MiniGUI API Reference (MiniGUI-Standalone)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
newtoolbar.h
Go to the documentation of this file.
1 
43 /*
44  * $Id: newtoolbar.h 10690 2008-08-18 09:32:47Z weiym $
45  *
46  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
47  * pSOS, ThreadX, NuCleus, OSE, and Win32.
48  */
49 
50 #ifndef _MGUI_CTRL_NEWTOOLBAR_H
51 #define _MGUI_CTRL_NEWTOOLBAR_H
52 
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif /* __cplusplus */
57 
84 #define CTRL_NEWTOOLBAR ("newtoolbar")
85 
87 typedef struct _NTBINFO
88 {
91 
93  int nr_cells;
94 
107  int nr_cols;
108 
113  int w_cell;
114 
119  int h_cell;
120 
121 } NTBINFO;
122 
133 typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y);
134 
135 /* Internal */
136 #define NTB_TEXT_LEN 15
137 /* Internal */
138 #define NTB_TIP_LEN 255
139 
140 #define NTBIF_PUSHBUTTON 0x0001
141 #define NTBIF_HOTSPOTBUTTON 0x0002
142 #define NTBIF_SEPARATOR 0x0003
143 #define NTBIF_CHECKBUTTON 0x0005
144 #define NTBIF_NEWLINE 0x0008
145 #define NTBIF_TYPEMASK 0x000F
146 
151 #define NTBIF_DISABLED 0x0010
152 
156 #define NTBIF_CHECKED 0x0020
157 
158 #define MTB_WHICH_FLAGS 0x0001
159 #define MTB_WHICH_ID 0x0002
160 #define MTB_WHICH_TEXT 0x0004
161 #define MTB_WHICH_TIP 0x0008
162 #define MTB_WHICH_CELL 0x0010
163 #define MTB_WHICH_HOTSPOT 0x0020
164 #define MTB_WHICH_ADDDATA 0x0040
165 
167 typedef struct _NTBITEMINFO
168 {
182 
194 
200  int id;
201 
206  char* text;
207 
209  char* tip;
210 
212  int bmp_cell;
213 
216 
219 
222 } NTBITEMINFO;
223 
229 
239 #define NTBS_WITHTEXT 0x000000001L
240 
245 #define NTBS_TEXTRIGHT 0x000000002L
246 
252 #define NTBS_DRAWSTATES 0x000000004L
253 
258 #define NTBS_DRAWSEPARATOR 0x000000008L
259 
264 #define NTBS_HORIZONTAL 0x00000000L
265 
270 #define NTBS_VERTICAL 0x00000010L
271 
278 #define NTBS_MULTLINE 0x00000020L
279 
287 #define NTB_OKAY 0
288 
289 #define NTB_ERR (-1)
290 
291 #define NTB_ERR_SPACE (-2)
292 
293 #define NTB_ERR_DUPID (-3)
294 
313 #define NTBM_ADDITEM 0xFE00
314 
333 #define NTBM_GETITEM 0xFE01
334 
353 #define NTBM_SETITEM 0xFE02
354 
373 #define NTBM_ENABLEITEM 0xFE03
374 
391 #define NTBM_SETBITMAP 0xFE04
392 
393 
394 #define NTBM_MSGMAX 0xFE10
395 
402 #ifdef __cplusplus
403 }
404 #endif /* __cplusplus */
405 
406 #endif /* _MGUI_CTRL_NEWTOOLBAR_H */
407 
int w_cell
Definition: newtoolbar.h:113
RECT rc_hotspot
Definition: newtoolbar.h:218
char * tip
Definition: newtoolbar.h:209
struct _NTBITEMINFO NTBITEMINFO
Definition: common.h:843
void(* HOTSPOTPROC)(HWND hwnd, int id, const RECT *cell, int x, int y)
Type of the hotspot-clicked callback procedure.
Definition: newtoolbar.h:133
char * text
Definition: newtoolbar.h:206
PBITMAP image
Definition: newtoolbar.h:90
int nr_cells
Definition: newtoolbar.h:93
int nr_cols
Definition: newtoolbar.h:107
GHANDLE HWND
Handle to main window or control.
Definition: common.h:358
DWORD add_data
Definition: newtoolbar.h:221
NTBITEMINFO * PNTBITEMINFO
Data type of pointer to a NTBITEMINFO;.
Definition: newtoolbar.h:228
int h_cell
Definition: newtoolbar.h:119
struct _NTBINFO NTBINFO
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:555
HOTSPOTPROC hotspot_proc
Definition: newtoolbar.h:215
Definition: gdi.h:7382