WebRadioApp  0.1
_CoreOutline.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 _CoreOutline_H
28 #define _CoreOutline_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::Outline */
60 #ifndef _CoreOutline_
61  EW_DECLARE_CLASS( CoreOutline )
62 #define _CoreOutline_
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 Effects::PointEffect */
72 #ifndef _EffectsPointEffect_
73  EW_DECLARE_CLASS( EffectsPointEffect )
74 #define _EffectsPointEffect_
75 #endif
76 
77 /* Forward declaration of the class Graphics::Canvas */
78 #ifndef _GraphicsCanvas_
79  EW_DECLARE_CLASS( GraphicsCanvas )
80 #define _GraphicsCanvas_
81 #endif
82 
83 
84 /* The class Core::Outline provides a special kind of a view able to unite and control
85  its sibling views. It acts like a lightweight container for the views without
86  being the owner of them:
87  - Outline can control only views lying in front of it (views with higher Z-order).
88  Furthermore the affected views have to be signed explicitly with the state 'Embedded'.
89  Views lying behind the outline or views not signed as embedded are ignored by
90  the outline - they are controlled by their @Owner.
91  - Outline limits the visibility of the embedded views to its own boundary area.
92  In this manner the views are clipped at the outlines edges.
93  - Moving the outline causes the embedded views to be moved accordingly. Together
94  with the outline the views behave like a single union.
95  - The embedded views can be scrolled within the outline boundary area. The property
96  @ScrollOffset determines the desired displacement.
97  - A Core::SlideTouchHandler can be attached to the outline so the user can scroll
98  the outline content interactively by touching the screen. The property @SlideHandler
99  allows it.
100  - If the size of the outline changes, all embedded views are automatically arranged
101  within the outline boundary accordingly to their @Layout properties.
102  - The property @Formation allows more sophisticated arrangement of embedded views
103  in columns and rows. Even table-like grid is possible. It is useful to create
104  scrollable menus or lists. With the properties @SpaceHorz, @SpaceVert and @Space
105  the padding between the automatically arranged views is controlled.
106  - To find and enumerate the embedded views, the methods like @FindNextView(),
107  @FindPrevView(), @FindViewAtPosition, @FindViewInDirection() or @GetViewAtIndex()
108  are available.
109  - The method @EnsureVisible() has the job to scroll the outline contents until
110  the given view is visible. The method @AdjustContent() in contrast tries to scroll
111  the outline so the entire outline area is filled with views. Usually this is
112  used after the outline size changes.
113  The outline itself is invisible except the Embedded Wizard Composer, where all
114  outlines appear as semitransparent rectangles. This allows you to interact with
115  the outlines during the design time. */
116 EW_DEFINE_FIELDS( CoreOutline, CoreRectView )
117  EW_VARIABLE( scrollEffect, EffectsPointEffect )
118  EW_VARIABLE( onDoneScroll, XSlot )
119  EW_PROPERTY( OnUpdate, XSlot )
120  EW_PROPERTY( ScrollOffset, XPoint )
121  EW_PROPERTY( SpaceVert, XInt32 )
122  EW_PROPERTY( SpaceHorz, XInt32 )
123  EW_PROPERTY( Space, XInt32 )
124  EW_PROPERTY( Formation, XEnum )
125 EW_END_OF_FIELDS( CoreOutline )
126 
127 /* Virtual Method Table (VMT) for the class : 'Core::Outline' */
128 EW_DEFINE_METHODS( CoreOutline, CoreRectView )
129  EW_METHOD( initLayoutContext, void )( CoreRectView _this, XRect aBounds, CoreOutline
130  aOutline )
131  EW_METHOD( GetRoot, CoreRoot )( CoreView _this )
132  EW_METHOD( Draw, void )( CoreOutline _this, GraphicsCanvas aCanvas,
134  EW_METHOD( HandleEvent, XObject )( CoreView _this, CoreEvent aEvent )
135  EW_METHOD( CursorHitTest, CoreCursorHit )( CoreView _this, XRect aArea, XInt32
136  aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason )
137  EW_METHOD( ArrangeView, XPoint )( CoreRectView _this, XRect aBounds, XEnum
138  aFormation )
139  EW_METHOD( MoveView, void )( CoreRectView _this, XPoint aOffset, XBool
140  aFastMove )
141  EW_METHOD( GetExtent, XRect )( CoreRectView _this )
142  EW_METHOD( ChangeViewState, void )( CoreView _this, XSet aSetState, XSet aClearState )
143  EW_METHOD( OnSetBounds, void )( CoreOutline _this, XRect value )
144 EW_END_OF_METHODS( CoreOutline )
145 
146 /* The method Draw() is invoked automatically if parts of the view should be redrawn
147  on the screen. This can occur when e.g. the view has been moved or the appearance
148  of the view has changed before.
149  Draw() is invoked automatically by the framework, you never will need to invoke
150  this method directly. However you can request an invocation of this method by
151  calling the method InvalidateArea() of the views @Owner. Usually this is also
152  unnecessary unless you are developing your own view.
153  The passed parameters determine the drawing destination aCanvas and the area
154  to redraw aClip in the coordinate space of the canvas. The parameter aOffset
155  contains the displacement between the origin of the views owner and the origin
156  of the canvas. You will need it to convert views coordinates into these of the
157  canvas.
158  The parameter aOpacity contains the opacity descended from this view's @Owner.
159  It lies in range 0 .. 255. If the view implements its own 'Opacity', 'Color',
160  etc. properties, the Draw() method should calculate the resulting real opacity
161  by mixing the values of these properties with the one passed in aOpacity parameter.
162  The parameter aBlend contains the blending mode descended from this view's @Owner.
163  It determines, whether the view should be drawn with alpha-blending active or
164  not. If aBlend is false, the outputs of the view should overwrite the corresponding
165  pixel in the drawing destination aCanvas. If aBlend is true, the outputs should
166  be mixed with the pixel already stored in aCanvas. For this purpose all Graphics
167  Engine functions provide a parameter to specify the mode for the respective drawing
168  operation. If the view implements its own 'Blend' property, the Draw() method
169  should calculate the resulting real blend mode by using logical AND operation
170  of the value of the property and the one passed in aBlend parameter. */
171 void CoreOutline_Draw( CoreOutline _this, GraphicsCanvas aCanvas, XRect aClip, XPoint
173 
174 /* 'C' function for method : 'Core::Outline.OnSetBounds()' */
175 void CoreOutline_OnSetBounds( CoreOutline _this, XRect value );
176 
177 /* 'C' function for method : 'Core::Outline.onFinishScrollSlot()' */
178 void CoreOutline_onFinishScrollSlot( CoreOutline _this, XObject sender );
179 
180 /* 'C' function for method : 'Core::Outline.OnSetScrollOffset()' */
181 void CoreOutline_OnSetScrollOffset( CoreOutline _this, XPoint value );
182 
183 /* The method EnsureVisible() scrolls the content of the outline until the given
184  view aView is partially or fully within the outline boundary area @Bounds. The
185  respective mode is determined by the parameter aFullyVisible.
186  This scroll operation can optionally be animated by an effect passed in the parameter
187  aAnimationEffect. If aAnimationEffect == null, no animation is used and the scrolling
188  is executed immediately. After the operation is done, a signal is sent to the
189  optional slot method specified in the parameter aOnDoneScroll.
190  Please note, calling the method EnsureVisible() while an animation is running
191  will terminate it abruptly without the slot method aOnDoneScroll being notified.
192  More flexible approach to stop an activate animation is to use the method @StopScrollEffect().
193  Whether an animation is currently running can be queried by using the method
194  @IsScrollEffectActive(). */
195 void CoreOutline_EnsureVisible( CoreOutline _this, CoreView aView, XBool aFullyVisible,
196  EffectsPointEffect aAnimationEffect, XSlot aOnDoneScroll );
197 
198 /* Default onget method for the property 'ScrollOffset' */
199 XPoint CoreOutline_OnGetScrollOffset( CoreOutline _this );
200 
201 #ifdef __cplusplus
202  }
203 #endif
204 
205 #endif /* _CoreOutline_H */
206 
207 /* Embedded Wizard */
CoreOutline_EnsureVisible
void CoreOutline_EnsureVisible(CoreOutline _this, CoreView aView, XBool aFullyVisible, EffectsPointEffect aAnimationEffect, XSlot aOnDoneScroll)
Definition: Core.c:5750
EW_METHOD
EW_METHOD(initLayoutContext, void)(CoreRectView _this
ewrte.h
CoreOutline_OnGetScrollOffset
XPoint CoreOutline_OnGetScrollOffset(CoreOutline _this)
Definition: Core.c:5817
EW_END_OF_FIELDS
#define EW_END_OF_FIELDS(aClass)
Definition: ewrte.h:460
CoreCursorHit
XRect CoreOutline aOutline CoreCursorHit(CoreView _this, XRect aArea, XInt32 aFinger, XInt32 aStrikeCount, CoreView aDedicatedView, XSet aRetargetReason) EW_METHOD(ArrangeView
EW_DECLARE_CLASS
#define EW_DECLARE_CLASS(aClass)
Definition: ewrte.h:393
CoreOutline_OnSetBounds
void CoreOutline_OnSetBounds(CoreOutline _this, XRect value)
Definition: Core.c:5623
XSlot
Definition: ewrte.h:2114
EW_VARIABLE
#define EW_VARIABLE(aName, aType)
Definition: ewrte.h:464
ewgfx.h
aBounds
XRect aBounds
Definition: _CoreOutline.h:129
_obj_XObject
Definition: ewrte.h:281
CoreOutline_Draw
void CoreOutline_Draw(CoreOutline _this, GraphicsCanvas aCanvas, XRect aClip, XPoint aOffset, XInt32 aOpacity, XBool aBlend)
Definition: Core.c:5610
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
CoreOutline_OnSetScrollOffset
void CoreOutline_OnSetScrollOffset(CoreOutline _this, XPoint value)
Definition: Core.c:5710
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
aOpacity
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 aOpacity
Definition: _CoreOutline.h:172
CoreOutline_onFinishScrollSlot
void CoreOutline_onFinishScrollSlot(CoreOutline _this, XObject sender)
Definition: Core.c:5698
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
aCanvas
XRect CoreOutline aOutline GraphicsCanvas aCanvas
Definition: _CoreOutline.h:171
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
aBlend
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint XInt32 XBool aBlend
Definition: _CoreOutline.h:172
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451