2001-11-14 15:40:20 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/memtext.h
|
|
|
|
// Purpose: wxMemoryText allows to use wxTextBuffer without a file
|
|
|
|
// Created: 14.11.01
|
|
|
|
// Author: Morten Hanssen
|
2004-05-23 10:56:36 -04:00
|
|
|
// Copyright: (c) 2001 wxWidgets team
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-11-14 15:40:20 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_MEMTEXT_H
|
|
|
|
#define _WX_MEMTEXT_H
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
// there is no separate setting for wxMemoryText, it's smallish anyhow
|
|
|
|
#if wxUSE_TEXTBUFFER
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxMemoryText
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2003-07-01 21:59:24 -04:00
|
|
|
class WXDLLIMPEXP_BASE wxMemoryText : public wxTextBuffer
|
2001-11-14 15:40:20 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Constructors.
|
|
|
|
wxMemoryText() { }
|
|
|
|
wxMemoryText(const wxString& name) : wxTextBuffer(name) { }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool OnExists() const
|
2004-09-17 18:23:59 -04:00
|
|
|
{ return false; }
|
2001-11-14 15:40:20 -05:00
|
|
|
|
2002-05-07 17:58:27 -04:00
|
|
|
virtual bool OnOpen(const wxString & WXUNUSED(strBufferName),
|
|
|
|
wxTextBufferOpenMode WXUNUSED(OpenMode))
|
2004-09-17 18:23:59 -04:00
|
|
|
{ return true; }
|
2001-11-14 15:40:20 -05:00
|
|
|
|
|
|
|
virtual bool OnClose()
|
2004-09-17 18:23:59 -04:00
|
|
|
{ return true; }
|
2001-11-14 15:40:20 -05:00
|
|
|
|
2002-05-07 17:58:27 -04:00
|
|
|
virtual bool OnRead(wxMBConv& WXUNUSED(conv))
|
2004-09-17 18:23:59 -04:00
|
|
|
{ return true; }
|
2001-11-14 15:40:20 -05:00
|
|
|
|
2002-05-07 17:58:27 -04:00
|
|
|
virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
|
2003-02-26 14:31:44 -05:00
|
|
|
wxMBConv& WXUNUSED(conv) = wxConvUTF8)
|
2004-09-17 18:23:59 -04:00
|
|
|
{ return true; }
|
2003-07-21 20:24:07 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_NO_COPY_CLASS(wxMemoryText)
|
2001-11-14 15:40:20 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_TEXTBUFFER
|
|
|
|
|
|
|
|
#endif // _WX_MEMTEXT_H
|
|
|
|
|