WebRadioApp  0.1
_EffectsVisibilityFader.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 _EffectsVisibilityFader_H
28 #define _EffectsVisibilityFader_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 "_EffectsFader.h"
46 
47 /* Forward declaration of the class Core::Group */
48 #ifndef _CoreGroup_
49  EW_DECLARE_CLASS( CoreGroup )
50 #define _CoreGroup_
51 #endif
52 
53 /* Forward declaration of the class Effects::FaderTask */
54 #ifndef _EffectsFaderTask_
55  EW_DECLARE_CLASS( EffectsFaderTask )
56 #define _EffectsFaderTask_
57 #endif
58 
59 /* Forward declaration of the class Effects::VisibilityFader */
60 #ifndef _EffectsVisibilityFader_
61  EW_DECLARE_CLASS( EffectsVisibilityFader )
62 #define _EffectsVisibilityFader_
63 #endif
64 
65 
66 /* The class Effects::VisibilityFader provides functionality for the most primitive
67  fade-in and fade-out transitions affecting the pure visibility of a given GUI
68  component. This fader is thus ideal wherever one GUI component should instantly
69  appear or disappear in context of another component. In fact, this version of
70  a fader does not implement any animation effects to smoothly change the state
71  of the affected component.
72  With the property @Visible you configure, whether the fader should show or hide
73  the GUI component. When you intend to show the GUI component, you can additionally
74  specify in the property @Position where it should appear. In such case set the
75  property @UseCurrentState to the value 'false'. If the property @UseCurrentState
76  is 'true', the GUI component will appear at position, the component stores already
77  in its own Bounds property.
78  The fader automatically takes care of adding the GUI component to the intended
79  owner, when the component should appear and it is not yet a member within the
80  owner. Moreover, when showing the component, the fader automatically focuses
81  it and restacks it to appear above all other sibling views existing already within
82  the owner component. This behavior can be configured by modifying the properties
83  @AssignFocus and @RestackTopmost.
84  The fader automatically removes the GUI component from its owner, when the component
85  disappears. This behavior can be changed by modifying the property @RemoveIfHidden.
86  Please note, when the fader is configured to fade-in (show) the GUI component,
87  the affected operation is performed just at the beginning of all other transitions
88  running simultaneously, in other words, during the start phase of the transition.
89  In turn, if the fader is configured to fade-out (hide) the component, the operation
90  is executed during the end phase of the transition. This behavior can be modified
91  by using the properties @ShowAtStart and @HideAtStart.
92  Applying the fade-out transition on a GUI component, which is already invisible
93  has no effect. Similarly, the fade-in transition has no effect if the GUI component
94  is already visible at the specified @Position. In both cases the affected component
95  retains its actual state.
96  In practice, you create an instance of the fader class, configure its properties
97  (in particular the property @Visible) according to the desired kind of transition
98  and pass both, the fader instance and the affected GUI component as parameters
99  in the invocation of the method Core::Group.FadeGroup(). */
100 EW_DEFINE_FIELDS( EffectsVisibilityFader, EffectsFader )
101  EW_PROPERTY( Position, XPoint )
102  EW_PROPERTY( ShowAtStart, XBool )
103  EW_PROPERTY( HideAtStart, XBool )
104  EW_VARIABLE( finished, XBool )
105 EW_END_OF_FIELDS( EffectsVisibilityFader )
106 
107 /* Virtual Method Table (VMT) for the class : 'Effects::VisibilityFader' */
108 EW_DEFINE_METHODS( EffectsVisibilityFader, EffectsFader )
109  EW_METHOD( IsFinished, XBool )( EffectsVisibilityFader _this )
110  EW_METHOD( OnEnd, void )( EffectsVisibilityFader _this )
111  EW_METHOD( OnStart, void )( EffectsVisibilityFader _this )
112 EW_END_OF_METHODS( EffectsVisibilityFader )
113 
114 /* The method IsFinished() should return 'true' if the fader has finalized its fading
115  animation and 'false' if the animation is not started or it is still in progress.
116  This method should therefore be overridden in derived classes to evaluate the
117  state of animation effects used inside the fader. */
118 XBool EffectsVisibilityFader_IsFinished( EffectsVisibilityFader _this );
119 
120 /* The method OnEnd() is invoked automatically just in the moment, when this fader
121  and all other faders belonging to the same fading task have signaled that they
122  are finished with their animations. The default implementation of this method
123  simply does nothing.
124  Derived classes can override this method and implement there the code to complete
125  the animation (e.g. to remove the group from its owner after it has been faded-out,
126  etc.). The implementation of the overridden OnEnd() method has to use the variables
127  @Group and @Owner to determine on which group the fader has applied the animation.
128  Depending on the kind of the implemented animation, the OnEnd() method can also
129  evaluate the properties @UseCurrentState, @AssignFocus and @RestackTopmost. */
130 void EffectsVisibilityFader_OnEnd( EffectsVisibilityFader _this );
131 
132 /* The method OnStart() is invoked automatically just in the moment, when the fader
133  is triggered to begin its animation. The default implementation of this method
134  simply calls the @Complete() method indicating so, that the fader is done with
135  its work. Thereupon the next fader waiting for its execution can start.
136  Derived classes should override this method and implement there the code to prepare
137  and start the desired fade-in/out animation effects. The implementation of the
138  overridden OnStart() method has to use the variables @Group and @Owner to determine
139  on which group the fader should apply the animation. Depending on the kind of
140  the implemented animation, the OnStart() method can also evaluate the properties
141  @UseCurrentState, @AssignFocus and @RestackTopmost.
142  Please note, if there is a slot method associated to the property @OnInitialize,
143  this slot method is signaled shortly before the method OnStart() is executed
144  given the slot method a possibility to apply more individual initialization steps
145  on the fader just before the animation begins.
146  When the animation reaches its end (e.g. when the animation effects used inside
147  the fader do terminate), your implementation of the fader should invoke the method
148  @Complete() otherwise the animation is considered as still being in progress
149  causing other pending faders to wait. */
150 void EffectsVisibilityFader_OnStart( EffectsVisibilityFader _this );
151 
152 #ifdef __cplusplus
153  }
154 #endif
155 
156 #endif /* _EffectsVisibilityFader_H */
157 
158 /* Embedded Wizard */
ewrte.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
EW_METHOD
EW_METHOD(IsFinished, XBool)(EffectsVisibilityFader _this) EW_METHOD(OnEnd
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
EffectsVisibilityFader_IsFinished
XBool EffectsVisibilityFader_IsFinished(EffectsVisibilityFader _this)
Definition: Effects.c:1537
XBool
char XBool
Definition: ewrte.h:1592
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
EffectsFader
EffectsFader(EffectsShowHideTransition _this) EW_METHOD(CreateRestoreFader
_EffectsFader.h
XPoint
Definition: ewrte.h:1616
EffectsVisibilityFader_OnStart
void EffectsVisibilityFader_OnStart(EffectsVisibilityFader _this)
Definition: Effects.c:1591
EW_PROPERTY
#define EW_PROPERTY(aName, aType)
Definition: ewrte.h:466
EffectsVisibilityFader_OnEnd
void EffectsVisibilityFader_OnEnd(EffectsVisibilityFader _this)
Definition: Effects.c:1552
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451