mCtrl  0.9.7
grid.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2014 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/_common.h>
24 #include <mCtrl/value.h>
25 #include <mCtrl/table.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
131 
136 BOOL MCTRL_API mcGrid_Initialize(void);
137 
141 void MCTRL_API mcGrid_Terminate(void);
142 
150 
152 #define MC_WC_GRIDW L"mCtrl.grid"
153 
154 #define MC_WC_GRIDA "mCtrl.grid"
155 
163 
165 #define MC_GS_NOTABLECREATE 0x0001
166 
168 #define MC_GS_NOGRIDLINES 0x0002
169 
171 #define MC_GS_DOUBLEBUFFER 0x0004
172 
175 #define MC_GS_OWNERDATA 0x0008
176 
177 /* TODO:
178 #define MC_GS_RESIZABLECOLUMNS 0x0010
179 #define MC_GS_RESIZABLEROWS 0x0020
180 #define MC_GS_RESIZABLEHEADERS 0x0040
181 */
182 
184 #define MC_GS_COLUMNHEADERNORMAL 0x0000
185 
186 #define MC_GS_COLUMNHEADERNUMBERED 0x1000
187 
188 #define MC_GS_COLUMNHEADERALPHABETIC 0x2000
189 
190 #define MC_GS_COLUMNHEADERNONE 0x3000
191 
192 #define MC_GS_COLUMNHEADERMASK (MC_GS_COLUMNHEADERNORMAL | \
193  MC_GS_COLUMNHEADERNUMBERED | \
194  MC_GS_COLUMNHEADERALPHABETIC | \
195  MC_GS_COLUMNHEADERNONE)
196 
198 #define MC_GS_ROWHEADERNORMAL 0x0000
199 
200 #define MC_GS_ROWHEADERNUMBERED 0x4000
201 
202 #define MC_GS_ROWHEADERALPHABETIC 0x8000
203 
204 #define MC_GS_ROWHEADERNONE 0xC000
205 
206 #define MC_GS_ROWHEADERMASK (MC_GS_ROWHEADERNORMAL | \
207  MC_GS_ROWHEADERNUMBERED | \
208  MC_GS_ROWHEADERALPHABETIC | \
209  MC_GS_ROWHEADERNONE)
210 
219 
221 #define MC_GGF_COLUMNHEADERHEIGHT (1 << 0)
222 
223 #define MC_GGF_ROWHEADERWIDTH (1 << 1)
224 
225 #define MC_GGF_DEFCOLUMNWIDTH (1 << 2)
226 
227 #define MC_GGF_DEFROWHEIGHT (1 << 3)
228 
229 #define MC_GGF_PADDINGHORZ (1 << 4)
230 
231 #define MC_GGF_PADDINGVERT (1 << 5)
232 
240 
245 typedef struct MC_GGEOMETRY_tag {
247  DWORD fMask;
260 } MC_GGEOMETRY;
261 
265 typedef struct MC_NMGCACHEHINT_tag {
267  NMHDR hdr;
271  WORD wRowFrom;
273  WORD wColumnTo;
275  WORD wRowTo;
277 
282 typedef struct MC_NMGDISPINFOW_tag {
284  NMHDR hdr;
286  WORD wColumn;
288  WORD wRow;
292 
297 typedef struct MC_NMGDISPINFOA_tag {
299  NMHDR hdr;
301  WORD wColumn;
303  WORD wRow;
307 
315 
329 #define MC_GM_GETTABLE (MC_GM_FIRST + 0)
330 
344 #define MC_GM_SETTABLE (MC_GM_FIRST + 1)
345 
353 #define MC_GM_GETCOLUMNCOUNT (MC_GM_FIRST + 2)
354 
362 #define MC_GM_GETROWCOUNT (MC_GM_FIRST + 3)
363 
372 #define MC_GM_RESIZE (MC_GM_FIRST + 4)
373 
385 #define MC_GM_CLEAR (MC_GM_FIRST + 5)
386 
396 #define MC_GM_SETCELLW (MC_GM_FIRST + 6)
397 
407 #define MC_GM_SETCELLA (MC_GM_FIRST + 7)
408 
421 #define MC_GM_GETCELLW (MC_GM_FIRST + 8)
422 
435 #define MC_GM_GETCELLA (MC_GM_FIRST + 9)
436 
446 #define MC_GM_SETGEOMETRY (MC_GM_FIRST + 10)
447 
456 #define MC_GM_GETGEOMETRY (MC_GM_FIRST + 11)
457 
475 #define MC_GM_REDRAWCELLS (MC_GM_FIRST + 12)
476 
491 #define MC_GM_SETCOLUMNWIDTH (MC_GM_FIRST + 13)
492 
502 #define MC_GM_GETCOLUMNWIDTH (MC_GM_FIRST + 14)
503 
518 #define MC_GM_SETROWHEIGHT (MC_GM_FIRST + 15)
519 
529 #define MC_GM_GETROWHEIGHT (MC_GM_FIRST + 16)
530 
538 
574 #define MC_GN_ODCACHEHINT (MC_GN_FIRST + 0)
575 
576 #if 0 /* TODO */
577 #define MC_GN_SETDISPINFOW (MC_GN_FIRST + 1)
578 #define MC_GN_SETDISPINFOA (MC_GN_FIRST + 2)
579 #endif
580 
604 #define MC_GN_GETDISPINFOW (MC_GN_FIRST + 3)
605 
629 #define MC_GN_GETDISPINFOA (MC_GN_FIRST + 4)
630 
638 
640 #define MC_WC_GRID MCTRL_NAME_AW(MC_WC_GRID)
641 
642 #define MC_NMGDISPINFO MCTRL_NAME_AW(MC_NMGDISPINFO)
643 
644 #define MC_GM_SETCELL MCTRL_NAME_AW(MC_GM_SETCELL)
645 
646 #define MC_GM_GETCELL MCTRL_NAME_AW(MC_GM_GETCELL)
647 
648 #define MC_GN_SETDISPINFO MCTRL_NAME_AW(MC_GN_SETDISPINFO)
649 
650 #define MC_GN_GETDISPINFO MCTRL_NAME_AW(MC_GN_GETDISPINFO)
651 
655 #ifdef __cplusplus
656 } /* extern "C" */
657 #endif
658 
659 #endif /* MCTRL_GRID_H */
#define MCTRL_API
Definition: _defs.h:46
Structure describing a table cell (Unicode variant).
Definition: table.h:146
Structure describing a table cell (ANSI variant).
Definition: table.h:170
WORD wColumnTo
Definition: grid.h:273
DWORD fMask
Definition: grid.h:247
NMHDR hdr
Definition: grid.h:299
WORD wRowFrom
Definition: grid.h:271
WORD wRowHeaderWidth
Definition: grid.h:251
WORD wColumn
Definition: grid.h:286
WORD wColumn
Definition: grid.h:301
WORD wDefRowHeight
Definition: grid.h:255
WORD wPaddingHorz
Definition: grid.h:257
WORD wPaddingVert
Definition: grid.h:259
WORD wRow
Definition: grid.h:303
NMHDR hdr
Definition: grid.h:284
MC_TABLECELLA cell
Definition: grid.h:305
WORD wRow
Definition: grid.h:288
BOOL mcGrid_Initialize(void)
Table (data model for grid control)
Polymorphic data (MC_HVALUETYPE and MC_HVALUE).
Structure used by notification MC_GN_ODCACHEHINT.
Definition: grid.h:265
Structure used by notifications MC_GN_GETDISPINFO and MC_GN_SETDISPINFO (ANSI variant).
Definition: grid.h:297
WORD wColumnHeaderHeight
Definition: grid.h:249
Structure used by notifications MC_GN_GETDISPINFO and MC_GN_SETDISPINFO (Unicode variant).
Definition: grid.h:282
WORD wDefColumnWidth
Definition: grid.h:253
MC_TABLECELLW cell
Definition: grid.h:290
WORD wColumnFrom
Definition: grid.h:269
Structure describing inner geometry of the grid.
Definition: grid.h:245
NMHDR hdr
Definition: grid.h:267
Common definitions.
void mcGrid_Terminate(void)
Common constants and types.
WORD wRowTo
Definition: grid.h:275