Varous changes and tweaks to match some of Julian's new code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-10-09 02:38:10 +00:00
parent 3f3bf980f6
commit 1aefbabe46

View File

@@ -81,10 +81,16 @@ enum {
wxRICHTEXT_FORMATTED, wxRICHTEXT_FORMATTED,
wxRICHTEXT_UNFORMATTED, wxRICHTEXT_UNFORMATTED,
wxRICHTEXT_SETSTYLE_NONE,
wxRICHTEXT_SETSTYLE_WITH_UNDO,
wxRICHTEXT_SETSTYLE_OPTIMIZE,
wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY,
wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY,
wxRICHTEXT_INSERT_NONE, wxRICHTEXT_INSERT_NONE,
wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE,
// TODO: Rename these to be wxRICHTEXT_* ?? // TODO: Rename these to be wxRICHTEXT_* ??
@@ -348,7 +354,7 @@ public:
def SetFont(self, font): def SetFont(self, font):
return self.GetFontAttributes(font) return self.GetFontAttributes(font)
} }
// setters // setters
void SetTextColour(const wxColour& colText); void SetTextColour(const wxColour& colText);
void SetBackgroundColour(const wxColour& colBack); void SetBackgroundColour(const wxColour& colBack);
@@ -373,7 +379,8 @@ public:
void SetBulletStyle(int style); void SetBulletStyle(int style);
void SetBulletNumber(int n); void SetBulletNumber(int n);
void SetBulletSymbol(wxChar symbol); void SetBulletSymbol(wxChar symbol);
void SetBulletFont(const wxString& bulletFont);
const wxColour& GetTextColour() const; const wxColour& GetTextColour() const;
const wxColour& GetBackgroundColour() const; const wxColour& GetBackgroundColour() const;
wxTextAttrAlignment GetAlignment() const; wxTextAttrAlignment GetAlignment() const;
@@ -395,8 +402,9 @@ public:
int GetParagraphSpacingBefore() const; int GetParagraphSpacingBefore() const;
int GetLineSpacing() const; int GetLineSpacing() const;
int GetBulletStyle() const; int GetBulletStyle() const;
int GetBulletNumber() const { return m_bulletNumber; } int GetBulletNumber() const;
wxChar GetBulletSymbol() const; wxChar GetBulletSymbol() const;
const wxString& GetBulletFont() const;
// accessors // accessors
bool HasTextColour() const; bool HasTextColour() const;
@@ -430,7 +438,7 @@ public:
// returns false if we have any attributes set, true otherwise // returns false if we have any attributes set, true otherwise
bool IsDefault() const; bool IsDefault() const;
// // return the attribute having the valid font and colours: it uses the // // return the attribute having the valid font and colours: it uses the
// // attributes set in attr and falls back first to attrDefault and then to // // attributes set in attr and falls back first to attrDefault and then to
// // the text control font/colours for those attributes which are not set // // the text control font/colours for those attributes which are not set
@@ -438,9 +446,10 @@ public:
// const wxRichTextAttr& attrDef, // const wxRichTextAttr& attrDef,
// const wxTextCtrlBase *text); // const wxTextCtrlBase *text);
%property(Alignment, GetAlignment, SetAlignment, doc="See `GetAlignment` and `SetAlignment`"); %property(Alignment, GetAlignment, SetAlignment, doc="See `GetAlignment` and `SetAlignment`");
%property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`"); %property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`");
%property(BulletFont, GetBulletFont, SetBulletFont, doc="See `GetBulletFont` and `SetBulletFont`");
%property(BulletNumber, GetBulletNumber, SetBulletNumber, doc="See `GetBulletNumber` and `SetBulletNumber`"); %property(BulletNumber, GetBulletNumber, SetBulletNumber, doc="See `GetBulletNumber` and `SetBulletNumber`");
%property(BulletStyle, GetBulletStyle, SetBulletStyle, doc="See `GetBulletStyle` and `SetBulletStyle`"); %property(BulletStyle, GetBulletStyle, SetBulletStyle, doc="See `GetBulletStyle` and `SetBulletStyle`");
%property(BulletSymbol, GetBulletSymbol, SetBulletSymbol, doc="See `GetBulletSymbol` and `SetBulletSymbol`"); %property(BulletSymbol, GetBulletSymbol, SetBulletSymbol, doc="See `GetBulletSymbol` and `SetBulletSymbol`");
@@ -638,6 +647,15 @@ text control.", "");
virtual bool , SetStyle(const wxRichTextRange& range, const wxRichTextAttr& style), virtual bool , SetStyle(const wxRichTextRange& range, const wxRichTextAttr& style),
"Set the style for the text in ``range`` to ``style``", ""); "Set the style for the text in ``range`` to ``style``", "");
DocDeclStr(
virtual bool , SetStyleEx(const wxRichTextRange& range, const wxRichTextAttr& style,
int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO),
"Extended style setting operation with flags including:
RICHTEXT_SETSTYLE_WITH_UNDO, RICHTEXT_SETSTYLE_OPTIMIZE,
RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY, RICHTEXT_SETSTYLE_CHARACTERS_ONLY", "");
DocDeclStr( DocDeclStr(
virtual bool , GetStyle(long position, wxRichTextAttr& style), virtual bool , GetStyle(long position, wxRichTextAttr& style),
"Retrieve the style used at the given position. Copies the style "Retrieve the style used at the given position. Copies the style
@@ -649,8 +667,8 @@ if successful. Returns ``False`` otherwise.", "");
"Get the content (uncombined) attributes for this position. Copies the "Get the content (uncombined) attributes for this position. Copies the
style values at ``position`` into the ``style`` parameter and returns style values at ``position`` into the ``style`` parameter and returns
``True`` if successful. Returns ``False`` otherwise.", ""); ``True`` if successful. Returns ``False`` otherwise.", "");
DocDeclStr( DocDeclStr(
virtual bool , SetDefaultStyle(const wxRichTextAttr& style), virtual bool , SetDefaultStyle(const wxRichTextAttr& style),
"Set the style used by default for the rich text document.", ""); "Set the style used by default for the rich text document.", "");
@@ -1094,7 +1112,7 @@ flag.", "");
DocDeclStr( DocDeclStr(
virtual bool , SelectWord(long position), virtual bool , SelectWord(long position),
"", ""); "", "");
/// Get/set the selection range in character positions. -1, -1 means no selection. /// Get/set the selection range in character positions. -1, -1 means no selection.
DocDeclStr( DocDeclStr(
@@ -1111,11 +1129,11 @@ flag.", "");
DocDeclStr( DocDeclStr(
const wxRichTextRange& , GetInternalSelectionRange() const, const wxRichTextRange& , GetInternalSelectionRange() const,
"", ""); "", "");
DocDeclStr( DocDeclStr(
void , SetInternalSelectionRange(const wxRichTextRange& range), void , SetInternalSelectionRange(const wxRichTextRange& range),
"", ""); "", "");
/// Add a new paragraph of text to the end of the buffer /// Add a new paragraph of text to the end of the buffer
@@ -1367,8 +1385,8 @@ flag.", "");
DocDeclStr( DocDeclStr(
bool , ApplyStyleSheet(wxRichTextStyleSheet* styleSheet = NULL), bool , ApplyStyleSheet(wxRichTextStyleSheet* styleSheet = NULL),
"", ""); "", "");
%property(Buffer, GetBuffer, doc="See `GetBuffer`"); %property(Buffer, GetBuffer, doc="See `GetBuffer`");
%property(DefaultStyle, GetDefaultStyle, SetDefaultStyle, doc="See `GetDefaultStyle` and `SetDefaultStyle`"); %property(DefaultStyle, GetDefaultStyle, SetDefaultStyle, doc="See `GetDefaultStyle` and `SetDefaultStyle`");