Planeshift
pawscheckbox.h
Go to the documentation of this file.
1 
19 #ifndef PAWS_CHECKBOX_HEADER
20 #define PAWS_CHECKBOX_HEADER
21 
22 
23 #include "pawsbutton.h"
24 
25 class pawsTextBox;
26 
48 class pawsCheckBox: public pawsWidget
49 {
50 public:
55  pawsCheckBox();
56 
57  pawsCheckBox(const pawsCheckBox &origin);
58 
63  virtual ~pawsCheckBox();
64 
71  virtual bool Setup(iDocumentNode* node);
72 
79  bool SelfPopulate(iDocumentNode* node);
80 
89  bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget* widget);
90 
97  virtual void SetState(bool state);
98 
107  virtual bool GetState();
108 
115  virtual void SetText(const char* string);
116 
121  virtual const char* GetText();
122 
130  virtual void OnUpdateData(const char* dataname,PAWSData &data);
131 
139  virtual void SetImages(const char* up, const char* down);
140 
148  virtual double GetProperty(MathEnvironment* env, const char* ptr);
149 
157  virtual void SetProperty(const char* ptr, double value);
158 
161  {
162  return checkBox;
163  }
164 
165 private:
166  pawsButton* checkBox;
167  pawsTextBox* text;
168  int textOffsetX;
169  int textOffsetY;
170 
171  csString checkBoxOff;
172  csString checkBoxOn;
173  csString checkBoxGrey;
174 
175  int checkBoxSize;
176 
177 };
179 
182 #endif
virtual void SetState(bool state)
Set whether the checkbox is "checked" or "unchecked".
virtual double GetProperty(MathEnvironment *env, const char *ptr)
Get the value of the specified property.
The main base widget that all other widgets should inherit from.
Definition: pawswidget.h:116
virtual const char * GetText()
Return the text contained within the checkbox.
A specific MathEnvironment to be used in a MathScript.
Definition: mathscript.h:188
A combination widget that has a check box and a text label.
Definition: pawscheckbox.h:48
virtual void SetProperty(const char *ptr, double value)
Set the value of the specified property.
CREATE_PAWS_FACTORY(pawsCheckBox)
virtual ~pawsCheckBox()
This function is not yet documented.
virtual void SetText(const char *string)
Set the text contained in the checkbox.
pawsButton * GetButton()
@@ Hack: please someone tell me how to do this better?
Definition: pawscheckbox.h:160
pawsCheckBox()
This function is not yet documented.
virtual bool GetState()
Return whether the checkbox is "checked" or "unchecked".
A simple button widget.
Definition: pawsbutton.h:43
virtual bool Setup(iDocumentNode *node)
This function is not yet documented.
virtual void OnUpdateData(const char *dataname, PAWSData &data)
This function is not yet documented.
bool OnButtonPressed(int mouseButton, int keyModifier, pawsWidget *widget)
This function is not yet documented.
virtual void SetImages(const char *up, const char *down)
This function is not yet documented.
A basic text box widget.
Definition: pawstextbox.h:42
bool SelfPopulate(iDocumentNode *node)
This function is not yet documented.