gridview.h

Go to the documentation of this file.
00001 
00019 /*
00020  * $Id: gridview.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) 1998-2002 Wei Yongming.
00027  */
00028 
00029 #ifndef EXT_GRIDVIEW_H
00030 #define EXT_GRIDVIEW_H
00031 
00032 
00033 #ifdef  __cplusplus
00034 extern "C" {
00035 #endif
00036 
00050 #define CTRL_GRIDVIEW               "gridview"
00051 
00052 #define GVS_COLFIRST                0x0000
00053 #define GVS_ROWFIRST                0x0001
00054 
00059 #define GRID_OKAY                   0
00060 
00065 #define GRID_ERR                    (-1)
00066 
00068 typedef struct _GRIDVIEWDATA
00069 {
00071     int nr_rows;
00073     int nr_cols;
00075     int row_height;
00077     int col_width;
00078 } GRIDVIEWDATA;
00079 
00082 #define GV_HALIGN_LEFT                          0x00000001
00083 
00084 #define GV_HALIGN_RIGHT                         0x00000002
00085 
00086 #define GV_HALIGN_CENTER                        0x00000003
00087 
00088 #define GV_VALIGN_TOP                           0x00000010
00089 
00090 #define GV_VALIGN_BOTTOM                        0x00000020
00091 
00092 #define GV_VALIGN_CENTER                        0x00000030
00093 
00095 #define GV_HALIGN_MASK                          0x0000000F
00096 
00098 #define GV_VALIGN_MASK                          0x000000F0
00099 
00101 #define GV_TYPE_UNKNOWN                         0x00000000
00102 
00103 #define GV_TYPE_TEXT                            0x00000100
00104 
00105 #define GV_TYPE_NUMBER                          0x00000200
00106 
00107 #define GV_TYPE_CHECKBOX                        0x00000300
00108 
00109 #define GV_TYPE_SELECTION                       0x00000400
00110 
00111 #define GV_TYPE_HEADER                          0x00000500
00112 
00113 #define GV_TYPE_TABLEHEADER                     0x00000600
00114 
00116 #define GV_TYPE_MASK                            0x0000FF00
00117 
00119 #define GVS_WITHICON                            0x00010000
00120 
00121 #define GVS_WITHCHECKBOX                        0x00020000
00122 
00124 #define GVS_MULTLINE                          0x00100000
00125 
00126 #define GVS_READONLY                            0x00200000
00127 
00128 #define GVS_BOXCHECKED                          0x00400000
00129 
00130 #define GVITEM_STYLE                            0x0001
00131 #define GVITEM_BGCOLOR                          0x0002
00132 #define GVITEM_FGCOLOR                          0x0004
00133 #define GVITEM_FONT                             0x0008
00134 #define GVITEM_IMAGE                            0x0010
00135 #define GVITEM_MAINCONTENT                      0x0020 
00136 #define GVITEM_SIZE                             0x0040
00137 
00138 #define GVITEM_ALLCONTENT                       0x00FF
00139 
00141 typedef struct _GRIDCELLS
00142 {
00144     int row;
00146     int column;
00148     int width;
00150     int height;
00151 }GRIDCELLS;
00152 
00153 typedef int (*GRIDCELLEVALCALLBACK)(GRIDCELLS* target, GRIDCELLS* source, DWORD dwAddData);
00154 
00155 typedef struct _GRIDCELLDEPENDENCE
00156 {
00158     GRIDCELLS source;
00160     GRIDCELLS target;
00162     GRIDCELLEVALCALLBACK callback;
00164     DWORD dwAddData;
00165 }GRIDCELLDEPENDENCE;
00166 
00168 typedef struct _GRIDCELLDATAHEADER
00169 {
00171     int size;
00173     char* buff;
00175     int len_buff;
00176 }GRIDCELLDATAHEADER;
00177 
00179 typedef struct _GRIDCELLDATATEXT
00180 {
00182     char* buff;
00184     int len_buff;
00185 }GRIDCELLDATATEXT;
00186 
00188 typedef struct _GRIDCELLDATANUMBER
00189 {
00191     double number;
00193     char* format;
00195     int len_format;
00196 }GRIDCELLDATANUMBER;
00197 
00199 typedef struct _GRIDCELLDATACHECKBOX
00200 {
00202     BOOL checked;
00204     char* text;
00206     int len_text;
00207 }GRIDCELLDATACHECKBOX;
00208 
00210 typedef struct _GRIDCELLDATASELECTION
00211 {
00213     int cur_index;
00215     char* selections;
00217     int len_sel;
00218 }GRIDCELLDATASELECTION;
00219 
00220 #if 0
00221 
00222 typedef struct _GRIDCELLDATAEVAL
00223 {
00225     double number;
00227     GRIDCELLS sourcecells;
00229     GRIDCELLEVALCALLBACK eval_callback;
00231     char* format;
00233     int len_format;
00234 }GRIDCELLDATAEVAL;
00235 #endif
00236 
00238 typedef struct _GRIDCELLDATA
00239 {
00258     DWORD mask;
00259 
00261     DWORD style;
00263     gal_pixel color_fg;
00265     gal_pixel color_bg;
00267     PLOGFONT font;
00269     PBITMAP image;
00271     void* content;
00272 }GRIDCELLDATA;
00273 
00296 #define  GRIDM_SETCELLPROPERTY    0xF210
00297 
00316 #define  GRIDM_GETCELLPROPERTY    0xF211
00317 
00336 #define  GRIDM_SETCOLWIDTH       0xF212
00337 
00355 #define  GRIDM_GETCOLWIDTH       0xF213 
00356 
00375 #define  GRIDM_SETROWHEIGHT      0xF214
00376 
00394 #define  GRIDM_GETROWHEIGHT      0xF215
00395 
00414 #define  GRIDM_ADDROW         0xF216
00415 
00433 #define  GRIDM_DELROW         0xF217
00434 
00452 #define  GRIDM_ADDCOLUMN      0xF218
00453 
00470 #define  GRIDM_DELCOLUMN      0xF219
00471 
00486 #define  GRIDM_GETROWCOUNT    0xF21A
00487 
00502 #define  GRIDM_GETCOLCOUNT    0xF21B
00503 
00523 #define  GRIDM_SETNUMFORMAT   0xF21C
00524 
00543 #define  GRIDM_SETSELECTED    0xF21D
00544 
00563 #define  GRIDM_GETSELECTED    0xF21E
00564 
00584 #define  GRIDM_ADDDEPENDENCE    0xF21F
00585 
00604 #define  GRIDM_DELDEPENDENCE    0xF220
00605 
00606 /*TODO messages for query dependence */
00611 #define  GRIDM_ENDCELLEDIT      0xF221
00612 
00625 #define  GRIDN_HEADLDOWN       1
00626 
00631 #define  GRIDN_HEADLUP         2
00632 
00636 #define  GRIDN_KEYDOWN         3
00637 
00642 #define  GRIDN_CELLDBCLK       4
00643 
00648 #define  GRIDN_CELLCLK         5
00649 
00654 #define  GRIDN_FOCUSCHANGED    6
00655 
00660 #define  GRIDN_CELLTEXTCHANGED 7
00661 
00668 #ifdef  __cplusplus
00669 }
00670 #endif
00671 
00672 #endif /* EXT_GRIDVIEW_H */
00673 
Generated on Thu Apr 7 15:58:31 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3