WebRadioApp  0.1
_ResourcesFont.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 _ResourcesFont_H
28 #define _ResourcesFont_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 "_CoreResource.h"
46 
47 /* Forward declaration of the class Resources::Font */
48 #ifndef _ResourcesFont_
49  EW_DECLARE_CLASS( ResourcesFont )
50 #define _ResourcesFont_
51 #endif
52 
53 
54 /* The class Resources::Font provides the base functionality to handle fonts. A
55  font serves as a kind of container to store glyphs together with their metrics
56  and attributes. Fonts are used to print text on the screen. Due to their complexity
57  fonts can be loaded from font resources only. The dynamic creation or modification
58  of fonts at the runtime is not possible.
59  This class implements a set of methods and properties to query font and glyph
60  metrics and attributes. For example, the method @GetGlyphSize() returns the size
61  in pixel of the specified glyph. The method @GetTextExtent() in contrast determines
62  the area needed to print the given text.
63  Font are created at the design time by drag-and-drop them from the Embedded Wizard
64  Gallery into the Composer window where you are editing your GUI project. The
65  font attributes will be determined in the Embedded Wizard Inspector. */
66 EW_DEFINE_FIELDS( ResourcesFont, CoreResource )
67  EW_VARIABLE( font, XHandle )
68  EW_PROPERTY( Leading, XInt32 )
69  EW_PROPERTY( Descent, XInt32 )
70  EW_PROPERTY( Ascent, XInt32 )
71 EW_END_OF_FIELDS( ResourcesFont )
72 
73 /* Virtual Method Table (VMT) for the class : 'Resources::Font' */
74 EW_DEFINE_METHODS( ResourcesFont, CoreResource )
75 EW_END_OF_METHODS( ResourcesFont )
76 
77 /* 'C' function for method : 'Resources::Font.Done()' */
78 void ResourcesFont_Done( ResourcesFont _this );
79 
80 /* 'C' function for method : 'Resources::Font.Init()' */
81 void ResourcesFont_Init( ResourcesFont _this, XHandle aArg );
82 
83 /* 'C' function for method : 'Resources::Font.GetFlowTextAdvance()' */
84 XInt32 ResourcesFont_GetFlowTextAdvance( ResourcesFont _this, XString aFlowString );
85 
86 /* 'C' function for method : 'Resources::Font.ParseFlowString()' */
87 XString ResourcesFont_ParseFlowString( ResourcesFont _this, XString aString, XInt32
88  aOffset, XInt32 aWidth, XInt32 aMaxNoOfRows, XHandle aBidi );
89 
90 /* The method GetTextAdvance() calculates the horizontal advance in pixel of a text
91  row to print with this font. This value is calculated by the sum of advance values
92  of all affected glyphs. The text is passed in the parameter aString. The parameter
93  aOffset determines within aString the sign to start the calculation. If aOffset
94  is zero, the calculation starts with the first sign. The parameter aCount determines
95  the max. number of following sigs to calculate the advance value. If aCount is
96  -1, all signs until the end of the string will be evaluated. */
97 XInt32 ResourcesFont_GetTextAdvance( ResourcesFont _this, XString aString, XInt32
98  aOffset, XInt32 aCount );
99 
100 /* Default onget method for the property 'Leading' */
101 XInt32 ResourcesFont_OnGetLeading( ResourcesFont _this );
102 
103 /* Wrapper function for the non virtual method : 'Resources::Font.OnGetLeading()' */
104 XInt32 ResourcesFont__OnGetLeading( void* _this );
105 
106 /* The following define announces the presence of the method Resources::Font.OnGetLeading(). */
107 #define _ResourcesFont__OnGetLeading_
108 
109 /* Default onget method for the property 'Descent' */
110 XInt32 ResourcesFont_OnGetDescent( ResourcesFont _this );
111 
112 /* Wrapper function for the non virtual method : 'Resources::Font.OnGetDescent()' */
113 XInt32 ResourcesFont__OnGetDescent( void* _this );
114 
115 /* The following define announces the presence of the method Resources::Font.OnGetDescent(). */
116 #define _ResourcesFont__OnGetDescent_
117 
118 /* Default onget method for the property 'Ascent' */
119 XInt32 ResourcesFont_OnGetAscent( ResourcesFont _this );
120 
121 /* Wrapper function for the non virtual method : 'Resources::Font.OnGetAscent()' */
122 XInt32 ResourcesFont__OnGetAscent( void* _this );
123 
124 /* The following define announces the presence of the method Resources::Font.OnGetAscent(). */
125 #define _ResourcesFont__OnGetAscent_
126 
127 #ifdef __cplusplus
128  }
129 #endif
130 
131 #endif /* _ResourcesFont_H */
132 
133 /* Embedded Wizard */
ResourcesFont_GetFlowTextAdvance
XInt32 ResourcesFont_GetFlowTextAdvance(ResourcesFont _this, XString aFlowString)
Definition: Resources.c:280
ewrte.h
ResourcesFont_OnGetAscent
XInt32 ResourcesFont_OnGetAscent(ResourcesFont _this)
Definition: Resources.c:365
XHandle
unsigned long XHandle
Definition: ewrte.h:291
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
aArg
XRect CoreOutline aOutline XHandle aArg
Definition: _ApplicationApplication.h:151
ResourcesFont__OnGetLeading
XInt32 ResourcesFont__OnGetLeading(void *_this)
Definition: Resources.c:347
ResourcesFont_Init
void ResourcesFont_Init(ResourcesFont _this, XHandle aArg)
Definition: Resources.c:245
_CoreResource.h
XInt32
signed long XInt32
Definition: ewrte.h:1586
EW_DEFINE_METHODS
#define EW_DEFINE_METHODS(aClass, aSuperClass)
Definition: ewrte.h:524
ResourcesFont_ParseFlowString
XString ResourcesFont_ParseFlowString(ResourcesFont _this, XString aString, XInt32 aOffset, XInt32 aWidth, XInt32 aMaxNoOfRows, XHandle aBidi)
Definition: Resources.c:295
ResourcesFont_Done
void ResourcesFont_Done(ResourcesFont _this)
Definition: Resources.c:229
ResourcesFont_GetTextAdvance
XInt32 ResourcesFont_GetTextAdvance(ResourcesFont _this, XString aString, XInt32 aOffset, XInt32 aCount)
Definition: Resources.c:321
ResourcesFont__OnGetDescent
XInt32 ResourcesFont__OnGetDescent(void *_this)
Definition: Resources.c:359
ResourcesFont_OnGetDescent
XInt32 ResourcesFont_OnGetDescent(ResourcesFont _this)
Definition: Resources.c:353
ResourcesFont_OnGetLeading
XInt32 ResourcesFont_OnGetLeading(ResourcesFont _this)
Definition: Resources.c:341
EW_PROPERTY
#define EW_PROPERTY(aName, aType)
Definition: ewrte.h:466
aOffset
XRect CoreOutline aOutline GraphicsCanvas XRect XPoint aOffset
Definition: _CoreOutline.h:172
XString
XChar * XString
Definition: ewrte.h:1656
EW_END_OF_METHODS
#define EW_END_OF_METHODS(aClass)
Definition: ewrte.h:539
ResourcesFont__OnGetAscent
XInt32 ResourcesFont__OnGetAscent(void *_this)
Definition: Resources.c:371
EW_DEFINE_FIELDS
#define EW_DEFINE_FIELDS(aClass, aSuperClass)
Definition: ewrte.h:451