83 mModalMouseInputFocusedWidget(
nullptr),
86 mLastWidgetWithModalFocus(
nullptr),
87 mLastWidgetWithModalMouseInputFocus(
nullptr),
137 if ((*iter) == widget)
190 int focusedWidget = -1;
192 for (i = 0; i < sz; ++ i)
197 const int focused = focusedWidget;
215 if (focusedWidget >= sz)
218 if (focusedWidget == focused)
230 if (focusedWidget >= 0)
261 int focusedWidget = -1;
263 for (i = 0; i < sz; ++ i)
268 const int focused = focusedWidget;
286 if (focusedWidget <= 0)
287 focusedWidget = sz - 1;
289 if (focusedWidget == focused)
301 if (focusedWidget >= 0)
323 while (widget !=
nullptr)
327 if (window !=
nullptr)
345 if (sourceWidget ==
nullptr)
347 std::list<FocusListener*> focusListeners
351 for (std::list<FocusListener*>::const_iterator
352 it = focusListeners.begin();
353 it != focusListeners.end();
356 (*it)->focusGained(focusEvent);
365 int toBeFocusedIndex = -1;
366 for (
unsigned int i = 0, fsz =
CAST_U32(
371 toBeFocusedIndex = i;
376 if (toBeFocusedIndex < 0)
381 if (oldFocused != widget)
388 if (oldFocused !=
nullptr)
390 Event oldFocusEvent(oldFocused);
431 int focusedWidget = -1;
433 for (i = 0; i < sz; ++i)
438 const int focused = focusedWidget;
455 if (focusedWidget >= sz)
458 if (focusedWidget == focused)
461 while (!
mWidgets.at(focusedWidget)->isFocusable());
463 if (focusedWidget >= 0)
487 int focusedWidget = -1;
489 for (i = 0; i < sz; ++ i)
494 const int focused = focusedWidget;
511 if (focusedWidget <= 0)
512 focusedWidget = sz - 1;
514 if (focusedWidget == focused)
517 while (!
mWidgets.at(focusedWidget)->isFocusable());
519 if (focusedWidget >= 0)
550 Event focusEvent(focused);
558 if (sourceWidget ==
nullptr)
561 std::list<FocusListener*> focusListeners
565 for (std::list<FocusListener*>::const_iterator
566 it = focusListeners.begin();
567 it != focusListeners.end();
570 (*it)->focusLost(focusEvent);
Widget * getSource() const
static void distributeFocusGainedEvent(const Event &focusEvent)
void setLastWidgetWithModalFocus(Widget *const widget)
static void distributeFocusLostEvent(const Event &focusEvent)
void add(Widget *const widget)
void checkForWindow() const
void requestModalFocus(Widget *const widget)
Widget * mLastWidgetWithMouse
Widget * mLastWidgetWithModalFocus
Widget * getLastWidgetWithModalMouseInputFocus() const
Widget * getModalMouseInputFocused() const
Widget * getDraggedWidget() const
Widget * mModalMouseInputFocusedWidget
void requestModalMouseInputFocus(Widget *const widget)
void requestFocus(const Widget *const widget)
Widget * mModalFocusedWidget
void setLastWidgetWithMouse(Widget *const lastWidgetWithMouse)
Widget * getFocused() const
void releaseModalMouseInputFocus(const Widget *const widget)
Widget * getLastWidgetPressed() const
Widget * mLastWidgetPressed
std::list< Widget * > mModalStack
WidgetVector::iterator WidgetIterator
void releaseModalFocus(Widget *const widget)
Widget * mLastWidgetWithModalMouseInputFocus
void remove(Widget *const widget)
void setLastWidgetWithModalMouseInputFocus(Widget *const widget)
void setDraggedWidget(Widget *const draggedWidget)
Widget * getLastWidgetWithMouse() const
Widget * getModalFocused() const
bool isFocused(const Widget *const widget) const
Widget * getLastWidgetWithModalFocus() const
void setLastWidgetPressed(Widget *const lastWidgetPressed)
void distributeGlobalFocusGainedEvent(const Event &focusEvent)
#define FOR_EACH(type, iter, array)