MiniGUI API Reference (MiniGUI-Processes)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
gridview.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: gridview.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 EXT_GRIDVIEW_H
63 #define EXT_GRIDVIEW_H
64 
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
83 #define CTRL_GRIDVIEW "gridview"
84 
85 #define GVS_COLFIRST 0x0000
86 #define GVS_ROWFIRST 0x0001
87 
92 #define GRID_OKAY 0
93 
98 #define GRID_ERR (-1)
99 
101 typedef struct _GRIDVIEWDATA
102 {
104  int nr_rows;
106  int nr_cols;
111 } GRIDVIEWDATA;
112 
115 #define GV_HALIGN_LEFT 0x00000001
116 
117 #define GV_HALIGN_RIGHT 0x00000002
118 
119 #define GV_HALIGN_CENTER 0x00000003
120 
121 #define GV_VALIGN_TOP 0x00000010
122 
123 #define GV_VALIGN_BOTTOM 0x00000020
124 
125 #define GV_VALIGN_CENTER 0x00000030
126 
128 #define GV_HALIGN_MASK 0x0000000F
129 
131 #define GV_VALIGN_MASK 0x000000F0
132 
134 #define GV_TYPE_UNKNOWN 0x00000000
135 
136 #define GV_TYPE_TEXT 0x00000100
137 
138 #define GV_TYPE_NUMBER 0x00000200
139 
140 #define GV_TYPE_CHECKBOX 0x00000300
141 
142 #define GV_TYPE_SELECTION 0x00000400
143 
144 #define GV_TYPE_HEADER 0x00000500
145 
146 #define GV_TYPE_TABLEHEADER 0x00000600
147 
149 #define GV_TYPE_MASK 0x0000FF00
150 
152 #define GVS_WITHICON 0x00010000
153 
154 #define GVS_WITHCHECKBOX 0x00020000
155 
157 #define GVS_MULTLINE 0x00100000
158 
159 #define GVS_READONLY 0x00200000
160 
161 #define GVS_BOXCHECKED 0x00400000
162 
163 #define GVITEM_STYLE 0x0001
164 #define GVITEM_BGCOLOR 0x0002
165 #define GVITEM_FGCOLOR 0x0004
166 #define GVITEM_FONT 0x0008
167 #define GVITEM_IMAGE 0x0010
168 #define GVITEM_MAINCONTENT 0x0020
169 #define GVITEM_SIZE 0x0040
170 
171 #define GVITEM_ALLCONTENT 0x00FF
172 
174 typedef struct _GRIDCELLS
175 {
177  int row;
179  int column;
181  int width;
183  int height;
184 }GRIDCELLS;
185 
186 typedef int (*GRIDCELLEVALCALLBACK)(GRIDCELLS* target, GRIDCELLS* source, DWORD dwAddData);
187 
188 typedef struct _GRIDCELLDEPENDENCE
189 {
191  GRIDCELLS source;
193  GRIDCELLS target;
195  GRIDCELLEVALCALLBACK callback;
197  DWORD dwAddData;
198 }GRIDCELLDEPENDENCE;
199 
201 typedef struct _GRIDCELLDATAHEADER
202 {
204  int size;
206  char* buff;
208  int len_buff;
210 
212 typedef struct _GRIDCELLDATATEXT
213 {
215  char* buff;
217  int len_buff;
219 
221 typedef struct _GRIDCELLDATANUMBER
222 {
224  double number;
226  char* format;
230 
232 typedef struct _GRIDCELLDATACHECKBOX
233 {
237  char* text;
239  int len_text;
241 
244 {
248  char* selections;
250  int len_sel;
252 
253 #if 0
254 
255 typedef struct _GRIDCELLDATAEVAL
256 {
258  double number;
260  GRIDCELLS sourcecells;
262  GRIDCELLEVALCALLBACK eval_callback;
264  char* format;
266  int len_format;
267 }GRIDCELLDATAEVAL;
268 #endif
269 
271 typedef struct _GRIDCELLDATA
272 {
292 
304  void* content;
305 }GRIDCELLDATA;
306 
329 #define GRIDM_SETCELLPROPERTY 0xF210
330 
349 #define GRIDM_GETCELLPROPERTY 0xF211
350 
369 #define GRIDM_SETCOLWIDTH 0xF212
370 
388 #define GRIDM_GETCOLWIDTH 0xF213
389 
408 #define GRIDM_SETROWHEIGHT 0xF214
409 
427 #define GRIDM_GETROWHEIGHT 0xF215
428 
447 #define GRIDM_ADDROW 0xF216
448 
466 #define GRIDM_DELROW 0xF217
467 
485 #define GRIDM_ADDCOLUMN 0xF218
486 
503 #define GRIDM_DELCOLUMN 0xF219
504 
519 #define GRIDM_GETROWCOUNT 0xF21A
520 
535 #define GRIDM_GETCOLCOUNT 0xF21B
536 
556 #define GRIDM_SETNUMFORMAT 0xF21C
557 
576 #define GRIDM_SETSELECTED 0xF21D
577 
596 #define GRIDM_GETSELECTED 0xF21E
597 
617 #define GRIDM_ADDDEPENDENCE 0xF21F
618 
637 #define GRIDM_DELDEPENDENCE 0xF220
638 
643 #define GRIDM_ENDCELLEDIT 0xF221
644 
657 #define GRIDN_HEADLDOWN 1
658 
663 #define GRIDN_HEADLUP 2
664 
668 #define GRIDN_KEYDOWN 3
669 
674 #define GRIDN_CELLDBCLK 4
675 
680 #define GRIDN_CELLCLK 5
681 
686 #define GRIDN_FOCUSCHANGED 6
687 
692 #define GRIDN_CELLTEXTCHANGED 7
693 
700 #ifdef __cplusplus
701 }
702 #endif
703 
704 #endif /* EXT_GRIDVIEW_H */
705 
_GRIDCELLDATASELECTION::len_sel
int len_sel
Definition: gridview.h:250
_GRIDCELLDATAHEADER::size
int size
Definition: gridview.h:204
_GRIDCELLDATA::style
DWORD style
Definition: gridview.h:294
DWORD
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:604
GRIDCELLDATATEXT
struct _GRIDCELLDATATEXT GRIDCELLDATATEXT
_LOGFONT
Definition: gdi.h:6478
_GRIDCELLS::column
int column
Definition: gridview.h:179
_GRIDCELLDATAHEADER
Definition: gridview.h:201
_GRIDCELLDATANUMBER
Definition: gridview.h:221
_GRIDCELLS::height
int height
Definition: gridview.h:183
_GRIDCELLDATAHEADER::len_buff
int len_buff
Definition: gridview.h:208
_GRIDCELLDATATEXT::len_buff
int len_buff
Definition: gridview.h:217
_GRIDCELLDATANUMBER::format
char * format
Definition: gridview.h:226
_GRIDCELLDATACHECKBOX::text
char * text
Definition: gridview.h:237
_GRIDCELLDATATEXT
Definition: gridview.h:212
_GRIDCELLS::width
int width
Definition: gridview.h:181
GRIDVIEWDATA
struct _GRIDVIEWDATA GRIDVIEWDATA
_GRIDCELLDATANUMBER::number
double number
Definition: gridview.h:224
BOOL
int BOOL
A type definition for boolean value.
Definition: common.h:343
_GRIDCELLDATA::color_fg
gal_pixel color_fg
Definition: gridview.h:296
_GRIDVIEWDATA::nr_cols
int nr_cols
Definition: gridview.h:106
_GRIDCELLDATA::font
PLOGFONT font
Definition: gridview.h:300
_GRIDCELLDATASELECTION::cur_index
int cur_index
Definition: gridview.h:246
_GRIDCELLDATANUMBER::len_format
int len_format
Definition: gridview.h:228
_GRIDCELLDATACHECKBOX
Definition: gridview.h:232
_GRIDCELLDATASELECTION::selections
char * selections
Definition: gridview.h:248
_GRIDCELLDATATEXT::buff
char * buff
Definition: gridview.h:215
_GRIDCELLDATA
Definition: gridview.h:271
_GRIDCELLDATA::content
void * content
Definition: gridview.h:304
_GRIDCELLDATASELECTION
Definition: gridview.h:243
_GRIDCELLDATA::color_bg
gal_pixel color_bg
Definition: gridview.h:298
_GRIDVIEWDATA
Definition: gridview.h:101
GRIDCELLS
struct _GRIDCELLS GRIDCELLS
_GRIDCELLDATA::image
PBITMAP image
Definition: gridview.h:302
GRIDCELLDATAHEADER
struct _GRIDCELLDATAHEADER GRIDCELLDATAHEADER
GRIDCELLDATACHECKBOX
struct _GRIDCELLDATACHECKBOX GRIDCELLDATACHECKBOX
_GRIDCELLDATAHEADER::buff
char * buff
Definition: gridview.h:206
_GRIDCELLDATACHECKBOX::checked
BOOL checked
Definition: gridview.h:235
_GRIDVIEWDATA::col_width
int col_width
Definition: gridview.h:110
_GRIDCELLS
Definition: gridview.h:174
_GRIDCELLS::row
int row
Definition: gridview.h:177
_GRIDCELLDATACHECKBOX::len_text
int len_text
Definition: gridview.h:239
_GRIDCELLDATA::mask
DWORD mask
Definition: gridview.h:291
_GRIDVIEWDATA::nr_rows
int nr_rows
Definition: gridview.h:104
GRIDCELLDATANUMBER
struct _GRIDCELLDATANUMBER GRIDCELLDATANUMBER
_BITMAP
Definition: gdi.h:11088
gal_pixel
Uint32 gal_pixel
Data type of pixel value.
Definition: common.h:1106
_GRIDVIEWDATA::row_height
int row_height
Definition: gridview.h:108
GRIDCELLDATA
struct _GRIDCELLDATA GRIDCELLDATA
GRIDCELLDATASELECTION
struct _GRIDCELLDATASELECTION GRIDCELLDATASELECTION