Implements the algorithm to find the next view to focus. More...
#include <SFocusManager.h>
Public Member Functions | |
| FocusSearch (SWindow *root, bool cycle) | |
| Constructor. | |
| virtual | ~FocusSearch () |
| Destructor. | |
| SWindow * | FindNextFocusableView (SWindow *starting_view, bool reverse, bool check_starting_view) |
| Finds the next focusable view. | |
Implements the algorithm to find the next view to focus.
This class is responsible for finding the next focusable view within a given view hierarchy. It can cycle through the views and handle focus traversal.
Definition at line 29 of file SFocusManager.h.
| SNSBEGIN FocusSearch::FocusSearch | ( | SWindow * | root, |
| bool | cycle ) |
Constructor.
| root | Root of the view hierarchy to traverse |
| cycle | TRUE if focus should cycle back to the first view when reaching the end |
Initializes the FocusSearch object with the specified root view and cycle behavior.
Definition at line 10 of file SFocusManager.cpp.
|
inlinevirtual |
Destructor.
Definition at line 43 of file SFocusManager.h.
| SWindow * FocusSearch::FindNextFocusableView | ( | SWindow * | starting_view, |
| bool | reverse, | ||
| bool | check_starting_view ) |
Finds the next focusable view.
| starting_view | Starting view for the search |
| reverse | TRUE to find the previous view, FALSE for the next view |
| check_starting_view | TRUE if the starting view may obtain focus |
Finds the next focusable view based on the specified parameters. If a FocusTraversable is found, it sets the FocusTraversable and returns NULL.
Definition at line 16 of file SFocusManager.cpp.