soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
FocusSearch Class Reference

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.
 
SWindowFindNextFocusableView (SWindow *starting_view, bool reverse, bool check_starting_view)
 Finds the next focusable view.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FocusSearch()

SNSBEGIN FocusSearch::FocusSearch ( SWindow * root,
bool cycle )

Constructor.

Parameters
rootRoot of the view hierarchy to traverse
cycleTRUE 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.

◆ ~FocusSearch()

virtual FocusSearch::~FocusSearch ( )
inlinevirtual

Destructor.

Definition at line 43 of file SFocusManager.h.

Member Function Documentation

◆ FindNextFocusableView()

SWindow * FocusSearch::FindNextFocusableView ( SWindow * starting_view,
bool reverse,
bool check_starting_view )

Finds the next focusable view.

Parameters
starting_viewStarting view for the search
reverseTRUE to find the previous view, FALSE for the next view
check_starting_viewTRUE if the starting view may obtain focus
Returns
Next focusable view or NULL if none found

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.


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