class XGFocus

Declared in <XEvent.h>

This is the object which provides focus support for a collection of dispatch objects.

Okay, here's the deal. If you have multiple windows up, each window can have it's own focus. Further, there is a "focus" when no window is present. The way I deal with this is to make each window and/or the application object itself contain a pointer to the current focus. The focus that is then used is found by the application by testing to see which is the frontmost window.

As this is assumed to be associated with the frontmost window or application, each focus object is it's own default focus.


Construction/Destruction

XGFocus::XGFocus
XGFocus::~XGFocus

Focus Manipulation

XGFocus::GetFocus
XGFocus::SendDispatch


Construction/Destruction

XGFocus::XGFocus

Usage: XGError::~XGError()

Construct this object with itself as the current focus.

XGFocus::~XGFocus

Usage: XGFocus::~XGFocus()

Delete this object.

Focus Manipulation

XGFocus::GetFocus

Usage: XGDispatch*GetFocus()

This returns the current keyboard focus being tracked by this focus object. Note that the application and each window tracks a different "focus", but only one--the one in the frontmost window or in the application if no windows exist is used as the actual keyboard focus.

XGFocus::SendDispatch

Usage: long XGFocus::SendDispatch(long msg,long arg,void*parg)

Send dispatch message to the current focus.