00001
00002
00003
00004
00005
00008
00009 #define _BUTTON_H_
00012 #include <stdio.h>
00013 #include "types.h"
00014 #include "surface.h"
00017
00018
00019
00022
00023 #define guidBUTTON (Abutton::CI.guid)
00024
00027
00028 class Abutton : public Asurface
00029 {
00030 public:
00031 enum
00032 {
00033 btCAPTION=1,
00034 btBITMAP=2,
00035 bt2STATES=4
00036 };
00037
00038 enum
00039 {
00040 btCHECK=8,
00041 };
00042
00043 ALIBOBJ
00044
00045
00046 ADLL Abutton (char *name, Aobject *L, int x, int y, int def=btCHECK);
00047 ADLL Abutton (char *name, Aobject *L, int x, int y, int w, int h, char *caption=NULL, int type=btCAPTION);
00048 ADLL Abutton (char *name, Aobject *L, int x, int y, int w, int h, Aresobj *o, int type=btBITMAP);
00049 ADLL virtual ~Abutton ();
00050
00051 ADLL virtual bool mouse (int x, int y, int state, int event);
00052
00053 ADLL virtual void setCaption (char *caption);
00054 ADLL virtual char * getCaption () { return caption; }
00055
00056 virtual bool isChecked () { return checked; }
00057 ADLL virtual void setChecked (bool c);
00058
00059 dword colorBACKNORMAL;
00060 dword colorBACKOVER;
00061 dword colorBACKDOWN;
00062 dword colorBACKCHECK;
00063 dword colorFORENORMAL;
00064 dword colorFOREOVER;
00065 dword colorFOREDOWN;
00066 dword colorFORECHECK;
00067
00068 protected:
00069 int type;
00070 bool checked;
00071 char *caption;
00072 Abitmap *bmp1;
00073 };
00074
00077 #endif //_TITLEBAR_H_