Provides a message pump and global handlers for all other PG_MessageObject instances.
Public Member Functions | |
PG_MessageObject () | |
Creates a PG_MessageObject. | |
virtual | ~PG_MessageObject () |
Destroys a PG_MessageObject and removes it from the global object list. | |
void | EnableReceiver (bool enable) |
This function enables or disables receiving of SDL_Event messages. | |
PG_MessageObject * | SetCapture () |
Set a message capture for this object. | |
void | ReleaseCapture () |
Releases a previous capture. | |
PG_MessageObject * | GetCapture () |
Return the current capture object. | |
PG_MessageObject * | SetInputFocus () |
Set an inputfocus for this object. | |
void | ReleaseInputFocus () |
Release the inputfocus. | |
bool | IsEnabled () |
Check if the object can receive messages. | |
void | TranslateNumpadKeys (SDL_KeyboardEvent *key) |
Translates numeric keypad keys into other keys in dependency of NUM_LOCK state. | |
virtual bool | ProcessEvent (const SDL_Event *event) |
Sends an event directly to an object. | |
Static Public Member Functions | |
bool | PumpIntoEventQueue (const SDL_Event *event) |
Sends an event to the global message queue. | |
SDL_Event | WaitEvent (Uint32 delay=0) |
Public Attributes | |
SignalAppIdle | sigAppIdle |
Protected Member Functions | |
virtual bool | eventActive (const SDL_ActiveEvent *active) |
Overridable Eventhandler for the SDL_ActiveEvent message. | |
virtual bool | eventKeyDown (const SDL_KeyboardEvent *key) |
Overridable Eventhandler for a SDL_KeyboardEvent message. | |
virtual bool | eventKeyUp (const SDL_KeyboardEvent *key) |
Overridable Eventhandler for a SDL_KeyboardEvent message. | |
virtual bool | eventMouseMotion (const SDL_MouseMotionEvent *motion) |
Overridable Eventhandler for a SDL_MouseMotionEvent message. | |
virtual bool | eventMouseButtonDown (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
virtual bool | eventMouseButtonUp (const SDL_MouseButtonEvent *button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. | |
virtual bool | eventQuit (int id, PG_MessageObject *widget, unsigned long data) |
Overridable Eventhandler for a SDL_QuitEvent message. | |
virtual bool | eventQuitModal (int id, PG_MessageObject *widget, unsigned long data) |
Overridable Eventhandler for a MSG_QUITMODAL message. | |
virtual bool | eventSysWM (const SDL_SysWMEvent *syswm) |
Overridable Eventhandler for a SDL_SysWMEvent message. | |
virtual bool | eventResize (const SDL_ResizeEvent *event) |
Overridable Eventhandler for a SDL_ResizeEvent message. | |
virtual void | eventInputFocusLost (PG_MessageObject *newfocus) |
virtual void | eventIdle () |
virtual bool | AcceptEvent (const SDL_Event *event) |
Overridable message filter function. | |
Static Protected Attributes | |
bool | my_quitEventLoop |
vector< PG_MessageObject * > | objectList |
PG_MessageObject * | captureObject |
Friends | |
class | PG_Application |
|
Creates a PG_MessageObject.
|
|
Destroys a PG_MessageObject and removes it from the global object list.
|
|
Overridable message filter function. Derivated classes can filter special events. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Widget. |
|
This function enables or disables receiving of SDL_Event messages.
|
|
Overridable Eventhandler for the SDL_ActiveEvent message. The default implementation returns 'false' which indicates that this message is not processed by this object.
|
|
|
|
Reimplemented in PG_LineEdit. |
|
Overridable Eventhandler for a SDL_KeyboardEvent message. This handler is called when a key changed it's state from unpressed to pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Application, PG_LineEdit, and PG_PopupMenu. |
|
Overridable Eventhandler for a SDL_KeyboardEvent message. This handler is called when a key changed it's state from pressed to unpressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Application. |
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Button, PG_ListBox, PG_MaskEdit, PG_PopupMenu, PG_ScrollBar, PG_WidgetDnD, and PG_Window. |
|
Overridable Eventhandler for a SDL_MouseButtonEvent message. This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Button, PG_CheckButton, PG_LineEdit, PG_ListBox, PG_ListBoxBaseItem, PG_PopupMenu, PG_RadioButton, PG_ScrollBar, PG_Slider, PG_WidgetDnD, and PG_Window. |
|
Overridable Eventhandler for a SDL_MouseMotionEvent message. This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_ListBox, PG_PopupMenu, PG_ScrollBar, PG_WidgetDnD, and PG_Window. |
|
Overridable Eventhandler for a SDL_QuitEvent message. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Application. |
|
Overridable Eventhandler for a MSG_QUITMODAL message. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Widget. |
|
Overridable Eventhandler for a SDL_ResizeEvent message. The default implementation returns 'false' which indicates that this message is not processed by this object.
Reimplemented in PG_Application. |
|
Overridable Eventhandler for a SDL_SysWMEvent message. The default implementation returns 'false' which indicates that this message is not processed by this object.
|
|
Return the current capture object.
|
|
Check if the object can receive messages.
|
|
Sends an event directly to an object.
|
|
Sends an event to the global message queue.
|
|
Releases a previous capture.
|
|
Release the inputfocus.
|
|
Set a message capture for this object. This object will receive all SDL_Event messages regardless if it is able to process them or not. |
|
Set an inputfocus for this object.
|
|
Translates numeric keypad keys into other keys in dependency of NUM_LOCK state. Should be called in eventKeyDown() for proper numeric keypad behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
|