Select one of the symbols to view example projects that use it.
 
Outline
#define CUSTOM_CONTROLS_VIEW_HPP
#include <gui/common/DemoView.hpp>
#include <gui/custom_controls_screen/CustomControlsPresenter.hpp>
#include <touchgfx/widgets/Image.hpp>
#include <touchgfx/widgets/Button.hpp>
#include <touchgfx/widgets/TextArea.hpp>
#include <touchgfx/mixins/FadeAnimator.hpp>
#include <gui/custom_controls_screen/ThreeWayProgressBar.hpp>
#include <gui/custom_controls_screen/CircularProgress.hpp>
#include <gui/custom_controls_screen/DatePicker.hpp>
#include <gui/custom_controls_screen/Gauge.hpp>
#include <gui/custom_controls_screen/VerticalSlideMenu.hpp>
CustomControlsView
Files
loading...
CodeScopeSTM32 Libraries and SamplesTouchGFXGui/gui/include/gui/custom_controls_screen/CustomControlsView.hpp
 
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * 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. * ****************************************************************************** *//* ... */ #ifndef CUSTOM_CONTROLS_VIEW_HPP #define CUSTOM_CONTROLS_VIEW_HPP #include <gui/common/DemoView.hpp> #include <gui/custom_controls_screen/CustomControlsPresenter.hpp> #include <touchgfx/widgets/Image.hpp> #include <touchgfx/widgets/Button.hpp> #include <touchgfx/widgets/TextArea.hpp> #include <touchgfx/mixins/FadeAnimator.hpp> #include <gui/custom_controls_screen/ThreeWayProgressBar.hpp> #include <gui/custom_controls_screen/CircularProgress.hpp> #include <gui/custom_controls_screen/DatePicker.hpp> #include <gui/custom_controls_screen/Gauge.hpp> #include <gui/custom_controls_screen/VerticalSlideMenu.hpp> 11 includes class CustomControlsView : public DemoView<CustomControlsPresenter> { public: CustomControlsView(); virtual ~CustomControlsView(); virtual void setupScreen(); virtual void tearDownScreen(); virtual void handleTickEvent(); virtual void screenSaverMinorTick(); public: private: Image menuBackground; Image background; Button menuUp; Button menuDown; Callback<CustomControlsView, const AbstractButton&> onButtonPressed; void buttonPressedHandler(const AbstractButton& button); VerticalSlideMenu slideMenu; Callback<CustomControlsView, const VerticalSlideMenu& > slideMenuElementSelectedCallback; void slideMenuElementSelectedHandler(const VerticalSlideMenu& menu); FadeAnimator<TextArea> statusMessage; ThreeWayProgressBar threeWayProgressBar; Callback<CustomControlsView, const ThreeWayProgressBar& > threeWayButtonPressedCallback; void threeWayButtonPressedHandler(const ThreeWayProgressBar& button); CircularProgress percentageBar; DatePicker datePicker; Gauge gauge; // Animation members enum AnimationState { ANIMATION_THREE_WAY_RUNNING, ANIMATION_GAUGE, NO_ANIMATION ...}; AnimationState currentAnimationState; int animationCounter; int tickCounter; // ThreeWayProgressBar animation static const int NUMBER_OF_BARS = 3; AnimationState barAnimationState[NUMBER_OF_BARS]; int animationDuration[NUMBER_OF_BARS]; EasingEquation animationEquation[NUMBER_OF_BARS]; AnimationState getAnimationState(); EasingEquation getRandomEasingEquation(); void startThreeWayProgressBarAnimation(); void stopThreeWayProgressBarAnimation();private: ...}; /* ... */ #endif // CUSTOM_CONTROLS_VIEW_HPP