1
//------------------------------------------------------------------------------
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 1997, 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
//-----------------------------------------------------------------------------
22
#ifndef _TEXTVIEWDIALOG_H
23
#define _TEXTVIEWDIALOG_H
29
class FileSelectionDialog;
34
/// manages text editor dialogs.
35
class TextViewDialog: public Dialog {
36
/*@Doc: {\large {\bf scope:} GUI} */
39
TextViewDialog(Widget parent);
41
virtual ~TextViewDialog();
43
const char *GetClassName() { return "TextViewDialog";}
48
void SetTextSize(int nrOfRows, int nrOfColumns);
50
void SetTextRows(int nrOfRows);
52
void SetTextColumns(int nrOfColumns);
54
void SetTextMaxSize(int nrOfRows, int nrOfColumns);
56
void SetTextString(const string *text);
58
void GetTextString(string *t);
61
void SetStatus(const char *s);
63
void SetStatus(const string *s);
66
void SetDirectory(const char *d);
68
void SetDirectory(const string *d);
74
bool SaveFile(const char *file);
76
bool SaveFile(const string *file);
78
bool LoadFile(const char *file);
80
bool LoadFile(const string *file);
91
void ClearSelection();
100
FileSelectionDialog *GetFileSelectionDialog() {return fileSelector;}
107
Widget GetTextWidget() {return textWidget;}
109
ReplaceDialog *GetReplaceDialog() {return replaceDialog;}
111
void SetReplaceDialog(ReplaceDialog *r) {replaceDialog=r;}
113
virtual void InitMenuItems();
115
static void PrintCB(Widget, XtPointer, XtPointer);
117
static void SaveAsCB(Widget, XtPointer, XtPointer);
119
static void SaveOKCB(Widget, XtPointer, XtPointer);
121
static void CopyCB(Widget, XtPointer, XtPointer);
123
static void FindCB(Widget, XtPointer, XtPointer);
125
static void FindNextCB(Widget, XtPointer, XtPointer);
127
static void FindAllCB(Widget, XtPointer, XtPointer);
129
static void ClearSelectionCB(Widget, XtPointer, XtPointer);
131
static void ClearFindCB(Widget, XtPointer, XtPointer);
137
MenuItem *searchItems;
146
FileSelectionDialog *fileSelector;
148
PrinterOptions *printerOptions;
150
FindDialog *findDialog;
152
ReplaceDialog *replaceDialog;