- Timestamp:
- May 30, 2006, 10:13:29 AM (18 years ago)
- Location:
- branches/gui/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui_widget.h
r7943 r7971 122 122 DeclareSignal(testSignal, ()); 123 123 124 static void connect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver, Slot executor); 125 void connect(Signal& signal, BaseObject* receiver, Slot executor); 124 126 127 void disconnect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver); 125 128 126 129 protected: -
branches/gui/src/lib/gui/gl_gui/signal_connector.h
r7919 r7971 11 11 namespace OrxGui 12 12 { 13 /** 14 * @brief declares a new Signal. 15 * @param SignalName the Name of the Signal. 16 * @param params the Parameters to be taken 17 */ 18 #define DeclareSignal(SignalName, params) \ 19 public: \ 20 void signal_ ## connect ## SignalName(const SignalConnector& connector) { \ 21 SignalName ## connected.push_back(connector); \ 22 }\ 23 Signal& getSignalVector_##SignalName () { return this->SignalName ## connected; }; \ 24 private: \ 25 void SignalName params { \ 26 for (unsigned int i = 0; i < SignalName ## connected .size(); i++) \ 27 SignalName ## connected[i] ("TEST"); \ 28 }\ 29 Signal SignalName ## connected 13 30 14 #define DeclareSignal(name, params) \ 15 public: \ 16 void signal_ ##connect ##name(const SignalConnector& connector) { \ 17 name ## connected.push_back(connector); \ 18 }\ 19 private: \ 20 void signal_ ## name params { \ 21 for (unsigned int i = 0; i < name ## connected . size(); i++) \ 22 name ## connected[i] ("TEST"); \ 23 }\ 24 std::vector<SignalConnector> name ## connected 31 /** 32 * @brief selects a Signal. 33 * @param SignalName the Signal to be retrieved. 34 */ 35 #define SIGNAL(SignalName) \ 36 getSignalVector_##SignalName() 37 38 #define SLOT(Class, function) \ 39 createExecutor<Class>(&Class::function) 25 40 26 41 //! A class for Conncting Signals to Objects, inside of the GUI … … 45 60 const Executor* exec; //!< The Executor, that will be called, on object. 46 61 }; 62 63 typedef std::vector<SignalConnector> Signal; 64 typedef Executor* Slot; 65 47 66 } 48 67 #endif /* _SIGNAL_CONNECTOR_H */ -
branches/gui/src/lib/math/vector.h
r7939 r7971 96 96 inline void slerpTo(const Vector& toVec, float t) { *this + (toVec - *this) * t; }; 97 97 98 /** @returns a Null Vector */ 99 inline static const Vector& nullVector() { static Vector nullVector; return nullVector; } 98 100 void debug() const; 99 101 -
branches/gui/src/story_entities/simple_game_menu.cc
r7939 r7971 93 93 rdnpb->show(); 94 94 rdnpb->setAbsCoor2D(200, 180); 95 rdnpb->connectSignal(OrxGui::Signal_release, this, createExecutor<SimpleGameMenu>(&SimpleGameMenu::quitMenu));95 rdnpb->connectSignal(OrxGui::Signal_release, this, SLOT(SimpleGameMenu, quitMenu)); 96 96 97 97 OrxGui::GLGuiInputLine* input = new OrxGui::GLGuiInputLine();
Note: See TracChangeset
for help on using the changeset viewer.