00001 00020 /* 00021 * $Id: gridview.h,v 1.6.2.3 2006/06/05 08:59:40 xwyan Exp $ 00022 * 00023 * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 00024 * pSOS, ThreadX, NuCleus, OSE, and Win32 version 1.6.x 00025 * Copyright (C) 2002-2006 Feynman Software. 00026 * Copyright (C) 1998-2002 Wei Yongming. 00027 */ 00028 00029 #ifndef EXT_GRIDVIEW_H 00030 #define EXT_GRIDVIEW_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00054 #define CTRL_GRIDVIEW "gridview" 00055 00056 #define GVS_COLFIRST 0x0000 00057 #define GVS_ROWFIRST 0x0001 00058 00063 #define GRID_OKAY 0 00064 00069 #define GRID_ERR (-1) 00070 00072 typedef struct _GRIDVIEWDATA 00073 { 00075 int nr_rows; 00077 int nr_cols; 00079 int row_height; 00081 int col_width; 00082 } GRIDVIEWDATA; 00083 00086 #define GV_HALIGN_LEFT 0x00000001 00087 00088 #define GV_HALIGN_RIGHT 0x00000002 00089 00090 #define GV_HALIGN_CENTER 0x00000003 00091 00092 #define GV_VALIGN_TOP 0x00000010 00093 00094 #define GV_VALIGN_BOTTOM 0x00000020 00095 00096 #define GV_VALIGN_CENTER 0x00000030 00097 00099 #define GV_HALIGN_MASK 0x0000000F 00100 00102 #define GV_VALIGN_MASK 0x000000F0 00103 00105 #define GV_TYPE_UNKNOWN 0x00000000 00106 00107 #define GV_TYPE_TEXT 0x00000100 00108 00109 #define GV_TYPE_NUMBER 0x00000200 00110 00111 #define GV_TYPE_CHECKBOX 0x00000300 00112 00113 #define GV_TYPE_SELECTION 0x00000400 00114 00115 #define GV_TYPE_HEADER 0x00000500 00116 00117 #define GV_TYPE_TABLEHEADER 0x00000600 00118 00120 #define GV_TYPE_MASK 0x0000FF00 00121 00123 #define GVS_WITHICON 0x00010000 00124 00125 #define GVS_WITHCHECKBOX 0x00020000 00126 00128 #define GVS_MULTLINE 0x00100000 00129 00130 #define GVS_READONLY 0x00200000 00131 00132 #define GVS_BOXCHECKED 0x00400000 00133 00134 #define GVITEM_STYLE 0x0001 00135 #define GVITEM_BGCOLOR 0x0002 00136 #define GVITEM_FGCOLOR 0x0004 00137 #define GVITEM_FONT 0x0008 00138 #define GVITEM_IMAGE 0x0010 00139 #define GVITEM_MAINCONTENT 0x0020 00140 #define GVITEM_SIZE 0x0040 00141 00142 #define GVITEM_ALLCONTENT 0x00FF 00143 00145 typedef struct _GRIDCELLS 00146 { 00148 int row; 00150 int column; 00152 int width; 00154 int height; 00155 }GRIDCELLS; 00156 00157 typedef int (*GRIDCELLEVALCALLBACK)(GRIDCELLS* target, GRIDCELLS* source, DWORD dwAddData); 00158 00159 typedef struct _GRIDCELLDEPENDENCE 00160 { 00162 GRIDCELLS source; 00164 GRIDCELLS target; 00166 GRIDCELLEVALCALLBACK callback; 00168 DWORD dwAddData; 00169 }GRIDCELLDEPENDENCE; 00170 00172 typedef struct _GRIDCELLDATAHEADER 00173 { 00175 int size; 00177 char* buff; 00179 int len_buff; 00180 }GRIDCELLDATAHEADER; 00181 00183 typedef struct _GRIDCELLDATATEXT 00184 { 00186 char* buff; 00188 int len_buff; 00189 }GRIDCELLDATATEXT; 00190 00192 typedef struct _GRIDCELLDATANUMBER 00193 { 00195 double number; 00197 char* format; 00199 int len_format; 00200 }GRIDCELLDATANUMBER; 00201 00203 typedef struct _GRIDCELLDATACHECKBOX 00204 { 00206 BOOL checked; 00208 char* text; 00210 int len_text; 00211 }GRIDCELLDATACHECKBOX; 00212 00214 typedef struct _GRIDCELLDATASELECTION 00215 { 00217 int cur_index; 00219 char* selections; 00221 int len_sel; 00222 }GRIDCELLDATASELECTION; 00223 00224 #if 0 00225 00226 typedef struct _GRIDCELLDATAEVAL 00227 { 00229 double number; 00231 GRIDCELLS sourcecells; 00233 GRIDCELLEVALCALLBACK eval_callback; 00235 char* format; 00237 int len_format; 00238 }GRIDCELLDATAEVAL; 00239 #endif 00240 00242 typedef struct _GRIDCELLDATA 00243 { 00262 DWORD mask; 00263 00265 DWORD style; 00267 gal_pixel color_fg; 00269 gal_pixel color_bg; 00271 PLOGFONT font; 00273 PBITMAP image; 00275 void* content; 00276 }GRIDCELLDATA; 00277 00300 #define GRIDM_SETCELLPROPERTY 0xF210 00301 00320 #define GRIDM_GETCELLPROPERTY 0xF211 00321 00339 #define GRIDM_SETCOLWIDTH 0xF212 00340 00357 #define GRIDM_GETCOLWIDTH 0xF213 00358 00376 #define GRIDM_SETROWHEIGHT 0xF214 00377 00394 #define GRIDM_GETROWHEIGHT 0xF215 00395 00413 #define GRIDM_ADDROW 0xF216 00414 00431 #define GRIDM_DELROW 0xF217 00432 00449 #define GRIDM_ADDCOLUMN 0xF218 00450 00466 #define GRIDM_DELCOLUMN 0xF219 00467 00482 #define GRIDM_GETROWCOUNT 0xF21A 00483 00498 #define GRIDM_GETCOLCOUNT 0xF21B 00499 00518 #define GRIDM_SETNUMFORMAT 0xF21C 00519 00538 #define GRIDM_SETSELECTED 0xF21D 00539 00558 #define GRIDM_GETSELECTED 0xF21E 00559 00579 #define GRIDM_ADDDEPENDENCE 0xF21F 00580 00599 #define GRIDM_DELDEPENDENCE 0xF220 00600 00601 /*TODO messages for query dependence */ 00602 00603 #define GRIDM_ENDCELLEDIT 0xF221 00604 00617 #define GRIDN_HEADLDOWN 1 00618 00623 #define GRIDN_HEADLUP 2 00624 00628 #define GRIDN_KEYDOWN 3 00629 00634 #define GRIDN_CELLDBCLK 4 00635 00640 #define GRIDN_CELLCLK 5 00641 00646 #define GRIDN_FOCUSCHANGED 6 00647 00652 #define GRIDN_CELLTEXTCHANGED 7 00653 00662 #ifdef __cplusplus 00663 } 00664 #endif 00665 00666 #endif /* EXT_GRIDVIEW_H */ 00667
1.4.2