C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
rtos_UIModelManager Class Reference

RTOS wrapper for UIModelManager class. More...

#include <rtos_ui_core.h>

Inheritance diagram for rtos_UIModelManager:
Inheritance graph
Collaboration diagram for rtos_UIModelManager:
Collaboration graph

Public Member Functions

 rtos_UIModelManager (bool is_wrapable=true)
 Construct a new rtos UIModel Manager object.
 
size_t get_current_focus_index ()
 Get the current focus index.
 
void make_managed_rtos_model_active ()
 Make the current active managed rtos_UIControlledModel the active one.
 
void make_rtos_manager_active ()
 Make the rtos_UIModelManager the active one.
 
void add_managed_rtos_model (rtos_UIControlledModel *new_model)
 Add a new managed rtos_UIControlledModel.
 
void forward_control_event_to_active_managed_model (struct_ControlEventData *control_event)
 Forward a control event to the current active managed rtos_UIControlledModel.
 
- Public Member Functions inherited from rtos_UIControlledModel
void update_rtos_status (ControlledObjectStatus _new_status)
 update the status of the controlled model
 
ControlledObjectStatus get_rtos_status ()
 Get the current status of the controlled model.
 
virtual void process_control_event (struct_ControlEventData control_event)=0
 process a control event received from the control event queue
 
- Public Member Functions inherited from rtos_Model
void update_attached_rtos_widget (rtos_Widget *linked_widget)
 link a new widget task to the model
 
void notify_all_linked_widget_task ()
 notify all linked widget tasks that the model has changed
 
 rtos_Model ()
 constructor for RTOS model
 
 ~rtos_Model ()
 destructor for RTOS model
 

Public Attributes

std::vector< rtos_UIControlledModel * > managed_rtos_models
 A static vector containing all the managed rtos_UIControlledModel objects.
 
rtos_UIControlledModelcurrent_active_rtos_model
 A static pointer to the current active rtos_UIControlledModel object.
 
- Public Attributes inherited from rtos_UIControlledModel
QueueHandle_t control_event_input_queue
 FreeRTOS queue handle used to receive control events for this model.
 
- Public Attributes inherited from rtos_Model
TaskHandle_t task_handle
 the task handle of the model task
 

Protected Member Functions

virtual void increment_focus ()
 Increment the focus index.
 
virtual void decrement_focus ()
 Decrement the focus index.
 

Private Attributes

int current_focus_index = 0
 The current focus index among the managed models.
 
bool is_wrapable
 If true, the focus index wraps around when incremented/decremented beyond the limits.
 
int max_focus_index
 The maximum focus index based on the number of managed models.
 

Additional Inherited Members

- Protected Attributes inherited from rtos_UIControlledModel
ControlledObjectStatus rtos_status {ControlledObjectStatus::IS_WAITING}
 The status of the model, indicating if it is waiting, active or just ahs focus (pointed by the object manager)
 

Detailed Description

RTOS wrapper for UIModelManager class.

Constructor & Destructor Documentation

◆ rtos_UIModelManager()

rtos_UIModelManager::rtos_UIModelManager ( bool is_wrapable = true)

Construct a new rtos UIModel Manager object.

Parameters
is_wrapable
Here is the call graph for this function:

Member Function Documentation

◆ add_managed_rtos_model()

void rtos_UIModelManager::add_managed_rtos_model ( rtos_UIControlledModel * new_model)

Add a new managed rtos_UIControlledModel.

Parameters
new_modelThe new model to be added

◆ forward_control_event_to_active_managed_model()

void rtos_UIModelManager::forward_control_event_to_active_managed_model ( struct_ControlEventData * control_event)

Forward a control event to the current active managed rtos_UIControlledModel.

Parameters
control_eventThe control event to be forwarded

◆ get_current_focus_index()

size_t rtos_UIModelManager::get_current_focus_index ( )

Get the current focus index.

Returns
The current focus index

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