]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/richtext/richtextctrl.h
clarify wxListCtrl::GetItem (fixes #9640)
[wxWidgets.git] / interface / wx / richtext / richtextctrl.h
index a3b6aa953dd9965a53e1e782d3e75fd487e1f292..cda726e4df54ccde9748af80411302b4a2661527 100644 (file)
@@ -114,7 +114,7 @@ public:
     /**
         Gets the range for the current operation.
     */
-    wxRichTextRange GetRange() const;
+    const wxRichTextRange& GetRange() const;
 
     /**
         Sets the character variable.
@@ -389,7 +389,7 @@ public:
         See BeginNumberedBullet() for an explanation of how indentation is used
         to render the bulleted paragraph.
     */
-    bool BeginSymbolBullet(wxChar symbol, int leftIndent,
+    bool BeginSymbolBullet(const wxString& symbol, int leftIndent,
                            int leftSubIndent,
                            int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL);
 
@@ -513,11 +513,6 @@ public:
     */
     virtual void DiscardEdits();
 
-    /**
-        Currently this simply returns @c wxSize(10, 10).
-    */
-    virtual wxSize DoGetBestSize() const;
-
     /**
         Ends alignment.
     */
@@ -627,8 +622,7 @@ public:
         Helper function for extending the selection, returning @true if the selection
         was changed. Selections are in caret positions.
     */
-    bool ExtendSelection(long oldPosition, long newPosition,
-                         int flags);
+    virtual bool ExtendSelection(long oldPosition, long newPosition, int flags);
 
     /**
         Helper function for finding the caret position for the next word.
@@ -650,7 +644,7 @@ public:
         applied (for example, setting the default style to bold will cause
         subsequently inserted text to be bold).
     */
-    const wxTextAttr GetBasicStyle() const;
+    virtual const wxTextAttr& GetBasicStyle() const;
 
     //@{
     /**
@@ -679,7 +673,7 @@ public:
         Returns the current default style, which can be used to change how subsequently
         inserted text is displayed.
     */
-    const wxTextAttr GetDefaultStyle() const;
+    virtual const wxTextAttr& GetDefaultStyle() const;
 
     /**
         Gets the size of the buffer beyond which layout is delayed during resizing.
@@ -757,7 +751,7 @@ public:
     /**
         Returns the selection range in character positions. -1, -1 means no selection.
     */
-    const wxRichTextRange GetSelectionRange() const;
+    wxRichTextRange GetSelectionRange() const;
 
     /**
         Returns the text within the current selection range, if any.
@@ -779,8 +773,8 @@ public:
         Attributes that differ in value within the range will not be included
         in @a style flags.
     */
-    bool GetStyleForRange(const wxRichTextRange& range,
-                          wxTextAttr& style);
+    virtual bool GetStyleForRange(const wxRichTextRange& range,
+                                  wxTextAttr& style);
 
     /**
         Returns the style sheet associated with the control, if any.
@@ -821,8 +815,8 @@ public:
         You can use this to implement, for example, bold button updating.
         @a style must have flags indicating which attributes are of interest.
     */
-    bool HasCharacterAttributes(const wxRichTextRange& range,
-                                const wxTextAttr& style) const;
+    virtual bool HasCharacterAttributes(const wxRichTextRange& range,
+                                        const wxTextAttr& style) const;
 
     /**
         Test if this whole range has paragraph attributes of the specified kind.
@@ -830,8 +824,8 @@ public:
         You can use this to implement, for example, centering button updating.
         @a style must have flags indicating which attributes are of interest.
     */
-    bool HasParagraphAttributes(const wxRichTextRange& range,
-                                const wxTextAttr& style) const;
+    virtual bool HasParagraphAttributes(const wxRichTextRange& range,
+                                        const wxTextAttr& style) const;
 
     /**
         Returns @true if there is a selection.
@@ -855,11 +849,6 @@ public:
     */
     void Init();
 
-    /**
-        Initialises the command event.
-    */
-    void InitCommandEvent(wxCommandEvent& event) const;
-
     /**
         Returns @true if the user has recently set the default style without moving
         the caret, and therefore the UI needs to reflect the default style and not
@@ -1467,7 +1456,7 @@ public:
     /**
         Loads an image from a file and writes it at the current insertion point.
     */
-    bool WriteImage(const wxString& filename, int bitmapType);
+    virtual bool WriteImage(const wxString& filename, wxBitmapType bitmapType);
 
     /**
         Writes an image block at the current insertion point.
@@ -1494,5 +1483,17 @@ public:
         Translates from column and line number to position.
     */
     virtual long XYToPosition(long x, long y) const;
+
+protected:
+
+    /**
+        Currently this simply returns @c wxSize(10, 10).
+    */
+    virtual wxSize DoGetBestSize() const;
+
+    /**
+        Initialises the command event.
+    */
+    void InitCommandEvent(wxCommandEvent& event) const;
 };