1
//------------------------------------------------------------------------------
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 1995, Vrije Universiteit Amsterdam.
5
// (c) copyright 1999, University of Twente.
6
// Author: Frank Dehne (frank@cs.vu.nl).
7
// Author: Henk van de Zandschulp (henkz@cs.utwente.nl)
9
// TCM 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 of the License, or
12
// (at your option) any later version.
14
// TCM 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.
19
// You should have received a copy of the GNU General Public License
20
// along with TCM; if not, write to the Free Software Foundation, Inc.,
21
// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
//-----------------------------------------------------------------------------
24
#ifndef _STARTUPWINDOW_H
25
#define _STARTUPWINDOW_H
29
#include "mainwindow.h"
34
class FileSelectionDialog;
35
class TextFieldListDialog;
37
/// Main window of the startup program.
38
class StartupWindow: public MainWindow {
39
/*@Doc: {\large {\bf scope:} general startup tool} */
42
StartupWindow(const char *name);
44
virtual ~StartupWindow();
46
const char *GetClassName() { return "StartupWindow";}
56
void StartEditor(int editor, const string *filename = 0);
58
void StartTableEditor(unsigned rows, unsigned columns,
59
unsigned cellwidth, unsigned cellheight);
61
void SetDrawingArea(unsigned idw, unsigned idh,
62
unsigned mdw, unsigned mdh);
64
void SetProject(const string *s);
66
void OpenDocument(const string *s);
68
void SetStatus(const char *s);
70
void SetStatus(const string *s);
72
FileSelectionDialog *GetFileSelectionDialog() {
73
return fileSelectionDialog;}
75
FileSelectionDialog *GetDirSelectionDialog() {
76
return dirSelectionDialog;}
78
TextFieldListDialog *GetTableOptionsDialog() {
79
return tableOptionsDialog;}
81
TextFieldListDialog *GetDrawingOptionsDialog() {
82
return drawingOptionsDialog;}
84
static void QuitCB(Widget, XtPointer, XtPointer);
86
static void HelpCB(Widget, XtPointer, XtPointer);
88
static void ProjectCB(Widget, XtPointer, XtPointer);
90
static void DocumentCB(Widget, XtPointer, XtPointer);
92
static void OpenDocumentCB(Widget, XtPointer, XtPointer);
94
static void DrawingAreaCB(Widget, XtPointer, XtPointer);
96
static void StartEditorCB(Widget, XtPointer, XtPointer);
98
static void StartTableEditorCB(Widget, XtPointer, XtPointer);
100
static void SetProjectCB(Widget, XtPointer, XtPointer);
102
static void SetDrawingAreaCB(Widget, XtPointer, XtPointer);
111
FileSelectionDialog *fileSelectionDialog;
113
FileSelectionDialog *dirSelectionDialog;
115
TextFieldListDialog *tableOptionsDialog;
117
TextFieldListDialog *drawingOptionsDialog;
121
unsigned initDrawingWidth;
123
unsigned initDrawingHeight;
125
unsigned maxDrawingWidth;
127
unsigned maxDrawingHeight;
128
/// the directory where the binaries are.
132
void InitMenuItems();
134
Widget CreateWorkArea(Widget w, int argc, char **argv);
136
void ParseUserOptions(int argc, char **argv);
138
void CreateComponents(Widget parent);
140
Widget CreateMenuBar(Widget parent);
154
void AddToolEntry(Widget parent, int i);
156
void StartDocumentEditor(int editor, const string *filename = 0);
158
void ShowTableDialog(int editor);
160
void AppendExec(string *s, int editor);
162
void AppendProjDir(string *s);
164
void AppendDrawingArea(string *s);
166
void ExecCommand(string *s);
168
void InitTextFields();
172
List<string *> tableFields;
174
List<string *> tableDefaults;
176
List<string *> fetDefaults;
178
List<string *> tutDefaults;
180
List<string *> drawingFields;
182
List<string *> drawingDefaults;
186
static const int MIN_DRAWING_SIZE;
192
Widget scrolledWindow;