MyRP2_ui_core
Loading...
Searching...
No Matches
test_controlled_value.cpp
Go to the documentation of this file.
1
12
13TestIncrementalValue::TestIncrementalValue(std::string _name, int _min_value, int _max_value, bool _is_wrapable, int increment)
14 : UIControlledIncrementalValue(_min_value, _max_value, _is_wrapable, increment)
15{
16 this->name = _name;
17}
18
19TestIncrementalValue::~TestIncrementalValue()
20{
21}
22
24{
25 switch (_event)
26 {
27 case ControlEvent::LONG_PUSH:
28 this->set_clipped_value(0);
29 break;
30 case ControlEvent::INCREMENT:
31 increment_value();
32 break;
33 case ControlEvent::DECREMENT:
34 decrement_value();
35 break;
36 default:
37 printf("TestIncrementalValue::process_control_event(ControlEvent _event) = default\n");
38 break;
39 }
40}
41
42std::string TestIncrementalValue::get_name()
43{
44 return name;
45}
void process_control_event(ControlEvent _event)
void set_clipped_value(int _new_value)
Set the clipped value object.
Definition ui_core.cpp:92
ControlEvent
The list of predefined event that a Controller can send to the controlled object, leaving it the resp...
Definition ui_core.h:26