]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/richtext/richtextctrl.h
do not add files in wxDebugReport::AddFile if copy failed
[wxWidgets.git] / interface / wx / richtext / richtextctrl.h
index 11a5b60b08d2babdc0468adc5524f42cc1fb4771..2564f01565b991db00d16fbc286d45637e1a66d3 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     interface of wxRichTextCtrl and wxRichTextEvent
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 /**
@@ -159,6 +159,16 @@ public:
 
     For more information, see the @ref overview_richtextctrl.
 
+    @beginStyleTable
+    @style{wxRE_CENTRE_CARET}
+           The control will try to keep the caret line centred vertically while editing.
+           wxRE_CENTER_CARET is a synonym for this style.
+    @style{wxRE_MULTILINE}
+           The control will be multiline (mandatory).
+    @style{wxRE_READONLY}
+           The control will not be editable.
+    @endStyleTable
+
     @library{wxrichtext}
     @category{richtext}
     @appearance{richtextctrl.png}
@@ -452,7 +462,7 @@ public:
 
         @see SetListStyle(), PromoteList(), NumberList().
     */
-    bool ClearListStyle(const wxRichTextRange& range,
+    virtual bool ClearListStyle(const wxRichTextRange& range,
                         int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
 
     /**
@@ -491,6 +501,11 @@ public:
         Deletes content if there is a selection, e.g. when pressing a key.
         Returns the new caret position in @e newPos, or leaves it if there
         was no action. This is undoable.
+
+        @beginWxPerlOnly
+        In wxPerl this method takes no arguments and returns a 2-element
+        list (ok, newPos).
+        @endWxPerlOnly
     */
     bool DeleteSelectedContent(long* newPos = NULL);
 
@@ -653,6 +668,12 @@ public:
 
     /**
         Returns the caret height and position for the given character position.
+
+        @beginWxPerlOnly
+        In wxPerl this method is implemented as
+        GetCaretPositionForIndex(@a position) returning a
+        2-element list (ok, rect).
+        @endWxPerlOnly
     */
     bool GetCaretPositionForIndex(long position, wxRect& rect);
 
@@ -757,6 +778,11 @@ public:
         style attributes.
 
         To get the character or paragraph style alone, use GetUncombinedStyle().
+
+        @beginWxPerlOnly
+        In wxPerl this method is implemented as GetStyle(@a position)
+        returning a 2-element list (ok, attr).
+        @endWxPerlOnly
     */
     virtual bool GetStyle(long position, wxTextAttr& style);
 
@@ -764,6 +790,11 @@ public:
         Gets the attributes common to the specified range.
         Attributes that differ in value within the range will not be included
         in @a style flags.
+
+        @beginWxPerlOnly
+        In wxPerl this method is implemented as GetStyleForRange(@a position)
+        returning a 2-element list (ok, attr).
+        @endWxPerlOnly
     */
     virtual bool GetStyleForRange(const wxRichTextRange& range,
                                   wxTextAttr& style);
@@ -784,6 +815,11 @@ public:
         If you specify (any) paragraph attribute in @e style's flags, this function
         will fetch the paragraph attributes.
         Otherwise, it will return the character attributes.
+
+        @beginWxPerlOnly
+        In wxPerl this method is implemented as GetUncombinedStyle(@a position)
+        returning a 2-element list (ok, attr).
+        @endWxPerlOnly
     */
     virtual bool GetUncombinedStyle(long position, wxTextAttr& style);
 
@@ -943,6 +979,9 @@ public:
 
     /**
         Move the caret to the given character position.
+
+        Please note that this does not update the current editing style
+        from the new position; to do that, call wxRichTextCtrl::SetInsertionPoint instead.
     */
     virtual bool MoveCaret(long pos, bool showAtLineStart = false);
 
@@ -1140,6 +1179,13 @@ public:
     */
     virtual void PaintBackground(wxDC& dc);
 
+    /**
+        Other user defined painting after everything else (i.e. all text) is painted.
+
+        @since 2.9.1
+    */
+    virtual void PaintAboveContent(wxDC& dc);
+
     /**
         Pastes content from the clipboard to the buffer.
     */
@@ -1244,8 +1290,13 @@ public:
     virtual void SetBasicStyle(const wxTextAttr& style);
 
     /**
+        Sets the caret position.
+
         The caret position is the character position just before the caret.
         A value of -1 means the caret is at the start of the buffer.
+        Please note that this does not update the current editing style
+        from the new position or cause the actual caret to be refreshed; to do that,
+        call wxRichTextCtrl::SetInsertionPoint instead.
     */
     void SetCaretPosition(long position,
                           bool showAtLineStart = false);
@@ -1292,7 +1343,8 @@ public:
     void SetHandlerFlags(int flags);
 
     /**
-        Sets the insertion point.
+        Sets the insertion point and causes the current editing style to be taken from
+        the new position (unlike wxRichTextCtrl::SetCaretPosition).
     */
     virtual void SetInsertionPoint(long pos);
 
@@ -1363,7 +1415,6 @@ public:
     bool SetStyle(long start, long end, const wxTextAttr& style);
     //@}
 
-    //@{
     /**
         Sets the attributes for the given range, passing flags to determine how the
         attributes are set.
@@ -1391,13 +1442,9 @@ public:
         - wxRICHTEXT_SETSTYLE_REMOVE: removes the specified style. Only the style flags
           are used in this operation.
     */
-    bool SetStyleEx(const wxRichTextRange& range,
-                    const wxTextAttr& style,
-                    int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
-    bool SetStyleEx(long start, long end,
+    virtual bool SetStyleEx(const wxRichTextRange& range,
                     const wxTextAttr& style,
                     int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
-    //@}
 
     /**
         Sets the style sheet associated with the control.