[Home] [Prev] [Next] [Up]
XGDispatch class
Receives dispatched messages
Usage:
#include <XEvent.h>
class XGDispatch;
Description
This is the class used to receive messages dispatched by the XGAppCore application core. Messages are received, and either processed or passed upwards.
NOTE: This requires a little work. Specifically I haven't tested constructing a window which is a child of an XDispatch object. I also need to figure out a clean way to handle creating views and windows through a different mechanism than the view factory mechanism.
Construction/Destruction
XGDispatch::XGDispatch(void)
This creates the specified dispatch object.
The parent of the dispatched object is set to the global internal variable gParent. If that is NULL, this is set to the root of the dispatch tree, or gDefault. If the root is NULL, I assume that this is the root XGAppCore object.
The current XGFocus object managing this class is set to my parent's object.
XGDispatch::~XGDispatch
Detach me. If the focus is set to me, this repoints the focus to the default focus associated with the XGFocus object.
Focus Management
XGDispatch *XGDispatch::SetFocus(void)
This is the public interface to setting the focus to another owner. This notifies the owner XGFocus object that this is the current focus, and calls the appropriate GainFocus and LoseFocus methods.
bool XGDispatch::HasFocus(void)
This returns true if this has the focus.
void XGDispatch::GainFocus(void)
This is called when this dispatch object gains the current focus
void XGDispatch::LoseFocus(void)
This is called when this dispatch object loses the current focus
Dispatch Messages
long XGDispatch::ReceiveDispatch(long msg, long arg, void *parg)
This method is called when this object should handle the specified message. If the message is handled, this should return a value. If the message is not handled, the derived class should call the parent's ReceiveDispatch methods.
This method calls the parent's ReceiveDispatch method.