1
//------------------------------------------------------------------------------
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 1995, Vrije Universiteit Amsterdam.
5
// Author: Frank Dehne (frank@cs.vu.nl).
7
// TCM 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 2 of the License, or
10
// (at your option) any later version.
12
// TCM is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with TCM; if not, write to the Free Software
19
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21
//-----------------------------------------------------------------------------
25
#include "mousecursor.h"
31
/// class supporting the main (toplevel) window.
32
class MainWindow: public MWidget {
33
/*@Doc: {\large {\bf scope:} GUI} */
35
/// Constructor requires only a name
36
MainWindow(const char *name);
38
virtual ~MainWindow();
41
const char *GetClassName() { return "MainWindow";}
43
/// create toplevel widget, and other class members.
44
virtual void Initialize(int argc, char** argv, Config *config);
46
/// initialization to do when window is already managed.
47
virtual void Finalize() {}
50
virtual void Manage();
52
/// pop down the window
53
virtual void Unmanage();
55
/// iconify the window
56
virtual void Iconify();
59
void ManageUnmapped();
65
void SetTitle(const char *title);
67
void SetTitle(const string *title);
69
/// Set name of window icon.
70
void SetIconName(const char *name);
72
/// Set pixmap of window icon.
73
void SetIconPixmap(Pixmap px);
76
void SetCursor(int cursorNum) {cursor->Set(cursorNum);}
78
void SetSizeCursor(int cursorNum) {cursor->SetSize(cursorNum);}
81
virtual int GetTool() {return -1;}
84
virtual void SetStatus(const char *) {}
86
virtual void SetStatus(const string *) {}
89
PrinterOptions *GetPrinterOptions();
91
/// Derived classes define this to create the appl-specific work area.
92
virtual Widget CreateWorkArea(Widget, int argc, char** argv) = 0;
94
/// Derived classes use this functions to parse argv.
95
virtual void ParseUserOptions(int argc, char** argv) = 0;
97
/// Functions to create the constituting parts of the main window.
98
virtual void CreateComponents(Widget window) = 0;
101
MouseCursor *GetCursor() {return cursor;}
103
Config *GetConfig() {return config;}
105
/// The MainWindow widget.
111
/// the configuration object.
115
void WidgetDestroyed();