]> git.saurik.com Git - wxWidgets.git/blame - include/wx/memtext.h
added missing #include <wx/defs.h> (parts of patch 649438)
[wxWidgets.git] / include / wx / memtext.h
CommitLineData
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
6// Copyright: (c) 2001 wxWindows team
371a5b4e 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 22class WXDLLIMPEXP_BASE wxMemoryText : public wxTextBuffer
a3a584a7
VZ
23{
24public:
25 // Constructors.
26 wxMemoryText() { }
27 wxMemoryText(const wxString& name) : wxTextBuffer(name) { }
28
29protected:
30 virtual bool OnExists() const
f6c2a6f4 31 { return FALSE; }
a3a584a7 32
d84afea9
GD
33 virtual bool OnOpen(const wxString & WXUNUSED(strBufferName),
34 wxTextBufferOpenMode WXUNUSED(OpenMode))
f6c2a6f4 35 { return TRUE; }
a3a584a7
VZ
36
37 virtual bool OnClose()
f6c2a6f4 38 { return TRUE; }
a3a584a7 39
d84afea9 40 virtual bool OnRead(wxMBConv& WXUNUSED(conv))
f6c2a6f4 41 { return TRUE; }
a3a584a7 42
d84afea9 43 virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
d3c0ce34 44 wxMBConv& WXUNUSED(conv) = wxConvUTF8)
f6c2a6f4 45 { return TRUE; }
a3a584a7
VZ
46};
47
48#endif // wxUSE_TEXTBUFFER
49
50#endif // _WX_MEMTEXT_H
51