X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d551ad5e5d4f9643d69e70638788fb9a78f209a..74b720793f9d312566450461fac394e5e456ae5d:/include/wx/richtext/richtextbuffer.h diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index 68e1fefd45..e1633bc419 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -9,6 +9,9 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#ifndef _WX_RICHTEXTBUFFER_H_ +#define _WX_RICHTEXTBUFFER_H_ + /* Data structures @@ -84,17 +87,17 @@ */ -#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" @@ -489,13 +492,13 @@ private: 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 @@ -648,7 +651,7 @@ protected: wxTextAttrEx m_attributes; }; -WX_DECLARE_EXPORTED_LIST( wxRichTextObject, wxRichTextObjectList ); +WX_DECLARE_LIST_WITH_DECL( wxRichTextObject, wxRichTextObjectList, class WXDLLIMPEXP_ADV ); /*! * wxRichTextCompositeObject class declaration @@ -1071,7 +1074,7 @@ protected: wxRichTextParagraph* m_parent; }; -WX_DECLARE_EXPORTED_LIST( wxRichTextLine, wxRichTextLineList ); +WX_DECLARE_LIST_WITH_DECL( wxRichTextLine, wxRichTextLineList , class WXDLLIMPEXP_ADV ); /*! * wxRichTextParagraph class declaration @@ -1489,7 +1492,7 @@ public: virtual void ClearStyleStack(); /// Get the size of the style stack, for example to check correct nesting - virtual int GetStyleStackSize() const { return m_attributeStack.GetCount(); } + virtual size_t GetStyleStackSize() const { return m_attributeStack.GetCount(); } /// Begin using bold bool BeginBold(); @@ -1819,15 +1822,22 @@ public: virtual bool IsVisible() const { return m_visible; } virtual void SetVisible(bool visible) { m_visible = visible; } + /// The name of the nandler void SetName(const wxString& name) { m_name = name; } wxString GetName() const { return m_name; } + /// The default extension to recognise void SetExtension(const wxString& ext) { m_extension = ext; } wxString GetExtension() const { return m_extension; } + /// The handler type void SetType(int type) { m_type = type; } int GetType() const { return m_type; } + /// Encoding to use when saving a file. If empty, a suitable encoding is chosen + void SetEncoding(const wxString& encoding) { m_encoding = encoding; } + const wxString& GetEncoding() const { return m_encoding; } + protected: #if wxUSE_STREAMS @@ -1836,6 +1846,7 @@ protected: #endif wxString m_name; + wxString m_encoding; wxString m_extension; int m_type; bool m_visible;