WebRadioApp  0.1
_ViewsFrame.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 _ViewsFrame_H
28 #define _ViewsFrame_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 "_CoreRectView.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 Core::LayoutContext */
54 #ifndef _CoreLayoutContext_
55  EW_DECLARE_CLASS( CoreLayoutContext )
56 #define _CoreLayoutContext_
57 #endif
58 
59 /* Forward declaration of the class Core::Timer */
60 #ifndef _CoreTimer_
61  EW_DECLARE_CLASS( CoreTimer )
62 #define _CoreTimer_
63 #endif
64 
65 /* Forward declaration of the class Core::View */
66 #ifndef _CoreView_
67  EW_DECLARE_CLASS( CoreView )
68 #define _CoreView_
69 #endif
70 
71 /* Forward declaration of the class Graphics::Canvas */
72 #ifndef _GraphicsCanvas_
73  EW_DECLARE_CLASS( GraphicsCanvas )
74 #define _GraphicsCanvas_
75 #endif
76 
77 /* Forward declaration of the class Resources::Bitmap */
78 #ifndef _ResourcesBitmap_
79  EW_DECLARE_CLASS( ResourcesBitmap )
80 #define _ResourcesBitmap_
81 #endif
82 
83 /* Forward declaration of the class Views::Frame */
84 #ifndef _ViewsFrame_
85  EW_DECLARE_CLASS( ViewsFrame )
86 #define _ViewsFrame_
87 #endif
88 
89 
90 /* The class Views::Frame provides a kind of view specialized to draw free scalable
91  frames by composing them of bitmap segments. These segments are used to draw
92  the frame's corners, to fill its edges and to fill its interior area. The bitmap
93  has thus to contain nine equal segments arranged in three rows and three columns.
94  The top-left segment e.g. is used to draw the top-left corner of the frame. In
95  contrast, the top-middle segment corresponds to the frame's top edge. If the
96  edge is wider than the segment, multiple copies of the segment are used to fill
97  the entire edge. In this manner the entire frame is composed by simply copying
98  bitmap segments. It's up to you to provide suitable bitmaps. The only thing you
99  have to take in account when designing them is, that their size have to be a
100  multiple of 3.
101  The bitmap is determined by the property @Bitmap. In case of a multi-frame bitmap
102  the desired frame can be selected by the property @FrameNumber. Please don't
103  confuse these multi-frame bitmaps with the frames described above. Multi-frame
104  bitmaps, which are able to be animated can be controlled by the properties @Animated
105  and @Endless. Alternatively, the animation can be controlled by sending signals
106  to the slot methods @StartAnimation and @StopAnimation.
107  The position and the size of the area to draw the frame is determined by the
108  property @Bounds. The properties @Color, @ColorTL, @ColorTR, @ColorBL and @ColorBR
109  can be used to tint the frame or to modulate its transparency. For each view's
110  corner different color can be set, so the frame can be shown with fancy color
111  or opacity gradients. The particular effect of the colors depends on the type
112  of the bitmap used to compose the frame:
113  - Alpha8 bitmaps will be tinted with the given colors due to the fact they don't
114  provide their own color information. This allows one and the same Alpha8 bitmap
115  to be drawn with different colors.
116  - In case of Native, Index8 or RGB565 bitmaps the opacity of the bitmap is modulated
117  by the color's alpha value. The original RGB information stored in the bitmap
118  are not affected. This allows one and the same bitmap to be drawn with different
119  transparencies.
120  With the properties @Edges and @NoEdgesLimit you can individually configure which
121  edges of the frame view are displayed.
122  The visibility of the frame is controlled by the properties @Visible, @AlphaBlended,
123  @Opacity and @Embedded. In particular the property @Embedded can determine whether
124  the corresponding view is limited (== embedded) to the boundary of a sibling
125  Core::Outline view or not. The embedding of views within a Core::Outline allows
126  a kind of sub-groups within the GUI component itself. Very useful for any kind
127  of scrollable lists, menus, etc. */
128 EW_DEFINE_FIELDS( ViewsFrame, CoreRectView )
129  EW_VARIABLE( timer, CoreTimer )
130  EW_PROPERTY( Bitmap, ResourcesBitmap )
131  EW_PROPERTY( OnFinished, XSlot )
132  EW_VARIABLE( animFrameNumber, XInt32 )
133  EW_PROPERTY( ColorBL, XColor )
134  EW_PROPERTY( ColorBR, XColor )
135  EW_PROPERTY( ColorTR, XColor )
136  EW_PROPERTY( ColorTL, XColor )
137  EW_PROPERTY( Edges, XSet )
138  EW_PROPERTY( FrameNumber, XInt32 )
139  EW_PROPERTY( Opacity, XInt32 )
140  EW_VARIABLE( startTime, XUInt32 )
141  EW_PROPERTY( NoEdgesLimit, XPoint )
142  EW_PROPERTY( Animated, XBool )
143  EW_PROPERTY( Endless, XBool )
144 EW_END_OF_FIELDS( ViewsFrame )
145 
146 /* Virtual Method Table (VMT) for the class : 'Views::Frame' */
147 EW_DEFINE_METHODS( ViewsFrame, CoreRectView )
148  EW_METHOD( initLayoutContext, void )( CoreRectView _this, XRect aBounds, CoreOutline
149  aOutline )
150  EW_METHOD( GetRoot, CoreRoot )( CoreView _this )
151  EW_METHOD( Draw, void )( ViewsFrame _this, GraphicsCanvas aCanvas,
153  EW_METHOD( HandleEvent, XObject )( CoreView _this, CoreEvent aEvent )
154  EW_METHOD( CursorHitTest, CoreCursorHit )( CoreView _this, XRect aArea, XInt32
155  aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason )
156  EW_METHOD( ArrangeView, XPoint )( CoreRectView _this, XRect aBounds, XEnum
157  aFormation )
158  EW_METHOD( MoveView, void )( CoreRectView _this, XPoint aOffset, XBool
159  aFastMove )
160  EW_METHOD( GetExtent, XRect )( CoreRectView _this )
161  EW_METHOD( ChangeViewState, void )( CoreView _this, XSet aSetState, XSet aClearState )
162  EW_METHOD( OnSetBounds, void )( CoreRectView _this, XRect value )
163 EW_END_OF_METHODS( ViewsFrame )
164 
165 /* The method Draw() is invoked automatically if parts of the view should be redrawn
166  on the screen. This can occur when e.g. the view has been moved or the appearance
167  of the view has changed before.
168  Draw() is invoked automatically by the framework, you never will need to invoke
169  this method directly. However you can request an invocation of this method by
170  calling the method InvalidateArea() of the views @Owner. Usually this is also
171  unnecessary unless you are developing your own view.
172  The passed parameters determine the drawing destination aCanvas and the area
173  to redraw aClip in the coordinate space of the canvas. The parameter aOffset
174  contains the displacement between the origin of the views owner and the origin
175  of the canvas. You will need it to convert views coordinates into these of the
176  canvas.
177  The parameter aOpacity contains the opacity descended from this view's @Owner.
178  It lies in range 0 .. 255. If the view implements its own 'Opacity', 'Color',
179  etc. properties, the Draw() method should calculate the resulting real opacity
180  by mixing the values of these properties with the one passed in aOpacity parameter.
181  The parameter aBlend contains the blending mode descended from this view's @Owner.
182  It determines, whether the view should be drawn with alpha-blending active or
183  not. If aBlend is false, the outputs of the view should overwrite the corresponding
184  pixel in the drawing destination aCanvas. If aBlend is true, the outputs should
185  be mixed with the pixel already stored in aCanvas. For this purpose all Graphics
186  Engine functions provide a parameter to specify the mode for the respective drawing
187  operation. If the view implements its own 'Blend' property, the Draw() method
188  should calculate the resulting real blend mode by using logical AND operation
189  of the value of the property and the one passed in aBlend parameter. */
190 void ViewsFrame_Draw( ViewsFrame _this, GraphicsCanvas aCanvas, XRect aClip, XPoint
192 
193 /* 'C' function for method : 'Views::Frame.observerSlot()' */
194 void ViewsFrame_observerSlot( ViewsFrame _this, XObject sender );
195 
196 /* 'C' function for method : 'Views::Frame.timerSlot()' */
197 void ViewsFrame_timerSlot( ViewsFrame _this, XObject sender );
198 
199 /* 'C' function for method : 'Views::Frame.OnSetColor()' */
200 void ViewsFrame_OnSetColor( ViewsFrame _this, XColor value );
201 
202 /* 'C' function for method : 'Views::Frame.OnSetAnimated()' */
203 void ViewsFrame_OnSetAnimated( ViewsFrame _this, XBool value );
204 
205 /* 'C' function for method : 'Views::Frame.OnSetEdges()' */
206 void ViewsFrame_OnSetEdges( ViewsFrame _this, XSet value );
207 
208 /* 'C' function for method : 'Views::Frame.OnSetFrameNumber()' */
209 void ViewsFrame_OnSetFrameNumber( ViewsFrame _this, XInt32 value );
210 
211 /* 'C' function for method : 'Views::Frame.OnSetBitmap()' */
212 void ViewsFrame_OnSetBitmap( ViewsFrame _this, ResourcesBitmap value );
213 
214 /* 'C' function for method : 'Views::Frame.OnSetVisible()' */
215 void ViewsFrame_OnSetVisible( ViewsFrame _this, XBool value );
216 
217 /* 'C' function for method : 'Views::Frame.OnSetNoEdgesLimit()' */
218 void ViewsFrame_OnSetNoEdgesLimit( ViewsFrame _this, XPoint value );
219 
220 #ifdef __cplusplus
221  }
222 #endif
223 
224 #endif /* _ViewsFrame_H */
225 
226 /* Embedded Wizard */
aClip
XRect CoreOutline aOutline GraphicsCanvas XRect aClip
Definition: _ViewsFrame.h:190
ViewsFrame_OnSetVisible
void ViewsFrame_OnSetVisible(ViewsFrame _this, XBool value)
Definition: Views.c:574
ewrte.h
ViewsFrame_OnSetBitmap
void ViewsFrame_OnSetBitmap(ViewsFrame _this, ResourcesBitmap value)
Definition: Views.c:546
aOpacity
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 aOpacity
Definition: _ViewsFrame.h:191
XColor
Definition: ewrte.h:1700
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
XSlot
Definition: ewrte.h:2114
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
aBounds
XRect aBounds
Definition: _ViewsFrame.h:148
_obj_XObject
Definition: ewrte.h:281
ViewsFrame_OnSetNoEdgesLimit
void ViewsFrame_OnSetNoEdgesLimit(ViewsFrame _this, XPoint value)
Definition: Views.c:583
ViewsFrame_observerSlot
void ViewsFrame_observerSlot(ViewsFrame _this, XObject sender)
Definition: Views.c:406
aCanvas
XRect CoreOutline aOutline GraphicsCanvas aCanvas
Definition: _ViewsFrame.h:190
EW_METHOD
EW_METHOD(initLayoutContext, void)(CoreRectView _this
aOutline
XRect CoreOutline aOutline XRect CoreOutline aOutline
Definition: _CoreQuadView.h:109
XInt32
signed long XInt32
Definition: ewrte.h:1586
value
XRect CoreOutline aOutline XPoint value
Definition: _ViewsWarpView.h:137
ViewsFrame_OnSetFrameNumber
void ViewsFrame_OnSetFrameNumber(ViewsFrame _this, XInt32 value)
Definition: Views.c:527
XBool
char XBool
Definition: ewrte.h:1592
XEnum
unsigned long XEnum
Definition: ewrte.h:1593
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
XRect
Definition: ewrte.h:1639
_CoreRectView.h
XSet
unsigned long XSet
Definition: ewrte.h:1594
CoreCursorHit
XRect CoreOutline aOutline CoreCursorHit(CoreView _this, XRect aArea, XInt32 aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason) EW_METHOD(ArrangeView
ViewsFrame_OnSetAnimated
void ViewsFrame_OnSetAnimated(ViewsFrame _this, XBool value)
Definition: Views.c:485
ViewsFrame_OnSetEdges
void ViewsFrame_OnSetEdges(ViewsFrame _this, XSet value)
Definition: Views.c:514
ViewsFrame_OnSetColor
void ViewsFrame_OnSetColor(ViewsFrame _this, XColor value)
Definition: Views.c:468
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
ViewsFrame_Draw
void ViewsFrame_Draw(ViewsFrame _this, GraphicsCanvas aCanvas, XRect aClip, XPoint aOffset, XInt32 aOpacity, XBool aBlend)
Definition: Views.c:274
XUInt32
unsigned long XUInt32
Definition: ewrte.h:1590
aBlend
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 XBool aBlend
Definition: _ViewsFrame.h:191
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
ViewsFrame_timerSlot
void ViewsFrame_timerSlot(ViewsFrame _this, XObject sender)
Definition: Views.c:417
aOffset
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint aOffset
Definition: _ViewsFrame.h:191
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451