FocusHandler Class Reference

#include <focushandler.h>

List of all members.


Detailed Description

The focus handler.

This focus handler does exactly the same as the Guichan focus handler, but keeps a stack of modal widgets to be able to handle multiple modal focus requests.

Definition at line 34 of file focushandler.h.


Public Member Functions

void requestModalFocus (gcn::Widget *widget)
 Sets modal focus to a widget.
void releaseModalFocus (gcn::Widget *widget)
 Releases modal focus of a widget.
void remove (gcn::Widget *widget)
 Removes a widget from the focus handler.

Private Attributes

std::list< gcn::Widget * > mModalStack
 Stack of widgets that have requested modal forcus.

Member Function Documentation

void FocusHandler::requestModalFocus ( gcn::Widget *  widget  ) 

Sets modal focus to a widget.

When there is already a modal widget then that widget loses modal focus and will regain it after this widget releases his modal focus.

Definition at line 24 of file focushandler.cpp.

void FocusHandler::releaseModalFocus ( gcn::Widget *  widget  ) 

Releases modal focus of a widget.

When this widget had modal focus and there are other widgets that had also requested modal focus, then modal focus will be transfered to the last of those.

Definition at line 38 of file focushandler.cpp.

void FocusHandler::remove ( gcn::Widget *  widget  ) 

Removes a widget from the focus handler.

Also makes sure no dangling pointers remain in modal focus stack.

Definition at line 57 of file focushandler.cpp.


Member Data Documentation

std::list<gcn::Widget*> FocusHandler::mModalStack [private]

Stack of widgets that have requested modal forcus.

Definition at line 61 of file focushandler.h.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5