- Timestamp:
- May 30, 2006, 11:34:38 PM (18 years ago)
- Location:
- branches/gui/src/lib/gui/gl_gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui_box.cc
r7779 r7997 23 23 * standard constructor 24 24 */ 25 GLGuiBox::GLGuiBox ( BoxType type)25 GLGuiBox::GLGuiBox (OrxGui::Orientation orientation) 26 26 { 27 27 this->init(); 28 28 29 this->set Type (type);29 this->setOrientation(orientation); 30 30 } 31 31 … … 47 47 void GLGuiBox::pack(GLGuiWidget* widget) 48 48 { 49 if (widget == NULL) 50 return; 49 assert (widget != NULL); 51 50 52 51 this->children.push_back(widget); … … 56 55 void GLGuiBox::unpack(GLGuiWidget* widget) 57 56 { 58 if (widget == NULL) 59 { 60 this->children.clear(); 61 } 62 else 63 { 64 this->children.remove(widget); 65 } 57 assert(widget == NULL); 58 59 this->children.remove(widget); 66 60 } 67 61 -
branches/gui/src/lib/gui/gl_gui/glgui_box.h
r7779 r7997 9 9 10 10 #include "glgui_container.h" 11 11 #include "glgui_defs.h" 12 12 13 13 namespace OrxGui 14 14 { 15 typedef enum16 {17 Box_H,18 Box_V,19 } BoxType;20 21 15 //! This is BOX part of the openglGUI class 22 16 /** … … 27 21 28 22 public: 29 GLGuiBox( BoxType type = Box_H);23 GLGuiBox(OrxGui::Orientation orientation = OrxGui::Horizontal); 30 24 virtual ~GLGuiBox(); 31 25 32 26 void init(); 33 void setType(BoxType type) { this->type = type; }; 27 /** @returns the Orientation of the Box */ 28 OrxGui::Orientation orientation() const { return this->_orientation; }; 29 void setOrientation(OrxGui::Orientation orientation) { this->_orientation = orientation; }; 34 30 35 31 virtual void pack(GLGuiWidget* widget); … … 41 37 42 38 private: 43 BoxType type; 39 virtual void resize(); 40 41 Orientation _orientation; 44 42 std::list<GLGuiWidget*> children; 45 43 }; -
branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.cc
r7985 r7997 52 52 } 53 53 54 void GLGuiCheckButton::setActivity(bool bActive) 55 { 56 this->bActive = bActive; 57 emit(this->toggled(this->bActive)); 58 } 54 59 55 60 void GLGuiCheckButton::toggleActiveState() 56 61 { 57 this-> bActive = !this->bActive;62 this->setActivity(!this->isActive()); 58 63 } 59 64 … … 70 75 void GLGuiCheckButton::releasing(const Vector2D& pos) 71 76 { 72 printf("%s released\n", this->getLabel().c_str());73 77 GLGuiButton::releasing(pos); 74 78 this->toggleActiveState(); -
branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.h
r7985 r7997 34 34 virtual void update() {}; 35 35 36 DeclareSignal1(toggled, bool); 37 36 38 protected: 37 39 virtual void resize();
Note: See TracChangeset
for help on using the changeset viewer.