GUI::EventsDispatcher Class ReferenceHandle events dispatching.
Inheritance diagram for GUI::EventsDispatcher:
List of all members.
Public Member Functions
|int ||startListen () throw (GuiException)|
| ||Start the message loop. |
|void ||registerController (WidgetController *controller_ptr)|
| ||Register a new controller object for event handling. |
Static Public Member Functions
|static LRESULT CALLBACK ||WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)|
| ||Standard window procedure, called by the system. |
Handle events dispatching.
- From messages to events
- Event handling mecanism start from widget factory. When a widget factory was registered it create the Windows-Class using the static member EventsDispatcher::WindowProcedure for window procedure. In this way the system know to notify all messages at this static member.
- When a new widget is instantiated the relative factory create a widget controller and register this object in the EventsDispatcher using the method EventsDispatcher::registerController.
- When a Windows message is notified to the function EventsDispatcher::WindowProcedure the function search for a registered controller (using the window handle), if a controller is registered (all controller must be registered) the message was translated in an event. The message translation is delegated to the MessageTranslator class. When we have the event this was notified to the controller using the function WidgetController::eventNotify
- See also:
Member Function Documentation
Register a new controller object for event handling.
The relative widget factory register the controller after creation.
|controller_ptr ||pointer to the desired controller |
|| throw (GuiException)
Start the message loop.
This method start a message loop and exit only if an exception was throw or if the apllication terminate
- the application exit code
- See also:
|LRESULT CALLBACK GUI::EventsDispatcher::WindowProcedure
Standard window procedure, called by the system.
This callback is called by the system, if there is a widget controller registered for the corresponding handle the message was notified to the controller object.
The documentation for this class was generated from the following files:
Generated on Wed Nov 15 22:21:10 2006 for Win32 by