MiniGUI API Reference (MiniGUI-Standalone)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
menubutton.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: menubutton.h 10690 2008-08-18 09:32:47Z weiym $
57  *
58  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
59  * pSOS, ThreadX, NuCleus, OSE, and Win32.
60  */
61 
62 #ifndef _MGUI_CTRL_MENUBUTTON_H
63 #define _MGUI_CTRL_MENUBUTTON_H
64 
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif /* __cplusplus */
69 
84 #define CTRL_MENUBTN ("menubutton")
85 
90 #define CTRL_MENUBUTTON ("menubutton")
91 
93 #define MB_OKAY 0
94 
95 #define MB_ERR -1
96 
97 #define MB_INV_ITEM -2
98 
99 #define MB_ERR_SPACE -3
100 
102 #define MB_WHICH_TEXT 0x01
103 
104 #define MB_WHICH_BMP 0x02
105 
106 #define MB_WHICH_ATTDATA 0x04
107 
109 typedef struct _MENUBUTTONITEM
110 {
121  const char* text;
127 
133 
144 #define MBS_SORT 0x0001
145 
150 #define MBS_LEFTARROW 0x0002
151 
156 #define MBS_NOBUTTON 0x0004
157 
162 #define MBS_ALIGNLEFT 0x0000
163 
168 #define MBS_ALIGNRIGHT 0x0010
169 
174 #define MBS_ALIGNCENTER 0x0020
175 
180 #define MBS_ALIGNMASK 0x00F0
181 
214 #define MBM_ADDITEM 0xF200
215 
232 #define MBM_DELITEM 0xF201
233 
247 #define MBM_RESETCTRL 0xF202
248 
271 #define MBM_SETITEMDATA 0xF203
272 
292 #define MBM_GETITEMDATA 0xF204
293 
308 #define MBM_GETCURITEM 0xF206
309 
326 #define MBM_SETCURITEM 0xF207
327 
357 #define MBM_SETSTRCMPFUNC 0xF208
358 
359 /* Internal */
360 #define MBM_MSGMAX 0xF210
361 
373 #define MBN_ERRSPACE 255
374 
379 #define MBN_CHANGED 1
380 
385 #define MBN_SELECTED 2
386 
391 #define MBN_STARTMENU 4
392 
397 #define MBN_ENDMENU 5
398 
403 #define MBN_CLICKED 6
404 
411 #ifdef __cplusplus
412 }
413 #endif /* __cplusplus */
414 
415 #endif /* _MGUI_CTRL_MENUBUTTON_H */
416 
PMENUBUTTONITEM
MENUBUTTONITEM * PMENUBUTTONITEM
Data type of the pointer to a MENUBUTTONITEM.
Definition: menubutton.h:132
DWORD
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:604
_MENUBUTTONITEM::which
DWORD which
Definition: menubutton.h:119
_MENUBUTTONITEM::bmp
PBITMAP bmp
Definition: menubutton.h:123
_MENUBUTTONITEM::text
const char * text
Definition: menubutton.h:121
_MENUBUTTONITEM::data
DWORD data
Definition: menubutton.h:125
_MENUBUTTONITEM
Definition: menubutton.h:109
_BITMAP
Definition: gdi.h:11088
MENUBUTTONITEM
struct _MENUBUTTONITEM MENUBUTTONITEM