Iridescence 1.00
Embedded Graphic Framework
Loading...
Searching...
No Matches
ds_progress_bar.h
1/* Copyright (C) 2017 - 2024, Thornwave Labs Inc - All Rights Reserved.
2 * Unauthorized copying of this file, via any medium is strictly prohibited.
3 * Proprietary and confidential.
4 * Written by Razvan Turiac <razvan.turiac@thornwave.com>
5*/
6
7#ifndef _BAR_GAUGE_H
8#define _BAR_GAUGE_H
9
10
11#include <ds_view.h>
12#include <ds_value_base.h>
13
17class DsProgressBar: public DsView, public DsValueBase
18{
19public:
27 DsProgressBar(DsView* parent, const DsPoint &pos, const DsSize &size);
28
29
35
36
41 void setBorderThickness(uint8_t thickness);
42
43
48 void setCornerRadius(uint16_t radius);
49
50
56
57
63
64
65private:
66 uint8_t mBorderThickness;
67 uint16_t mCornerRadius;
68
69 DsColor mBorderColor;
70 DsColor mTrackColor;
71 DsColor mActiveColor;
72
73 int32_t mProgressPos;
74
75 void onPaint(DsRenderer &renderer) override final;
76 float onValueChange(float value) override final;
77};
78
79
80#endif
DsColor is a class that represents a 4 channel color (Alpha, Red, Green, Blue).
Definition ds_color.h:53
DsPoint is a class that represents the X and Y 2D coordinates of a point as integer numbers.
Definition ds_geometry.h:24
DsProgressBar is a class that implements a progress bar.
Definition ds_progress_bar.h:18
void setBorderColor(DsColor color)
Sets the border color.
void setCornerRadius(uint16_t radius)
Sets the list corner radius.
void setActiveColor(DsColor color)
Sets the active color.
void setTrackColor(DsColor color)
Sets the track color.
DsProgressBar(DsView *parent, const DsPoint &pos, const DsSize &size)
Creates a DsProgressBar view.
void setBorderThickness(uint8_t thickness)
Sets the border width.
DsRenderer is a class that implements all the drawing operations.
Definition ds_renderer.h:42
DsSize is class that represents the 2D size of a graphic object (width, height) as integer values.
Definition ds_geometry.h:780
DsValueBase is a base class that contains a float value.
Definition ds_value_base.h:19
DsView is a base class that represents any view on the screen.
Definition ds_view.h:40