Debian Codegraph @

stat/TableEditor.h

raw
1 #ifndef _TableEditor_h_
2 #define _TableEditor_h_
3 /* TableEditor.h
4 *
5 * Copyright (C) 2006,2007,2010-2012,2015-2019,2022,2023,2026 Paul Boersma
6 *
7 * This code is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or (at
10 * your option) any later version.
11 *
12 * This code is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 * See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this work. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "ScriptEditor.h"
22 #include "Table.h"
23
24 #define kTableEditor_MAXNUM_VISIBLE_COLUMNS 100
25
26 Thing_define (TableEditor, Editor) {
27 Table table() { return static_cast <Table> (our data()); }
28
29 integer topRow, leftColumn, selectedRow, selectedColumn;
30 GuiText text;
31 GuiDrawingArea drawingArea;
32 GuiScrollBar horizontalScrollBar, verticalScrollBar;
33 double columnLeft [kTableEditor_MAXNUM_VISIBLE_COLUMNS], columnRight [kTableEditor_MAXNUM_VISIBLE_COLUMNS];
34 autoGraphics graphics;
35
36 void v1_info ()
37 override;
38 void v_createChildren ()
39 override;
40 void v_createMenus ()
41 override;
42 void v_createMenuItems_help (EditorMenu menu)
43 override;
44 void v1_dataChanged (Editor sender)
45 override;
46
47 virtual void v_draw ();
48 virtual bool v_clickCell (integer row, integer column, bool shiftKeyPressed);
49
50 #include "TableEditor_prefs.h"
51 };
52
53 void TableEditor_init (TableEditor me, conststring32 title, Table table);
54
55 autoTableEditor TableEditor_create (conststring32 title, Table table);
56
57 /* End of file TableEditor.h */
58 #endif