Declaration of the MessageWindow support functions, MessageWindow_Create(), MessageWindow_Destroy(), MessageWindow_ProcessMessage(), and MessageWindow_ToString(), as used in the HandlerChain Pattern. More...
Go to the source code of this file.
Macros | |
#define | __HANDLERCHAIN_WINDOW_H__ |
Functions | |
int | MessageWindow_Create (const char *title, int x, int y, int w, int h) |
Create a MessageWindow object with the given properties and return the ID of the object. | |
void | MessageWindow_Destroy (int windowId) |
Destroy the MessageWindow object with the given ID. Removes the window from any message handling as well. | |
bool | MessageWindow_ProcessMessage (int windowId, Message *message) |
Pass a Message object to a window for processing. | |
bool | MessageWindow_ToString (int windowId, DynamicString *output) |
Convert the specified window to a string representation. | |
Declaration of the MessageWindow support functions, MessageWindow_Create(), MessageWindow_Destroy(), MessageWindow_ProcessMessage(), and MessageWindow_ToString(), as used in the HandlerChain Pattern.
Definition in file HandlerChain_MessageWindow.h.
#define __HANDLERCHAIN_WINDOW_H__ |
Definition at line 10 of file HandlerChain_MessageWindow.h.
int MessageWindow_Create | ( | const char * | title, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Create a MessageWindow object with the given properties and return the ID of the object.
title | Title of the window. |
x | Horizontal position of the upper left corner of the window. |
y | Vertical position of the upper left corner of the window. |
w | Width of the window. |
h | Height of the window. |
Definition at line 318 of file HandlerChain_MessageWindow.c.
References _AppendWindowToList(), _Window::_closeBox, _nextWindowId, _Window::_title, _Window::_windowBox, _Window::_windowId, CLOSE_HEIGHT, CLOSE_WIDTH, HandlerChain_AddWindow(), WindowRectangle::Right, WindowRectangle::Top, and WindowRectangle_Initialize().
Referenced by _HandlerChain_ConstructWindowChain().
void MessageWindow_Destroy | ( | int | windowId | ) |
Destroy the MessageWindow object with the given ID. Removes the window from any message handling as well.
windowId | ID of the MessageWindow to destroy. |
Definition at line 354 of file HandlerChain_MessageWindow.c.
References _FindWindow(), and _RemoveWindowFromList().
Referenced by _HandleDestroyMessage().
bool MessageWindow_ProcessMessage | ( | int | windowId, |
Message * | message | ||
) |
Pass a Message object to a window for processing.
windowId | The ID of the window who will get the message. |
message | The Message object to process. |
Definition at line 367 of file HandlerChain_MessageWindow.c.
References _FindWindow(), _HandleButtonDownMessage(), _HandleButtonUpMessage(), _HandleCloseMessage(), _HandleDestroyMessage(), ButtonDown, ButtonUp, Close, Destroy, and Message::MessageType.
Referenced by HandlerChain_SendMessage().
bool MessageWindow_ToString | ( | int | windowId, |
DynamicString * | output | ||
) |
Convert the specified window to a string representation.
windowId | ID of the window to convert. |
output | A DynamicString that returns the string version of the window. Call DynamicString_Initialize() on this object before passing as an argument. |
Definition at line 409 of file HandlerChain_MessageWindow.c.
References _FindWindow(), _Window::_selected, _Window::_title, _Window::_windowBox, _Window::_windowId, DynamicString_Append(), DynamicString_Clear(), formatstring(), DynamicString::string, and WindowRectangle_ToString().
Referenced by HandlerChain_ToString().