You.i Engine
YiFocus.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_FOCUS_H_
3 #define _YI_FOCUS_H_
4 
6 
7 class CYIAABB;
8 class CYISceneNode;
9 class CYISceneView;
10 
38 class CYIFocus
39 {
40 public:
44  enum class Direction
45  {
46  Up,
47  Down,
48  Right,
49  Left,
50  Forward,
51  Reverse,
53  };
54 
60  enum class FocusRootRule
61  {
62  Descendants,
63  DescendantsUpdateContext,
64  Any
65  };
66 
76  static CYISceneView *FindNextFocus(const CYISceneNode *pSearchRoot, const CYIAABB &previousFocusRect, Direction direction, const CYIFocusSearchOptions &options = CYIFocusSearchOptions());
77 
84  static CYISceneView *FindInitialFocus(const CYISceneNode *pSearchRoot, const CYIFocusSearchOptions &options = CYIFocusSearchOptions());
85 
92  static CYISceneView *FindNextFocusInRegion(const CYISceneNode *pSearchRoot, const CYIAABB &previousFocusRect, Direction direction, const CYIAABB &searchRegion, const CYIFocusSearchOptions &options = CYIFocusSearchOptions());
93 
99  static CYIAABB GetScreenSpaceFocusRegion(const CYISceneView *pView);
100 
106  static bool IsRelativeDirection(Direction direction);
107 
113  static bool IsAbsoluteDirection(Direction direction);
114 
115 private:
116  CYIFocus();
117 };
118 
123 #endif // _YI_FOCUS_H_
A class containing focus search options.
Definition: YiFocusSearchOptions.h:23
The base class for all view types. Views are containers of renderable elements that often define inte...
Definition: YiSceneView.h:47
static CYISceneView * FindNextFocusInRegion(const CYISceneNode *pSearchRoot, const CYIAABB &previousFocusRect, Direction direction, const CYIAABB &searchRegion, const CYIFocusSearchOptions &options=CYIFocusSearchOptions())
Direction
Definition: YiFocus.h:44
static CYISceneView * FindInitialFocus(const CYISceneNode *pSearchRoot, const CYIFocusSearchOptions &options=CYIFocusSearchOptions())
A collection focus-finding utilities.
Definition: YiFocus.h:38
static CYIAABB GetScreenSpaceFocusRegion(const CYISceneView *pView)
A scene node is the base type for all nodes which are used by the scene manager; it is an integral pa...
Definition: YiSceneNode.h:99
FocusRootRule
Definition: YiFocus.h:60
static bool IsRelativeDirection(Direction direction)
This class represents an Axis-Aligned Bounding Box.
Definition: YiAABB.h:24
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, bool >::type Any(E a)
Definition: YiEnumBitmaskOperators.h:124
static CYISceneView * FindNextFocus(const CYISceneNode *pSearchRoot, const CYIAABB &previousFocusRect, Direction direction, const CYIFocusSearchOptions &options=CYIFocusSearchOptions())
static bool IsAbsoluteDirection(Direction direction)