STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
MULTIEDIT.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 : MULTIEDIT.h
30 Purpose : MULTIEDIT include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef MULTIEDIT_H
35 #define MULTIEDIT_H
36 
37 #include "WM.h"
38 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */
39 
40 #if GUI_WINSUPPORT
41 
42 #if defined(__cplusplus)
43  extern "C" { /* Make sure we have C-declarations in C++ programs */
44 #endif
45 
46 #define MULTIEDIT_CF_READONLY (1 << 0)
47 #define MULTIEDIT_CF_INSERT (1 << 2)
48 #define MULTIEDIT_CF_AUTOSCROLLBAR_V (1 << 3)
49 #define MULTIEDIT_CF_AUTOSCROLLBAR_H (1 << 4)
50 #define MULTIEDIT_CF_PASSWORD (1 << 5)
51 
52 #define MULTIEDIT_SF_READONLY MULTIEDIT_CF_READONLY
53 #define MULTIEDIT_SF_INSERT MULTIEDIT_CF_INSERT
54 #define MULTIEDIT_SF_AUTOSCROLLBAR_V MULTIEDIT_CF_AUTOSCROLLBAR_V
55 #define MULTIEDIT_SF_AUTOSCROLLBAR_H MULTIEDIT_CF_AUTOSCROLLBAR_H
56 #define MULTIEDIT_SF_PASSWORD MULTIEDIT_CF_PASSWORD
57 
58 /*********************************************************************
59 *
60 * Color indices
61 */
62 #define MULTIEDIT_CI_EDIT 0
63 #define MULTIEDIT_CI_READONLY 1
64 
65 /*********************************************************************
66 *
67 * Public Types
68 *
69 **********************************************************************
70 */
71 
72 typedef WM_HMEM MULTIEDIT_HANDLE;
73 
74 /*********************************************************************
75 *
76 * Create functions
77 *
78 **********************************************************************
79 */
80 MULTIEDIT_HANDLE MULTIEDIT_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int ExFlags, const char * pText, int MaxLen);
81 MULTIEDIT_HANDLE MULTIEDIT_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int BufferSize, const char * pText);
82 MULTIEDIT_HANDLE MULTIEDIT_CreateIndirect(const GUI_WIDGET_CREATE_INFO* pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
83 MULTIEDIT_HANDLE MULTIEDIT_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int BufferSize, const char * pText, int NumExtraBytes);
84 
85 /*********************************************************************
86 *
87 * The callback ...
88 *
89 * Do not call it directly ! It is only to be used from within an
90 * overwritten callback.
91 */
92 void MULTIEDIT_Callback(WM_MESSAGE * pMsg);
93 
94 /*********************************************************************
95 *
96 * Member functions
97 *
98 **********************************************************************
99 */
100 
101 int MULTIEDIT_AddKey (MULTIEDIT_HANDLE hObj, U16 Key);
102 int MULTIEDIT_AddText (MULTIEDIT_HANDLE hObj, const char * s);
103 void MULTIEDIT_EnableBlink (MULTIEDIT_HANDLE hObj, int Period, int OnOff);
104 int MULTIEDIT_GetCursorCharPos (MULTIEDIT_HANDLE hObj);
105 void MULTIEDIT_GetCursorPixelPos(MULTIEDIT_HANDLE hObj, int * pxPos, int * pyPos);
106 void MULTIEDIT_GetPrompt (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars);
107 int MULTIEDIT_GetTextSize (MULTIEDIT_HANDLE hObj);
108 void MULTIEDIT_GetText (MULTIEDIT_HANDLE hObj, char* sDest, int MaxNumChars);
109 int MULTIEDIT_GetUserData (MULTIEDIT_HANDLE hObj, void * pDest, int NumBytes);
110 void MULTIEDIT_SetTextAlign (MULTIEDIT_HANDLE hObj, int Align);
111 void MULTIEDIT_SetAutoScrollH (MULTIEDIT_HANDLE hObj, int OnOff);
112 void MULTIEDIT_SetAutoScrollV (MULTIEDIT_HANDLE hObj, int OnOff);
113 void MULTIEDIT_SetBkColor (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color);
114 void MULTIEDIT_SetCursorCharPos (MULTIEDIT_HANDLE hObj, int x, int y); /* Not yet implemented */
115 void MULTIEDIT_SetCursorPixelPos(MULTIEDIT_HANDLE hObj, int x, int y); /* Not yet implemented */
116 void MULTIEDIT_SetCursorOffset (MULTIEDIT_HANDLE hObj, int Offset);
117 void MULTIEDIT_SetHBorder (MULTIEDIT_HANDLE hObj, unsigned HBorder);
118 void MULTIEDIT_SetFocussable (MULTIEDIT_HANDLE hObj, int State);
119 void MULTIEDIT_SetFont (MULTIEDIT_HANDLE hObj, const GUI_FONT * pFont);
120 void MULTIEDIT_SetInsertMode (MULTIEDIT_HANDLE hObj, int OnOff);
121 void MULTIEDIT_SetBufferSize (MULTIEDIT_HANDLE hObj, int BufferSize);
122 void MULTIEDIT_SetMaxNumChars (MULTIEDIT_HANDLE hObj, unsigned MaxNumChars);
123 void MULTIEDIT_SetPrompt (MULTIEDIT_HANDLE hObj, const char* sPrompt);
124 void MULTIEDIT_SetReadOnly (MULTIEDIT_HANDLE hObj, int OnOff);
125 void MULTIEDIT_SetPasswordMode (MULTIEDIT_HANDLE hObj, int OnOff);
126 void MULTIEDIT_SetText (MULTIEDIT_HANDLE hObj, const char* s);
127 void MULTIEDIT_SetTextColor (MULTIEDIT_HANDLE hObj, unsigned Index, GUI_COLOR color);
128 int MULTIEDIT_SetUserData (MULTIEDIT_HANDLE hObj, const void * pSrc, int NumBytes);
129 void MULTIEDIT_SetWrapNone (MULTIEDIT_HANDLE hObj);
130 void MULTIEDIT_SetWrapChar (MULTIEDIT_HANDLE hObj);
131 void MULTIEDIT_SetWrapWord (MULTIEDIT_HANDLE hObj);
132 
133 /*********************************************************************
134 *
135 * Macros for compatibility with older versions
136 *
137 **********************************************************************
138 */
139 
140 #define MULTIEDIT_SetMaxLen(hObj, MaxLen) MULTIEDIT_SetBufferSize(hObj, MaxLen)
141 #define MULTIEDIT_GetStringSize MULTIEDIT_GetTextSize
142 
143 #if defined(__cplusplus)
144  }
145 #endif
146 
147 #endif // GUI_WINSUPPORT
148 #endif // MULTIEDIT_H
149 
150 /*************************** End of file ****************************/
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define U16
Definition: Global.h:47