2
// --------------------------------------------------------------------
3
// A UI toolkit for Lua
4
// --------------------------------------------------------------------
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2009 Otfried Cheong
10
Ipe is free software; you can redistribute it and/or modify it
11
under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 3 of the License, or
13
(at your option) any later version.
15
As a special exception, you have permission to link Ipe with the
16
CGAL library and distribute executables, as long as you follow the
17
requirements of the Gnu General Public License in regard to all of
18
the software in the executable aside from CGAL.
20
Ipe is distributed in the hope that it will be useful, but WITHOUT
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
23
License for more details.
25
You should have received a copy of the GNU General Public License
26
along with Ipe; if not, you can find it at
27
"http://www.gnu.org/copyleft/gpl.html", or write to the Free
28
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36
#include <QGridLayout>
41
// avoid including Lua headers here
42
typedef struct lua_State lua_State;
46
// --------------------------------------------------------------------
48
class MenuAction : public QAction {
51
MenuAction(const QString &name, int number,
52
const QString &item, const QString &text,
54
QString name() const { return iName; }
55
QString itemName() const { return iItemName; }
56
int number() const { return iNumber; }
64
class Timer : public QObject {
67
Timer(lua_State *L0, int lua_object, const QString &method);
70
int setSingleShot(lua_State *L);
71
int setInterval(lua_State *L);
72
int active(lua_State *L);
73
int start(lua_State *L);
74
int stop(lua_State *L);
86
// --------------------------------------------------------------------
88
class Dialog : public QDialog {
92
Dialog(lua_State *L0, QWidget *parent);
95
QGridLayout *gridlayout();
98
int add(lua_State *L);
99
int set(lua_State *L);
100
int get(lua_State *L);
101
int setEnabled(lua_State *L);
102
int execute(lua_State *L);
108
enum { ELogFile = 0x001, EXml = 0x002 };
117
int findElement(lua_State *L, int index);
119
void addButton(lua_State *L, SElement &m);
120
void addTextEdit(lua_State *L, SElement &m);
121
void addList(lua_State *L, SElement &m);
122
void addLabel(lua_State *L, SElement &m);
123
void addCombo(lua_State *L, SElement &m);
124
void addCheckbox(lua_State *L, SElement &m);
125
void addInput(lua_State *L, SElement &m);
129
std::vector<SElement> iElements;
135
// --------------------------------------------------------------------