C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
widget_horizontal_bar.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "sw/ui_core/ui_core.h"
14#include "sw/widget/widget.h"
15
16
20{
21private:
23 int level;
25 int max_value;
27 int min_value;
29 uint8_t px_max;
31 uint8_t px_min;
33 uint8_t px_position;
35 float level_coef;
37 int level_offset;
38
40 void convert_level_value_to_px();
41
42protected:
43public:
45 void draw();
46
54 WidgetHorizontalBar(Model *bar_value_model,
55 GraphicDisplayDevice *graphic_display_screen,
56 int max_value, int min_value,
58 CanvasFormat format);
59
63 void set_level(int value);
64};
CanvasFormat
the format of the canvas
Definition canvas.h:61
This is the abstract class to handle all generic behavior of physical graphic display devices (e....
Definition display_device.h:30
GraphicWidget(GraphicDisplayDevice *graphic_display_screen, struct_ConfigGraphicWidget graph_cfg, CanvasFormat canvas_format, Model *displayed_object=nullptr)
Construct a new Graphic Widget object.
Definition widget.cpp:59
This is the Model abstract class of Model_View_Control design pattern.
Definition ui_core.h:67
void set_level(int value)
set the level to value
Definition widget_horizontal_bar.cpp:62
void draw()
the draw function of the widget
Definition widget_horizontal_bar.cpp:10
WidgetHorizontalBar(Model *bar_value_model, GraphicDisplayDevice *graphic_display_screen, int max_value, int min_value, struct_ConfigGraphicWidget graph_cfg, CanvasFormat format)
Construct a new GraphicWidget Horizontal Bar object.
Definition widget_horizontal_bar.cpp:42
data structure used to configure graphic framebuffer
Definition canvas.h:81