00001
00002
00003
00004
00005
00006 #ifndef WIDGET_H
00007 #define WIDGET_H
00008
00009 #include<Region.h>
00010
00011 #include<string>
00012
00032 class Widget : public Region
00033 {
00034 DYNAMIC_OBJECT;
00035 public:
00037 Widget(int i = 0);
00038
00040 void enable(bool e) {
00041 enabled = e;
00042 }
00044 bool isEnabled() {
00045 return enabled;
00046 }
00047
00048
00049 void parseSymbol(Token &t, ObjectFile &file);
00050 void writeParams(ostream &stream);
00051
00052 protected:
00054 void foreGround() {
00055 if (enabled) super::foreGround();
00056 else glColor3f(.3, .3, .3);
00057 }
00058
00060 void entryBackGround() {
00061 if (enabled) super::entryBackGround();
00062 else super::backGround();
00063 }
00064
00065
00066 void createSymbols();
00067
00069 bool enabled;
00070
00071 private:
00072 typedef Region super;
00073 };
00074 #endif