LXRAD 0.7
cgrid.h
Go to the documentation of this file.
1/* ########################################################################
2
3 LXRAD - GUI for X programing
4
5 ########################################################################
6
7 Copyright (c) : 2001 Luis Claudio Gamboa Lopes
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23 For e-mail suggestions : lcgamboa@yahoo.com
24 ######################################################################## */
25
32#ifndef CGRID
33#define CGRID
34
35#include"ccontrol.h"
36#include"cwindow.h"
37
43class CGrid:public CControl
44{
45protected:
46 int Rows;
47 int Cols;
48 int ARow;
49 int ACol;
50 int Rsize;
51 int Csize;
52 int RLsize;
53 int CLsize;
54 int Ronly;
55 int DragRs;
56 int CEvent (int event);
57public:
58 CGrid (void);
59 ~CGrid (void);
60 int Create (CControl * control);
62 void SetContext (lxStringList context);
63 void Event (wxEvent & event);
64 //propiedades
65 void SetRowsCount (int rows);
66 int GetRowsCount (void);
67 void SetColsCount (int cols);
68 int GetColsCount (void);
69 void SetReadOnly (int ronly);
70 int GetReadOnly (void);
71 void SetDefaultRowSize(int height);
72 int GetDefaultRowSize (void);
73 void SetDefaultColSize(int width);
74 int GetDefaultColSize (void);
75 void SetRowLabelSize(int height);
76 int GetRowLabelSize (void);
77 void SetColLabelSize(int width);
78 int GetColLabelSize (void);
79 void SetEnableDragGridSize(int enable);
80 int GetEnableDragGridSize(void);
81 //runtime
82 void SetCell (int row, int col, lxString val);
83 lxString GetCell (int row, int col);
84 void SetCellBgColor(int row, int col, const wxColour& color);
85 void SetRowSize(int row, int height);
86 void SetColSize(int col, int height);
87 int GetActiveCol (void);
88 int GetActiveRow (void);
89 //events
90 void (CControl::*EvOnGridCellLeftClick) (CControl * control);
91 void (CControl::*EvOnGridCellRightClick) (CControl * control);
92 void (CControl::*EvOnGridSelectCell) (CControl * control);
93};
94
95#endif
Generic Control.
Definition: ccontrol.h:47
Grid Control.
Definition: cgrid.h:44
void SetContext(lxStringList context)
int ARow
Definition: cgrid.h:48
int Ronly
Definition: cgrid.h:54
int RLsize
Definition: cgrid.h:52
int Csize
Definition: cgrid.h:51
lxStringList GetContext(void)
int CLsize
Definition: cgrid.h:53
int Rsize
Definition: cgrid.h:50
int ACol
Definition: cgrid.h:49
int DragRs
Definition: cgrid.h:55