#include <focushandler.h>
Used to keep track of widget focus. You will probably not have to use the FocusHandler directly to handle focus. Widget has functions for handling focus which uses a FocusHandler. Use them instead.
- See also
- Widget::hasFocus
-
Widget::requestFocus
-
Widget::setFocusable
-
Widget::isFocusable
-
Widget::gotFocus
-
Widget::lostFocus
◆ WidgetIterator
◆ WidgetVector
◆ FocusHandler()
gcn::FocusHandler::FocusHandler |
( |
| ) |
|
◆ ~FocusHandler()
virtual gcn::FocusHandler::~FocusHandler |
( |
| ) |
|
|
inlinevirtual |
◆ add()
◆ applyChanges()
void gcn::FocusHandler::applyChanges |
( |
| ) |
|
|
virtual |
◆ checkHotKey()
void gcn::FocusHandler::checkHotKey |
( |
const KeyInput & |
keyInput | ) |
|
|
virtual |
Check if a hot key was pressed.
◆ dragNone()
void gcn::FocusHandler::dragNone |
( |
| ) |
|
|
virtual |
◆ focusNext()
void gcn::FocusHandler::focusNext |
( |
| ) |
|
|
virtual |
Focuses the next Widget. If no Widget has focus the first Widget gets focus. The order in which the Widgets are focused depends on the order you add them to the GUI.
◆ focusNone()
void gcn::FocusHandler::focusNone |
( |
| ) |
|
|
virtual |
◆ focusPrevious()
void gcn::FocusHandler::focusPrevious |
( |
| ) |
|
|
virtual |
Focuses the previous Widget. If no Widget has focus the first Widget gets focus. The order in which the widgets are focused depends on the order you add them to the GUI.
◆ getDragged()
Widget * gcn::FocusHandler::getDragged |
( |
| ) |
const |
|
virtual |
Gets the widget that is dragged.
- Returns
- the widget that is dragged. NULL will be returned if no Widget is dragged.
◆ getFocused()
Widget * gcn::FocusHandler::getFocused |
( |
| ) |
const |
|
virtual |
Gets the Widget with focus.
- Returns
- the Widget with focus. NULL will be returned if no Widget has focus.
◆ getModalFocused()
Widget * gcn::FocusHandler::getModalFocused |
( |
| ) |
const |
|
virtual |
Gets the Widget with modal focus.
- Returns
- the Widget with modal focus. NULL will be returned if no Widget has modal focus.
◆ hasFocus()
bool gcn::FocusHandler::hasFocus |
( |
const Widget * |
widget | ) |
const |
|
virtual |
Checks if a Widget has focus.
- Parameters
-
widget | widget to check if it has focus.. |
- Returns
- true if the widget has focus.
◆ isDragged()
bool gcn::FocusHandler::isDragged |
( |
const Widget * |
widget | ) |
const |
|
virtual |
Checks if a widget is being dragged
- Parameters
-
widget | the Widget to check if it is being dragged. |
- Returns
- true if the widget is being dragged.
◆ releaseModalFocus()
void gcn::FocusHandler::releaseModalFocus |
( |
Widget * |
widget | ) |
|
|
virtual |
Releases modal focus if the Widget has modal focus. Otherwise nothing will be done.
- Parameters
-
widget | the Widget to release modal focus for. |
◆ remove()
Removes a widget from the FocusHandler.
- Parameters
-
widget | the widget to remove. |
◆ requestDrag()
void gcn::FocusHandler::requestDrag |
( |
Widget * |
widget | ) |
|
|
virtual |
Sets drag to a Widget.
- Parameters
-
◆ requestFocus()
void gcn::FocusHandler::requestFocus |
( |
Widget * |
widget | ) |
|
|
virtual |
◆ requestModalFocus()
void gcn::FocusHandler::requestModalFocus |
( |
Widget * |
widget | ) |
|
|
virtual |
Sets modal focus to a Widget. If another Widget already has modal focus will an exception be thrown.
- Parameters
-
widget | the Widget to focus modal. |
- Exceptions
-
Exception | when another widget already has modal focus. |
◆ setFocus()
void gcn::FocusHandler::setFocus |
( |
Widget * |
widget | ) |
|
|
virtual |
◆ tabNext()
void gcn::FocusHandler::tabNext |
( |
| ) |
|
|
virtual |
Focuses the next Widget which allows tab in unless current focused Widget disallows tab out.
◆ tabPrevious()
void gcn::FocusHandler::tabPrevious |
( |
| ) |
|
|
virtual |
Focuses the previous Widget which allows tab in unless current focused Widget disallows tab out.
◆ mDraggedWidget
Widget* gcn::FocusHandler::mDraggedWidget |
|
protected |
◆ mFocusedWidget
Widget* gcn::FocusHandler::mFocusedWidget |
|
protected |
◆ mModalFocusedWidget
Widget* gcn::FocusHandler::mModalFocusedWidget |
|
protected |
◆ mToBeDragged
Widget* gcn::FocusHandler::mToBeDragged |
|
protected |
◆ mToBeFocused
Widget* gcn::FocusHandler::mToBeFocused |
|
protected |
◆ mWidgets
The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The