newtoolbar.h

Go to the documentation of this file.
00001 
00019 /*
00020  * $Id: newtoolbar.h 10690 2008-08-18 09:32:47Z weiym $
00021  *
00022  *             MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 
00023  *                     pSOS, ThreadX, NuCleus, OSE, and Win32.
00024  *
00025  *             Copyright (C) 2002-2008 Feynman Software.
00026  *             Copyright (C) 1999-2002 Wei Yongming.
00027  */
00028 
00029 #ifndef _MGUI_CTRL_NEWTOOLBAR_H
00030 #define _MGUI_CTRL_NEWTOOLBAR_H
00031  
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif  /* __cplusplus */
00036 
00063 #define CTRL_NEWTOOLBAR            ("newtoolbar")
00064 
00066 typedef struct _NTBINFO
00067 {
00069     PBITMAP image;
00070 
00072     int nr_cells;
00073 
00086     int nr_cols;
00087 
00092     int w_cell;
00093 
00098     int h_cell;
00099     
00100 } NTBINFO;
00101 
00112 typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y);
00113 
00114 /* Internal */
00115 #define NTB_TEXT_LEN        15
00116 /* Internal */
00117 #define NTB_TIP_LEN         255
00118 
00119 #define NTBIF_PUSHBUTTON    0x0001
00120 #define NTBIF_HOTSPOTBUTTON  0x0002
00121 #define NTBIF_SEPARATOR     0x0003
00122 #define NTBIF_CHECKBUTTON   0x0005
00123 #define NTBIF_NEWLINE       0x0008
00124 #define NTBIF_TYPEMASK      0x000F
00125 
00130 #define NTBIF_DISABLED      0x0010
00131 
00135 #define NTBIF_CHECKED       0x0020
00136 
00137 #define MTB_WHICH_FLAGS     0x0001
00138 #define MTB_WHICH_ID        0x0002
00139 #define MTB_WHICH_TEXT      0x0004
00140 #define MTB_WHICH_TIP       0x0008
00141 #define MTB_WHICH_CELL      0x0010
00142 #define MTB_WHICH_HOTSPOT   0x0020
00143 #define MTB_WHICH_ADDDATA   0x0040
00144 
00146 typedef struct _NTBITEMINFO
00147 {
00160     DWORD       which;
00161 
00172     DWORD       flags;
00173 
00179     int         id;
00180 
00185     char*       text;
00186 
00188     char*       tip;
00189 
00191     int         bmp_cell;
00192 
00194     HOTSPOTPROC  hotspot_proc;
00195 
00197     RECT        rc_hotspot;
00198 
00200     DWORD       add_data;
00201 } NTBITEMINFO;
00202 
00207 typedef NTBITEMINFO* PNTBITEMINFO;
00208 
00218 #define NTBS_WITHTEXT               0x000000001L
00219 
00224 #define NTBS_TEXTRIGHT              0x000000002L
00225 
00231 #define NTBS_DRAWSTATES             0x000000004L
00232 
00237 #define NTBS_DRAWSEPARATOR          0x000000008L
00238 
00243 #define NTBS_HORIZONTAL             0x00000000L
00244 
00249 #define NTBS_VERTICAL               0x00000010L
00250 
00257 #define NTBS_MULTLINE               0x00000020L
00258 
00266 #define NTB_OKAY        0
00267 
00268 #define NTB_ERR         (-1)
00269 
00270 #define NTB_ERR_SPACE   (-2)
00271 
00272 #define NTB_ERR_DUPID   (-3)
00273 
00292 #define NTBM_ADDITEM            0xFE00
00293 
00312 #define NTBM_GETITEM            0xFE01
00313 
00332 #define NTBM_SETITEM            0xFE02
00333 
00352 #define NTBM_ENABLEITEM         0xFE03
00353 
00370 #define NTBM_SETBITMAP          0xFE04
00371 
00372 
00373 #define NTBM_MSGMAX             0xFE10
00374 
00381 #ifdef __cplusplus
00382 }
00383 #endif  /* __cplusplus */
00384 
00385 #endif /* _MGUI_CTRL_NEWTOOLBAR_H */
00386 
Generated on Thu Apr 7 15:55:29 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3