10#if !defined(OWL_EDITFILE_H)
14#if defined(BI_HAS_PRAGMA_ONCE)
20#include <owl/editfile.rh>
39 LPCTSTR text =
nullptr,
40 int x = 0,
int y = 0,
int w = 0,
int h = 0,
41 LPCTSTR fileName =
nullptr,
48 int x = 0,
int y = 0,
int w = 0,
int h = 0,
63 virtual bool Read(LPCTSTR fileName =
nullptr);
65 virtual void ReplaceWith(LPCTSTR fileName);
68 virtual bool SaveAs();
69 virtual bool Write(LPCTSTR fileName =
nullptr);
72 LPCTSTR GetFileName()
const;
73 void SetFileName(LPCTSTR fileName);
95 void SetupWindow()
override;
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
TEditFile is a file-editing window.
void SetFileName(const tstring &fileName)
void CmFileSave()
CM_FILESAVE.
void CmFileSaveAs()
CM_FILESAVEAS.
void CmFileOpen()
CM_FILEOPEN.
virtual void NewFile()
Begins the edit of a new file after calling CanClear to determine that it is safe to clear the text o...
virtual bool SaveAs()
Saves the contents of the Editor to a file whose name is retrieved from the user, through execution o...
bool Write(const tstring &fileName)
void CmFileNew()
CM_FILENEW.
LPCTSTR GetFileName() const
Return the filename for this buffer.
TOpenSaveDialog::TData & GetFileData()
Return the FileData data member used for the common dialogs.
void SetFileData(const TOpenSaveDialog::TData &fd)
auto CanClose() -> bool override
Returns true if the edit window can be closed.
bool Read(const tstring &fileName)
virtual bool Read(LPCTSTR fileName=nullptr)
Reads the contents of a previously specified file into the Editor.
virtual bool Save()
Saves changes to the contents of the Editor to a file.
virtual bool CanClear()
Returns true if the text of the associated edit control can be cleared which is if the text has not b...
virtual void Open()
Opens a new file after determining that it is OK to clear the text of the Editor.
void ReplaceWith(const tstring &fileName)
TEditFile(TWindow *parent=nullptr, int id=0, LPCTSTR text=nullptr, int x=0, int y=0, int w=0, int h=0, LPCTSTR fileName=nullptr, TModule *module=nullptr)
Constructs a TEditFile window given the parent window, resource ID (Id), text, file name,...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TOpenSaveDialog structure contains information about the user's file open or save selection.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition of class TEditSearch, an edit control that responds to Find, Replace and FindNext menu com...
#define DECLARE_RESPONSE_TABLE(cls)
#define DECLARE_STREAMABLE_OWL(cls, ver)
#define DECLARE_STREAMABLE_INLINES(cls)
TEditSearch(TWindow *parent=nullptr, int id=0, LPCTSTR text=nullptr, int x=0, int y=0, int w=0, int h=0, TModule *module=nullptr)
Constructs a TEditSearch object given the parent window, resource ID, and character string (text).
Object Windows Library (OWLNext Core).
Definition of TOpenSave abstract, TFileOpen, TFileSave common Dialog classes.