Select one of the symbols to view example projects that use it.
 
Outline
#define DOTINDICATOR_HPP_
#include <touchgfx/widgets/Image.hpp>
#include <touchgfx/containers/ListLayout.hpp>
DotIndicator
Files
loading...
CodeScopeSTM32 Libraries and SamplesTouchGFXGui/gui/include/gui/common/DotIndicator.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 DOTINDICATOR_HPP_ #define DOTINDICATOR_HPP_ #include <touchgfx/widgets/Image.hpp> #include <touchgfx/containers/ListLayout.hpp> using namespace touchgfx; /** * @class DotIndicator * * DotIndicator shows a number of small dots where one of the dots is highlighted. * * This widget is part of the TouchGFX Open Widget Repository. * https://github.com/draupnergraphics/touchgfx-widgets * * @sa DotIndicator *//* ... */ class DotIndicator : public Container { public: DotIndicator(); virtual ~DotIndicator(); /** * @fn void DotIndicator::setNumberOfDots(uint8_t size); * * @brief Sets the number of dots that should be displayed. * * @param size The size. *//* ... */ void setNumberOfDots(uint8_t size); /** * @fn void DotIndicator::setBitmaps(const Bitmap& normalDot, const Bitmap& highlightedDot); * * @brief Sets the bitmaps to be used for normal and highlighted dots. Note that the bitmaps should * include the spacing between the dots and that they must have the same width and height. * * @param normalDot The normal dot bitmap. * @param highlightedDot The highlighted dot bitmap. *//* ... */ void setBitmaps(const Bitmap& normalDot, const Bitmap& highlightedDot); /** * @fn void DotIndicator::goRight(); * * @brief Highlight the dot to the right of the current highlighted dot. *//* ... */ void goRight(); /** * @fn void DotIndicator::goLeft(); * * @brief Highlight the dot to the left of the current highlighted dot *//* ... */ void goLeft(); /** * @fn void DotIndicator::setHighlightPosition(uint8_t index); * * @brief Sets highlight position. * * @param index Zero-based index of the dot to be highlighted. *//* ... */ void setHighlightPosition(uint8_t index);public: private: static const uint8_t MAX_SIZE = 10; ListLayout unselectedDots; Image dotHighlighted; Image dotNormal[MAX_SIZE]; uint8_t numberOfDots; uint8_t currentDot;private: ...}; /* ... */ #endif /* DOTINDICATOR_HPP_ */