15 #include "uitoolsmod.h" 31 const Setup& s=
Setup() )
34 , fileNmChg(this) {
init(p); }
36 const char*
fileName()
const {
return filename_; }
43 bool open(
const char*);
46 bool saveAs(
const char*);
51 const char*
text()
const;
71 void setFileName(
const char*);
73 void valChg(CallBacker*);
86 : uiDialog::Setup(winttl.isSet() ? winttl : tr(
"File viewer"),
88 , scroll2bottom_(false)
94 .separator(
false).modal(
false).menubar(
true);
104 bool rdonly=
false,
bool tbl=
false);
107 const Setup& s,
const char* fnm )
108 : uiDialog(p,s) {
init(s,ts,fnm); }
111 void setFileName(
const char*);
112 const char*
fileName()
const {
return editor_->fileName(); }
119 void open(CallBacker*);
120 void save(CallBacker*);
121 void saveAs(CallBacker*);
122 void dismiss(CallBacker*);
123 bool rejectOK(CallBacker*);
124 bool acceptOK(CallBacker*);
125 void finalizeCB(CallBacker*);
127 void fileNmChgd(CallBacker*);
130 int doMsg(
const char*,
bool iserr=
true);
#define mExpClass(module)
Definition: commondefs.h:160
int maxLines() const
Definition: uitextfile.h:38
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Definition: uitextedit.h:74
#define mNoHelpKey
Definition: uidialog.h:39
FixedString Setup()
Definition: keystrs.h:116
static uiString sClose()
Definition: uistrings.h:246
uiTable * tbl_
Definition: uitextfile.h:68
Definition: uitextfile.h:78
uiTextFileDlg(uiParent *p, const uiTextFile::Setup &ts, const Setup &s, const char *fnm)
Definition: uitextfile.h:106
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
static uiString sReload()
Definition: uistrings.h:416
uiTextFile(uiParent *p, const char *fnm, const Setup &s=Setup())
Definition: uitextfile.h:30
static const uiString & emptyString()
Definition: uistring.h:109
The base class for most UI elements.
Definition: uiobj.h:38
Definition: uistring.h:89
#define mNoDlgTitle
Stand-alone dialog window with optional 'OK', 'Cancel' and 'Save defaults' button.
Definition: uidialog.h:37
Definition: uiparent.h:26
Setup(const uiString &winttl=uiString::emptyString())
Definition: uitextfile.h:85
const char * text(const RowCol &) const
Definition: uidialog.h:42
const char * fileName() const
Definition: uitextfile.h:36
bool ismodified_
Definition: uitextfile.h:64
uiTextBrowser * txtbr_
Definition: uitextfile.h:67
bool isModified() const
Definition: uitextfile.h:37
bool captionisfilename_
Definition: uitextfile.h:117
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Setup setup_
Definition: uitable.h:344
const char * fileName() const
Definition: uitextfile.h:112
Definition: uitextedit.h:102
uiTextFile * editor_
Definition: uitextfile.h:116
BufferString filename_
Definition: uitextfile.h:63
uiTextEdit * textEdit()
Definition: uitextfile.h:53
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
File::ViewPars Setup
Definition: uitextfile.h:28
uiTextEdit * txted_
Definition: uitextfile.h:66
Notifier< uiTextFile > fileNmChg
Definition: uitextfile.h:58
uiTextFile * editor()
Definition: uitextfile.h:110
virtual bool isEditable() const
Definition: uitextfile.h:39
virtual bool isTable() const
Definition: uitextfile.h:40
uiTable * tableEditor()
Definition: uitextfile.h:55
Setup setup_
Definition: uitextfile.h:62
Definition: uitextfile.h:24
uiTextBrowser * textBrowser()
Definition: uitextfile.h:54