Class evab::LayoutBase¶
ClassList > evab > LayoutBase
Abstract base class for composite elements with circular focus chain. More...
#include <evabLayoutBase.h>
Inherits the following classes: evab::ElementBase
Public Functions¶
| Type | Name |
|---|---|
| ElementBase * | GetFocused () const Gets the current (focused) child. |
| void | Increment (signed char delta) Increments the selection by a delta. |
| bool | IsFocused (FocusableBase * aChild) Checks if a child is currently focused. |
| virtual bool | OnKey (Keys aKey) override Handles key events by forwarding to focused child. |
Public Functions inherited from evab::ElementBase¶
| Type | Name |
|---|---|
| void | Draw (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused) Draws the element on the specified screen. |
| void | Freeze () Make element insensitive to redraw method. |
| virtual bool | OnKey (Keys aKey) Handles key events for the element. |
Protected Functions¶
| Type | Name |
|---|---|
| void | focusChild (FocusableBase * aChild) Sets the current (focused) child. |
Protected Functions inherited from evab::ElementBase¶
| Type | Name |
|---|---|
| virtual void | drawer (Screen * aScreen, Coor aPos, Coor aSize, unsigned char aIsFocused) = 0 Pure virtual method for drawing the element. |
| virtual void | freezer () Virtual method for freezing the element. |
| bool | isFrozen () Checks if the element is currently freezed. |
| void | redraw () Redraws the element on the current screen. |
Detailed Description¶
Manages a circular linked list of child elements for focus navigation. Only stores one pointer - to the currently focused child. Children must be of type Focusable<T> to form the chain.
Public Functions Documentation¶
function GetFocused¶
Gets the current (focused) child.
ElementBase * evab::LayoutBase::GetFocused () const
Returns:
Pointer to current child, or nullptr if none
function Increment¶
Increments the selection by a delta.
void evab::LayoutBase::Increment (
signed char delta
)
Positive delta moves forward (next), negative moves backward (prev)
Parameters:
deltaAmount to increment (positive or negative)
function IsFocused¶
Checks if a child is currently focused.
bool evab::LayoutBase::IsFocused (
FocusableBase * aChild
)
Parameters:
aChildChild element to check
Returns:
true if the child is focused
function OnKey¶
Handles key events by forwarding to focused child.
virtual bool evab::LayoutBase::OnKey (
Keys aKey
) override
Parameters:
aKeyKey code to process
Returns:
true if the key was handled, false otherwise
Implements evab::ElementBase::OnKey
Protected Functions Documentation¶
function focusChild¶
Sets the current (focused) child.
void evab::LayoutBase::focusChild (
FocusableBase * aChild
)
Parameters:
aChildChild element to set as focused
The documentation for this class was generated from the following file src/evabLayoutBase.h