Mana
|
The focus handler. More...
#include <focushandler.h>
Public Member Functions | |
void | requestModalFocus (gcn::Widget *widget) override |
Sets modal focus to a widget. | |
void | releaseModalFocus (gcn::Widget *widget) override |
Releases modal focus of a widget. | |
void | remove (gcn::Widget *widget) override |
Removes a widget from the focus handler. | |
void | tabNext () override |
Overloaded to allow windows to move to the top when one of their widgets is tabbed to when tabbing through focusable elements. | |
void | tabPrevious () override |
Private Member Functions | |
void | checkForWindow () |
Checks to see if the widget tabbed to is in a window, and if it is, it requests the window be moved to the top. | |
Private Attributes | |
std::list< gcn::Widget * > | mModalStack |
Stack of widgets that have requested modal forcus. | |
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 33 of file focushandler.h.
|
private |
Checks to see if the widget tabbed to is in a window, and if it is, it requests the window be moved to the top.
Definition at line 80 of file focushandler.cpp.
|
override |
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 40 of file focushandler.cpp.
|
override |
Removes a widget from the focus handler.
Also makes sure no dangling pointers remain in modal focus stack.
Definition at line 59 of file focushandler.cpp.
|
override |
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 26 of file focushandler.cpp.
|
override |
Overloaded to allow windows to move to the top when one of their widgets is tabbed to when tabbing through focusable elements.
Definition at line 66 of file focushandler.cpp.
|
override |
Definition at line 73 of file focushandler.cpp.
|
private |
Stack of widgets that have requested modal forcus.
Definition at line 73 of file focushandler.h.