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 _FILESELECTIONDIALOG_H
23
#define _FILESELECTIONDIALOG_H
25
#include "selectiondialog.h"
28
/// file selection dialog class.
29
class FileSelectionDialog: public SelectionDialog {
30
/*@Doc: {\large {\bf scope:} GUI} */
33
FileSelectionDialog(Widget parent);
35
const char *GetClassName() { return "FileSelectionDialog";}
38
void SetExtension(const char *extension);
40
void SetExtension(const string *extension);
42
void SetDirectory(const char *d);
44
void SetDirectory(const string *d);
46
void SetDefaultFile(const char *f);
48
void SetDefaultFile(const string *f);
51
void CreateOptionMenu(string *label, List<string *> *items);
53
void GetOption(string *item);
58
/// returns selected file name.
59
void GetFileName(char *name);
61
void GetFileName(string *name);
63
/// returns current directory
64
void GetDirectory(char *dir);
66
void GetDirectory(string *name);
69
const string *GetDefaultFile() const {return &defaultFile;}
72
void ManageOptionMenu(bool b);
75
void SetOptionChangedCallback(XtCallbackProc fun, XtPointer cd);
77
void SetOption(const string *s);
84
static void OptionChangedCB(Widget, XtPointer, XtPointer);
86
static void SetDefaultFileCB(Widget, XtPointer, XtPointer);