WebRadioApp  0.1
_ViewsWarpImage.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 _ViewsWarpImage_H
28 #define _ViewsWarpImage_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 "_ViewsWarpView.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 Graphics::WarpMatrix */
78 #ifndef _GraphicsWarpMatrix_
79  EW_DECLARE_CLASS( GraphicsWarpMatrix )
80 #define _GraphicsWarpMatrix_
81 #endif
82 
83 /* Forward declaration of the class Resources::Bitmap */
84 #ifndef _ResourcesBitmap_
85  EW_DECLARE_CLASS( ResourcesBitmap )
86 #define _ResourcesBitmap_
87 #endif
88 
89 /* Forward declaration of the class Views::WarpImage */
90 #ifndef _ViewsWarpImage_
91  EW_DECLARE_CLASS( ViewsWarpImage )
92 #define _ViewsWarpImage_
93 #endif
94 
95 
96 /* The class Views::WarpImage provides a kind of view able to show a bitmap scaled
97  and rotated in the 2D/3D space. The bitmap is determined by the property @Bitmap.
98  In case of a multi-frame bitmap the desired frame can be selected by the property
99  @FrameNumber. The animation of bitmaps containing short video sequences is controlled
100  by the properties @Animated and @Endless. Alternatively, the animation can be
101  controlled by sending signals to the slot methods @StartAnimation and @StopAnimation.
102  First of all, Embedded Wizard is not a 3D GUI development tool! Its lightweight
103  3D functionality is limited to the perspectively correct projection of an image
104  onto a quad (four corners polygon). Depending on this polygon's shape, different
105  kinds of transformations are possible, e.g. scaling, rotation or mirroring. The
106  polygon is determined by the four corners @Point1, @Point2, @Point3 and @Point4.
107  Moving these corners is thus sufficient to determine the desired transformation.
108  More sophisticated way to control the transformations is provided by the methods
109  @RotateAndScale() and @Warp3D(). These methods derive the polygon coordinates
110  automatically from the given parameters.
111  The properties @Color, @Color1, @Color2, @Color3 and @Color4 can be used to tint
112  the bitmap or to modulate its transparency. For each polygon corner different
113  color can be set, so the bitmap can be shown with fancy color or opacity gradients.
114  The particular effect of the colors depends on the type of the bitmap:
115  - Alpha8 bitmaps will be tinted with the given colors due to the fact they don't
116  provide their own color information. This allows one and the same Alpha8 bitmap
117  to be drawn with different colors.
118  - In case of Native, Index8 or RGB565 bitmaps the opacity of the bitmap is modulated
119  by the color's alpha value. The original RGB information stored in the bitmap
120  are not affected. This allows one and the same bitmap to be drawn with different
121  transparencies.
122  The visibility of the view 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( ViewsWarpImage, ViewsWarpView )
129  EW_VARIABLE( timer, CoreTimer )
130  EW_PROPERTY( Bitmap, ResourcesBitmap )
131  EW_PROPERTY( OnFinished, XSlot )
132  EW_VARIABLE( startTime, XUInt32 )
133  EW_VARIABLE( animFrameNumber, XInt32 )
134  EW_PROPERTY( Color4, XColor )
135  EW_PROPERTY( Color3, XColor )
136  EW_PROPERTY( Color2, XColor )
137  EW_PROPERTY( Color1, XColor )
138  EW_PROPERTY( Opacity, XInt32 )
139  EW_PROPERTY( FrameNumber, XInt32 )
140  EW_PROPERTY( Animated, XBool )
141  EW_PROPERTY( Endless, XBool )
142 EW_END_OF_FIELDS( ViewsWarpImage )
143 
144 /* Virtual Method Table (VMT) for the class : 'Views::WarpImage' */
145 EW_DEFINE_METHODS( ViewsWarpImage, ViewsWarpView )
146  EW_METHOD( initLayoutContext, void )( CoreQuadView _this, XRect aBounds, CoreOutline
147  aOutline )
148  EW_METHOD( GetRoot, CoreRoot )( CoreView _this )
149  EW_METHOD( Draw, void )( ViewsWarpImage _this, GraphicsCanvas aCanvas,
151  EW_METHOD( HandleEvent, XObject )( CoreView _this, CoreEvent aEvent )
152  EW_METHOD( CursorHitTest, CoreCursorHit )( CoreView _this, XRect aArea, XInt32
153  aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason )
154  EW_METHOD( ArrangeView, XPoint )( CoreQuadView _this, XRect aBounds, XEnum
155  aFormation )
156  EW_METHOD( MoveView, void )( CoreQuadView _this, XPoint aOffset, XBool
157  aFastMove )
158  EW_METHOD( GetExtent, XRect )( CoreQuadView _this )
159  EW_METHOD( ChangeViewState, void )( CoreView _this, XSet aSetState, XSet aClearState )
160  EW_METHOD( OnSetPoint4, void )( ViewsWarpView _this, XPoint value )
161  EW_METHOD( OnSetPoint3, void )( ViewsWarpView _this, XPoint value )
162  EW_METHOD( OnSetPoint2, void )( ViewsWarpView _this, XPoint value )
163  EW_METHOD( OnSetPoint1, void )( ViewsWarpView _this, XPoint value )
164 EW_END_OF_METHODS( ViewsWarpImage )
165 
166 /* The method Draw() is invoked automatically if parts of the view should be redrawn
167  on the screen. This can occur when e.g. the view has been moved or the appearance
168  of the view has changed before.
169  Draw() is invoked automatically by the framework, you never will need to invoke
170  this method directly. However you can request an invocation of this method by
171  calling the method InvalidateArea() of the views @Owner. Usually this is also
172  unnecessary unless you are developing your own view.
173  The passed parameters determine the drawing destination aCanvas and the area
174  to redraw aClip in the coordinate space of the canvas. The parameter aOffset
175  contains the displacement between the origin of the views owner and the origin
176  of the canvas. You will need it to convert views coordinates into these of the
177  canvas.
178  The parameter aOpacity contains the opacity descended from this view's @Owner.
179  It lies in range 0 .. 255. If the view implements its own 'Opacity', 'Color',
180  etc. properties, the Draw() method should calculate the resulting real opacity
181  by mixing the values of these properties with the one passed in aOpacity parameter.
182  The parameter aBlend contains the blending mode descended from this view's @Owner.
183  It determines, whether the view should be drawn with alpha-blending active or
184  not. If aBlend is false, the outputs of the view should overwrite the corresponding
185  pixel in the drawing destination aCanvas. If aBlend is true, the outputs should
186  be mixed with the pixel already stored in aCanvas. For this purpose all Graphics
187  Engine functions provide a parameter to specify the mode for the respective drawing
188  operation. If the view implements its own 'Blend' property, the Draw() method
189  should calculate the resulting real blend mode by using logical AND operation
190  of the value of the property and the one passed in aBlend parameter. */
191 void ViewsWarpImage_Draw( ViewsWarpImage _this, GraphicsCanvas aCanvas, XRect aClip,
193 
194 /* 'C' function for method : 'Views::WarpImage.observerSlot()' */
195 void ViewsWarpImage_observerSlot( ViewsWarpImage _this, XObject sender );
196 
197 /* 'C' function for method : 'Views::WarpImage.timerSlot()' */
198 void ViewsWarpImage_timerSlot( ViewsWarpImage _this, XObject sender );
199 
200 /* 'C' function for method : 'Views::WarpImage.OnSetAnimated()' */
201 void ViewsWarpImage_OnSetAnimated( ViewsWarpImage _this, XBool value );
202 
203 /* 'C' function for method : 'Views::WarpImage.OnSetColor()' */
204 void ViewsWarpImage_OnSetColor( ViewsWarpImage _this, XColor value );
205 
206 /* 'C' function for method : 'Views::WarpImage.OnSetFrameNumber()' */
207 void ViewsWarpImage_OnSetFrameNumber( ViewsWarpImage _this, XInt32 value );
208 
209 /* 'C' function for method : 'Views::WarpImage.OnSetBitmap()' */
210 void ViewsWarpImage_OnSetBitmap( ViewsWarpImage _this, ResourcesBitmap value );
211 
212 #ifdef __cplusplus
213  }
214 #endif
215 
216 #endif /* _ViewsWarpImage_H */
217 
218 /* Embedded Wizard */
ewrte.h
XColor
Definition: ewrte.h:1700
ViewsWarpImage_Draw
void ViewsWarpImage_Draw(ViewsWarpImage _this, GraphicsCanvas aCanvas, XRect aClip, XPoint aOffset, XInt32 aOpacity, XBool aBlend)
Definition: Views.c:2521
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
_obj_XObject
Definition: ewrte.h:281
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
aOffset
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint aOffset
Definition: _ViewsWarpImage.h:192
aBlend
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 XBool aBlend
Definition: _ViewsWarpImage.h:192
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
ViewsWarpImage_OnSetBitmap
void ViewsWarpImage_OnSetBitmap(ViewsWarpImage _this, ResourcesBitmap value)
Definition: Views.c:2731
aBounds
XRect aBounds
Definition: _ViewsWarpImage.h:146
ViewsWarpImage_OnSetColor
void ViewsWarpImage_OnSetColor(ViewsWarpImage _this, XColor value)
Definition: Views.c:2695
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
ViewsWarpImage_observerSlot
void ViewsWarpImage_observerSlot(ViewsWarpImage _this, XObject sender)
Definition: Views.c:2587
ViewsWarpImage_timerSlot
void ViewsWarpImage_timerSlot(ViewsWarpImage _this, XObject sender)
Definition: Views.c:2615
sender
XRect CoreOutline aOutline XObject sender
Definition: _ApplicationRadioInterface.h:186
ViewsWarpImage_OnSetFrameNumber
void ViewsWarpImage_OnSetFrameNumber(ViewsWarpImage _this, XInt32 value)
Definition: Views.c:2712
XPoint
Definition: ewrte.h:1616
EW_PROPERTY
#define EW_PROPERTY(aName, aType)
Definition: ewrte.h:466
aOpacity
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 aOpacity
Definition: _ViewsWarpImage.h:192
XUInt32
unsigned long XUInt32
Definition: ewrte.h:1590
EW_METHOD
EW_METHOD(initLayoutContext, void)(CoreQuadView _this
aCanvas
XRect CoreOutline aOutline GraphicsCanvas aCanvas
Definition: _ViewsWarpImage.h:191
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
_ViewsWarpView.h
ViewsWarpImage_OnSetAnimated
void ViewsWarpImage_OnSetAnimated(ViewsWarpImage _this, XBool value)
Definition: Views.c:2666
aClip
XRect CoreOutline aOutline GraphicsCanvas XRect aClip
Definition: _ViewsWarpImage.h:191
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451