WebRadioApp  0.1
_ViewsWarpView.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 _ViewsWarpView_H
28 #define _ViewsWarpView_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 "_CoreQuadView.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::View */
60 #ifndef _CoreView_
61  EW_DECLARE_CLASS( CoreView )
62 #define _CoreView_
63 #endif
64 
65 /* Forward declaration of the class Graphics::WarpMatrix */
66 #ifndef _GraphicsWarpMatrix_
67  EW_DECLARE_CLASS( GraphicsWarpMatrix )
68 #define _GraphicsWarpMatrix_
69 #endif
70 
71 /* Forward declaration of the class Views::WarpView */
72 #ifndef _ViewsWarpView_
73  EW_DECLARE_CLASS( ViewsWarpView )
74 #define _ViewsWarpView_
75 #endif
76 
77 
78 /* The class Views::WarpView provides the base functionality for views able to show
79  images scaled and rotated in the 2D/3D space. First of all, Embedded Wizard is
80  not a 3D GUI development tool! Its lightweight 3D functionality is limited to
81  the perspectively correct projection of an image onto a quad (four corners polygon).
82  Depending on this polygon's shape, different kinds of transformations are possible,
83  e.g. scaling, rotation or mirroring. The polygon is determined by the four corners
84  @Point1, @Point2, @Point3 and @Point4. Moving these corners is thus sufficient
85  to determine the desired transformation.
86  More sophisticated way to control the transformations is provided by the methods
87  @RotateAndScale() and @Warp3D(). These methods derive the polygon coordinates
88  automatically from the given parameters.
89  The visibility of the view is controlled by the properties @Visible, @AlphaBlended,
90  and @Embedded. In particular the property @Embedded can determine whether the
91  corresponding view is limited (== embedded) to the boundary of a sibling Core::Outline
92  view or not. The embedding of views within a Core::Outline allows a kind of sub-groups
93  within the GUI component itself. Very useful for any kind of scrollable lists,
94  menus, etc.
95  The class Views::WarpView doesn't define any particular appearance. It exists
96  as base for derived view classes like the Views::WarpImage and Views::WarpGroup. */
97 EW_DEFINE_FIELDS( ViewsWarpView, CoreQuadView )
98  EW_VARIABLE( matrix, GraphicsWarpMatrix )
99  EW_VARIABLE( dstPosY, XFloat )
100  EW_VARIABLE( dstPosX, XFloat )
101  EW_VARIABLE( bitmapSize, XPoint )
102  EW_ARRAY ( lighting, XInt32, [4])
103  EW_ARRAY ( vertices, XFloat, [4][3])
104  EW_PROPERTY( Shininess, XFloat )
105  EW_PROPERTY( LightingEffect, XFloat )
106  EW_PROPERTY( Clipping, XRect )
107  EW_PROPERTY( SourceAnchor, XPoint )
108  EW_PROPERTY( SourceArea, XRect )
109  EW_VARIABLE( newUpdateCase, XChar )
110  EW_VARIABLE( oldUpdateCase, XChar )
111  EW_PROPERTY( Quality, XBool )
112 EW_END_OF_FIELDS( ViewsWarpView )
113 
114 /* Virtual Method Table (VMT) for the class : 'Views::WarpView' */
115 EW_DEFINE_METHODS( ViewsWarpView, CoreQuadView )
116  EW_METHOD( initLayoutContext, void )( CoreQuadView _this, XRect aBounds, CoreOutline
117  aOutline )
118  EW_METHOD( GetRoot, CoreRoot )( CoreView _this )
119  EW_METHOD( Draw, void )( CoreView _this, GraphicsCanvas aCanvas,
121  EW_METHOD( HandleEvent, XObject )( CoreView _this, CoreEvent aEvent )
122  EW_METHOD( CursorHitTest, CoreCursorHit )( CoreView _this, XRect aArea, XInt32
123  aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason )
124  EW_METHOD( ArrangeView, XPoint )( CoreQuadView _this, XRect aBounds, XEnum
125  aFormation )
126  EW_METHOD( MoveView, void )( CoreQuadView _this, XPoint aOffset, XBool
127  aFastMove )
128  EW_METHOD( GetExtent, XRect )( CoreQuadView _this )
129  EW_METHOD( ChangeViewState, void )( CoreView _this, XSet aSetState, XSet aClearState )
130  EW_METHOD( OnSetPoint4, void )( ViewsWarpView _this, XPoint value )
131  EW_METHOD( OnSetPoint3, void )( ViewsWarpView _this, XPoint value )
132  EW_METHOD( OnSetPoint2, void )( ViewsWarpView _this, XPoint value )
133  EW_METHOD( OnSetPoint1, void )( ViewsWarpView _this, XPoint value )
134 EW_END_OF_METHODS( ViewsWarpView )
135 
136 /* 'C' function for method : 'Views::WarpView.OnSetPoint4()' */
137 void ViewsWarpView_OnSetPoint4( ViewsWarpView _this, XPoint value );
138 
139 /* 'C' function for method : 'Views::WarpView.OnSetPoint3()' */
140 void ViewsWarpView_OnSetPoint3( ViewsWarpView _this, XPoint value );
141 
142 /* 'C' function for method : 'Views::WarpView.OnSetPoint2()' */
143 void ViewsWarpView_OnSetPoint2( ViewsWarpView _this, XPoint value );
144 
145 /* 'C' function for method : 'Views::WarpView.OnSetPoint1()' */
146 void ViewsWarpView_OnSetPoint1( ViewsWarpView _this, XPoint value );
147 
148 /* 'C' function for method : 'Views::WarpView.calculateLight()' */
149 void ViewsWarpView_calculateLight( ViewsWarpView _this );
150 
151 /* 'C' function for method : 'Views::WarpView.update()' */
152 void ViewsWarpView_update( ViewsWarpView _this, XObject sender );
153 
154 /* 'C' function for method : 'Views::WarpView.OnSetSourceAnchor()' */
155 void ViewsWarpView_OnSetSourceAnchor( ViewsWarpView _this, XPoint value );
156 
157 /* The method Warp3D() performs a 2D or 3D transformation of the source image. The
158  transformation is performed around a reference position specified in the property
159  @SourceAnchor. This allows e.g. a rotation around the center of the image, etc.
160  The kind of transformation is determined by the warp matrix passed in the parameter
161  aMatrix. The corresponding Graphics::WarpMatrix class provides several method
162  for different kinds of transformations. Even one matrix can describe a complex
163  transformation composed of several separate steps.
164  The transformed image appears on the screen at the position aDstPos relative
165  to the top-left corner of this view's @Owner. The view itself takes the shape
166  resulting from this transformation and adapts its @Point1 .. @Point4 coordinates
167  accordingly. Simple 2D rotation and scaling operations can be performed by the
168  method @RotateAndScale(). */
169 void ViewsWarpView_Warp3D( ViewsWarpView _this, XPoint aDstPos, GraphicsWarpMatrix
170  aMatrix );
171 
172 #ifdef __cplusplus
173  }
174 #endif
175 
176 #endif /* _ViewsWarpView_H */
177 
178 /* Embedded Wizard */
aBounds
XRect aBounds
Definition: _ViewsWarpView.h:116
ewrte.h
EW_ARRAY
#define EW_ARRAY(aName, aType, aArraySize)
Definition: ewrte.h:470
ViewsWarpView_OnSetPoint4
void ViewsWarpView_OnSetPoint4(ViewsWarpView _this, XPoint value)
Definition: Views.c:2123
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_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
_obj_XObject
Definition: ewrte.h:281
XChar
unsigned short XChar
Definition: ewrte.h:1596
ViewsWarpView_OnSetSourceAnchor
void ViewsWarpView_OnSetSourceAnchor(ViewsWarpView _this, XPoint value)
Definition: Views.c:2338
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
ViewsWarpView_update
void ViewsWarpView_update(ViewsWarpView _this, XObject sender)
Definition: Views.c:2256
XBool
char XBool
Definition: ewrte.h:1592
EW_METHOD
EW_METHOD(initLayoutContext, void)(CoreQuadView _this
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
_CoreQuadView.h
ViewsWarpView_Warp3D
void ViewsWarpView_Warp3D(ViewsWarpView _this, XPoint aDstPos, GraphicsWarpMatrix aMatrix)
Definition: Views.c:2364
XSet
unsigned long XSet
Definition: ewrte.h:1594
aOpacity
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 aOpacity
Definition: _CoreOutline.h:172
XFloat
float XFloat
Definition: ewrte.h:1595
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
ViewsWarpView_OnSetPoint1
void ViewsWarpView_OnSetPoint1(ViewsWarpView _this, XPoint value)
Definition: Views.c:2168
ViewsWarpView_OnSetPoint2
void ViewsWarpView_OnSetPoint2(ViewsWarpView _this, XPoint value)
Definition: Views.c:2153
aCanvas
XRect CoreOutline aOutline GraphicsCanvas aCanvas
Definition: _CoreOutline.h:171
ViewsWarpView_OnSetPoint3
void ViewsWarpView_OnSetPoint3(ViewsWarpView _this, XPoint value)
Definition: Views.c:2138
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
ViewsWarpView_calculateLight
void ViewsWarpView_calculateLight(ViewsWarpView _this)
Definition: Views.c:2183
aBlend
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 XBool aBlend
Definition: _CoreOutline.h:172
CoreCursorHit
XRect CoreOutline aOutline CoreCursorHit(CoreView _this, XRect aArea, XInt32 aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason) EW_METHOD(ArrangeView
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451