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
|
2005-05-04 14:57:50 -04:00
|
|
|
// Copyright: (c) 2001 Morten Hanssen
|
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
|
|
|
|
2006-04-05 10:37:47 -04:00
|
|
|
virtual bool OnRead(const 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),
|
2007-05-11 16:55:24 -04:00
|
|
|
const wxMBConv& WXUNUSED(conv) = wxMBConvUTF8())
|
2004-09-17 18:23:59 -04:00
|
|
|
{ return true; }
|
2003-07-21 20:24:07 -04:00
|
|
|
|
|
|
|
private:
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxMemoryText);
|
2001-11-14 15:40:20 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_TEXTBUFFER
|
|
|
|
|
|
|
|
#endif // _WX_MEMTEXT_H
|
|
|
|
|