Changeset 9406 in orxonox.OLD for trunk/src/lib/gui/gl
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- Location:
- trunk/src/lib/gui/gl
- Files:
-
- 2 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl/Makefile.am
r8973 r9406 13 13 \ 14 14 glgui_handler.cc \ 15 signal_connector.cc \16 15 glgui_mainwidget.cc \ 17 16 glgui_widget.cc \ … … 38 37 glmenu/glmenu_imagescreen.h \ 39 38 \ 40 signal_connector.h \41 39 glgui.h \ 42 40 glgui_defs.h \ -
trunk/src/lib/gui/gl/glgui_button.cc
r8769 r9406 79 79 { 80 80 GLGuiWidget::clicking(pos); 81 emit(clicked());81 clicked.emit(); 82 82 } 83 83 void GLGuiButton::releasing(const Vector2D& pos, bool focused) 84 84 { 85 85 GLGuiWidget::releasing(pos, focused); 86 emit(released());86 released.emit(); 87 87 } 88 88 … … 103 103 { 104 104 if (event.bPressed) 105 emit(pushed());105 clicked.emit(); 106 106 else 107 emit(released());107 released.emit(); 108 108 return true; 109 109 } -
trunk/src/lib/gui/gl/glgui_button.h
r8717 r9406 42 42 virtual bool processEvent(const Event& event); 43 43 44 DeclareSignal0(clicked);45 DeclareSignal0(released);44 sigslot::signal0<> clicked; 45 sigslot::signal0<> released; 46 46 47 47 -
trunk/src/lib/gui/gl/glgui_checkbutton.cc
r8717 r9406 55 55 { 56 56 this->bActive = bActive; 57 emit(this->toggled(this->bActive));57 this->toggled.emit(this->bActive); 58 58 } 59 59 -
trunk/src/lib/gui/gl/glgui_checkbutton.h
r8717 r9406 34 34 virtual void update() {}; 35 35 36 DeclareSignal1(toggled, bool);36 sigslot::signal1<bool> toggled; 37 37 38 38 protected: -
trunk/src/lib/gui/gl/glgui_frame.cc
r8145 r9406 57 57 else 58 58 { 59 PRINTF(2)("Frame %s is already filled, not filling with %s\n", this->get Name(), widget->getName());59 PRINTF(2)("Frame %s is already filled, not filling with %s\n", this->getCName(), widget->getCName()); 60 60 } 61 61 } -
trunk/src/lib/gui/gl/glgui_image.h
r8448 r9406 34 34 virtual void draw() const; 35 35 36 DeclareSignal0(imageChanged);36 sigslot::signal0<> imageChanged; 37 37 38 38 protected: -
trunk/src/lib/gui/gl/glgui_inputline.cc
r8717 r9406 124 124 this->resize(); 125 125 this->setFrontColor(Color(1,1,1,1), true); 126 emit(this->textChanged(this->_text.text()));126 this->textChanged.emit(this->_text.text()); 127 127 } 128 128 … … 146 146 void GLGuiInputLine::pushEnter() 147 147 { 148 emit(this->enterPushed(this->_text.text()));148 this->enterPushed.emit(this->_text.text()); 149 149 if (this->_clearOnEnter) 150 150 this->clear(); -
trunk/src/lib/gui/gl/glgui_inputline.h
r8619 r9406 49 49 virtual bool processEvent(const Event& event); 50 50 51 DeclareSignal1(textChanged, const std::string&);52 DeclareSignal1(enterPushed, const std::string&);51 sigslot::signal1<const std::string&> textChanged; 52 sigslot::signal1<const std::string&> enterPushed; 53 53 54 54 protected: -
trunk/src/lib/gui/gl/glgui_slider.cc
r8717 r9406 77 77 this->_handle.setCenter(this->sliderPosition(), borderTop() + (this->getSizeY2D() - borderTop() - borderBottom()) / 2.0); 78 78 79 emit(valueChanged(this->_value));79 valueChanged.emit(this->_value); 80 80 } 81 81 … … 90 90 { 91 91 this->_minValue = minimum; 92 emit(rangeChanged(this->_minValue, this->_maxValue));92 rangeChanged.emit(this->_minValue, this->_maxValue); 93 93 } 94 94 if (this->value() < this->min()) … … 107 107 { 108 108 this->_maxValue = maximum; 109 emit(rangeChanged(this->_minValue, this->_maxValue));109 rangeChanged.emit(this->_minValue, this->_maxValue); 110 110 } 111 111 if (this->value() > this->max()) … … 126 126 this->_minValue = minimum; 127 127 this->_maxValue = maximum; 128 emit(rangeChanged(this->_minValue, this->_maxValue));128 rangeChanged.emit(this->_minValue, this->_maxValue); 129 129 } 130 130 if (this->value() < this->min()) -
trunk/src/lib/gui/gl/glgui_slider.h
r8717 r9406 51 51 virtual void draw() const; 52 52 53 DeclareSignal1(valueChanged, float);54 DeclareSignal2(rangeChanged, float, float);53 sigslot::signal1<float> valueChanged; 54 sigslot::signal2<float, float> rangeChanged; 55 55 56 56 protected: -
trunk/src/lib/gui/gl/glgui_text.cc
r8991 r9406 113 113 this->resize(); 114 114 this->setFrontColor(_changedTextColor, true); 115 emit(this->textChanged(this->_text.text()));115 this->textChanged.emit(this->_text.text()); 116 116 } 117 117 -
trunk/src/lib/gui/gl/glgui_text.h
r8991 r9406 33 33 void setChangedTextColor(const Color& color); 34 34 35 void setLineWidth(float lineWidth) { this->_text.setLineWidth(lineWidth); }; 35 36 void setDotsPosition(LimitedWidthText::DotsPosition dotsPosition) { this->_text.setDotsPosition(dotsPosition); }; 36 37 … … 40 41 virtual void draw() const; 41 42 42 DeclareSignal1(textChanged, const std::string&);43 sigslot::signal1<const std::string&> textChanged; 43 44 44 45 protected: -
trunk/src/lib/gui/gl/glgui_textfield.cc
r9015 r9406 112 112 this->resize(); 113 113 this->setFrontColor(_changedTextColor, true); 114 emit(this->textChanged(this->_text.text()));114 this->textChanged.emit(this->_text.text()); 115 115 } 116 116 -
trunk/src/lib/gui/gl/glgui_textfield.h
r9015 r9406 38 38 virtual void draw() const; 39 39 40 DeclareSignal1(textChanged, const std::string&);40 sigslot::signal1<const std::string&> textChanged; 41 41 42 42 protected: -
trunk/src/lib/gui/gl/glgui_widget.cc
r9019 r9406 288 288 this->setWidgetSize(Vector2D(x, y)); 289 289 } 290 291 292 293 void GLGuiWidget::connect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver, Slot executor)294 {295 sender->connect(signal, receiver, executor);296 }297 298 void GLGuiWidget::connect(Signal& signal, BaseObject* receiver, Slot executor)299 {300 signal.push_back(SignalConnector(receiver, executor));301 }302 303 290 304 291 void GLGuiWidget::show() … … 806 793 //this->_currentStyle = this->_style[state]; 807 794 this->_state = state; 808 PRINTF(4)("%s::%s Switches to state %s\n", this->getClass Name(), this->getName(), OrxGui::StateString[state].c_str());795 PRINTF(4)("%s::%s Switches to state %s\n", this->getClassCName(), this->getCName(), OrxGui::StateString[state].c_str()); 809 796 810 797 this->animateBack(); … … 874 861 void GLGuiWidget::debug(unsigned int level) const 875 862 { 876 PRINT(0)("Debug of %s::%s - WidgetPart ", this->getClass Name(), this->getName());863 PRINT(0)("Debug of %s::%s - WidgetPart ", this->getClassCName(), this->getCName()); 877 864 if (_parent != NULL) 878 PRINT(0)("- Parent %s::%s ", _parent->getClass Name(), _parent->getName());865 PRINT(0)("- Parent %s::%s ", _parent->getClassCName(), _parent->getCName()); 879 866 PRINT(0)("- State: %s", StateString[_state].c_str()); 880 867 -
trunk/src/lib/gui/gl/glgui_widget.h
r8990 r9406 17 17 18 18 #include "event.h" 19 #include "sig nal_connector.h"19 #include "sigslot/signal.h" 20 20 21 21 namespace OrxGui … … 70 70 void release(const Vector2D& pos); 71 71 bool clickable() const { return this->_clickable; }; 72 73 static void connect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver, Slot executor);74 void connect(Signal& signal, BaseObject* receiver, Slot executor);75 76 void disconnect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver);77 72 78 73 OrxGui::State state() const { return this->_state; }; -
trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc
r8316 r9406 27 27 CREATE_FACTORY(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN); 28 28 29 using namespace std; 29 30 30 /** 31 31 * @param root The Element to load the GLMenu from
Note: See TracChangeset
for help on using the changeset viewer.