MiniGUI API Reference (MiniGUI-Processes)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
edit.h
Go to the documentation of this file.
1 
43 /*
44  * $Id: edit.h 13674 2010-12-06 06:45:01Z wanzheng $
45  *
46  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
47  * pSOS, ThreadX, NuCleus, OSE, and Win32.
48  */
49 
50 #ifndef _MGUI_CTRL_EDIT_H
51 #define _MGUI_CTRL_EDIT_H
52 
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif /* __cplusplus */
57 
75 #define CTRL_EDIT ("edit")
76 
84 #define CTRL_SLEDIT ("sledit")
85 
93 #define CTRL_BIDISLEDIT ("bidisledit")
94 
102 #define CTRL_MLEDIT ("mledit")
103 
111 #define CTRL_MEDIT ("medit")
112 
122 #define ES_LEFT 0x00000000L
123 
128 #define ES_CENTER 0x00000001L
129 
134 #define ES_RIGHT 0x00000002L
135 
140 #define ES_MULTILINE 0x00000004L
141 
146 #define ES_UPPERCASE 0x00000008L
147 
152 #define ES_LOWERCASE 0x00000010L
153 
158 #define ES_PASSWORD 0x00000020L
159 
164 #define ES_AUTOVSCROLL 0x00000040L
165 
170 #define ES_AUTOHSCROLL 0x00000080L
171 
176 #define ES_NOHIDESEL 0x00000100L
177 
182 #define ES_AUTOSELECT 0x00000400L
183 //#define ES_OEMCONVERT 0x00000400L
184 
189 #define ES_READONLY 0x00000800L
190 
195 #define ES_BASELINE 0x00001000L
196 
201 #define ES_AUTOWRAP 0x00002000L
202 
207 #define ES_TITLE 0x00004000L
208 
213 #define ES_TIP 0x00008000L
214 
241 #define EM_GETSEL 0xF0B0
242 
270 #define EM_SETSEL 0xF0B1
271 
276 #define EM_SETSELPOS EM_SETSEL
277 
282 #define EM_SETSELECTION EM_SETSEL
283 
295 #define EM_SELECTALL 0xF0B2
296 
319 #define EM_GETSELPOS 0xF0B3
320 
337 #define EM_INSERTCBTEXT 0xF0B4
338 
352 #define EM_COPYTOCB 0xF0B5
353 
367 #define EM_CUTTOCB 0xF0B6
368 
387 #define EM_SETLFDISPCHAR 0xF0B7
388 
406 #define EM_SETLINESEP 0xF0B8
407 
408 /* #define EM_GETRECT 0xF0B2 */
409 /* #define EM_SETRECT 0xF0B3 */
410 /* #define EM_SETRECTNP 0xF0B4 */
411 /* #define EM_SCROLL 0xF0B5 */
412 
435 #define EM_GETCARETPOS 0xF0B9
436 
459 #define EM_SETCARETPOS 0xF0BA
460 
465 #define EM_SETINSERTION EM_SETCARETPOS
466 
467 /* #define EM_SCROLLCARET 0xF0B9 */
468 /* #define EM_GETMODIFY 0xF0BA */
469 /* #define EM_SETMODIFY 0xF0BB */
470 
485 #define EM_GETLINECOUNT 0xF0BC
486 
501 #define EM_GETLINEHEIGHT 0xF0BD
502 
517 #define EM_SETLINEHEIGHT 0xF0BE
518 
519 
520 /*#define EM_LINEINDEX 0xF0BD */
521 /*#define EM_GETTHUMB 0xF0BE */
522 
523 /* internal used now */
529 #define EM_LINESCROLL 0xF0BF
530 
549 #define EM_INSERTTEXT 0xF0C0
550 
551 /* Not use */
557 #define EM_LINELENGTH 0xF0C1
558 
559 /* Not use */
565 #define EM_REPLACESEL 0xF0C2
566 
571 #define EM_GETMAXLIMIT 0xF0C3
572 
573 /* Not use */
579 #define EM_GETLINE 0xF0C4
580 
595 #define EM_LIMITTEXT 0xF0C5
596 
608 #define EM_REDO 0xF0C6
609 /*#define EM_CANUNDO 0xF0C6 */
610 
622 #define EM_UNDO 0xF0C7
623 
624 /* Not use */
630 #define EM_FMTLINES 0xF0C8
631 
632 /* Not use */
638 #define EM_LINEFROMCHAR 0xF0C9
639 
640 /* Not use */
646 #define EM_SETTABSTOPS 0xF0CB
647 
661 #define EM_SETPASSWORDCHAR 0xF0CC
662 
663 /* Not use */
664 #define EM_EMPTYUNDOBUFFER 0xF0CD
665 /* Not use */
666 #define EM_GETFIRSTVISIBLELINE 0xF0CE
667 
686 #define EM_SETREADONLY 0xF0CF
687 
701 typedef int (*ED_DRAWSEL_FUNC) (HWND, HDC, int, int, const char*, int, int);
702 
703 
718 #define EM_SETDRAWSELECTFUNC 0xF0D0
719 
737 #define EM_SETGETCARETWIDTHFUNC 0xF0D1
738 
739 /*
740 #define EM_SETWORDBREAKPROC 0xF0D0
741 #define EM_GETWORDBREAKPROC 0xF0D1
742 */
743 
758 #define EM_GETPASSWORDCHAR 0xF0D2
759 
764 #define EM_SETLIMITTEXT EM_LIMITTEXT
765 
770 #define ED_CARETSHAPE_LINE 0
771 
776 #define ED_CARETSHAPE_BLOCK 1
777 
795 #define EM_CHANGECARETSHAPE 0xF0D3
796 
801 #define EM_REFRESHCARET 0xF0D4
802 
820 #define EM_ENABLECARET 0xF0D5
821 
829 #define EM_GETLIMITTEXT 0xF0D6
830 
831 /*
832  * \def EM_SETMARGINS
833  * \brief Set the margins of edit control
834  *
835  * \code
836  * EM_SETMARGINS
837  *
838  * const RECT *prcMargins
839  *
840  * lParam = (LPARAM)prcMargins
841  * \endcode
842  *
843  * \param prcMargins : the margins info:
844  * - top : the top margin value
845  * - left: the left margin value
846  * - right: the right margin value
847  * - bottom: the bottom margin value
848  *
849  * \return ignored
850  *
851  * \sa EM_GETMARGINS
852  */
853 #define EM_SETMARGINS 0xF0D7
854 
855 /*
856  * \def EM_GETMARGINS
857  * \brief Get the margins of content
858  *
859  * \code
860  * EM_GETMARGINS
861  *
862  * RECT *prcMargins
863  *
864  * lParam = (LPARAM)prcMargins
865  * \endcode
866  *
867  * \param prcMargins : the margins info:
868  * - top : the top margin value
869  * - left: the left margin value
870  * - right: the right margin value
871  * - bottom: the bottom margin value
872  *
873  * \return TRUE / FALSE
874  *
875  * \sa EM_SETMARGINS
876  */
877 #define EM_GETMARGINS 0xF0D8
878 /*
879 #define EM_POSFROMCHAR 0xF0D9
880 #define EM_CHARFROMPOS 0xF0DA
881 #define EM_SETIMESTATUS 0xF0DB
882 #define EM_GETIMESTATUS 0xF0DC
883 
884 #define MEM_SCROLLCHANGE 0xF0DD
885 */
886 
887 /* Not use */
888 #define MED_STATE_YES 0x0
889 /* Not use */
890 #define MED_STATE_NOUP 0x1
891 /* Not use */
892 #define MED_STATE_NODN 0x2
893 /* Not use */
894 #define MED_STATE_NO 0x3
895 
911 #define EM_SETTITLETEXT 0xF0DC
912 
933 #define EM_GETTITLETEXT 0xF0DD
934 
949 #define EM_SETTIPTEXT 0xF0DE
950 
969 #define EM_GETTIPTEXT 0xF0DF
970 
974 typedef struct _TEXTPOSINFO {
985  int copy_len;
988  char *buff;
989 }TEXTPOSINFO;
990 
997 #define EM_GETNUMOFPARAGRAPHS 0xF0E0
998 
1009 #define EM_GETPARAGRAPHLENGTH 0xF0E1
1010 
1030 #define EM_GETPARAGRAPHTEXT 0xF0E2
1031 
1032 /*
1033  * \def EM_MUSTUPDATEBKGND
1034  * \brief Test if the bkgournd must be update
1035  *
1036  * \return BOOL. TRUE -- must update the bkground, texteditor would not use ScrollWindow
1037  * FALSE -- bkground does not need to update, textditor use Scrollwindow
1038  *
1039  * if you want paint a image on bkground, please make this message return TRUE
1040  *
1041  */
1042 #define EM_MUSTUPDATEBKGND 0xF0E3
1043 
1072 #define EM_SETCARETPOSBYLINE 0xF0D9
1073 
1094 #define EM_GETCARETPOSBYLINE 0xF0DA
1095 
1100 #define EM_SETSELPOSBYLINE 0xF0DB
1101 
1121 #define EM_GETSELPOSBYLINE 0xF0E4
1122 
1135 #define EM_GETPARAGRAPHLENGTHINMCHAR 0xF0E5
1136 
1149 #define EM_GETLINELENGTHINMCHAR 0xF0E6
1150 
1162 #define EM_GETLINELENGTH 0xF0E7
1163 
1184 #define EM_GETLINETEXT 0xF0E8
1185 
1186 #define EM_MSGMAX 0xF0EA
1187 
1195 #define EN_ERRSPACE 255
1196 
1204 #define EN_CLICKED 0x0001
1205 
1213 #define EN_DBLCLK 0x0002
1214 
1222 #define EN_SETFOCUS 0x0100
1223 
1231 #define EN_KILLFOCUS 0x0200
1232 
1240 #define EN_CHANGE 0x0300
1241 
1253 #define EN_UPDATE 0x0400
1254 
1262 #define EN_MAXTEXT 0x0501
1263 
1264 /* Not use */
1265 #define EN_HSCROLL 0x0601
1266 /* Not use */
1267 #define EN_VSCROLL 0x0602
1268 
1269 
1274 #define EN_SELCHANGED 0x0603
1275 
1281 #define EN_CONTCHANGED 0x0604
1282 
1287 #define EN_ENTER 0x0700
1288 
1291 /* Edit control EM_SETMARGIN parameters */
1296 #define EC_LEFTMARGIN 0x0001
1297 
1301 #define EC_RIGHTMARGIN 0x0002
1302 
1306 #define EC_USEFONTINFO 0xffff
1307 
1308 /* wParam of EM_GET/SETIMESTATUS */
1313 #define EMSIS_COMPOSITIONSTRING 0x0001
1314 
1315 /* lParam for EMSIS_COMPOSITIONSTRING */
1320 #define EIMES_GETCOMPSTRATONCE 0x0001
1321 
1325 #define EIMES_CANCELCOMPSTRINFOCUS 0x0002
1326 
1330 #define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004
1331 
1336 #ifdef __cplusplus
1337 }
1338 #endif /* __cplusplus */
1339 
1340 #endif /* _MGUI_CTRL_EDIT_H */
1341 
int copy_len
Definition: edit.h:985
GHANDLE HDC
Handle to device context.
Definition: common.h:363
GHANDLE HWND
Handle to main window or control.
Definition: common.h:358
int line_index
Definition: edit.h:980
char * buff
Definition: edit.h:988
struct _TEXTPOSINFO TEXTPOSINFO
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:701
int paragraph_index
Definition: edit.h:977
int start_pos
Definition: edit.h:982