STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
TEXT.h
Go to the documentation of this file.
1 /*********************************************************************
2 * SEGGER Microcontroller GmbH & Co. KG *
3 * Solutions for real time microcontroller applications *
4 **********************************************************************
5 * *
6 * (c) 1996 - 2015 SEGGER Microcontroller GmbH & Co. KG *
7 * *
8 * Internet: www.segger.com Support: support@segger.com *
9 * *
10 **********************************************************************
11 
12 ** emWin V5.28 - Graphical user interface for embedded applications **
13 All Intellectual Property rights in the Software belongs to SEGGER.
14 emWin is protected by international copyright laws. Knowledge of the
15 source code may not be used to write a similar product. This file may
16 only be used in accordance with the following terms:
17 
18 The software has been licensed to STMicroelectronics International
19 N.V. a Dutch company with a Swiss branch and its headquarters in Plan-
20 les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the
21 purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_
22 troller products commercialized by Licensee only, sublicensed and dis_
23 tributed under the terms and conditions of the End User License Agree_
24 ment supplied by STMicroelectronics International N.V.
25 Full source code is available at: www.segger.com
26 
27 We appreciate your understanding and fairness.
28 ----------------------------------------------------------------------
29 File : TEXT.h
30 Purpose : TEXT include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef TEXT_H
35 #define TEXT_H
36 
37 #include "WM.h"
38 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */
39 #include "WIDGET.h"
40 #include "GUI_Debug.h"
41 
42 #if GUI_WINSUPPORT
43 
44 #if defined(__cplusplus)
45  extern "C" { /* Make sure we have C-declarations in C++ programs */
46 #endif
47 
48 /************************************************************
49 *
50 * #defines
51 *
52 *************************************************************
53 */
54 
55 /************************************************************
56 *
57 * Create / Status flags
58 */
59 #define TEXT_CF_LEFT GUI_TA_LEFT
60 #define TEXT_CF_RIGHT GUI_TA_RIGHT
61 #define TEXT_CF_HCENTER GUI_TA_HCENTER
62 
63 #define TEXT_CF_VCENTER GUI_TA_VCENTER
64 #define TEXT_CF_TOP GUI_TA_TOP
65 #define TEXT_CF_BOTTOM GUI_TA_BOTTOM
66 
67 
68 /*********************************************************************
69 *
70 * Public Types
71 *
72 **********************************************************************
73 
74 */
75 typedef WM_HMEM TEXT_Handle;
76 
77 /*********************************************************************
78 *
79 * Standard member functions
80 *
81 **********************************************************************
82 */
83 
84 #define TEXT_EnableMemdev(hObj) WM_EnableMemdev(hObj)
85 #define TEXT_DisableMemdev(hObj) WM_DisableMemdev(hObj)
86 #define TEXT_Delete(hObj) WM_DeleteWindow(hObj)
87 #define TEXT_Paint(hObj) WM_Paint(hObj)
88 #define TEXT_Invalidate(hObj) WM_InvalidateWindow(hObj)
89 
90 /*********************************************************************
91 *
92 * Create functions
93 *
94 **********************************************************************
95 */
96 TEXT_Handle TEXT_Create (int x0, int y0, int xSize, int ySize, int Id, int Flags, const char * s, int Align);
97 TEXT_Handle TEXT_CreateAsChild (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, const char * s, int Align);
98 TEXT_Handle TEXT_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, const char * pText);
99 TEXT_Handle TEXT_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, const char * pText, int NumExtraBytes);
100 TEXT_Handle TEXT_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
101 
102 /*********************************************************************
103 *
104 * The callback ...
105 *
106 * Do not call it directly ! It is only to be used from within an
107 * overwritten callback.
108 */
109 void TEXT_Callback(WM_MESSAGE * pMsg);
110 
111 /*********************************************************************
112 *
113 * Member functions
114 *
115 **********************************************************************
116 */
117 
118 /* Methods changing properties */
119 
120 int TEXT_GetNumLines (TEXT_Handle hObj);
121 int TEXT_GetText (TEXT_Handle hObj, char * pDest, U32 BufferSize);
122 int TEXT_GetUserData (TEXT_Handle hObj, void * pDest, int NumBytes);
123 void TEXT_SetBkColor (TEXT_Handle hObj, GUI_COLOR Color); /* Obsolete. Left in GUI for compatibility to older versions */
124 void TEXT_SetFont (TEXT_Handle hObj, const GUI_FONT * pFont);
125 int TEXT_SetText (TEXT_Handle hObj, const char * s);
126 void TEXT_SetTextAlign(TEXT_Handle hObj, int Align);
127 void TEXT_SetTextColor(TEXT_Handle hObj, GUI_COLOR Color);
128 int TEXT_SetUserData (TEXT_Handle hObj, const void * pSrc, int NumBytes);
129 void TEXT_SetWrapMode (TEXT_Handle hObj, GUI_WRAPMODE WrapMode);
130 
131 /*********************************************************************
132 *
133 * Global functions
134 *
135 **********************************************************************
136 */
137 
138 void TEXT_SetDefaultFont (const GUI_FONT * pFont);
139 const GUI_FONT * TEXT_GetDefaultFont (void);
140 void TEXT_SetDefaultTextColor(GUI_COLOR Color);
141 GUI_WRAPMODE TEXT_SetDefaultWrapMode (GUI_WRAPMODE WrapMode);
142 
143 #if defined(__cplusplus)
144  }
145 #endif
146 
147 #endif // GUI_WINSUPPORT
148 #endif // TEXT_H
149 
150 /*************************** End of file ****************************/
#define U32
Definition: Global.h:50
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
GUI_WRAPMODE
Definition: GUI.h:696