WebRadioApp  0.1
_ViewsImage.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 _ViewsImage_H
28 #define _ViewsImage_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::Image */
84 #ifndef _ViewsImage_
85  EW_DECLARE_CLASS( ViewsImage )
86 #define _ViewsImage_
87 #endif
88 
89 
90 /* The class Views::Image provides a kind of view specialized to draw and animate
91  bitmaps. The bitmap is determined by the property @Bitmap. In case of a multi-frame
92  bitmap the desired frame can be selected by the property @FrameNumber. The animation
93  of bitmaps containing short video sequences is controlled by the properties @Animated
94  and @Endless. Alternatively, the animation can be controlled by sending signals
95  to the slot methods @StartAnimation and @StopAnimation.
96  The position and the size of the area where the bitmap is drawn is determined
97  by the property @Bounds. If the size of this area differs from the size of the
98  bitmap the bitmap can be aligned or scaled within this area. This is controlled
99  by the property @Alignment. With the property @Orientation the displayed content
100  can be rotated. The properties @Color, @ColorTL, @ColorTR, @ColorBL and @ColorBR
101  can be used to tint the bitmap or to modulate its transparency. For each view's
102  corner different color can be set, so the bitmap can be shown with fancy color
103  or opacity gradients. The particular effect of the colors depends on the type
104  of the bitmap:
105  - Alpha8 bitmaps will be tinted with the given colors due to the fact they don't
106  provide their own color information. This allows one and the same Alpha8 bitmap
107  to be drawn with different colors.
108  - In case of Native, Index8 or RGB565 bitmaps the opacity of the bitmap is modulated
109  by the color's alpha value. The original RGB information stored in the bitmap
110  are not affected. This allows one and the same bitmap to be drawn with different
111  transparencies.
112  The property @SlideHandler permits the image view to be connected together with
113  an interactive Core::SlideTouchHandler. In this manner the user can scroll the
114  displayed bitmap by simply touching the slide handler on the screen. Alternatively,
115  the scroll position can be controlled by the value of the property @ScrollOffset.
116  The visibility of the image is controlled by the properties @Visible, @AlphaBlended,
117  @Opacity and @Embedded. In particular the property @Embedded can determine whether
118  the corresponding view is limited (== embedded) to the boundary of a sibling
119  Core::Outline view or not. The embedding of views within a Core::Outline allows
120  a kind of sub-groups within the GUI component itself. Very useful for any kind
121  of scrollable lists, menus, etc. */
122 EW_DEFINE_FIELDS( ViewsImage, CoreRectView )
123  EW_VARIABLE( timer, CoreTimer )
124  EW_PROPERTY( Bitmap, ResourcesBitmap )
125  EW_PROPERTY( OnFinished, XSlot )
126  EW_VARIABLE( startTime, XUInt32 )
127  EW_VARIABLE( animFrameNumber, XInt32 )
128  EW_PROPERTY( ColorBL, XColor )
129  EW_PROPERTY( ColorBR, XColor )
130  EW_PROPERTY( ColorTR, XColor )
131  EW_PROPERTY( ColorTL, XColor )
132  EW_PROPERTY( ScrollOffset, XPoint )
133  EW_PROPERTY( Alignment, XSet )
134  EW_PROPERTY( FrameNumber, XInt32 )
135  EW_PROPERTY( Opacity, XInt32 )
136  EW_PROPERTY( Orientation, XEnum )
137  EW_PROPERTY( Animated, XBool )
138  EW_PROPERTY( Endless, XBool )
139  EW_PROPERTY( AutoSize, XBool )
140  EW_PROPERTY( Quality, XBool )
141 EW_END_OF_FIELDS( ViewsImage )
142 
143 /* Virtual Method Table (VMT) for the class : 'Views::Image' */
144 EW_DEFINE_METHODS( ViewsImage, CoreRectView )
145  EW_METHOD( initLayoutContext, void )( CoreRectView _this, XRect aBounds, CoreOutline
146  aOutline )
147  EW_METHOD( GetRoot, CoreRoot )( CoreView _this )
148  EW_METHOD( Draw, void )( ViewsImage _this, GraphicsCanvas aCanvas,
150  EW_METHOD( HandleEvent, XObject )( CoreView _this, CoreEvent aEvent )
151  EW_METHOD( CursorHitTest, CoreCursorHit )( CoreView _this, XRect aArea, XInt32
152  aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason )
153  EW_METHOD( ArrangeView, XPoint )( CoreRectView _this, XRect aBounds, XEnum
154  aFormation )
155  EW_METHOD( MoveView, void )( CoreRectView _this, XPoint aOffset, XBool
156  aFastMove )
157  EW_METHOD( GetExtent, XRect )( CoreRectView _this )
158  EW_METHOD( ChangeViewState, void )( CoreView _this, XSet aSetState, XSet aClearState )
159  EW_METHOD( OnSetBounds, void )( CoreRectView _this, XRect value )
160 EW_END_OF_METHODS( ViewsImage )
161 
162 /* The method Draw() is invoked automatically if parts of the view should be redrawn
163  on the screen. This can occur when e.g. the view has been moved or the appearance
164  of the view has changed before.
165  Draw() is invoked automatically by the framework, you never will need to invoke
166  this method directly. However you can request an invocation of this method by
167  calling the method InvalidateArea() of the views @Owner. Usually this is also
168  unnecessary unless you are developing your own view.
169  The passed parameters determine the drawing destination aCanvas and the area
170  to redraw aClip in the coordinate space of the canvas. The parameter aOffset
171  contains the displacement between the origin of the views owner and the origin
172  of the canvas. You will need it to convert views coordinates into these of the
173  canvas.
174  The parameter aOpacity contains the opacity descended from this view's @Owner.
175  It lies in range 0 .. 255. If the view implements its own 'Opacity', 'Color',
176  etc. properties, the Draw() method should calculate the resulting real opacity
177  by mixing the values of these properties with the one passed in aOpacity parameter.
178  The parameter aBlend contains the blending mode descended from this view's @Owner.
179  It determines, whether the view should be drawn with alpha-blending active or
180  not. If aBlend is false, the outputs of the view should overwrite the corresponding
181  pixel in the drawing destination aCanvas. If aBlend is true, the outputs should
182  be mixed with the pixel already stored in aCanvas. For this purpose all Graphics
183  Engine functions provide a parameter to specify the mode for the respective drawing
184  operation. If the view implements its own 'Blend' property, the Draw() method
185  should calculate the resulting real blend mode by using logical AND operation
186  of the value of the property and the one passed in aBlend parameter. */
187 void ViewsImage_Draw( ViewsImage _this, GraphicsCanvas aCanvas, XRect aClip, XPoint
189 
190 /* 'C' function for method : 'Views::Image.observerSlot()' */
191 void ViewsImage_observerSlot( ViewsImage _this, XObject sender );
192 
193 /* 'C' function for method : 'Views::Image.timerSlot()' */
194 void ViewsImage_timerSlot( ViewsImage _this, XObject sender );
195 
196 /* 'C' function for method : 'Views::Image.OnSetColor()' */
197 void ViewsImage_OnSetColor( ViewsImage _this, XColor value );
198 
199 /* 'C' function for method : 'Views::Image.OnSetAnimated()' */
200 void ViewsImage_OnSetAnimated( ViewsImage _this, XBool value );
201 
202 /* 'C' function for method : 'Views::Image.OnSetAlignment()' */
203 void ViewsImage_OnSetAlignment( ViewsImage _this, XSet value );
204 
205 /* 'C' function for method : 'Views::Image.OnSetFrameNumber()' */
206 void ViewsImage_OnSetFrameNumber( ViewsImage _this, XInt32 value );
207 
208 /* 'C' function for method : 'Views::Image.OnSetBitmap()' */
209 void ViewsImage_OnSetBitmap( ViewsImage _this, ResourcesBitmap value );
210 
211 /* The method GetContentArea() returns the position and the size of an area where
212  the view will show the bitmap. This area is expressed in coordinates relative
213  to the top-left corner of the view's @Owner. The method takes in account all
214  properties which do affect the position and the alignment of the bitmap, e.g.
215  @Alignment or @ScrollOffset. */
216 XRect ViewsImage_GetContentArea( ViewsImage _this );
217 
218 #ifdef __cplusplus
219  }
220 #endif
221 
222 #endif /* _ViewsImage_H */
223 
224 /* Embedded Wizard */
ViewsImage_OnSetBitmap
void ViewsImage_OnSetBitmap(ViewsImage _this, ResourcesBitmap value)
Definition: Views.c:913
ViewsImage_observerSlot
void ViewsImage_observerSlot(ViewsImage _this, XObject sender)
Definition: Views.c:768
ewrte.h
XColor
Definition: ewrte.h:1700
aClip
XRect CoreOutline aOutline GraphicsCanvas XRect aClip
Definition: _ViewsImage.h:187
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(initLayoutContext, void)(CoreRectView _this
XSlot
Definition: ewrte.h:2114
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
_obj_XObject
Definition: ewrte.h:281
ViewsImage_timerSlot
void ViewsImage_timerSlot(ViewsImage _this, XObject sender)
Definition: Views.c:784
aOffset
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint aOffset
Definition: _ViewsImage.h:188
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
ViewsImage_OnSetAlignment
void ViewsImage_OnSetAlignment(ViewsImage _this, XSet value)
Definition: Views.c:881
aBlend
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 XBool aBlend
Definition: _ViewsImage.h:188
XBool
char XBool
Definition: ewrte.h:1592
XEnum
unsigned long XEnum
Definition: ewrte.h:1593
CoreCursorHit
XRect CoreOutline aOutline CoreCursorHit(CoreView _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
XRect
Definition: ewrte.h:1639
_CoreRectView.h
XSet
unsigned long XSet
Definition: ewrte.h:1594
ViewsImage_OnSetAnimated
void ViewsImage_OnSetAnimated(ViewsImage _this, XBool value)
Definition: Views.c:852
ViewsImage_OnSetFrameNumber
void ViewsImage_OnSetFrameNumber(ViewsImage _this, XInt32 value)
Definition: Views.c:894
aCanvas
XRect CoreOutline aOutline GraphicsCanvas aCanvas
Definition: _ViewsImage.h:187
aOpacity
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 aOpacity
Definition: _ViewsImage.h:188
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
XUInt32
unsigned long XUInt32
Definition: ewrte.h:1590
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
aBounds
XRect aBounds
Definition: _ViewsImage.h:145
ViewsImage_OnSetColor
void ViewsImage_OnSetColor(ViewsImage _this, XColor value)
Definition: Views.c:835
ViewsImage_Draw
void ViewsImage_Draw(ViewsImage _this, GraphicsCanvas aCanvas, XRect aClip, XPoint aOffset, XInt32 aOpacity, XBool aBlend)
Definition: Views.c:688
ViewsImage_GetContentArea
XRect ViewsImage_GetContentArea(ViewsImage _this)
Definition: Views.c:950
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451