X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/453fb36b0a3ee6ab728985d0f6f87ddd7281a1ea..e02c0a13600894068466a3e7a6035839c3ddd383:/wxPython/src/gtk/richtext.py diff --git a/wxPython/src/gtk/richtext.py b/wxPython/src/gtk/richtext.py index af84931632..e5efed0aea 100644 --- a/wxPython/src/gtk/richtext.py +++ b/wxPython/src/gtk/richtext.py @@ -81,6 +81,13 @@ RICHTEXT_HITTEST_AFTER = _richtext.RICHTEXT_HITTEST_AFTER RICHTEXT_HITTEST_ON = _richtext.RICHTEXT_HITTEST_ON RICHTEXT_FORMATTED = _richtext.RICHTEXT_FORMATTED RICHTEXT_UNFORMATTED = _richtext.RICHTEXT_UNFORMATTED +RICHTEXT_SETSTYLE_NONE = _richtext.RICHTEXT_SETSTYLE_NONE +RICHTEXT_SETSTYLE_WITH_UNDO = _richtext.RICHTEXT_SETSTYLE_WITH_UNDO +RICHTEXT_SETSTYLE_OPTIMIZE = _richtext.RICHTEXT_SETSTYLE_OPTIMIZE +RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY = _richtext.RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY +RICHTEXT_SETSTYLE_CHARACTERS_ONLY = _richtext.RICHTEXT_SETSTYLE_CHARACTERS_ONLY +RICHTEXT_INSERT_NONE = _richtext.RICHTEXT_INSERT_NONE +RICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE = _richtext.RICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE TEXT_ATTR_TEXT_COLOUR = _richtext.TEXT_ATTR_TEXT_COLOUR TEXT_ATTR_BACKGROUND_COLOUR = _richtext.TEXT_ATTR_BACKGROUND_COLOUR TEXT_ATTR_FONT_FACE = _richtext.TEXT_ATTR_FONT_FACE @@ -247,6 +254,9 @@ class RichTextRange(object): __safe_for_unpickling__ = True def __reduce__(self): return (RichTextRange, self.Get()) + End = property(GetEnd,SetEnd,doc="See `GetEnd` and `SetEnd`") + Length = property(GetLength,doc="See `GetLength`") + Start = property(GetStart,SetStart,doc="See `GetStart` and `SetStart`") _richtext.RichTextRange_swigregister(RichTextRange) class RichTextAttr(object): @@ -362,6 +372,10 @@ class RichTextAttr(object): """SetBulletSymbol(self, wxChar symbol)""" return _richtext.RichTextAttr_SetBulletSymbol(*args, **kwargs) + def SetBulletFont(*args, **kwargs): + """SetBulletFont(self, String bulletFont)""" + return _richtext.RichTextAttr_SetBulletFont(*args, **kwargs) + def GetTextColour(*args, **kwargs): """GetTextColour(self) -> Colour""" return _richtext.RichTextAttr_GetTextColour(*args, **kwargs) @@ -446,6 +460,10 @@ class RichTextAttr(object): """GetBulletSymbol(self) -> wxChar""" return _richtext.RichTextAttr_GetBulletSymbol(*args, **kwargs) + def GetBulletFont(*args, **kwargs): + """GetBulletFont(self) -> String""" + return _richtext.RichTextAttr_GetBulletFont(*args, **kwargs) + def HasTextColour(*args, **kwargs): """HasTextColour(self) -> bool""" return _richtext.RichTextAttr_HasTextColour(*args, **kwargs) @@ -542,6 +560,30 @@ class RichTextAttr(object): """IsDefault(self) -> bool""" return _richtext.RichTextAttr_IsDefault(*args, **kwargs) + Alignment = property(GetAlignment,SetAlignment,doc="See `GetAlignment` and `SetAlignment`") + BackgroundColour = property(GetBackgroundColour,SetBackgroundColour,doc="See `GetBackgroundColour` and `SetBackgroundColour`") + BulletFont = property(GetBulletFont,SetBulletFont,doc="See `GetBulletFont` and `SetBulletFont`") + BulletNumber = property(GetBulletNumber,SetBulletNumber,doc="See `GetBulletNumber` and `SetBulletNumber`") + BulletStyle = property(GetBulletStyle,SetBulletStyle,doc="See `GetBulletStyle` and `SetBulletStyle`") + BulletSymbol = property(GetBulletSymbol,SetBulletSymbol,doc="See `GetBulletSymbol` and `SetBulletSymbol`") + CharacterStyleName = property(GetCharacterStyleName,SetCharacterStyleName,doc="See `GetCharacterStyleName` and `SetCharacterStyleName`") + Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`") + Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`") + FontAttributes = property(GetFontAttributes,doc="See `GetFontAttributes`") + FontFaceName = property(GetFontFaceName,SetFontFaceName,doc="See `GetFontFaceName` and `SetFontFaceName`") + FontSize = property(GetFontSize,SetFontSize,doc="See `GetFontSize` and `SetFontSize`") + FontStyle = property(GetFontStyle,SetFontStyle,doc="See `GetFontStyle` and `SetFontStyle`") + FontUnderlined = property(GetFontUnderlined,SetFontUnderlined,doc="See `GetFontUnderlined` and `SetFontUnderlined`") + FontWeight = property(GetFontWeight,SetFontWeight,doc="See `GetFontWeight` and `SetFontWeight`") + LeftIndent = property(GetLeftIndent,SetLeftIndent,doc="See `GetLeftIndent` and `SetLeftIndent`") + LeftSubIndent = property(GetLeftSubIndent,doc="See `GetLeftSubIndent`") + LineSpacing = property(GetLineSpacing,SetLineSpacing,doc="See `GetLineSpacing` and `SetLineSpacing`") + ParagraphSpacingAfter = property(GetParagraphSpacingAfter,SetParagraphSpacingAfter,doc="See `GetParagraphSpacingAfter` and `SetParagraphSpacingAfter`") + ParagraphSpacingBefore = property(GetParagraphSpacingBefore,SetParagraphSpacingBefore,doc="See `GetParagraphSpacingBefore` and `SetParagraphSpacingBefore`") + ParagraphStyleName = property(GetParagraphStyleName,SetParagraphStyleName,doc="See `GetParagraphStyleName` and `SetParagraphStyleName`") + RightIndent = property(GetRightIndent,SetRightIndent,doc="See `GetRightIndent` and `SetRightIndent`") + Tabs = property(GetTabs,SetTabs,doc="See `GetTabs` and `SetTabs`") + TextColour = property(GetTextColour,SetTextColour,doc="See `GetTextColour` and `SetTextColour`") _richtext.RichTextAttr_swigregister(RichTextAttr) cvar = _richtext.cvar RICHTEXT_ALL = cvar.RICHTEXT_ALL @@ -556,16 +598,18 @@ class RichTextCtrl(_windows.ScrolledWindow): __repr__ = _swig_repr def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, - Size size=DefaultSize, long style=RE_MULTILINE) -> RichTextCtrl + __init__(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=RE_MULTILINE) -> RichTextCtrl """ _richtext.RichTextCtrl_swiginit(self,_richtext.new_RichTextCtrl(*args, **kwargs)) self._setOORInfo(self) def Create(*args, **kwargs): """ - Create(self, Window parent, int id=-1, Point pos=DefaultPosition, - Size size=DefaultSize, long style=RE_MULTILINE) -> bool + Create(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=RE_MULTILINE) -> bool """ return _richtext.RichTextCtrl_Create(*args, **kwargs) @@ -673,7 +717,7 @@ class RichTextCtrl(_windows.ScrolledWindow): SaveFile(self, String file=EmptyString, int type=RICHTEXT_TYPE_ANY) -> bool Save the contents of the document to the given filename, or if the - empty string is passed then to the filename set with `SetFileName`. + empty string is passed then to the filename set with `SetFilename`. """ return _richtext.RichTextCtrl_SaveFile(*args, **kwargs) @@ -728,16 +772,36 @@ class RichTextCtrl(_windows.ScrolledWindow): """ return _richtext.RichTextCtrl_SetStyle(*args, **kwargs) + def SetStyleEx(*args, **kwargs): + """ + SetStyleEx(self, RichTextRange range, RichTextAttr style, int flags=RICHTEXT_SETSTYLE_WITH_UNDO) -> bool + + Extended style setting operation with flags including: + RICHTEXT_SETSTYLE_WITH_UNDO, RICHTEXT_SETSTYLE_OPTIMIZE, + RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY, RICHTEXT_SETSTYLE_CHARACTERS_ONLY + """ + return _richtext.RichTextCtrl_SetStyleEx(*args, **kwargs) + def GetStyle(*args, **kwargs): """ GetStyle(self, long position, RichTextAttr style) -> bool Retrieve the style used at the given position. Copies the style - values at ``position`` into the ``style`` parameter returns ``True`` + values at ``position`` into the ``style`` parameter and returns ``True`` if successful. Returns ``False`` otherwise. """ return _richtext.RichTextCtrl_GetStyle(*args, **kwargs) + def GetUncombinedStyle(*args, **kwargs): + """ + GetUncombinedStyle(self, long position, RichTextAttr style) -> bool + + Get the content (uncombined) attributes for this position. Copies the + style values at ``position`` into the ``style`` parameter and returns + ``True`` if successful. Returns ``False`` otherwise. + """ + return _richtext.RichTextCtrl_GetUncombinedStyle(*args, **kwargs) + def SetDefaultStyle(*args, **kwargs): """ SetDefaultStyle(self, RichTextAttr style) -> bool @@ -1125,6 +1189,10 @@ class RichTextCtrl(_windows.ScrolledWindow): """SelectNone(self)""" return _richtext.RichTextCtrl_SelectNone(*args, **kwargs) + def SelectWord(*args, **kwargs): + """SelectWord(self, long position) -> bool""" + return _richtext.RichTextCtrl_SelectWord(*args, **kwargs) + def GetSelectionRange(*args, **kwargs): """GetSelectionRange(self) -> RichTextRange""" return _richtext.RichTextCtrl_GetSelectionRange(*args, **kwargs) @@ -1133,6 +1201,14 @@ class RichTextCtrl(_windows.ScrolledWindow): """SetSelectionRange(self, RichTextRange range)""" return _richtext.RichTextCtrl_SetSelectionRange(*args, **kwargs) + def GetInternalSelectionRange(*args, **kwargs): + """GetInternalSelectionRange(self) -> RichTextRange""" + return _richtext.RichTextCtrl_GetInternalSelectionRange(*args, **kwargs) + + def SetInternalSelectionRange(*args, **kwargs): + """SetInternalSelectionRange(self, RichTextRange range)""" + return _richtext.RichTextCtrl_SetInternalSelectionRange(*args, **kwargs) + def AddParagraph(*args, **kwargs): """AddParagraph(self, String text) -> RichTextRange""" return _richtext.RichTextCtrl_AddParagraph(*args, **kwargs) @@ -1281,6 +1357,23 @@ class RichTextCtrl(_windows.ScrolledWindow): """GetStyleSheet(self) -> wxRichTextStyleSheet""" return _richtext.RichTextCtrl_GetStyleSheet(*args, **kwargs) + def ApplyStyleSheet(*args, **kwargs): + """ApplyStyleSheet(self, wxRichTextStyleSheet styleSheet=None) -> bool""" + return _richtext.RichTextCtrl_ApplyStyleSheet(*args, **kwargs) + + Buffer = property(GetBuffer,doc="See `GetBuffer`") + DefaultStyle = property(GetDefaultStyle,SetDefaultStyle,doc="See `GetDefaultStyle` and `SetDefaultStyle`") + DelayedLayoutThreshold = property(GetDelayedLayoutThreshold,SetDelayedLayoutThreshold,doc="See `GetDelayedLayoutThreshold` and `SetDelayedLayoutThreshold`") + Filename = property(GetFilename,SetFilename,doc="See `GetFilename` and `SetFilename`") + InsertionPoint = property(GetInsertionPoint,SetInsertionPoint,doc="See `GetInsertionPoint` and `SetInsertionPoint`") + InternalSelectionRange = property(GetInternalSelectionRange,SetInternalSelectionRange,doc="See `GetInternalSelectionRange` and `SetInternalSelectionRange`") + LastPosition = property(GetLastPosition,doc="See `GetLastPosition`") + NumberOfLines = property(GetNumberOfLines,doc="See `GetNumberOfLines`") + Selection = property(GetSelection,SetSelection,doc="See `GetSelection` and `SetSelection`") + SelectionRange = property(GetSelectionRange,SetSelectionRange,doc="See `GetSelectionRange` and `SetSelectionRange`") + StringSelection = property(GetStringSelection,doc="See `GetStringSelection`") + StyleSheet = property(GetStyleSheet,SetStyleSheet,doc="See `GetStyleSheet` and `SetStyleSheet`") + Value = property(GetValue,SetValue,doc="See `GetValue` and `SetValue`") _richtext.RichTextCtrl_swigregister(RichTextCtrl) def PreRichTextCtrl(*args, **kwargs): @@ -1326,6 +1419,8 @@ class RichTextEvent(_core.NotifyEvent): """SetFlags(self, int flags)""" return _richtext.RichTextEvent_SetFlags(*args, **kwargs) + Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`") + Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`") _richtext.RichTextEvent_swigregister(RichTextEvent)