STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
EDIT_Private.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 : EDIT_Private.h
30 Purpose : Internal header file
31 ---------------------------END-OF-HEADER------------------------------
32 */
33 
34 #ifndef EDIT_PRIVATE_H
35 #define EDIT_PRIVATE_H
36 
37 #include "EDIT.h"
38 
39 #if GUI_WINSUPPORT
40 
41 #include "WIDGET.h"
42 
43 /*********************************************************************
44 *
45 * Defines
46 *
47 **********************************************************************
48 */
49 #define EDIT_REALLOC_SIZE 16
50 
51 #ifndef EDIT_XOFF
52  #define EDIT_XOFF 1
53 #endif
54 
55 /*********************************************************************
56 *
57 * Types
58 *
59 **********************************************************************
60 */
61 typedef struct EDIT_Obj_struct EDIT_Obj;
62 
63 typedef struct {
64  int Align;
65  int Border;
66  const GUI_FONT * pFont;
67  GUI_COLOR aTextColor[2];
68  GUI_COLOR aBkColor[2];
69 } EDIT_PROPS;
70 
71 struct EDIT_Obj_struct {
72  WIDGET Widget;
73  WM_HMEM hpText;
74  I16 MaxLen;
75  U16 BufferSize;
76  I32 Min, Max; // Min max values as normalized floats (integers)
77  U8 NumDecs; // Number of decimals
78  I32 CurrentValue; // Current value
79  int CursorPos; // Cursor position. 0 means left most
80  unsigned SelSize; // Number of selected characters
81  U8 EditMode; // Insert or overwrite mode
82  U8 XSizeCursor; // Size of cursor when working in insert mode
83  U8 Flags;
84  tEDIT_AddKeyEx * pfAddKeyEx; // Handle key input
85  tEDIT_UpdateBuffer * pfUpdateBuffer; // Update textbuffer
86  EDIT_PROPS Props;
87  WM_HTIMER hTimer;
88  U8 MinMaxMode;
89 };
90 
91 /*********************************************************************
92 *
93 * Macros for internal use
94 *
95 **********************************************************************
96 */
97 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
98  #define EDIT_INIT_ID(p) (p->Widget.DebugId = EDIT_ID)
99 #else
100  #define EDIT_INIT_ID(p)
101 #endif
102 
103 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
104  EDIT_Obj * EDIT_LockH(EDIT_Handle h);
105  #define EDIT_LOCK_H(h) EDIT_LockH(h)
106 #else
107  #define EDIT_LOCK_H(h) (EDIT_Obj *)GUI_LOCK_H(h)
108 #endif
109 
110 /*********************************************************************
111 *
112 * Public data (internal defaults)
113 *
114 **********************************************************************
115 */
116 extern EDIT_PROPS EDIT__DefaultProps;
117 
118 /*********************************************************************
119 *
120 * Public functions (internal)
121 *
122 **********************************************************************
123 */
124 U16 EDIT__GetCurrentChar (EDIT_Obj * pObj);
125 void EDIT__SetCursorPos (EDIT_Handle hObj, int CursorPos);
126 void EDIT__SetValueUnsigned(EDIT_Handle hObj, I32 Value);
127 
128 #endif // GUI_WINSUPPORT
129 
130 #endif // EDIT_PRIVATE_H
131 
132 /*************************** End of file ****************************/
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define I16
Definition: Global.h:56
#define U16
Definition: Global.h:47
#define I32
Definition: Global.h:59
#define U8
Definition: Global.h:44