Changeset 9369 in orxonox.OLD for branches/proxy/src/lib
- Timestamp:
- Jul 20, 2006, 9:16:39 PM (18 years ago)
- Location:
- branches/proxy/src/lib
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/Makefile.am
r8367 r9369 31 31 collision_detection \ 32 32 collision_reaction \ 33 gui \ 33 34 network \ 34 35 parser \ 35 36 shell \ 36 script_engine \ 37 gui 37 script_engine -
branches/proxy/src/lib/gui/gl/glgui_button.cc
r8769 r9369 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 } -
branches/proxy/src/lib/gui/gl/glgui_button.h
r8717 r9369 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 -
branches/proxy/src/lib/gui/gl/glgui_checkbutton.cc
r8717 r9369 55 55 { 56 56 this->bActive = bActive; 57 emit(this->toggled(this->bActive));57 this->toggled.emit(this->bActive); 58 58 } 59 59 -
branches/proxy/src/lib/gui/gl/glgui_checkbutton.h
r8717 r9369 34 34 virtual void update() {}; 35 35 36 DeclareSignal1(toggled, bool);36 sigslot::signal1<bool> toggled; 37 37 38 38 protected: -
branches/proxy/src/lib/gui/gl/glgui_image.h
r8448 r9369 34 34 virtual void draw() const; 35 35 36 DeclareSignal0(imageChanged);36 sigslot::signal0<> imageChanged; 37 37 38 38 protected: -
branches/proxy/src/lib/gui/gl/glgui_inputline.cc
r8717 r9369 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(); -
branches/proxy/src/lib/gui/gl/glgui_inputline.h
r8619 r9369 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: -
branches/proxy/src/lib/gui/gl/glgui_slider.cc
r8717 r9369 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()) -
branches/proxy/src/lib/gui/gl/glgui_slider.h
r8717 r9369 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: -
branches/proxy/src/lib/gui/gl/glgui_text.cc
r8991 r9369 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 -
branches/proxy/src/lib/gui/gl/glgui_text.h
r8991 r9369 40 40 virtual void draw() const; 41 41 42 DeclareSignal1(textChanged, const std::string&);42 sigslot::signal1<const std::string&> textChanged; 43 43 44 44 protected: -
branches/proxy/src/lib/gui/gl/glgui_textfield.cc
r9015 r9369 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 -
branches/proxy/src/lib/gui/gl/glgui_textfield.h
r9015 r9369 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: -
branches/proxy/src/lib/gui/gl/glgui_widget.cc
r9019 r9369 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() -
branches/proxy/src/lib/gui/gl/glgui_widget.h
r8990 r9369 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; }; -
branches/proxy/src/lib/gui/gl/signal_connector.h
r8145 r9369 12 12 { 13 13 14 14 //////////////// TO BE IGNORED BY YOU ///// 15 15 #define DeclareSignalBegin(SignalName) \ 16 16 public: \ -
branches/proxy/src/lib/util/sigslot/signal.h
r9368 r9369 1238 1238 virtual _connection_base0<mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) 1239 1239 { 1240 return new _connection0<dest_type, mt_policy>( (dest_type *)pnewdest, m_pmemfun);1240 return new _connection0<dest_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1241 1241 } 1242 1242 … … 1279 1279 virtual _connection_base1<arg1_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) 1280 1280 { 1281 return new _connection1<dest_type, arg1_type, mt_policy>( (dest_type *)pnewdest, m_pmemfun);1281 return new _connection1<dest_type, arg1_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1282 1282 } 1283 1283 … … 1321 1321 virtual _connection_base2<arg1_type, arg2_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) 1322 1322 { 1323 return new _connection2<dest_type, arg1_type, arg2_type, mt_policy>( (dest_type *)pnewdest, m_pmemfun);1323 return new _connection2<dest_type, arg1_type, arg2_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1324 1324 } 1325 1325 … … 1363 1363 virtual _connection_base3<arg1_type, arg2_type, arg3_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) 1364 1364 { 1365 return new _connection3<dest_type, arg1_type, arg2_type, arg3_type, mt_policy>( (dest_type *)pnewdest, m_pmemfun);1365 return new _connection3<dest_type, arg1_type, arg2_type, arg3_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1366 1366 } 1367 1367 … … 1407 1407 virtual _connection_base4<arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest) 1408 1408 { 1409 return new _connection4<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>( (dest_type *)pnewdest, m_pmemfun);1409 return new _connection4<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1410 1410 } 1411 1411 … … 1457 1457 { 1458 1458 return new _connection5<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, 1459 arg5_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);1459 arg5_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1460 1460 } 1461 1461 … … 1507 1507 { 1508 1508 return new _connection6<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, 1509 arg5_type, arg6_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);1509 arg5_type, arg6_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1510 1510 } 1511 1511 … … 1557 1557 { 1558 1558 return new _connection7<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, 1559 arg5_type, arg6_type, arg7_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);1559 arg5_type, arg6_type, arg7_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1560 1560 } 1561 1561 … … 1609 1609 { 1610 1610 return new _connection8<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, 1611 arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);1611 arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun); 1612 1612 } 1613 1613 -
branches/proxy/src/lib/util/sigslot/slot.h
r9361 r9369 240 240 241 241 template<class mt_policy = SIGSLOT_DEFAULT_MT_POLICY> 242 class has_slots : public mt_policy242 class has_slots //: public mt_policy 243 243 { 244 244 private: … … 253 253 254 254 has_slots(const has_slots& hs) 255 : mt_policy(hs)256 { 257 lock_block<mt_policy> lock(this);255 // : mt_policy(hs) 256 { 257 //lock_block<mt_policy> lock(this); 258 258 const_iterator it = hs.m_senders.begin(); 259 259 const_iterator itEnd = hs.m_senders.end(); … … 269 269 void signal_connect(_signal_base<mt_policy>* sender) 270 270 { 271 lock_block<mt_policy> lock(this);271 //lock_block<mt_policy> lock(this); 272 272 m_senders.insert(sender); 273 273 } … … 275 275 void signal_disconnect(_signal_base<mt_policy>* sender) 276 276 { 277 lock_block<mt_policy> lock(this);277 //lock_block<mt_policy> lock(this); 278 278 m_senders.erase(sender); 279 279 } … … 286 286 void disconnect_all() 287 287 { 288 lock_block<mt_policy> lock(this);288 //lock_block<mt_policy> lock(this); 289 289 const_iterator it = m_senders.begin(); 290 290 const_iterator itEnd = m_senders.end();
Note: See TracChangeset
for help on using the changeset viewer.