MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
edit.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 
55 /*
56  * $Id: edit.h 13674 2010-12-06 06:45:01Z wanzheng $
57  *
58  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
59  * pSOS, ThreadX, NuCleus, OSE, and Win32.
60  */
61 
62 #ifndef _MGUI_CTRL_EDIT_H
63 #define _MGUI_CTRL_EDIT_H
64 
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif /* __cplusplus */
69 
87 #define CTRL_EDIT ("edit")
88 
96 #define CTRL_SLEDIT ("sledit")
97 
105 #define CTRL_BIDISLEDIT ("bidisledit")
106 
114 #define CTRL_MLEDIT ("mledit")
115 
123 #define CTRL_MEDIT ("medit")
124 
134 #define ES_LEFT 0x00000000L
135 
140 #define ES_CENTER 0x00000001L
141 
146 #define ES_RIGHT 0x00000002L
147 
152 #define ES_MULTILINE 0x00000004L
153 
158 #define ES_UPPERCASE 0x00000008L
159 
164 #define ES_LOWERCASE 0x00000010L
165 
170 #define ES_PASSWORD 0x00000020L
171 
176 #define ES_AUTOVSCROLL 0x00000040L
177 
182 #define ES_AUTOHSCROLL 0x00000080L
183 
188 #define ES_NOHIDESEL 0x00000100L
189 
194 #define ES_AUTOSELECT 0x00000400L
195 //#define ES_OEMCONVERT 0x00000400L
196 
201 #define ES_READONLY 0x00000800L
202 
207 #define ES_BASELINE 0x00001000L
208 
213 #define ES_AUTOWRAP 0x00002000L
214 
219 #define ES_TITLE 0x00004000L
220 
225 #define ES_TIP 0x00008000L
226 
253 #define EM_GETSEL 0xF0B0
254 
282 #define EM_SETSEL 0xF0B1
283 
288 #define EM_SETSELPOS EM_SETSEL
289 
294 #define EM_SETSELECTION EM_SETSEL
295 
307 #define EM_SELECTALL 0xF0B2
308 
331 #define EM_GETSELPOS 0xF0B3
332 
349 #define EM_INSERTCBTEXT 0xF0B4
350 
364 #define EM_COPYTOCB 0xF0B5
365 
379 #define EM_CUTTOCB 0xF0B6
380 
399 #define EM_SETLFDISPCHAR 0xF0B7
400 
418 #define EM_SETLINESEP 0xF0B8
419 
420 /* #define EM_GETRECT 0xF0B2 */
421 /* #define EM_SETRECT 0xF0B3 */
422 /* #define EM_SETRECTNP 0xF0B4 */
423 /* #define EM_SCROLL 0xF0B5 */
424 
447 #define EM_GETCARETPOS 0xF0B9
448 
471 #define EM_SETCARETPOS 0xF0BA
472 
477 #define EM_SETINSERTION EM_SETCARETPOS
478 
479 /* #define EM_SCROLLCARET 0xF0B9 */
480 /* #define EM_GETMODIFY 0xF0BA */
481 /* #define EM_SETMODIFY 0xF0BB */
482 
497 #define EM_GETLINECOUNT 0xF0BC
498 
513 #define EM_GETLINEHEIGHT 0xF0BD
514 
529 #define EM_SETLINEHEIGHT 0xF0BE
530 
531 
532 /*#define EM_LINEINDEX 0xF0BD */
533 /*#define EM_GETTHUMB 0xF0BE */
534 
535 /* internal used now */
541 #define EM_LINESCROLL 0xF0BF
542 
561 #define EM_INSERTTEXT 0xF0C0
562 
563 /* Not use */
569 #define EM_LINELENGTH 0xF0C1
570 
571 /* Not use */
577 #define EM_REPLACESEL 0xF0C2
578 
583 #define EM_GETMAXLIMIT 0xF0C3
584 
585 /* Not use */
591 #define EM_GETLINE 0xF0C4
592 
607 #define EM_LIMITTEXT 0xF0C5
608 
620 #define EM_REDO 0xF0C6
621 /*#define EM_CANUNDO 0xF0C6 */
622 
634 #define EM_UNDO 0xF0C7
635 
636 /* Not use */
642 #define EM_FMTLINES 0xF0C8
643 
644 /* Not use */
650 #define EM_LINEFROMCHAR 0xF0C9
651 
652 /* Not use */
658 #define EM_SETTABSTOPS 0xF0CB
659 
673 #define EM_SETPASSWORDCHAR 0xF0CC
674 
675 /* Not use */
676 #define EM_EMPTYUNDOBUFFER 0xF0CD
677 /* Not use */
678 #define EM_GETFIRSTVISIBLELINE 0xF0CE
679 
698 #define EM_SETREADONLY 0xF0CF
699 
712 typedef int (*ED_DRAWSEL_FUNC) (HWND, HDC, int, int, const char*, int, int);
713 
714 
729 #define EM_SETDRAWSELECTFUNC 0xF0D0
730 
748 #define EM_SETGETCARETWIDTHFUNC 0xF0D1
749 
750 /*
751 #define EM_SETWORDBREAKPROC 0xF0D0
752 #define EM_GETWORDBREAKPROC 0xF0D1
753 */
754 
769 #define EM_GETPASSWORDCHAR 0xF0D2
770 
775 #define EM_SETLIMITTEXT EM_LIMITTEXT
776 
781 #define ED_CARETSHAPE_LINE 0
782 
787 #define ED_CARETSHAPE_BLOCK 1
788 
806 #define EM_CHANGECARETSHAPE 0xF0D3
807 
812 #define EM_REFRESHCARET 0xF0D4
813 
831 #define EM_ENABLECARET 0xF0D5
832 
840 #define EM_GETLIMITTEXT 0xF0D6
841 
842 /*
843  * \def EM_SETMARGINS
844  * \brief Set the margins of edit control
845  *
846  * \code
847  * EM_SETMARGINS
848  *
849  * const RECT *prcMargins
850  *
851  * lParam = (LPARAM)prcMargins
852  * \endcode
853  *
854  * \param prcMargins : the margins info:
855  * - top : the top margin value
856  * - left: the left margin value
857  * - right: the right margin value
858  * - bottom: the bottom margin value
859  *
860  * \return ignored
861  *
862  * \sa EM_GETMARGINS
863  */
864 #define EM_SETMARGINS 0xF0D7
865 
866 /*
867  * \def EM_GETMARGINS
868  * \brief Get the margins of content
869  *
870  * \code
871  * EM_GETMARGINS
872  *
873  * RECT *prcMargins
874  *
875  * lParam = (LPARAM)prcMargins
876  * \endcode
877  *
878  * \param prcMargins : the margins info:
879  * - top : the top margin value
880  * - left: the left margin value
881  * - right: the right margin value
882  * - bottom: the bottom margin value
883  *
884  * \return TRUE / FALSE
885  *
886  * \sa EM_SETMARGINS
887  */
888 #define EM_GETMARGINS 0xF0D8
889 /*
890 #define EM_POSFROMCHAR 0xF0D9
891 #define EM_CHARFROMPOS 0xF0DA
892 #define EM_SETIMESTATUS 0xF0DB
893 #define EM_GETIMESTATUS 0xF0DC
894 
895 #define MEM_SCROLLCHANGE 0xF0DD
896 */
897 
898 /* Not use */
899 #define MED_STATE_YES 0x0
900 /* Not use */
901 #define MED_STATE_NOUP 0x1
902 /* Not use */
903 #define MED_STATE_NODN 0x2
904 /* Not use */
905 #define MED_STATE_NO 0x3
906 
922 #define EM_SETTITLETEXT 0xF0DC
923 
944 #define EM_GETTITLETEXT 0xF0DD
945 
960 #define EM_SETTIPTEXT 0xF0DE
961 
980 #define EM_GETTIPTEXT 0xF0DF
981 
985 typedef struct _TEXTPOSINFO {
996  int copy_len;
999  char *buff;
1000 }TEXTPOSINFO;
1001 
1008 #define EM_GETNUMOFPARAGRAPHS 0xF0E0
1009 
1020 #define EM_GETPARAGRAPHLENGTH 0xF0E1
1021 
1041 #define EM_GETPARAGRAPHTEXT 0xF0E2
1042 
1043 /*
1044  * \def EM_MUSTUPDATEBKGND
1045  * \brief Test if the bkgournd must be update
1046  *
1047  * \return BOOL. TRUE -- must update the bkground, texteditor would not use ScrollWindow
1048  * FALSE -- bkground does not need to update, textditor use Scrollwindow
1049  *
1050  * if you want paint a image on bkground, please make this message return TRUE
1051  *
1052  */
1053 #define EM_MUSTUPDATEBKGND 0xF0E3
1054 
1083 #define EM_SETCARETPOSBYLINE 0xF0D9
1084 
1105 #define EM_GETCARETPOSBYLINE 0xF0DA
1106 
1111 #define EM_SETSELPOSBYLINE 0xF0DB
1112 
1132 #define EM_GETSELPOSBYLINE 0xF0E4
1133 
1146 #define EM_GETPARAGRAPHLENGTHINMCHAR 0xF0E5
1147 
1160 #define EM_GETLINELENGTHINMCHAR 0xF0E6
1161 
1173 #define EM_GETLINELENGTH 0xF0E7
1174 
1195 #define EM_GETLINETEXT 0xF0E8
1196 
1197 #define EM_MSGMAX 0xF0EA
1198 
1206 #define EN_ERRSPACE 255
1207 
1215 #define EN_CLICKED 0x0001
1216 
1224 #define EN_DBLCLK 0x0002
1225 
1233 #define EN_SETFOCUS 0x0100
1234 
1242 #define EN_KILLFOCUS 0x0200
1243 
1251 #define EN_CHANGE 0x0300
1252 
1264 #define EN_UPDATE 0x0400
1265 
1273 #define EN_MAXTEXT 0x0501
1274 
1275 /* Not use */
1276 #define EN_HSCROLL 0x0601
1277 /* Not use */
1278 #define EN_VSCROLL 0x0602
1279 
1280 
1285 #define EN_SELCHANGED 0x0603
1286 
1292 #define EN_CONTCHANGED 0x0604
1293 
1298 #define EN_ENTER 0x0700
1299 
1302 /* Edit control EM_SETMARGIN parameters */
1307 #define EC_LEFTMARGIN 0x0001
1308 
1312 #define EC_RIGHTMARGIN 0x0002
1313 
1317 #define EC_USEFONTINFO 0xffff
1318 
1319 /* wParam of EM_GET/SETIMESTATUS */
1324 #define EMSIS_COMPOSITIONSTRING 0x0001
1325 
1326 /* lParam for EMSIS_COMPOSITIONSTRING */
1331 #define EIMES_GETCOMPSTRATONCE 0x0001
1332 
1336 #define EIMES_CANCELCOMPSTRINFOCUS 0x0002
1337 
1341 #define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004
1342 
1347 #ifdef __cplusplus
1348 }
1349 #endif /* __cplusplus */
1350 
1351 #endif /* _MGUI_CTRL_EDIT_H */
1352 
_TEXTPOSINFO::buff
char * buff
Definition: edit.h:999
HWND
GHANDLE HWND
Handle to main window or control.
Definition: common.h:407
HDC
GHANDLE HDC
Handle to device context.
Definition: common.h:412
_TEXTPOSINFO::paragraph_index
int paragraph_index
Definition: edit.h:988
_TEXTPOSINFO::copy_len
int copy_len
Definition: edit.h:996
_TEXTPOSINFO
Definition: edit.h:985
ED_DRAWSEL_FUNC
int(* ED_DRAWSEL_FUNC)(HWND, HDC, int, int, const char *, int, int)
Type of the edit control callback function on drawing selected strings.
Definition: edit.h:712
_TEXTPOSINFO::start_pos
int start_pos
Definition: edit.h:993
TEXTPOSINFO
struct _TEXTPOSINFO TEXTPOSINFO
_TEXTPOSINFO::line_index
int line_index
Definition: edit.h:991