Select one of the symbols to view example projects that use it.
 
Outline
#include <gui/custom_controls_screen/ThreeWayProgressBarCircle.hpp>
#include <BitmapDatabase.hpp>
#include <texts/TextKeysAndLanguages.hpp>
#include <touchgfx/Color.hpp>
#include <assert.h>
ThreeWayProgressBarCircle::ThreeWayProgressBarCircle()
ThreeWayProgressBarCircle::~ThreeWayProgressBarCircle()
ThreeWayProgressBarCircle::setIcon(BitmapId, BitmapId)
ThreeWayProgressBarCircle::setActive(bool)
ThreeWayProgressBarCircle::setPercentage(int)
Files
loading...
CodeScopeSTM32 Libraries and SamplesTouchGFXGui/gui/src/custom_controls_screen/ThreeWayProgressBarCircle.cpp
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * This file is part of the TouchGFX 4.10.0 distribution. * * @attention * * Copyright (c) 2018 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ #include <gui/custom_controls_screen/ThreeWayProgressBarCircle.hpp> #include <BitmapDatabase.hpp> #include <texts/TextKeysAndLanguages.hpp> #include <touchgfx/Color.hpp> #include <assert.h> 5 includes ThreeWayProgressBarCircle::ThreeWayProgressBarCircle() { background.setBitmap(Bitmap(BITMAP_CONTROLS_THREE_WAY_SMALL_CIRCLE_ID)); background.setXY(0, 0); add(background); add(icon); text.setTypedText(TypedText(T_THREE_WAY_PROGRESS_BAR_PERCENTAGE)); text.setWildcard(textBuffer); text.setColor(Color::getColorFrom24BitRGB(0xFF, 0xFF, 0xFF)); text.setPosition(30, 50, 40, 18); add(text); setPercentage(0); setWidth(background.getWidth()); setHeight(background.getHeight()); }{ ... } ThreeWayProgressBarCircle::~ThreeWayProgressBarCircle() { }{ ... } void ThreeWayProgressBarCircle::setIcon(BitmapId newIconBmp, BitmapId newIconActiveBmp) { iconBmp = newIconBmp; iconActiveBmp = newIconActiveBmp; setActive(false); icon.setXY((background.getWidth() - icon.getWidth())/2, 15); }{ ... } void ThreeWayProgressBarCircle::setActive(bool active) { active ? icon.setBitmap(Bitmap(iconActiveBmp)) : icon.setBitmap(Bitmap(iconBmp)); icon.invalidate(); }{ ... } void ThreeWayProgressBarCircle::setPercentage(int percentage) { Unicode::snprintf(textBuffer, 5, "%d", percentage); text.invalidate(); }{ ... }