// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#ifndef _WX_RICHTEXTBUFFER_H_
+#define _WX_RICHTEXTBUFFER_H_
+
/*
Data structures
*/
-#ifndef _WX_RICHTEXTBUFFER_H_
-#define _WX_RICHTEXTBUFFER_H_
-
/*!
* Includes
*/
-#include "wx/list.h"
+#include "wx/defs.h"
#if wxUSE_RICHTEXT
+#include "wx/list.h"
+#include "wx/textctrl.h"
+#include "wx/bitmap.h"
#include "wx/image.h"
#include "wx/cmdproc.h"
#include "wx/txtstrm.h"
wxString m_paragraphStyleName;
};
-#define wxTEXT_ATTR_CHARACTER (wxTEXT_ATTR_FONT) | wxTEXT_ATTR_BACKGROUND_COLOUR | wxTEXT_ATTR_TEXT_COLOUR
+#define wxTEXT_ATTR_CHARACTER (wxTEXT_ATTR_FONT | wxTEXT_ATTR_BACKGROUND_COLOUR | wxTEXT_ATTR_TEXT_COLOUR)
-#define wxTEXT_ATTR_PARAGRAPH wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_TABS|\
+#define wxTEXT_ATTR_PARAGRAPH (wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_TABS|\
wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER|wxTEXT_ATTR_LINE_SPACING|\
- wxTEXT_ATTR_BULLET_STYLE|wxTEXT_ATTR_BULLET_NUMBER|wxTEXT_ATTR_BULLET_SYMBOL
+ wxTEXT_ATTR_BULLET_STYLE|wxTEXT_ATTR_BULLET_NUMBER|wxTEXT_ATTR_BULLET_SYMBOL)
-#define wxTEXT_ATTR_ALL wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH
+#define wxTEXT_ATTR_ALL (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH)
/*!
* wxRichTextObject class declaration
#ifndef _WX_RICHTEXTCTRL_H_
#define _WX_RICHTEXTCTRL_H_
-#include "wx/textctrl.h"
+#include "wx/richtext/richtextbuffer.h"
#if wxUSE_RICHTEXT
#include "wx/scrolwin.h"
#include "wx/caret.h"
-#include "wx/richtext/richtextbuffer.h"
-
#if wxCHECK_VERSION(2,7,0)
#define wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE 0
#else
#define wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE 0
#endif
+#if wxRICHTEXT_DERIVES_FROM_TEXTCTRLBASE
+#include "wx/textctrl.h"
+#endif
+
/*!
* Styles and flags
*/
* Includes
*/
-#include "wx/defs.h"
+#include "wx/richtext/richtextbuffer.h"
#if wxUSE_RICHTEXT
-#include "wx/richtext/richtextbuffer.h"
-
#if wxUSE_HTML
#include "wx/htmllbox.h"
#endif
* Includes
*/
-#include "wx/defs.h"
+#include "wx/richtext/richtextbuffer.h"
#if wxUSE_RICHTEXT
-#include "wx/richtext/richtextbuffer.h"
-
/*!
* wxRichTextXMLHandler
*/
#pragma hdrstop
#endif
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtextbuffer.h"
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
-#include "wx/image.h"
-
-#if wxUSE_RICHTEXT
-
#include "wx/filename.h"
#include "wx/clipbrd.h"
#include "wx/dataobj.h"
#include "wx/mstream.h"
#include "wx/sstream.h"
-#include "wx/richtext/richtextbuffer.h"
#include "wx/richtext/richtextctrl.h"
#include "wx/richtext/richtextstyles.h"
void wxRichTextImageBlock::Clear()
{
- if (m_data)
- delete m_data;
+ delete[] m_data;
m_data = NULL;
m_dataSize = 0;
m_imageType = -1;
#pragma hdrstop
#endif
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtextctrl.h"
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
-#include "wx/image.h"
-
-#if wxUSE_RICHTEXT
-
#include "wx/textfile.h"
#include "wx/ffile.h"
#include "wx/settings.h"
#include "wx/filename.h"
#include "wx/dcbuffer.h"
-
-#include "wx/richtext/richtextctrl.h"
#include "wx/arrimpl.cpp"
DEFINE_EVENT_TYPE(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED)
#pragma hdrstop
#endif
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtextstyles.h"
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
-#include "wx/image.h"
-
-#if wxUSE_RICHTEXT
-
#include "wx/filename.h"
#include "wx/clipbrd.h"
#include "wx/wfstream.h"
#include "wx/module.h"
-#include "wx/richtext/richtextstyles.h"
#include "wx/richtext/richtextctrl.h"
IMPLEMENT_CLASS(wxRichTextStyleDefinition, wxObject)
#pragma hdrstop
#endif
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtextxml.h"
+
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
-#include "wx/image.h"
-
-#if wxUSE_RICHTEXT
-
#include "wx/filename.h"
#include "wx/clipbrd.h"
#include "wx/wfstream.h"
#include "wx/txtstrm.h"
#include "wx/xml/xml.h"
-#include "wx/richtext/richtextxml.h"
-
IMPLEMENT_DYNAMIC_CLASS(wxRichTextXMLHandler, wxRichTextFileHandler)
#if wxUSE_STREAMS