]>
Commit | Line | Data |
---|---|---|
a3a584a7 VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/memtext.h | |
3 | // Purpose: wxMemoryText allows to use wxTextBuffer without a file | |
4 | // Created: 14.11.01 | |
5 | // Author: Morten Hanssen | |
99d80019 | 6 | // Copyright: (c) 2001 Morten Hanssen |
65571936 | 7 | // Licence: wxWindows licence |
a3a584a7 VZ |
8 | /////////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | #ifndef _WX_MEMTEXT_H | |
11 | #define _WX_MEMTEXT_H | |
12 | ||
13 | #include "wx/defs.h" | |
14 | ||
15 | // there is no separate setting for wxMemoryText, it's smallish anyhow | |
16 | #if wxUSE_TEXTBUFFER | |
17 | ||
18 | // ---------------------------------------------------------------------------- | |
19 | // wxMemoryText | |
20 | // ---------------------------------------------------------------------------- | |
21 | ||
bddd7a8d | 22 | class WXDLLIMPEXP_BASE wxMemoryText : public wxTextBuffer |
a3a584a7 VZ |
23 | { |
24 | public: | |
25 | // Constructors. | |
26 | wxMemoryText() { } | |
27 | wxMemoryText(const wxString& name) : wxTextBuffer(name) { } | |
28 | ||
29 | protected: | |
30 | virtual bool OnExists() const | |
4e32eea1 | 31 | { return false; } |
a3a584a7 | 32 | |
d84afea9 GD |
33 | virtual bool OnOpen(const wxString & WXUNUSED(strBufferName), |
34 | wxTextBufferOpenMode WXUNUSED(OpenMode)) | |
4e32eea1 | 35 | { return true; } |
a3a584a7 VZ |
36 | |
37 | virtual bool OnClose() | |
4e32eea1 | 38 | { return true; } |
a3a584a7 | 39 | |
830f8f11 | 40 | virtual bool OnRead(const wxMBConv& WXUNUSED(conv)) |
4e32eea1 | 41 | { return true; } |
a3a584a7 | 42 | |
d84afea9 | 43 | virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew), |
5487ff0f | 44 | const wxMBConv& WXUNUSED(conv) = wxMBConvUTF8()) |
4e32eea1 | 45 | { return true; } |
fc7a2a60 VZ |
46 | |
47 | private: | |
c0c133e1 | 48 | wxDECLARE_NO_COPY_CLASS(wxMemoryText); |
a3a584a7 VZ |
49 | }; |
50 | ||
51 | #endif // wxUSE_TEXTBUFFER | |
52 | ||
53 | #endif // _WX_MEMTEXT_H | |
54 |