## class XGDispatch

> Declared in <XEvent.h>

> This is the universal receiver; this is the thing which receives all messages that are broadcast, sent or dispatched through the current focus

Construction/Destruction

> XGDispatch::XGDispatch
> XGDispatch::~XGDispatch

Initialization Support

> XGDispatch::GetCTorDispatch
> XGDispatch::SetCTorDispatch
> XGDispatch::SetDispatchParent
> XGDispatch::SetFocusDispatch

Focus Manipulation

> XGDispatch::CanGainFocus
> XGDispatch::CanLoseFocus
> XGDispatch::GainFocus
> XGDispatch::HasFocus
> XGDispatch::LoseFocus
> XGDispatch::SetFocus

Message dispatch

> XGDispatch::DoDispatch

Construction/Destruction

XGDispatch::XGDispatch

> Usage: XGDispatch::XGDispatch(bool root)

> Construct me. This constructs my dispatch object by constructing me with the last constructed object as my parent.

XGDispatch::~XGDispatch

> Usage: XGDispatch::~XGDispatch()

> If I have the focus, clear it

Initialization Support

XGDispatch::GetCTorDispatch

> Usage: static XGDispatch*GetCTorDispatch()

> This returns the current dispatch object that will be used as the parent for the next constructed XGDispatch object.

XGDispatch::SetCTorDispatch

> Usage: static void SetCTorDispatch(XGDispatch*d)

> This sets the dispatch object that will be used as the parent for the next constructed XGDispatch object.

XGDispatch::SetDispatchParent

> Usage: void SetDispatchParent(XGDispatch*p)

> This sets the parent of this dispatch object ot the parent object provided..

XGDispatch::SetFocusDispatch

> Usage: void SetFocusDispatch(XGFocus*f)

> This sets the current focus object which owns this dispatch object.

Focus Manipulation

XGDispatch::CanGainFocus

> Usage: bool XGDispatch::CanGainFocus()

> Can I gain focus? Default true

XGDispatch::CanLoseFocus

> Usage: bool XGDispatch::CanLoseFocus()

> Can i lose focus? Default true

XGDispatch::GainFocus

> Usage: void XGDispatch::GainFocus()

> Called right after I gain focus. Default does nothing

XGDispatch::HasFocus

> Usage: bool XGDispatch::HasFocus()

> Do I have focus?

XGDispatch::LoseFocus

> Usage: void XGDispatch::LoseFocus()

> Called right before I lose focus. Default does nothing

XGDispatch::SetFocus

> Usage: bool XGDispatch::SetFocus()

> Set the current focus

Message dispatch

XGDispatch::DoDispatch

> Usage: long XGDispatch::DoDispatch(long msg,long arg,void*parg,bool par)

> Do dispatch of message. This scans the various dispatch tables to determine what's going on