2001-11-14 20:40:20 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/memtext.h
|
|
|
|
// Purpose: wxMemoryText allows to use wxTextBuffer without a file
|
|
|
|
// Created: 14.11.01
|
|
|
|
// Author: Morten Hanssen
|
2005-05-04 18:57:50 +00:00
|
|
|
// Copyright: (c) 2001 Morten Hanssen
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-11-14 20:40:20 +00: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-02 01:59:24 +00:00
|
|
|
class WXDLLIMPEXP_BASE wxMemoryText : public wxTextBuffer
|
2001-11-14 20:40:20 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Constructors.
|
|
|
|
wxMemoryText() { }
|
|
|
|
wxMemoryText(const wxString& name) : wxTextBuffer(name) { }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual bool OnExists() const
|
2004-09-17 22:23:59 +00:00
|
|
|
{ return false; }
|
2001-11-14 20:40:20 +00:00
|
|
|
|
2002-05-07 21:58:27 +00:00
|
|
|
virtual bool OnOpen(const wxString & WXUNUSED(strBufferName),
|
|
|
|
wxTextBufferOpenMode WXUNUSED(OpenMode))
|
2004-09-17 22:23:59 +00:00
|
|
|
{ return true; }
|
2001-11-14 20:40:20 +00:00
|
|
|
|
|
|
|
virtual bool OnClose()
|
2004-09-17 22:23:59 +00:00
|
|
|
{ return true; }
|
2001-11-14 20:40:20 +00:00
|
|
|
|
2006-04-05 14:37:47 +00:00
|
|
|
virtual bool OnRead(const wxMBConv& WXUNUSED(conv))
|
2004-09-17 22:23:59 +00:00
|
|
|
{ return true; }
|
2001-11-14 20:40:20 +00:00
|
|
|
|
2002-05-07 21:58:27 +00:00
|
|
|
virtual bool OnWrite(wxTextFileType WXUNUSED(typeNew),
|
2007-05-11 20:55:24 +00:00
|
|
|
const wxMBConv& WXUNUSED(conv) = wxMBConvUTF8())
|
2004-09-17 22:23:59 +00:00
|
|
|
{ return true; }
|
2003-07-22 00:24:07 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_NO_COPY_CLASS(wxMemoryText)
|
2001-11-14 20:40:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_TEXTBUFFER
|
|
|
|
|
|
|
|
#endif // _WX_MEMTEXT_H
|
|
|
|
|