00001 00021 /* 00022 * $Id: gridview.h,v 1.16 2006/06/11 04:20:45 weiym Exp $ 00023 * 00024 * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 00025 * pSOS, ThreadX, NuCleus, OSE, and Win32. 00026 * 00027 * Copyright (C) 2002-2006 Feynman Software. 00028 * Copyright (C) 1998-2002 Wei Yongming. 00029 */ 00030 00031 #ifndef EXT_GRIDVIEW_H 00032 #define EXT_GRIDVIEW_H 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00056 #define CTRL_GRIDVIEW "gridview" 00057 00058 #define GVS_COLFIRST 0x0000 00059 #define GVS_ROWFIRST 0x0001 00060 00065 #define GRID_OKAY 0 00066 00071 #define GRID_ERR (-1) 00072 00074 typedef struct _GRIDVIEWDATA 00075 { 00077 int nr_rows; 00079 int nr_cols; 00081 int row_height; 00083 int col_width; 00084 } GRIDVIEWDATA; 00085 00088 #define GV_HALIGN_LEFT 0x00000001 00089 00090 #define GV_HALIGN_RIGHT 0x00000002 00091 00092 #define GV_HALIGN_CENTER 0x00000003 00093 00094 #define GV_VALIGN_TOP 0x00000010 00095 00096 #define GV_VALIGN_BOTTOM 0x00000020 00097 00098 #define GV_VALIGN_CENTER 0x00000030 00099 00101 #define GV_HALIGN_MASK 0x0000000F 00102 00104 #define GV_VALIGN_MASK 0x000000F0 00105 00107 #define GV_TYPE_UNKNOWN 0x00000000 00108 00109 #define GV_TYPE_TEXT 0x00000100 00110 00111 #define GV_TYPE_NUMBER 0x00000200 00112 00113 #define GV_TYPE_CHECKBOX 0x00000300 00114 00115 #define GV_TYPE_SELECTION 0x00000400 00116 00117 #define GV_TYPE_HEADER 0x00000500 00118 00119 #define GV_TYPE_TABLEHEADER 0x00000600 00120 00122 #define GV_TYPE_MASK 0x0000FF00 00123 00125 #define GVS_WITHICON 0x00010000 00126 00127 #define GVS_WITHCHECKBOX 0x00020000 00128 00130 #define GVS_MULTLINE 0x00100000 00131 00132 #define GVS_READONLY 0x00200000 00133 00134 #define GVS_BOXCHECKED 0x00400000 00135 00136 #define GVITEM_STYLE 0x0001 00137 #define GVITEM_BGCOLOR 0x0002 00138 #define GVITEM_FGCOLOR 0x0004 00139 #define GVITEM_FONT 0x0008 00140 #define GVITEM_IMAGE 0x0010 00141 #define GVITEM_MAINCONTENT 0x0020 00142 #define GVITEM_SIZE 0x0040 00143 00144 #define GVITEM_ALLCONTENT 0x00FF 00145 00147 typedef struct _GRIDCELLS 00148 { 00150 int row; 00152 int column; 00154 int width; 00156 int height; 00157 }GRIDCELLS; 00158 00159 typedef int (*GRIDCELLEVALCALLBACK)(GRIDCELLS* target, GRIDCELLS* source, DWORD dwAddData); 00160 00161 typedef struct _GRIDCELLDEPENDENCE 00162 { 00164 GRIDCELLS source; 00166 GRIDCELLS target; 00168 GRIDCELLEVALCALLBACK callback; 00170 DWORD dwAddData; 00171 }GRIDCELLDEPENDENCE; 00172 00174 typedef struct _GRIDCELLDATAHEADER 00175 { 00177 int size; 00179 char* buff; 00181 int len_buff; 00182 }GRIDCELLDATAHEADER; 00183 00185 typedef struct _GRIDCELLDATATEXT 00186 { 00188 char* buff; 00190 int len_buff; 00191 }GRIDCELLDATATEXT; 00192 00194 typedef struct _GRIDCELLDATANUMBER 00195 { 00197 double number; 00199 char* format; 00201 int len_format; 00202 }GRIDCELLDATANUMBER; 00203 00205 typedef struct _GRIDCELLDATACHECKBOX 00206 { 00208 BOOL checked; 00210 char* text; 00212 int len_text; 00213 }GRIDCELLDATACHECKBOX; 00214 00216 typedef struct _GRIDCELLDATASELECTION 00217 { 00219 int cur_index; 00221 char* selections; 00223 int len_sel; 00224 }GRIDCELLDATASELECTION; 00225 00226 #if 0 00227 00228 typedef struct _GRIDCELLDATAEVAL 00229 { 00231 double number; 00233 GRIDCELLS sourcecells; 00235 GRIDCELLEVALCALLBACK eval_callback; 00237 char* format; 00239 int len_format; 00240 }GRIDCELLDATAEVAL; 00241 #endif 00242 00244 typedef struct _GRIDCELLDATA 00245 { 00264 DWORD mask; 00265 00267 DWORD style; 00269 gal_pixel color_fg; 00271 gal_pixel color_bg; 00273 PLOGFONT font; 00275 PBITMAP image; 00277 void* content; 00278 }GRIDCELLDATA; 00279 00302 #define GRIDM_SETCELLPROPERTY 0xF210 00303 00322 #define GRIDM_GETCELLPROPERTY 0xF211 00323 00341 #define GRIDM_SETCOLWIDTH 0xF212 00342 00359 #define GRIDM_GETCOLWIDTH 0xF213 00360 00378 #define GRIDM_SETROWHEIGHT 0xF214 00379 00396 #define GRIDM_GETROWHEIGHT 0xF215 00397 00415 #define GRIDM_ADDROW 0xF216 00416 00433 #define GRIDM_DELROW 0xF217 00434 00451 #define GRIDM_ADDCOLUMN 0xF218 00452 00468 #define GRIDM_DELCOLUMN 0xF219 00469 00484 #define GRIDM_GETROWCOUNT 0xF21A 00485 00500 #define GRIDM_GETCOLCOUNT 0xF21B 00501 00520 #define GRIDM_SETNUMFORMAT 0xF21C 00521 00540 #define GRIDM_SETSELECTED 0xF21D 00541 00560 #define GRIDM_GETSELECTED 0xF21E 00561 00581 #define GRIDM_ADDDEPENDENCE 0xF21F 00582 00601 #define GRIDM_DELDEPENDENCE 0xF220 00602 00603 /*TODO messages for query dependence */ 00604 00605 #define GRIDM_ENDCELLEDIT 0xF221 00606 00619 #define GRIDN_HEADLDOWN 1 00620 00625 #define GRIDN_HEADLUP 2 00626 00630 #define GRIDN_KEYDOWN 3 00631 00636 #define GRIDN_CELLDBCLK 4 00637 00642 #define GRIDN_CELLCLK 5 00643 00648 #define GRIDN_FOCUSCHANGED 6 00649 00654 #define GRIDN_CELLTEXTCHANGED 7 00655 00664 #ifdef __cplusplus 00665 } 00666 #endif 00667 00668 #endif /* EXT_GRIDVIEW_H */ 00669
1.4.2