#include <sdlmessageobject.h>
Inheritance diagram for SDLMessageObject
Public Methods | |
SDLMessageObject () | |
Creates a SDLMessageObject. More... | |
virtual | ~SDLMessageObject () |
Destroys a SDLMessageObject and removes it from the global object list. More... | |
void | EnableReceiver (bool enable) |
This function enables or disables receiving of SDL_Event messages. More... | |
SDLMessageObject* | SetCapture () |
Set a message capture for this object. More... | |
void | ReleaseCapture () |
Releases a previous capture. More... | |
SDLMessageObject* | SetInputFocus () |
void | ReleaseInputFocus () |
int | RunEventLoop (void* data) |
Run the modal message pump. More... | |
bool | IsEnabled () |
returns true when the object can receive messages or false if not. More... | |
bool | SendMessage (SDLMessageObject* target, MSG_TYPE type, MSG_ID id, MSG_DATA data) |
void | SetEventCallback (MSG_TYPE type, MSG_CALLBACK cbfunc, void *clientdata = NULL) |
SDL_Event | WaitEvent (Uint32 delay=0) |
Static Public Methods | |
int | PumpIntoEventQueue (const SDL_Event* event) |
Sends an event to the global message queue. More... | |
Protected Methods | |
virtual bool | eventActive (const SDL_ActiveEvent* active) |
Overridable Eventhandler for the SDL_ActiveEvent message. More... | |
virtual bool | eventKeyDown (const SDL_KeyboardEvent* key) |
Overridable Eventhandler for a SDL_KeyboardEvent message. More... | |
virtual bool | eventKeyUp (const SDL_KeyboardEvent* key) |
Overridable Eventhandler for a SDL_KeyboardEvent message. More... | |
virtual bool | eventMouseMotion (const SDL_MouseMotionEvent* motion) |
Overridable Eventhandler for a SDL_MouseMotionEvent message. More... | |
virtual bool | eventMouseButtonDown (const SDL_MouseButtonEvent* button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. More... | |
virtual bool | eventMouseButtonUp (const SDL_MouseButtonEvent* button) |
Overridable Eventhandler for a SDL_MouseButtonEvent message. More... | |
virtual bool | eventQuit (int id, SDLWidget* widget, unsigned long data) |
Overridable Eventhandler for a SDL_QuitEvent message. More... | |
virtual bool | eventSysWM (const SDL_SysWMEvent* syswm) |
Overridable Eventhandler for a SDL_SysWMEvent message. More... | |
virtual bool | eventMessage (MSG_MESSAGE* msg) |
Overridable Eventhandler for a SDL_SysUserEvent message. More... | |
virtual bool | eventButtonClick (int id, SDLWidget* widget) |
virtual bool | eventScrollPos (int id, SDLWidget* widget, unsigned long data) |
virtual bool | eventScrollTrack (int id, SDLWidget* widget, unsigned long data) |
virtual void | eventInputFocusLost (SDLMessageObject* newfocus) |
virtual void | eventIdle () |
virtual bool | AcceptEvent (const SDL_Event* event) |
Overridable message filter function. More... | |
virtual bool | ProcessEvent (const SDL_Event* event) |
Sends an event directly to an object. More... | |
Protected Attributes | |
bool | my_quitEventLoop |
Provides a message pump and global handlers for all other SDLMessageObject instances.
Definition at line 53 of file sdlmessageobject.h.
|
Creates a SDLMessageObject. An application must have a maximum of one SDLMessageObject. If you try to create more than one SDLMessageObject the constructor will exit your application with an console error message. |
|
Destroys a SDLMessageObject 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 SDLWidget. |
|
This function enables or disables receiving of SDL_Event messages.
|
|
returns true when the object can receive messages or false if not.
|
|
Sends an event directly to an object.
Reimplemented in SDLWidget. |
|
Sends an event to the global message queue.
|
|
Releases a previous capture.
|
|
|
|
Run the modal message pump. This function will exit when the main window was closed. |
|
|
|
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. |
|
|
|
|
|
|
|
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 SDLButtonGroup, SDLCheckButton, SDLRadioButton, SDLScrollBar, and SDLWindow. |
|
|
|
Reimplemented in SDLLineEdit. |
|
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 SDLLineEdit. |
|
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 SDLApplication. |
|
Overridable Eventhandler for a SDL_SysUserEvent message. The default implementation returns 'false' which indicates that this message is not processed by this object.
|
|
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 SDLUserButton, SDLLineEdit, SDLListBox, SDLScrollBar::ScrollButton, SDLScrollBar, SDLWidgetDnD, and SDLWindow. |
|
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 SDLUserButton, SDLCheckButton, SDLListBox, SDLListBoxBaseItem, SDLRadioButton, SDLScrollBar::ScrollButton, SDLScrollBar, SDLSlider, SDLWidgetDnD, and SDLWindow. |
|
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 SDLListBox, SDLScrollBar::ScrollButton, SDLScrollBar, SDLWidgetDnD, and SDLWindow. |
|
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 SDLApplication. |
|
Reimplemented in SDLWidgetList. |
|
Reimplemented in SDLWidgetList. |
|
Overridable Eventhandler for a SDL_SysWMEvent message. The default implementation returns 'false' which indicates that this message is not processed by this object.
|
|
Definition at line 255 of file sdlmessageobject.h. |