C++ DevKit
C++ set of OOP library
|
Class that adds UI Controller to the basic Model class. More...
#include <ui_core.h>
Public Member Functions | |
void | update_status (ControlledObjectStatus _new_status) |
check if the _new_status change is effective, then change it and set the change_flag to true. | |
void | update_current_controller (UIController *_new_controller) |
if _new_controller is different from the current controller, change the current controller associated to the Model. the new controller has is member current_controlled_model also changed. | |
ControlledObjectStatus | get_status () |
Get the status object. | |
UIController * | get_current_controller () |
Get the current controller object. | |
virtual void | process_control_event (UIControlEvent _event)=0 |
The purpose of this function is to implement the behavior of the implemented model object when a ControlEvent is received. | |
![]() | |
Model () | |
Construct the Model object. | |
~Model () | |
Destroy the Model object. | |
void | update_attached_widgets (Widget *new_widget) |
add a new widget to the set of attached_widgets | |
int | get_number_of_attached_widget () |
get the number of attached widgets | |
bool | has_changed () |
get the change flag status | |
void | set_change_flag () |
Set the change flag object to true. | |
void | draw_widget_done () |
Set the change flag object to false. | |
uint32_t | get_time_since_last_change () |
compute time since the last status change | |
virtual void | draw_refresh_all_attached_widgets () |
update drawing for each attached widgets | |
Additional Inherited Members | |
![]() | |
std::set< Widget * > | attached_widgets |
the set of widgets that are in charge of viewing this model. | |
Class that adds UI Controller to the basic Model class.
UIController * UIControlledModel::get_current_controller | ( | ) |
Get the current controller object.
NOTICE: It is usually necessary to recast the abstract return UIController into the actual controller
ControlledObjectStatus UIControlledModel::get_status | ( | ) |
|
pure virtual |
The purpose of this function is to implement the behavior of the implemented model object when a ControlEvent is received.
_event |
void UIControlledModel::update_current_controller | ( | UIController * | _new_controller | ) |
if _new_controller is different from the current controller, change the current controller associated to the Model. the new controller has is member current_controlled_model also changed.
_new_controller |
void UIControlledModel::update_status | ( | ControlledObjectStatus | _new_status | ) |
check if the _new_status change is effective, then change it and set the change_flag to true.
_new_status |