MiniGUI API Reference (MiniGUI-Threads)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
gridview.h
Go to the documentation of this file.
1 
43 /*
44  * $Id: gridview.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 EXT_GRIDVIEW_H
51 #define EXT_GRIDVIEW_H
52 
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
71 #define CTRL_GRIDVIEW "gridview"
72 
73 #define GVS_COLFIRST 0x0000
74 #define GVS_ROWFIRST 0x0001
75 
80 #define GRID_OKAY 0
81 
86 #define GRID_ERR (-1)
87 
89 typedef struct _GRIDVIEWDATA
90 {
92  int nr_rows;
94  int nr_cols;
98  int col_width;
99 } GRIDVIEWDATA;
100 
103 #define GV_HALIGN_LEFT 0x00000001
104 
105 #define GV_HALIGN_RIGHT 0x00000002
106 
107 #define GV_HALIGN_CENTER 0x00000003
108 
109 #define GV_VALIGN_TOP 0x00000010
110 
111 #define GV_VALIGN_BOTTOM 0x00000020
112 
113 #define GV_VALIGN_CENTER 0x00000030
114 
116 #define GV_HALIGN_MASK 0x0000000F
117 
119 #define GV_VALIGN_MASK 0x000000F0
120 
122 #define GV_TYPE_UNKNOWN 0x00000000
123 
124 #define GV_TYPE_TEXT 0x00000100
125 
126 #define GV_TYPE_NUMBER 0x00000200
127 
128 #define GV_TYPE_CHECKBOX 0x00000300
129 
130 #define GV_TYPE_SELECTION 0x00000400
131 
132 #define GV_TYPE_HEADER 0x00000500
133 
134 #define GV_TYPE_TABLEHEADER 0x00000600
135 
137 #define GV_TYPE_MASK 0x0000FF00
138 
140 #define GVS_WITHICON 0x00010000
141 
142 #define GVS_WITHCHECKBOX 0x00020000
143 
145 #define GVS_MULTLINE 0x00100000
146 
147 #define GVS_READONLY 0x00200000
148 
149 #define GVS_BOXCHECKED 0x00400000
150 
151 #define GVITEM_STYLE 0x0001
152 #define GVITEM_BGCOLOR 0x0002
153 #define GVITEM_FGCOLOR 0x0004
154 #define GVITEM_FONT 0x0008
155 #define GVITEM_IMAGE 0x0010
156 #define GVITEM_MAINCONTENT 0x0020
157 #define GVITEM_SIZE 0x0040
158 
159 #define GVITEM_ALLCONTENT 0x00FF
160 
162 typedef struct _GRIDCELLS
163 {
165  int row;
167  int column;
169  int width;
171  int height;
172 }GRIDCELLS;
173 
174 typedef int (*GRIDCELLEVALCALLBACK)(GRIDCELLS* target, GRIDCELLS* source, DWORD dwAddData);
175 
176 typedef struct _GRIDCELLDEPENDENCE
177 {
179  GRIDCELLS source;
181  GRIDCELLS target;
183  GRIDCELLEVALCALLBACK callback;
185  DWORD dwAddData;
186 }GRIDCELLDEPENDENCE;
187 
189 typedef struct _GRIDCELLDATAHEADER
190 {
192  int size;
194  char* buff;
196  int len_buff;
198 
200 typedef struct _GRIDCELLDATATEXT
201 {
203  char* buff;
205  int len_buff;
207 
209 typedef struct _GRIDCELLDATANUMBER
210 {
212  double number;
214  char* format;
218 
220 typedef struct _GRIDCELLDATACHECKBOX
221 {
225  char* text;
227  int len_text;
229 
232 {
236  char* selections;
238  int len_sel;
240 
241 #if 0
242 
243 typedef struct _GRIDCELLDATAEVAL
244 {
246  double number;
248  GRIDCELLS sourcecells;
250  GRIDCELLEVALCALLBACK eval_callback;
252  char* format;
254  int len_format;
255 }GRIDCELLDATAEVAL;
256 #endif
257 
259 typedef struct _GRIDCELLDATA
260 {
280 
292  void* content;
293 }GRIDCELLDATA;
294 
317 #define GRIDM_SETCELLPROPERTY 0xF210
318 
337 #define GRIDM_GETCELLPROPERTY 0xF211
338 
357 #define GRIDM_SETCOLWIDTH 0xF212
358 
376 #define GRIDM_GETCOLWIDTH 0xF213
377 
396 #define GRIDM_SETROWHEIGHT 0xF214
397 
415 #define GRIDM_GETROWHEIGHT 0xF215
416 
435 #define GRIDM_ADDROW 0xF216
436 
454 #define GRIDM_DELROW 0xF217
455 
473 #define GRIDM_ADDCOLUMN 0xF218
474 
491 #define GRIDM_DELCOLUMN 0xF219
492 
507 #define GRIDM_GETROWCOUNT 0xF21A
508 
523 #define GRIDM_GETCOLCOUNT 0xF21B
524 
544 #define GRIDM_SETNUMFORMAT 0xF21C
545 
564 #define GRIDM_SETSELECTED 0xF21D
565 
584 #define GRIDM_GETSELECTED 0xF21E
585 
605 #define GRIDM_ADDDEPENDENCE 0xF21F
606 
625 #define GRIDM_DELDEPENDENCE 0xF220
626 
631 #define GRIDM_ENDCELLEDIT 0xF221
632 
645 #define GRIDN_HEADLDOWN 1
646 
651 #define GRIDN_HEADLUP 2
652 
656 #define GRIDN_KEYDOWN 3
657 
662 #define GRIDN_CELLDBCLK 4
663 
668 #define GRIDN_CELLCLK 5
669 
674 #define GRIDN_FOCUSCHANGED 6
675 
680 #define GRIDN_CELLTEXTCHANGED 7
681 
688 #ifdef __cplusplus
689 }
690 #endif
691 
692 #endif /* EXT_GRIDVIEW_H */
693 
int BOOL
A type definition for boolean value.
Definition: common.h:294
struct _GRIDCELLDATATEXT GRIDCELLDATATEXT
int height
Definition: gridview.h:171
gal_pixel color_fg
Definition: gridview.h:284
DWORD mask
Definition: gridview.h:279
Uint32 gal_pixel
Data type of pixel value.
Definition: common.h:1014
struct _GRIDCELLDATANUMBER GRIDCELLDATANUMBER
struct _GRIDVIEWDATA GRIDVIEWDATA
PLOGFONT font
Definition: gridview.h:288
struct _GRIDCELLDATASELECTION GRIDCELLDATASELECTION
struct _GRIDCELLDATAHEADER GRIDCELLDATAHEADER
struct _GRIDCELLDATA GRIDCELLDATA
struct _GRIDCELLDATACHECKBOX GRIDCELLDATACHECKBOX
PBITMAP image
Definition: gridview.h:290
int width
Definition: gridview.h:169
struct _GRIDCELLS GRIDCELLS
void * content
Definition: gridview.h:292
gal_pixel color_bg
Definition: gridview.h:286
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:555
int column
Definition: gridview.h:167
int col_width
Definition: gridview.h:98
Definition: gdi.h:7382
Definition: gdi.h:5697
int row_height
Definition: gridview.h:96
DWORD style
Definition: gridview.h:282