mCtrl 0.8.0

mCtrl/grid.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010-2011 Martin Mitas
00003  *
00004  * This library is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published by
00006  * the Free Software Foundation; either version 2.1 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU Lesser General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00017  */
00018 
00019 #ifndef MCTRL_GRID_H
00020 #define MCTRL_GRID_H
00021 
00022 #include <mCtrl/defs.h>
00023 #include <mCtrl/value.h>
00024 #include <mCtrl/table.h>
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 
00069 BOOL MCTRL_API mcGrid_Initialize(void);
00070 
00076 void MCTRL_API mcGrid_Terminate(void);
00077 
00078 
00084 #define MC_WC_GRIDW            L"mCtrl.grid"
00085 
00086 #define MC_WC_GRIDA             "mCtrl.grid"
00087 #ifdef UNICODE
00088 
00089     #define MC_WC_GRID          MC_WC_GRIDW
00090 #else
00091     #define MC_WC_GRID          MC_WC_GRIDA
00092 #endif
00093 
00100 
00102 #define MC_GS_NOTABLECREATE          (0x00000001L)
00103 
00105 #define MC_GS_NOGRIDLINES            (0x00000002L)
00106 
00108 #define MC_GS_COLUMNHEADERNONE       (0x00000000L)
00109 
00110 #define MC_GS_COLUMNHEADERNUMBERED   (0x00001000L)
00111 
00112 #define MC_GS_COLUMNHEADERALPHABETIC (0x00002000L)
00113 
00114 #define MC_GS_COLUMNHEADERCUSTOM     (0x00003000L)
00115 
00117 #define MC_GS_ROWHEADERNONE          (0x00000000L)
00118 
00119 #define MC_GS_ROWHEADERNUMBERED      (0x00004000L)
00120 
00121 #define MC_GS_ROWHEADERALPHABETIC    (0x00008000L)
00122 
00123 #define MC_GS_ROWHEADERCUSTOM        (0x0000C000L)
00124 
00131 typedef struct MC_GCELL_tag {
00133     WORD wCol;
00135     WORD wRow;
00137     MC_VALUETYPE hType;
00139     MC_VALUE hValue;
00140 } MC_GCELL;
00141 
00146 
00160 #define MC_GM_GETTABLE            (WM_USER + 100)
00161 
00175 #define MC_GM_SETTABLE            (WM_USER + 101)
00176 
00184 #define MC_GM_GETCOLUMNCOUNT      (WM_USER + 102)
00185 
00193 #define MC_GM_GETROWCOUNT         (WM_USER + 103)
00194 
00203 #define MC_GM_RESIZE              (WM_USER + 104)
00204 
00212 #define MC_GM_CLEAR               (WM_USER + 109)
00213 
00225 #define MC_GM_GETCELL             (WM_USER + 111)
00226 
00235 #define MC_GM_SETCELL             (WM_USER + 110)
00236 
00240 #ifdef __cplusplus
00241 }  /* extern "C" */
00242 #endif
00243 
00244 #endif  /* MCTRL_GRID_H */