mCtrl
grid.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2011 Martin Mitas
3  *
4  * This library is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef MCTRL_GRID_H
20 #define MCTRL_GRID_H
21 
22 #include <mCtrl/defs.h>
23 #include <mCtrl/value.h>
24 #include <mCtrl/table.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 
69 BOOL MCTRL_API mcGrid_Initialize(void);
70 
76 void MCTRL_API mcGrid_Terminate(void);
77 
78 
84 #define MC_WC_GRIDW L"mCtrl.grid"
85 
86 #define MC_WC_GRIDA "mCtrl.grid"
87 
94 
96 #define MC_GS_NOTABLECREATE 0x0001
97 
99 #define MC_GS_NOGRIDLINES 0x0002
100 
102 #define MC_GS_COLUMNHEADERNONE 0x0000
103 
104 #define MC_GS_COLUMNHEADERNUMBERED 0x1000
105 
106 #define MC_GS_COLUMNHEADERALPHABETIC 0x2000
107 
108 #define MC_GS_COLUMNHEADERCUSTOM 0x3000
109 
111 #define MC_GS_ROWHEADERNONE 0x0000
112 
113 #define MC_GS_ROWHEADERNUMBERED 0x4000
114 
115 #define MC_GS_ROWHEADERALPHABETIC 0x8000
116 
117 #define MC_GS_ROWHEADERCUSTOM 0xC000
118 
125 typedef struct MC_GCELL_tag {
127  WORD wCol;
129  WORD wRow;
134 } MC_GCELL;
135 
142 #define MC_GGM_COLUMNHEADERHEIGHT (1 << 0)
143 
144 #define MC_GGM_ROWHEADERWIDTH (1 << 1)
145 
146 #define MC_GGM_COLUMNWIDTH (1 << 2)
147 
148 #define MC_GGM_ROWHEIGHT (1 << 3)
149 
150 #define MC_GGM_PADDINGHORZ (1 << 4)
151 
152 #define MC_GGM_PADDINGVERT (1 << 5)
153 
155 #ifndef DOXYGEN /* prevent documentation of these */
156  /* Deprecated: Use @ref MC_GGM_xxxx instead in new code. */
157  #define MC_GGF_COLUMNHEADERHEIGHT MC_GGM_COLUMNHEADERHEIGHT
158  #define MC_GGF_ROWHEADERWIDTH MC_GGM_ROWHEADERWIDTH
159  #define MC_GGF_COLUMNWIDTH MC_GGM_COLUMNWIDTH
160  #define MC_GGF_ROWHEIGHT MC_GGM_ROWHEIGHT
161  #define MC_GGF_PADDINGHORZ MC_GGM_PADDINGHORZ
162  #define MC_GGF_PADDINGVERT MC_GGM_PADDINGVERT
163 #endif
164 
169 typedef struct MC_GGEOMETRY_tag {
171  DWORD fMask;
184 } MC_GGEOMETRY;
185 
190 
204 #define MC_GM_GETTABLE (WM_USER + 100)
205 
219 #define MC_GM_SETTABLE (WM_USER + 101)
220 
228 #define MC_GM_GETCOLUMNCOUNT (WM_USER + 102)
229 
237 #define MC_GM_GETROWCOUNT (WM_USER + 103)
238 
247 #define MC_GM_RESIZE (WM_USER + 104)
248 
256 #define MC_GM_CLEAR (WM_USER + 109)
257 
266 #define MC_GM_SETCELL (WM_USER + 110)
267 
279 #define MC_GM_GETCELL (WM_USER + 111)
280 
290 #define MC_GM_SETGEOMETRY (WM_USER + 112)
291 
300 #define MC_GM_GETGEOMETRY (WM_USER + 113)
301 
309 
311 #define MC_WC_GRID MCTRL_NAME_AW(MC_WC_GRID)
312 
316 #ifdef __cplusplus
317 } /* extern "C" */
318 #endif
319 
320 #endif /* MCTRL_GRID_H */