mGNCS API Reference  v1.5.0
A new control set and a new framework for MiniGUI apps
msledit.h
Go to the documentation of this file.
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 
54 #ifndef _MGUI_NCSCTRL_SLEDIT_H
55 #define _MGUI_NCSCTRL_SLEDIT_H
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif /* __cplusplus */
60 
66 /*
67  * \def NCSCTRL_SLEDIT
68  * \brief the name of sledit control
69 */
70 #define NCSCTRL_SLEDIT NCSCLASSNAME("sledit")
71 
72 typedef struct _mSlEdit mSlEdit;
73 typedef struct _mSlEditClass mSlEditClass;
74 typedef struct _mSlEditRenderer mSlEditRenderer;
75 
76 #define mSlEditHeader(Class) \
77  mEditHeader(Class) \
78  DWORD status; \
79  int editPos; \
80  int selStart; \
81  int selEnd; \
82  int nContX; \
83  int nContW; \
84  RECT rcVis; \
85  int nVisW; \
86  int startX; \
87  int startY; \
88  int nBlockSize; \
89  StrBuffer content; \
90  char *tipText; \
91  int hardLimit; \
92  int passwdChar; \
93  int changed; \
94  TextCopyPaste *cp;
95 
141 struct _mSlEdit
142 {
143  mSlEditHeader(mSlEdit)
144 };
145 
146 #define mSlEditClassHeader(clsName, parentClass) \
147  mEditClassHeader(clsName, parentClass)
148 
155 struct _mSlEditClass
156 {
157  mSlEditClassHeader(mSlEdit, mEdit)
158 };
159 
166 MGNCS_EXPORT extern mSlEditClass g_stmSlEditCls;
167 
168 #define mSlEditRendererHeader(clsName, parentClass) \
169  mEditRendererHeader(clsName, parentClass)
170 
177 struct _mSlEditRenderer
178 {
179  mSlEditRendererHeader(mSlEdit, mEdit)
180 };
181 
182 
187 #define NCSS_SLEDIT_PASSWORD (0x0001L<<NCSS_EDIT_SHIFT)
188 
193 #define NCSS_SLEDIT_AUTOSELECT (0x0002L<<NCSS_EDIT_SHIFT)
194 
195 /*
196  * \def NCSS_SLEDIT_TIP
197  * \brief Shows specified tip text.
198  */
199 #define NCSS_SLEDIT_TIP (0x0004L<<NCSS_EDIT_SHIFT)
200 
201 #define NCSS_SLEDIT_SHIFT (NCSS_EDIT_SHIFT+3)
202 
205 {
206  NCSP_SLEDIT_TIPTEXT = NCSP_EDIT_MAX + 1,
208  NCSP_SLEDIT_MAX
209 };
210 
213 {
216  NCSN_SLEDIT_MAX = NCSN_EDIT_MAX + 1,
217 };
218 
219 #define NCST_SLEDIT_FOCUSED 0x00000001L
220 #define NCST_SLEDIT_MODIFY 0x00000002L
221 #define NCST_SLEDIT_TMP 0x00000004L
222 #define NCST_SLEDIT_REPLACE 0x00000008L
223 
226 #ifdef __cplusplus
227 }
228 #endif /* __cplusplus */
229 
230 #endif /* _MGUI_NCSCTRL_SLEDIT_H */
NCSP_SLEDIT_TIPTEXT
@ NCSP_SLEDIT_TIPTEXT
Definition: msledit.h:206
mSlEdit
the single line control, derived from mEdit.
mSlEditRenderer
SlEdit class's Renderer interface, derived from mEditRenderer.
mSlEditNotify
mSlEditNotify
Definition: msledit.h:212
mSlEditProp
mSlEditProp
Definition: msledit.h:204
NCSN_SLEDIT_CHANGE
@ NCSN_SLEDIT_CHANGE
Definition: msledit.h:214
NCSN_SLEDIT_ENTER
@ NCSN_SLEDIT_ENTER
Definition: msledit.h:215
NCSN_ITEMV_ENTER
@ NCSN_ITEMV_ENTER
Definition: mitemview.h:600
NCSN_EDIT_CHANGE
@ NCSN_EDIT_CHANGE
Definition: medit.h:481
g_stmSlEditCls
MGNCS_EXPORT mSlEditClass g_stmSlEditCls
the instance of mSlEditClass
mEdit
the edit struct of edit control, derived from mScrollView.
NCSP_SLEDIT_PWDCHAR
@ NCSP_SLEDIT_PWDCHAR
Definition: msledit.h:207
mSlEditClass
the VTable of mSlEdit, derived from mEditClass.