More richtext fixes for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2013-06-08 23:23:02 +00:00
parent 57b15758aa
commit e4d44c92f5
2 changed files with 48 additions and 11 deletions

View File

@@ -6,6 +6,32 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/*!
* Flags for specifying permitted operations
*/
#define wxRICHTEXT_ORGANISER_DELETE_STYLES 0x0001
#define wxRICHTEXT_ORGANISER_CREATE_STYLES 0x0002
#define wxRICHTEXT_ORGANISER_APPLY_STYLES 0x0004
#define wxRICHTEXT_ORGANISER_EDIT_STYLES 0x0008
#define wxRICHTEXT_ORGANISER_RENAME_STYLES 0x0010
#define wxRICHTEXT_ORGANISER_OK_CANCEL 0x0020
#define wxRICHTEXT_ORGANISER_RENUMBER 0x0040
// The permitted style types to show
#define wxRICHTEXT_ORGANISER_SHOW_CHARACTER 0x0100
#define wxRICHTEXT_ORGANISER_SHOW_PARAGRAPH 0x0200
#define wxRICHTEXT_ORGANISER_SHOW_LIST 0x0400
#define wxRICHTEXT_ORGANISER_SHOW_BOX 0x0800
#define wxRICHTEXT_ORGANISER_SHOW_ALL 0x1000
// Common combinations
#define wxRICHTEXT_ORGANISER_ORGANISE (wxRICHTEXT_ORGANISER_SHOW_ALL|wxRICHTEXT_ORGANISER_DELETE_STYLES|wxRICHTEXT_ORGANISER_CREATE_STYLES|wxRICHTEXT_ORGANISER_APPLY_STYLES|wxRICHTEXT_ORGANISER_EDIT_STYLES|wxRICHTEXT_ORGANISER_RENAME_STYLES)
#define wxRICHTEXT_ORGANISER_BROWSE (wxRICHTEXT_ORGANISER_SHOW_ALL|wxRICHTEXT_ORGANISER_OK_CANCEL)
#define wxRICHTEXT_ORGANISER_BROWSE_NUMBERING (wxRICHTEXT_ORGANISER_SHOW_LIST|wxRICHTEXT_ORGANISER_OK_CANCEL|wxRICHTEXT_ORGANISER_RENUMBER)
/**
@class wxRichTextStyleOrganiserDialog

View File

@@ -150,15 +150,15 @@ public:
/**
Returns the attributes associated with this style.
*/
wxTextAttr GetStyle() const;
const wxTextAttr GetStyle() const;
wxRichTextAttr GetStyle() const;
const wxRichTextAttr GetStyle() const;
//@}
/**
Returns the style attributes combined with the attributes of the specified base
style, if any. This function works recursively.
*/
virtual wxTextAttr GetStyleMergedWithBase(const wxRichTextStyleSheet* sheet) const;
virtual wxRichTextAttr GetStyleMergedWithBase(const wxRichTextStyleSheet* sheet) const;
/**
Sets the name of the style that this style is based on.
@@ -178,7 +178,7 @@ public:
/**
Sets the attributes for this style.
*/
void SetStyle(const wxTextAttr& style);
void SetStyle(const wxRichTextAttr& style);
/**
Returns the definition's properties.
@@ -249,6 +249,17 @@ public:
class wxRichTextStyleListBox : public wxHtmlListBox
{
public:
/// Which type of style definition is currently showing?
enum wxRichTextStyleType
{
wxRICHTEXT_STYLE_ALL,
wxRICHTEXT_STYLE_PARAGRAPH,
wxRICHTEXT_STYLE_CHARACTER,
wxRICHTEXT_STYLE_LIST,
wxRICHTEXT_STYLE_BOX
};
/**
Constructor.
*/
@@ -474,8 +485,8 @@ public:
If @a styleSheet is specified, the base style for this definition will also be
included in the result.
*/
wxTextAttr CombineWithParagraphStyle(int indent,
const wxTextAttr& paraStyle,
wxRichTextAttr CombineWithParagraphStyle(int indent,
const wxRichTextAttr& paraStyle,
wxRichTextStyleSheet* styleSheet = NULL);
/**
@@ -491,7 +502,7 @@ public:
If @a styleSheet is specified, the base style for this definition will also be
included in the result.
*/
wxTextAttr GetCombinedStyle(int indent,
wxRichTextAttr GetCombinedStyle(int indent,
wxRichTextStyleSheet* styleSheet = NULL);
/**
@@ -502,13 +513,13 @@ public:
included in the result.
*/
wxTextAttr GetCombinedStyleForLevel(int level,
wxRichTextStyleSheet* styleSheet = NULL) const;
wxRichTextAttr GetCombinedStyleForLevel(int level,
wxRichTextStyleSheet* styleSheet = NULL);
/**
Returns the style for the given level. @a level is a number between 0 and 9.
*/
const wxTextAttr* GetLevelAttributes(int level) const;
const wxRichTextAttr* GetLevelAttributes(int level) const;
/**
Returns the number of levels. This is hard-wired to 10.
@@ -526,7 +537,7 @@ public:
The first and most flexible form uses a wxTextAttr object, while the second
form is for convenient setting of the most commonly-used attributes.
*/
void SetLevelAttributes(int level, const wxTextAttr& attr);
void SetLevelAttributes(int level, const wxRichTextAttr& attr);
};