Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CheckBox.h

00001 /*
00002   File: CheckBox.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef CHECKBOX_H
00007 #define CHECKBOX_H
00008 
00009 #include<Widget.h>
00010 
00011 #include<string>
00012 
00026 class CheckBox : public Widget
00027 {
00028     DYNAMIC_OBJECT;
00029 public:
00031     CheckBox();
00032 
00034     bool isChecked() {
00035       return checked;
00036     }
00037 
00039     void setCheck(bool ch) {
00040       checked = ch;
00041     }
00042 
00043     // Inherited from Region
00044     void refresh();
00045     bool handleEvent(Event &event); 
00046 
00047     // Inherited from DynamicObject
00048     void parseSymbol(Token &t, ObjectFile &file);
00049     void writeParams(ostream &stream);
00050 
00051 protected:
00056     typedef enum State {
00057         Idle,       
00058         Pressed,    
00059         Released    
00060     };
00061 
00062     // Inherited from DynamicObject
00063     void createSymbols();
00064 
00066     State state;
00067 
00069     bool checked;
00070 
00071 private:
00072     typedef Widget super;
00073 };
00074 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.