WebRadioApp  0.1
_WidgetSetHorizontalValueBar.h
Go to the documentation of this file.
1 /*******************************************************************************
2 *
3 * E M B E D D E D W I Z A R D P R O J E C T
4 *
5 * Copyright (c) TARA Systems GmbH
6 * written by Paul Banach and Manfred Schweyer
7 *
8 ********************************************************************************
9 *
10 * This file was generated automatically by Embedded Wizard Studio.
11 *
12 * Please do not make any modifications of this file! The modifications are lost
13 * when the file is generated again by Embedded Wizard Studio!
14 *
15 * The template of this heading text can be found in the file 'head.ewt' in the
16 * directory 'Platforms' of your Embedded Wizard installation directory. If you
17 * wish to adapt this text, please copy the template file 'head.ewt' into your
18 * project directory and edit the copy only. Please avoid any modifications of
19 * the original template file!
20 *
21 * Version : 10.00
22 * Profile : STM32H747
23 * Platform : STM.STM32.RGB565
24 *
25 *******************************************************************************/
26 
27 #ifndef _WidgetSetHorizontalValueBar_H
28 #define _WidgetSetHorizontalValueBar_H
29 
30 #ifdef __cplusplus
31  extern "C"
32  {
33 #endif
34 
35 #include "ewrte.h"
36 #if EW_RTE_VERSION != 0x000A0000
37  #error Wrong version of Embedded Wizard Runtime Environment.
38 #endif
39 
40 #include "ewgfx.h"
41 #if EW_GFX_VERSION != 0x000A0000
42  #error Wrong version of Embedded Wizard Graphics Engine.
43 #endif
44 
45 #include "_CoreGroup.h"
46 #include "_EffectsFloatEffect.h"
47 
48 /* Forward declaration of the class Core::DialogContext */
49 #ifndef _CoreDialogContext_
50  EW_DECLARE_CLASS( CoreDialogContext )
51 #define _CoreDialogContext_
52 #endif
53 
54 /* Forward declaration of the class Core::KeyPressHandler */
55 #ifndef _CoreKeyPressHandler_
56  EW_DECLARE_CLASS( CoreKeyPressHandler )
57 #define _CoreKeyPressHandler_
58 #endif
59 
60 /* Forward declaration of the class Core::LayoutContext */
61 #ifndef _CoreLayoutContext_
62  EW_DECLARE_CLASS( CoreLayoutContext )
63 #define _CoreLayoutContext_
64 #endif
65 
66 /* Forward declaration of the class Core::TaskQueue */
67 #ifndef _CoreTaskQueue_
68  EW_DECLARE_CLASS( CoreTaskQueue )
69 #define _CoreTaskQueue_
70 #endif
71 
72 /* Forward declaration of the class Core::View */
73 #ifndef _CoreView_
74  EW_DECLARE_CLASS( CoreView )
75 #define _CoreView_
76 #endif
77 
78 /* Forward declaration of the class Effects::Fader */
79 #ifndef _EffectsFader_
81 #define _EffectsFader_
82 #endif
83 
84 /* Forward declaration of the class Graphics::Canvas */
85 #ifndef _GraphicsCanvas_
86  EW_DECLARE_CLASS( GraphicsCanvas )
87 #define _GraphicsCanvas_
88 #endif
89 
90 /* Forward declaration of the class Views::Frame */
91 #ifndef _ViewsFrame_
92  EW_DECLARE_CLASS( ViewsFrame )
93 #define _ViewsFrame_
94 #endif
95 
96 /* Forward declaration of the class Views::Image */
97 #ifndef _ViewsImage_
98  EW_DECLARE_CLASS( ViewsImage )
99 #define _ViewsImage_
100 #endif
101 
102 /* Forward declaration of the class WidgetSet::HorizontalValueBar */
103 #ifndef _WidgetSetHorizontalValueBar_
104  EW_DECLARE_CLASS( WidgetSetHorizontalValueBar )
105 #define _WidgetSetHorizontalValueBar_
106 #endif
107 
108 /* Forward declaration of the class WidgetSet::HorizontalValueBarConfig */
109 #ifndef _WidgetSetHorizontalValueBarConfig_
110  EW_DECLARE_CLASS( WidgetSetHorizontalValueBarConfig )
111 #define _WidgetSetHorizontalValueBarConfig_
112 #endif
113 
114 
115 /* This class implements a 'horizontal value bar' (bar gauge) instrument intended
116  to display a value as a needle that moves horizontally along a track. The areas
117  on the left and on the right of the needle can appear as filled bars. The position
118  of the needle corresponds to the value specified in the property @CurrentValue,
119  which lies in range determined by the properties @MinValue and @MaxValue.
120  Alternatively the property @Outlet can refer to any other 'int32' property the
121  widget should remain synchronized with. When the referred property is modified
122  by another one, the widget is automatically notified to remain in sync with the
123  property.
124  This approach follows the Controller-View programming paradigm. Here the value
125  bar widget represents the 'View' and the property referred via 'Outlet' can be
126  seen as a part of the 'Controller'.
127  The exact look and feel of the value bar widget is determined by the 'Horizontal
128  Value Bar Configuration' object assigned to the property @Appearance. The configuration
129  object provides bitmaps, colors and other configuration parameters needed to
130  construct and display the value bar widget. Usually, you will manage in your
131  project your own configuration objects and customize the value bar widgets according
132  to your design expectations. Depending on the information provided in the associated
133  configuration object, the value bar widget will be composed of following views:
134  - 'Face' is a bitmap frame view (Views::Frame) filling vertically centered the
135  entire width in the background of the widget. In the configuration object you
136  can specify the desired bitmap, its opacity, frame number (if the bitmap is multi-frame)
137  and tint color (if the bitmap contains Alpha8 information only). The value bar
138  widget can automatically play animated bitmaps.
139  - 'TrackLeft' is a bitmap frame view (Views::Frame) filling vertically centered
140  the background of the widget between its left edge and the actual position of
141  the needle. In the configuration object you can specify the desired bitmap, its
142  opacity, frame number (if the bitmap is multi-frame) and tint color (if the bitmap
143  contains Alpha8 information only). The value bar widget can automatically play
144  animated bitmaps.
145  - 'TrackRight' is a bitmap frame view (Views::Frame) filling vertically centered
146  the background of the widget between the actual position of the needle and the
147  right edge of the widget. In the configuration object you can specify the desired
148  bitmap, its opacity, frame number (if the bitmap is multi-frame) and tint color
149  (if the bitmap contains Alpha8 information only). The value bar widget can automatically
150  play animated bitmaps.
151  - 'Needle' is an image view (Views::Image) displayed centered at the actual needle
152  position. In the configuration object you can specify the desired bitmap, its
153  opacity, frame number (if the bitmap is multi-frame) and tint color (if the bitmap
154  contains Alpha8 information only). The value bar widget can automatically play
155  animated bitmaps. If necessary, additional margins on the left and on the right
156  of the needle can be specified.
157  - 'Cover' is a bitmap frame view (Views::Frame) filling vertically centered the
158  entire width of the widget and covering so eventually the needle and track. In
159  the configuration object you can specify the desired bitmap, its opacity, frame
160  number (if the bitmap is multi-frame) and tint color (if the bitmap contains
161  Alpha8 information only). The value bar widget can automatically play animated
162  bitmaps.
163  The value bar widget implements a 'swing' animation effect to move the needle
164  smoothly. You can configure the duration and the timing of this effect in the
165  configuration object. Value bar widgets are not intended to be controlled by
166  the user. The widget ignores all touch and keyboard events and it can't be focused.
167  The value bar widget provides an additional set of methods useful to query the
168  actual position of the needle and its possible movement range (@GetNeedleMaxPosition(),
169  @GetNeedleMinPosition(), @GetNeedlePosition()). These methods can be invoked
170  from a slot method assigned to the property @OnUpdate. In this manner you can
171  automatically arrange and updated additional decoration according to the actual
172  state of the value bar widget. For example, you can arrange a Views::Text view
173  to follow the needle and to display the actual value of the widget (@CurrentValue).
174  For more details regarding the customization of the value bar widget see the
175  description of WidgetSet::HorizontalValueBarConfig class. */
176 EW_DEFINE_FIELDS( WidgetSetHorizontalValueBar, CoreGroup )
177  EW_VARIABLE( frameView4, ViewsFrame )
178  EW_VARIABLE( imageView, ViewsImage )
179  EW_VARIABLE( frameView3, ViewsFrame )
180  EW_VARIABLE( frameView2, ViewsFrame )
181  EW_VARIABLE( frameView1, ViewsFrame )
182  EW_PROPERTY( Appearance, WidgetSetHorizontalValueBarConfig )
183  EW_PROPERTY( OnUpdate, XSlot )
184  EW_OBJECT ( FloatEffect, EffectsFloatEffect )
185  EW_VARIABLE( currentPos, XFloat )
186  EW_PROPERTY( MaxValue, XInt32 )
187  EW_PROPERTY( MinValue, XInt32 )
188  EW_PROPERTY( CurrentValue, XInt32 )
189  EW_VARIABLE( setupCurrentPos, XBool )
190 EW_END_OF_FIELDS( WidgetSetHorizontalValueBar )
191 
192 /* Virtual Method Table (VMT) for the class : 'WidgetSet::HorizontalValueBar' */
193 EW_DEFINE_METHODS( WidgetSetHorizontalValueBar, CoreGroup )
194  EW_METHOD( initLayoutContext, void )( CoreRectView _this, XRect aBounds, CoreOutline
195  aOutline )
196  EW_METHOD( GetRoot, CoreRoot )( CoreView _this )
197  EW_METHOD( Draw, void )( CoreGroup _this, GraphicsCanvas aCanvas,
199  EW_METHOD( HandleEvent, XObject )( CoreView _this, CoreEvent aEvent )
200  EW_METHOD( CursorHitTest, CoreCursorHit )( CoreGroup _this, XRect aArea, XInt32
201  aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason )
202  EW_METHOD( ArrangeView, XPoint )( CoreRectView _this, XRect aBounds, XEnum
203  aFormation )
204  EW_METHOD( MoveView, void )( CoreRectView _this, XPoint aOffset, XBool
205  aFastMove )
206  EW_METHOD( GetExtent, XRect )( CoreRectView _this )
207  EW_METHOD( ChangeViewState, void )( CoreGroup _this, XSet aSetState, XSet aClearState )
208  EW_METHOD( OnSetBounds, void )( WidgetSetHorizontalValueBar _this, XRect
209  value )
210  EW_METHOD( drawContent, void )( CoreGroup _this, GraphicsCanvas aCanvas,
212  EW_METHOD( OnSetFocus, void )( CoreGroup _this, CoreView value )
213  EW_METHOD( OnSetBuffered, void )( CoreGroup _this, XBool value )
214  EW_METHOD( OnSetOpacity, void )( CoreGroup _this, XInt32 value )
215  EW_METHOD( IsDialog, XBool )( CoreGroup _this, XBool aRecursive )
216  EW_METHOD( DispatchEvent, XObject )( CoreGroup _this, CoreEvent aEvent )
217  EW_METHOD( BroadcastEvent, XObject )( CoreGroup _this, CoreEvent aEvent, XSet
218  aFilter )
219  EW_METHOD( UpdateLayout, void )( CoreGroup _this, XPoint aSize )
220  EW_METHOD( UpdateViewState, void )( WidgetSetHorizontalValueBar _this, XSet
221  aState )
222  EW_METHOD( InvalidateArea, void )( CoreGroup _this, XRect aArea )
223 EW_END_OF_METHODS( WidgetSetHorizontalValueBar )
224 
225 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.OnSetBounds()' */
226 void WidgetSetHorizontalValueBar_OnSetBounds( WidgetSetHorizontalValueBar _this,
228 
229 /* The method UpdateViewState() is invoked automatically after the state of the
230  component has been changed. This method can be overridden and filled with logic
231  to ensure the visual aspect of the component does reflect its current state.
232  For example, the 'enabled' state of the component can affect its colors (disabled
233  components may appear pale). In this case the logic of the method should modify
234  the respective color properties accordingly to the current 'enabled' state.
235  The current state of the component is passed as a set in the parameter aState.
236  It reflects the very basic component state like its visibility or the ability
237  to react to user inputs. Beside this common state, the method can also involve
238  any other variables used in the component as long as they reflect its current
239  state. For example, the toggle switch component can take in account its toggle
240  state 'on' or 'off' and change accordingly the location of the slider, etc.
241  Usually, this method will be invoked automatically by the framework. Optionally
242  you can request its invocation by using the method @InvalidateViewState(). */
243 void WidgetSetHorizontalValueBar_UpdateViewState( WidgetSetHorizontalValueBar _this,
244  XSet aState );
245 
246 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.onUpdatePos()' */
247 void WidgetSetHorizontalValueBar_onUpdatePos( WidgetSetHorizontalValueBar _this,
248  XObject sender );
249 
250 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.onEndFloatEffect()' */
251 void WidgetSetHorizontalValueBar_onEndFloatEffect( WidgetSetHorizontalValueBar _this,
252  XObject sender );
253 
254 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.onFloatEffect()' */
255 void WidgetSetHorizontalValueBar_onFloatEffect( WidgetSetHorizontalValueBar _this,
256  XObject sender );
257 
258 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.onConfigChanged()' */
259 void WidgetSetHorizontalValueBar_onConfigChanged( WidgetSetHorizontalValueBar _this,
260  XObject sender );
261 
262 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.OnSetMaxValue()' */
263 void WidgetSetHorizontalValueBar_OnSetMaxValue( WidgetSetHorizontalValueBar _this,
264  XInt32 value );
265 
266 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.OnGetCurrentValue()' */
267 XInt32 WidgetSetHorizontalValueBar_OnGetCurrentValue( WidgetSetHorizontalValueBar _this );
268 
269 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.OnSetCurrentValue()' */
270 void WidgetSetHorizontalValueBar_OnSetCurrentValue( WidgetSetHorizontalValueBar _this,
271  XInt32 value );
272 
273 /* 'C' function for method : 'WidgetSet::HorizontalValueBar.OnSetAppearance()' */
274 void WidgetSetHorizontalValueBar_OnSetAppearance( WidgetSetHorizontalValueBar _this,
275  WidgetSetHorizontalValueBarConfig value );
276 
277 #ifdef __cplusplus
278  }
279 #endif
280 
281 #endif /* _WidgetSetHorizontalValueBar_H */
282 
283 /* Embedded Wizard */
WidgetSetHorizontalValueBar_UpdateViewState
void WidgetSetHorizontalValueBar_UpdateViewState(WidgetSetHorizontalValueBar _this, XSet aState)
Definition: WidgetSet.c:1956
WidgetSetHorizontalValueBar_OnSetMaxValue
void WidgetSetHorizontalValueBar_OnSetMaxValue(WidgetSetHorizontalValueBar _this, XInt32 value)
Definition: WidgetSet.c:2334
WidgetSetHorizontalValueBar_onFloatEffect
void WidgetSetHorizontalValueBar_onFloatEffect(WidgetSetHorizontalValueBar _this, XObject sender)
Definition: WidgetSet.c:2307
ewrte.h
_CoreGroup.h
EW_END_OF_FIELDS
#define EW_END_OF_FIELDS(aClass)
Definition: ewrte.h:460
EW_DECLARE_CLASS
#define EW_DECLARE_CLASS(aClass)
Definition: ewrte.h:393
WidgetSetHorizontalValueBar_onUpdatePos
void WidgetSetHorizontalValueBar_onUpdatePos(WidgetSetHorizontalValueBar _this, XObject sender)
Definition: WidgetSet.c:2237
XSlot
Definition: ewrte.h:2114
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
WidgetSetHorizontalValueBar_OnGetCurrentValue
XInt32 WidgetSetHorizontalValueBar_OnGetCurrentValue(WidgetSetHorizontalValueBar _this)
Definition: WidgetSet.c:2345
_obj_XObject
Definition: ewrte.h:281
WidgetSetHorizontalValueBar_OnSetCurrentValue
void WidgetSetHorizontalValueBar_OnSetCurrentValue(WidgetSetHorizontalValueBar _this, XInt32 value)
Definition: WidgetSet.c:2370
aOutline
XRect CoreOutline aOutline XRect CoreOutline aOutline
Definition: _CoreQuadView.h:109
XInt32
signed long XInt32
Definition: ewrte.h:1586
XBool
char XBool
Definition: ewrte.h:1592
XEnum
unsigned long XEnum
Definition: ewrte.h:1593
CoreCursorHit
XRect CoreOutline aOutline CoreCursorHit(CoreGroup _this, XRect aArea, XInt32 aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason) EW_METHOD(ArrangeView
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
WidgetSetHorizontalValueBar_onConfigChanged
void WidgetSetHorizontalValueBar_onConfigChanged(WidgetSetHorizontalValueBar _this, XObject sender)
Definition: WidgetSet.c:2318
XRect
Definition: ewrte.h:1639
WidgetSetHorizontalValueBar_OnSetAppearance
void WidgetSetHorizontalValueBar_OnSetAppearance(WidgetSetHorizontalValueBar _this, WidgetSetHorizontalValueBarConfig value)
Definition: WidgetSet.c:2382
EffectsFader
EffectsFader(EffectsShowHideTransition _this) EW_METHOD(CreateRestoreFader
WidgetSetHorizontalValueBar_onEndFloatEffect
void WidgetSetHorizontalValueBar_onEndFloatEffect(WidgetSetHorizontalValueBar _this, XObject sender)
Definition: WidgetSet.c:2297
XSet
unsigned long XSet
Definition: ewrte.h:1594
aOpacity
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 aOpacity
Definition: _CoreOutline.h:172
WidgetSetHorizontalValueBar_OnSetBounds
void WidgetSetHorizontalValueBar_OnSetBounds(WidgetSetHorizontalValueBar _this, XRect value)
Definition: WidgetSet.c:1876
EW_METHOD
EW_METHOD(initLayoutContext, void)(CoreRectView _this
XFloat
float XFloat
Definition: ewrte.h:1595
aBounds
XRect aBounds
Definition: _WidgetSetHorizontalValueBar.h:194
aClip
XRect CoreOutline aOutline GraphicsCanvas XRect aClip
Definition: _CoreOutline.h:171
sender
XRect CoreOutline aOutline XObject sender
Definition: _ApplicationRadioInterface.h:186
XPoint
Definition: ewrte.h:1616
EW_PROPERTY
#define EW_PROPERTY(aName, aType)
Definition: ewrte.h:466
aOffset
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint aOffset
Definition: _CoreOutline.h:172
EW_OBJECT
#define EW_OBJECT(aName, aObjectClass)
Definition: ewrte.h:468
aCanvas
XRect CoreOutline aOutline GraphicsCanvas aCanvas
Definition: _CoreOutline.h:171
value
XRect CoreOutline aOutline XRect value
Definition: _WidgetSetHorizontalValueBar.h:227
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
_EffectsFloatEffect.h
aBlend
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 XBool aBlend
Definition: _CoreOutline.h:172
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451