X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23bdfeee49fdbc03e3b9977882a1afd64fba8023..e878c3477b543d6cf8730b3acc692e6a0ad250da:/include/wx/richtext/richtextbuffer.h diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index 2262c0e115..ffff1c8428 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -99,14 +99,14 @@ // Include the faster, direct implementation for output #define wxRICHTEXT_HAVE_DIRECT_OUTPUT 1 -/* - * Special characters +/** + The line break character that can be embedded in content. */ extern WXDLLIMPEXP_RICHTEXT const wxChar wxRichTextLineBreakChar; -/*! - * File types in wxRichText context. +/** + File types in wxRichText context. */ enum wxRichTextFileType { @@ -140,9 +140,11 @@ class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextParagraphLayoutBox; class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextImageBlock; class WXDLLIMPEXP_FWD_XML wxXmlNode; class wxRichTextFloatCollector; +class WXDLLIMPEXP_FWD_BASE wxDataInputStream; +class WXDLLIMPEXP_FWD_BASE wxDataOutputStream; -/*! - * Flags determining the available space, passed to Layout +/** + Flags determining the available space, passed to Layout. */ #define wxRICHTEXT_FIXED_WIDTH 0x01 @@ -154,8 +156,8 @@ class wxRichTextFloatCollector; // the rect passed to Layout. #define wxRICHTEXT_LAYOUT_SPECIFIED_RECT 0x10 -/* - * Flags to pass to Draw +/** + Flags to pass to Draw */ // Ignore paragraph cache optimization, e.g. for printing purposes @@ -166,8 +168,8 @@ class wxRichTextFloatCollector; #define wxRICHTEXT_DRAW_PRINT 0x04 #define wxRICHTEXT_DRAW_GUIDELINES 0x08 -/* - * Flags returned from hit-testing, or passed to hit-test function. +/** + Flags returned from hit-testing, or passed to hit-test function. */ enum wxRichTextHitTestFlags { @@ -187,11 +189,14 @@ enum wxRichTextHitTestFlags wxRICHTEXT_HITTEST_OUTSIDE = 0x10, // Only do hit-testing at the current level (don't traverse into top-level objects) - wxRICHTEXT_HITTEST_NO_NESTED_OBJECTS = 0x20 + wxRICHTEXT_HITTEST_NO_NESTED_OBJECTS = 0x20, + + // Ignore floating objects + wxRICHTEXT_HITTEST_NO_FLOATING_OBJECTS = 0x40 }; -/*! - * Flags for GetRangeSize +/** + Flags for GetRangeSize. */ #define wxRICHTEXT_FORMATTED 0x01 @@ -199,8 +204,8 @@ enum wxRichTextHitTestFlags #define wxRICHTEXT_CACHE_SIZE 0x04 #define wxRICHTEXT_HEIGHT_ONLY 0x08 -/*! - * Flags for SetStyle/SetListStyle +/** + Flags for SetStyle/SetListStyle. */ #define wxRICHTEXT_SETSTYLE_NONE 0x00 @@ -236,8 +241,8 @@ enum wxRichTextHitTestFlags // Removes the given style instead of applying it #define wxRICHTEXT_SETSTYLE_REMOVE 0x80 -/*! - * Flags for object insertion +/** + Flags for object insertion. */ #define wxRICHTEXT_INSERT_NONE 0x00 @@ -249,31 +254,40 @@ enum wxRichTextHitTestFlags // flag to InsertFragment and DeleteRange to indicate the appropriate mode. #define wxTEXT_ATTR_KEEP_FIRST_PARA_STYLE 0x10000000 -/*! - * Default superscript/subscript font multiplication factor +/** + Default superscript/subscript font multiplication factor. */ #define wxSCRIPT_MUL_FACTOR 1.5 +/** + The type for wxTextAttrDimension flags. + */ typedef unsigned short wxTextAttrDimensionFlags; -// Miscellaneous text box flags +/** + Miscellaneous text box flags + */ enum wxTextBoxAttrFlags { wxTEXT_BOX_ATTR_FLOAT = 0x00000001, wxTEXT_BOX_ATTR_CLEAR = 0x00000002, wxTEXT_BOX_ATTR_COLLAPSE_BORDERS = 0x00000004, - wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT = 0x00000004 + wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT = 0x00000008 }; -// Whether a value is present, used in dimension flags +/** + Whether a value is present, used in dimension flags. + */ enum wxTextAttrValueFlags { wxTEXT_ATTR_VALUE_VALID = 0x1000, wxTEXT_ATTR_VALUE_VALID_MASK = 0x1000 }; -// Units - included in the dimension value +/** + Units, included in the dimension value. + */ enum wxTextAttrUnits { wxTEXT_ATTR_UNITS_TENTHS_MM = 0x0001, @@ -284,7 +298,9 @@ enum wxTextAttrUnits wxTEXT_ATTR_UNITS_MASK = 0x000F }; -// Position - included in the dimension flags +/** + Position alternatives, included in the dimension flags. + */ enum wxTextBoxAttrPosition { wxTEXT_BOX_ATTR_POSITION_STATIC = 0x0000, // Default is static, i.e. as per normal layout @@ -642,7 +658,9 @@ public: wxSize m_parentSize; }; -// Border styles +/** + Border styles, used with wxTextAttrBorder. + */ enum wxTextAttrBorderStyle { wxTEXT_BOX_ATTR_BORDER_NONE = 0, @@ -656,14 +674,18 @@ enum wxTextAttrBorderStyle wxTEXT_BOX_ATTR_BORDER_OUTSET = 8 }; -// Border style presence flags +/** + Border style presence flags, used with wxTextAttrBorder. + */ enum wxTextAttrBorderFlags { wxTEXT_BOX_ATTR_BORDER_STYLE = 0x0001, wxTEXT_BOX_ATTR_BORDER_COLOUR = 0x0002 }; -// Border width symbols for qualitative widths +/** + Border width symbols for qualitative widths, used with wxTextAttrBorder. + */ enum wxTextAttrBorderWidth { wxTEXT_BOX_ATTR_BORDER_THIN = -1, @@ -671,7 +693,9 @@ enum wxTextAttrBorderWidth wxTEXT_BOX_ATTR_BORDER_THICK = -3 }; -// Float styles +/** + Float styles. + */ enum wxTextBoxAttrFloatStyle { wxTEXT_BOX_ATTR_FLOAT_NONE = 0, @@ -679,7 +703,9 @@ enum wxTextBoxAttrFloatStyle wxTEXT_BOX_ATTR_FLOAT_RIGHT = 2 }; -// Clear styles +/** + Clear styles. + */ enum wxTextBoxAttrClearStyle { wxTEXT_BOX_ATTR_CLEAR_NONE = 0, @@ -688,14 +714,18 @@ enum wxTextBoxAttrClearStyle wxTEXT_BOX_ATTR_CLEAR_BOTH = 3 }; -// Collapse mode styles. TODO: can they be switched on per side? +/** + Collapse mode styles. TODO: can they be switched on per side? + */ enum wxTextBoxAttrCollapseMode { wxTEXT_BOX_ATTR_COLLAPSE_NONE = 0, wxTEXT_BOX_ATTR_COLLAPSE_FULL = 1 }; -// Vertical alignment values +/** + Vertical alignment values. + */ enum wxTextBoxAttrVerticalAlignment { wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_NONE = 0, @@ -1409,48 +1439,155 @@ public: WX_DECLARE_USER_EXPORTED_OBJARRAY(wxVariant, wxRichTextVariantArray, WXDLLIMPEXP_RICHTEXT); -// ---------------------------------------------------------------------------- -// wxRichTextProperties - A simple property class using wxVariants -// ---------------------------------------------------------------------------- +/** + @class wxRichTextProperties + A simple property class using wxVariants. This is used to give each rich text object the + ability to store custom properties that can be used by the application. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextObject, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextProperties: public wxObject { DECLARE_DYNAMIC_CLASS(wxRichTextProperties) public: + + /** + Default constructor. + */ wxRichTextProperties() {} + + /** + Copy constructor. + */ wxRichTextProperties(const wxRichTextProperties& props): wxObject() { Copy(props); } + /** + Assignment operator. + */ void operator=(const wxRichTextProperties& props) { Copy(props); } + + /** + Equality operator. + */ bool operator==(const wxRichTextProperties& props) const; + + /** + Copies from @a props. + */ void Copy(const wxRichTextProperties& props) { m_properties = props.m_properties; } + + /** + Returns the variant at the given index. + */ const wxVariant& operator[](size_t idx) const { return m_properties[idx]; } + + /** + Returns the variant at the given index. + */ wxVariant& operator[](size_t idx) { return m_properties[idx]; } + + /** + Clears the properties. + */ void Clear() { m_properties.Clear(); } + /** + Returns the array of variants implementing the properties. + */ const wxRichTextVariantArray& GetProperties() const { return m_properties; } + + /** + Returns the array of variants implementing the properties. + */ wxRichTextVariantArray& GetProperties() { return m_properties; } + + /** + Sets the array of variants. + */ void SetProperties(const wxRichTextVariantArray& props) { m_properties = props; } + /** + Returns all the property names. + */ wxArrayString GetPropertyNames() const; + /** + Returns a count of the properties. + */ size_t GetCount() const { return m_properties.GetCount(); } - int HasProperty(const wxString& name) const { return Find(name) != -1; } + /** + Returns @true if the given property is found. + */ + bool HasProperty(const wxString& name) const { return Find(name) != -1; } + /** + Finds the given property. + */ int Find(const wxString& name) const; + + /** + Gets the property variant by name. + */ const wxVariant& GetProperty(const wxString& name) const; + + /** + Finds or creates a property with the given name, returning a pointer to the variant. + */ wxVariant* FindOrCreateProperty(const wxString& name); + /** + Gets the value of the named property as a string. + */ wxString GetPropertyString(const wxString& name) const; + + /** + Gets the value of the named property as a long integer. + */ long GetPropertyLong(const wxString& name) const; + + /** + Gets the value of the named property as a boolean. + */ bool GetPropertyBool(const wxString& name) const; + + /** + Gets the value of the named property as a double. + */ double GetPropertyDouble(const wxString& name) const; + /** + Sets the property by passing a variant which contains a name and value. + */ void SetProperty(const wxVariant& variant); + + /** + Sets a property by name and variant. + */ void SetProperty(const wxString& name, const wxVariant& variant); + + /** + Sets a property by name and string value. + */ void SetProperty(const wxString& name, const wxString& value); + + /** + Sets property by name and long integer value. + */ void SetProperty(const wxString& name, long value); + + /** + Sets property by name and double value. + */ void SetProperty(const wxString& name, double value); + + /** + Sets property by name and boolean value. + */ void SetProperty(const wxString& name, bool value); protected: @@ -1458,26 +1595,58 @@ protected: }; -/*! - * wxRichTextFontTable - * Manages quick access to a pool of fonts for rendering rich text - */ +/** + @class wxRichTextFontTable + Manages quick access to a pool of fonts for rendering rich text. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextFontTable: public wxObject { public: + /** + Default constructor. + */ wxRichTextFontTable(); + /** + Copy constructor. + */ wxRichTextFontTable(const wxRichTextFontTable& table); virtual ~wxRichTextFontTable(); + /** + Returns @true if the font table is valid. + */ bool IsOk() const { return m_refData != NULL; } + /** + Finds a font for the given attribute object. + */ wxFont FindFont(const wxRichTextAttr& fontSpec); + + /** + Clears the font table. + */ void Clear(); + /** + Assignment operator. + */ void operator= (const wxRichTextFontTable& table); + + /** + Equality operator. + */ bool operator == (const wxRichTextFontTable& table) const; + + /** + Inequality operator. + */ bool operator != (const wxRichTextFontTable& table) const { return !(*this == table); } protected: @@ -1485,61 +1654,132 @@ protected: DECLARE_DYNAMIC_CLASS(wxRichTextFontTable) }; -/*! - * wxRichTextRange class declaration - * This stores beginning and end positions for a range of data. - * TODO: consider renaming wxTextRange and using for all text controls. - */ +/** + @class wxRichTextRange + + This stores beginning and end positions for a range of data. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextRange { public: // Constructors + /** + Default constructor. + */ wxRichTextRange() { m_start = 0; m_end = 0; } + + /** + Constructor taking start and end positions. + */ wxRichTextRange(long start, long end) { m_start = start; m_end = end; } + + /** + Copy constructor. + */ wxRichTextRange(const wxRichTextRange& range) { m_start = range.m_start; m_end = range.m_end; } ~wxRichTextRange() {} + /** + Assigns @a range to this range. + */ void operator =(const wxRichTextRange& range) { m_start = range.m_start; m_end = range.m_end; } + + /** + Equality operator. Returns @true if @a range is the same as this range. + */ bool operator ==(const wxRichTextRange& range) const { return (m_start == range.m_start && m_end == range.m_end); } + + /** + Inequality operator. + */ bool operator !=(const wxRichTextRange& range) const { return (m_start != range.m_start || m_end != range.m_end); } + + /** + Subtracts a range from this range. + */ wxRichTextRange operator -(const wxRichTextRange& range) const { return wxRichTextRange(m_start - range.m_start, m_end - range.m_end); } + + /** + Adds a range to this range. + */ wxRichTextRange operator +(const wxRichTextRange& range) const { return wxRichTextRange(m_start + range.m_start, m_end + range.m_end); } + /** + Sets the range start and end positions. + */ void SetRange(long start, long end) { m_start = start; m_end = end; } + /** + Sets the start position. + */ void SetStart(long start) { m_start = start; } + + /** + Returns the start position. + */ long GetStart() const { return m_start; } + /** + Sets the end position. + */ void SetEnd(long end) { m_end = end; } + + /** + Gets the end position. + */ long GetEnd() const { return m_end; } - /// Returns true if this range is completely outside 'range' + /** + Returns true if this range is completely outside @a range. + */ bool IsOutside(const wxRichTextRange& range) const { return range.m_start > m_end || range.m_end < m_start; } - /// Returns true if this range is completely within 'range' + /** + Returns true if this range is completely within @a range. + */ bool IsWithin(const wxRichTextRange& range) const { return m_start >= range.m_start && m_end <= range.m_end; } - /// Returns true if the given position is within this range. Allow - /// for the possibility of an empty range - assume the position - /// is within this empty range. NO, I think we should not match with an empty range. - // bool Contains(long pos) const { return pos >= m_start && (pos <= m_end || GetLength() == 0); } + /** + Returns true if @a pos was within the range. Does not match if the range is empty. + */ bool Contains(long pos) const { return pos >= m_start && pos <= m_end ; } - /// Limit this range to be within 'range' + /** + Limit this range to be within @a range. + */ bool LimitTo(const wxRichTextRange& range) ; - /// Gets the length of the range + /** + Gets the length of the range. + */ long GetLength() const { return m_end - m_start + 1; } - /// Swaps the start and end + /** + Swaps the start and end. + */ void Swap() { long tmp = m_start; m_start = m_end; m_end = tmp; } - /// Convert to internal form: (n, n) is the range of a single character. + /** + Converts the API-standard range, whose end is one past the last character in + the range, to the internal form, which uses the first and last character + positions of the range. In other words, one is subtracted from the end position. + (n, n) is the range of a single character. + */ wxRichTextRange ToInternal() const { return wxRichTextRange(m_start, m_end-1); } - /// Convert from internal to public API form: (n, n+1) is the range of a single character. + /** + Converts the internal range, which uses the first and last character positions + of the range, to the API-standard range, whose end is one past the last + character in the range. In other words, one is added to the end position. + (n, n+1) is the range of a single character. + */ wxRichTextRange FromInternal() const { return wxRichTextRange(m_start, m_end+1); } protected: @@ -1552,382 +1792,686 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxRichTextRange, wxRichTextRangeArray, WXDLLIM #define wxRICHTEXT_ALL wxRichTextRange(-2, -2) #define wxRICHTEXT_NONE wxRichTextRange(-1, -1) -// ---------------------------------------------------------------------------- -// wxRichTextSelection: stores selection information -// ---------------------------------------------------------------------------- - #define wxRICHTEXT_NO_SELECTION wxRichTextRange(-2, -2) +/** + @class wxRichTextSelection + + Stores selection information. The selection does not have to be contiguous, though currently non-contiguous + selections are only supported for a range of table cells (a geometric block of cells can consist + of a set of non-contiguous positions). + + The selection consists of an array of ranges, and the container that is the context for the selection. It + follows that a single selection object can only represent ranges with the same parent container. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ + class WXDLLIMPEXP_RICHTEXT wxRichTextSelection { public: + /** + Copy constructor. + */ wxRichTextSelection(const wxRichTextSelection& sel) { Copy(sel); } + + /** + Creates a selection from a range and a container. + */ wxRichTextSelection(const wxRichTextRange& range, wxRichTextParagraphLayoutBox* container) { m_ranges.Add(range); m_container = container; } + + /** + Default constructor. + */ wxRichTextSelection() { Reset(); } - /// Reset the selection + /** + Resets the selection. + */ void Reset() { m_ranges.Clear(); m_container = NULL; } - /// Set the selection + /** + Sets the selection. + */ + void Set(const wxRichTextRange& range, wxRichTextParagraphLayoutBox* container) { m_ranges.Clear(); m_ranges.Add(range); m_container = container; } - /// Add a selection + /** + Adds a range to the selection. + */ void Add(const wxRichTextRange& range) { m_ranges.Add(range); } - /// Set the selections + /** + Sets the selections from an array of ranges and a container object. + */ void Set(const wxRichTextRangeArray& ranges, wxRichTextParagraphLayoutBox* container) { m_ranges = ranges; m_container = container; } - /// Copy + /** + Copies from @a sel. + */ void Copy(const wxRichTextSelection& sel) { m_ranges = sel.m_ranges; m_container = sel.m_container; } - /// Assignment + /** + Assignment operator. + */ void operator=(const wxRichTextSelection& sel) { Copy(sel); } - /// Equality test + /** + Equality operator. + */ bool operator==(const wxRichTextSelection& sel) const; - /// Index operator + /** + Index operator. + */ wxRichTextRange operator[](size_t i) const { return GetRange(i); } - /// Get the selection ranges + /** + Returns the selection ranges. + */ wxRichTextRangeArray& GetRanges() { return m_ranges; } + + /** + Returns the selection ranges. + */ const wxRichTextRangeArray& GetRanges() const { return m_ranges; } - /// Set the selection ranges + /** + Sets the selection ranges. + */ void SetRanges(const wxRichTextRangeArray& ranges) { m_ranges = ranges; } - /// Get the number of ranges in the selection + /** + Returns the number of ranges in the selection. + */ size_t GetCount() const { return m_ranges.GetCount(); } - /// Get the given range + /** + Returns the range at the given index. + + */ wxRichTextRange GetRange(size_t i) const { return m_ranges[i]; } - /// Get the first range if there is one, otherwise wxRICHTEXT_NO_SELECTION. + /** + Returns the first range if there is one, otherwise wxRICHTEXT_NO_SELECTION. + */ wxRichTextRange GetRange() const { return (m_ranges.GetCount() > 0) ? (m_ranges[0]) : wxRICHTEXT_NO_SELECTION; } - /// Set a single range. + /** + Sets a single range. + */ void SetRange(const wxRichTextRange& range) { m_ranges.Clear(); m_ranges.Add(range); } - /// Get the container for which the selection is valid + /** + Returns the container for which the selection is valid. + */ wxRichTextParagraphLayoutBox* GetContainer() const { return m_container; } - /// Set the container for which the selection is valid + /** + Sets the container for which the selection is valid. + */ void SetContainer(wxRichTextParagraphLayoutBox* container) { m_container = container; } - /// Is the selection valid? + /** + Returns @true if the selection is valid. + */ bool IsValid() const { return m_ranges.GetCount() > 0 && GetContainer(); } - /// Get the selection appropriate to the specified object, if any; returns an empty array if none - /// at the level of the object's container. + /** + Returns the selection appropriate to the specified object, if any; returns an empty array if none + at the level of the object's container. + */ wxRichTextRangeArray GetSelectionForObject(wxRichTextObject* obj) const; - /// Is the given position within the selection? + /** + Returns @true if the given position is within the selection. + */ bool WithinSelection(long pos, wxRichTextObject* obj) const; - /// Is the given position within the selection? + /** + Returns @true if the given position is within the selection. + + */ bool WithinSelection(long pos) const { return WithinSelection(pos, m_ranges); } - /// Is the given position within the selection range? + /** + Returns @true if the given position is within the selection range. + */ static bool WithinSelection(long pos, const wxRichTextRangeArray& ranges); - /// Is the given range within the selection range? + /** + Returns @true if the given range is within the selection range. + */ static bool WithinSelection(const wxRichTextRange& range, const wxRichTextRangeArray& ranges); wxRichTextRangeArray m_ranges; wxRichTextParagraphLayoutBox* m_container; }; -/*! - * wxRichTextObject class declaration - * This is the base for drawable objects. - */ +/** + @class wxRichTextObject + + This is the base for drawable rich text objects. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject { DECLARE_CLASS(wxRichTextObject) public: -// Constructors - + /** + Constructor, taking an optional parent pointer. + */ wxRichTextObject(wxRichTextObject* parent = NULL); + virtual ~wxRichTextObject(); // Overrideables - /// Draw the item, within the given range. Some objects may ignore the range (for - /// example paragraphs) while others must obey it (lines, to implement wrapping) + /** + Draw the item, within the given range. Some objects may ignore the range (for + example paragraphs) while others must obey it (lines, to implement wrapping) + */ virtual bool Draw(wxDC& dc, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) = 0; - /// Lay the item out at the specified position with the given size constraint. - /// Layout must set the cached size. + /** + Lay the item out at the specified position with the given size constraint. + Layout must set the cached size. + */ virtual bool Layout(wxDC& dc, const wxRect& rect, int style) = 0; - /// Hit-testing: returns a flag indicating hit test details, plus - /// information about position. contextObj is returned to specify what object - /// position is relevant to, since otherwise there's an ambiguity. - /// obj may not a child of contextObj, since we may be referring to the container itself - /// if we have no hit on a child - for example if we click outside an object. + /** + Hit-testing: returns a flag indicating hit test details, plus + information about position. contextObj is returned to specify what object + position is relevant to, since otherwise there's an ambiguity. + obj may not a child of contextObj, since we may be referring to the container itself + if we have no hit on a child - for example if we click outside an object. + */ virtual int HitTest(wxDC& dc, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); - /// Finds the absolute position and row height for the given character position + /** + Finds the absolute position and row height for the given character position. + */ virtual bool FindPosition(wxDC& WXUNUSED(dc), long WXUNUSED(index), wxPoint& WXUNUSED(pt), int* WXUNUSED(height), bool WXUNUSED(forceLineStart)) { return false; } - /// Get the best size, i.e. the ideal starting size for this object irrespective - /// of available space. For a short text string, it will be the size that exactly encloses - /// the text. For a longer string, it might use the parent width for example. + /** + Returns the best size, i.e. the ideal starting size for this object irrespective + of available space. For a short text string, it will be the size that exactly encloses + the text. For a longer string, it might use the parent width for example. + */ virtual wxSize GetBestSize() const { return m_size; } /** - Gets the object size for the given range. Returns false if the range + Returns the object size for the given range. Returns @false if the range is invalid for this object. */ virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, int flags, wxPoint position = wxPoint(0,0), wxArrayInt* partialExtents = NULL) const = 0; - /// Do a split, returning an object containing the second part, and setting - /// the first part in 'this'. + /** + Do a split from @a pos, returning an object containing the second part, and setting + the first part in 'this'. + */ virtual wxRichTextObject* DoSplit(long WXUNUSED(pos)) { return NULL; } - /// Calculate range. By default, guess that the object is 1 unit long. + /** + Calculates the range of the object. By default, guess that the object is 1 unit long. + */ virtual void CalculateRange(long start, long& end) { end = start ; m_range.SetRange(start, end); } - /// Delete range + /** + Deletes the given range. + */ virtual bool DeleteRange(const wxRichTextRange& WXUNUSED(range)) { return false; } - /// Returns true if the object is empty + /** + Returns @true if the object is empty. + */ virtual bool IsEmpty() const { return false; } - /// Whether this object floatable + /** + Returns @true if this class of object is floatable. + */ virtual bool IsFloatable() const { return false; } - /// Whether this object is currently floating + /** + Returns @true if this object is currently floating. + */ virtual bool IsFloating() const { return GetAttributes().GetTextBoxAttr().IsFloating(); } - /// Whether this object is a place holding one - // virtual bool IsPlaceHolding() const { return false; } - - /// The floating direction + /** + Returns the floating direction. + */ virtual int GetFloatDirection() const { return GetAttributes().GetTextBoxAttr().GetFloatMode(); } - /// Get any text in this object for the given range + /** + Returns any text in this object for the given range. + */ virtual wxString GetTextForRange(const wxRichTextRange& WXUNUSED(range)) const { return wxEmptyString; } - /// Returns true if this object can merge itself with the given one. + /** + Returns @true if this object can merge itself with the given one. + */ virtual bool CanMerge(wxRichTextObject* WXUNUSED(object)) const { return false; } - /// Returns true if this object merged itself with the given one. - /// The calling code will then delete the given object. + /** + Returns @true if this object merged itself with the given one. + The calling code will then delete the given object. + */ virtual bool Merge(wxRichTextObject* WXUNUSED(object)) { return false; } - /// Dump to output stream for debugging + /** + Dump object data to the given output stream for debugging. + */ virtual void Dump(wxTextOutputStream& stream); - /// Can we edit properties via a GUI? + /** + Returns @true if we can edit the object's properties via a GUI. + */ virtual bool CanEditProperties() const { return false; } - /// Edit properties via a GUI + /** + Edits the object's properties via a GUI. + */ virtual bool EditProperties(wxWindow* WXUNUSED(parent), wxRichTextBuffer* WXUNUSED(buffer)) { return false; } - /// Return the label to be used for the properties context menu item. + /** + Returns the label to be used for the properties context menu item. + */ virtual wxString GetPropertiesMenuLabel() const { return wxEmptyString; } - /// Returns true if objects of this class can accept the focus, i.e. a call to SetFocusObject - /// is possible. For example, containers supporting text, such as a text box object, can accept the focus, - /// but a table can't (set the focus to individual cells instead). + /** + Returns @true if objects of this class can accept the focus, i.e. a call to SetFocusObject + is possible. For example, containers supporting text, such as a text box object, can accept the focus, + but a table can't (set the focus to individual cells instead). + */ virtual bool AcceptsFocus() const { return false; } #if wxUSE_XML - /// Import this object from XML + /** + Imports this object from XML. + */ virtual bool ImportFromXML(wxRichTextBuffer* buffer, wxXmlNode* node, wxRichTextXMLHandler* handler, bool* recurse); #endif #if wxRICHTEXT_HAVE_DIRECT_OUTPUT - /// Export this object directly to the given stream. + /** + Exports this object directly to the given stream, bypassing the creation of a wxXmlNode hierarchy. + This method is considerably faster than creating a tree first. However, both versions of ExportXML must be + implemented so that if the tree method is made efficient in the future, we can deprecate the + more verbose direct output method. Compiled only if wxRICHTEXT_HAVE_DIRECT_OUTPUT is defined (on by default). + */ virtual bool ExportXML(wxOutputStream& stream, int indent, wxRichTextXMLHandler* handler); #endif #if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT - /// Export this object to the given parent node, usually creating at least one child node. + /** + Exports this object to the given parent node, usually creating at least one child node. + This method is less efficient than the direct-to-stream method but is retained to allow for + switching to this method if we make it more efficient. Compiled only if wxRICHTEXT_HAVE_XMLDOCUMENT_OUTPUT is defined + (on by default). + */ virtual bool ExportXML(wxXmlNode* parent, wxRichTextXMLHandler* handler); #endif - /// Does this object take note of paragraph attributes? Text and image objects don't. + /** + Returns @true if this object takes note of paragraph attributes (text and image objects don't). + */ virtual bool UsesParagraphAttributes() const { return true; } - /// What is the XML node name of this object? + /** + Returns the XML node name of this object. This must be overridden for wxXmlNode-base XML export to work. + */ virtual wxString GetXMLNodeName() const { return wxT("unknown"); } - /// Invalidate the buffer. With no argument, invalidates whole buffer. + /** + Invalidates the object at the given range. With no argument, invalidates the whole object. + */ virtual void Invalidate(const wxRichTextRange& invalidRange = wxRICHTEXT_ALL); - /// Can this object handle the selections of its children? FOr example, a table. + /** + Returns @true if this object can handle the selections of its children, fOr example a table. + Required for composite selection handling to work. + */ virtual bool HandlesChildSelections() const { return false; } - /// Returns a selection object specifying the selections between start and end character positions. - /// For example, a table would deduce what cells (of range length 1) are selected when dragging across the table. + /** + Returns a selection object specifying the selections between start and end character positions. + For example, a table would deduce what cells (of range length 1) are selected when dragging across the table. + */ virtual wxRichTextSelection GetSelection(long WXUNUSED(start), long WXUNUSED(end)) const { return wxRichTextSelection(); } // Accessors - /// Get/set the cached object size as calculated by Layout. + /** + Gets the cached object size as calculated by Layout. + */ virtual wxSize GetCachedSize() const { return m_size; } + + /** + Sets the cached object size as calculated by Layout. + */ virtual void SetCachedSize(const wxSize& sz) { m_size = sz; } - /// Get/set the maximum object size as calculated by Layout. This allows - /// us to fit an object to its contents or allocate extra space if required. + /** + Gets the maximum object size as calculated by Layout. This allows + us to fit an object to its contents or allocate extra space if required. + */ virtual wxSize GetMaxSize() const { return m_maxSize; } + + /** + Sets the maximum object size as calculated by Layout. This allows + us to fit an object to its contents or allocate extra space if required. + */ virtual void SetMaxSize(const wxSize& sz) { m_maxSize = sz; } - /// Get/set the minimum object size as calculated by Layout. This allows - /// us to constrain an object to its absolute minimum size if necessary. + /** + Gets the minimum object size as calculated by Layout. This allows + us to constrain an object to its absolute minimum size if necessary. + */ virtual wxSize GetMinSize() const { return m_minSize; } + + /** + Sets the minimum object size as calculated by Layout. This allows + us to constrain an object to its absolute minimum size if necessary. + */ virtual void SetMinSize(const wxSize& sz) { m_minSize = sz; } - /// Get the 'natural' size for an object. For an image, it would be the - /// image size. + /** + Gets the 'natural' size for an object. For an image, it would be the + image size. + */ virtual wxTextAttrSize GetNaturalSize() const { return wxTextAttrSize(); } - /// Get/set the object position + /** + Returns the object position in pixels. + */ virtual wxPoint GetPosition() const { return m_pos; } + + /** + Sets the object position in pixels. + */ virtual void SetPosition(const wxPoint& pos) { m_pos = pos; } - /// Get the absolute object position, by traversing up the child/parent hierarchy - /// TODO: may not be needed, if all object positions are in fact relative to the - /// top of the coordinate space. + /** + Returns the absolute object position, by traversing up the child/parent hierarchy. + TODO: may not be needed, if all object positions are in fact relative to the + top of the coordinate space. + */ virtual wxPoint GetAbsolutePosition() const; - /// Get the rectangle enclosing the object + /** + Returns the rectangle enclosing the object. + */ virtual wxRect GetRect() const { return wxRect(GetPosition(), GetCachedSize()); } - /// Set the range + /** + Sets the object's range within its container. + */ void SetRange(const wxRichTextRange& range) { m_range = range; } - /// Get the range + /** + Returns the object's range. + */ const wxRichTextRange& GetRange() const { return m_range; } + + /** + Returns the object's range. + */ wxRichTextRange& GetRange() { return m_range; } - /// Set the 'own' range, for a top-level object with its own position space + /** + Set the object's own range, for a top-level object with its own position space. + */ void SetOwnRange(const wxRichTextRange& range) { m_ownRange = range; } - /// Get own range (valid if top-level) + /** + Returns the object's own range (valid if top-level). + */ const wxRichTextRange& GetOwnRange() const { return m_ownRange; } + + /** + Returns the object's own range (valid if top-level). + */ wxRichTextRange& GetOwnRange() { return m_ownRange; } - /// Get own range only if a top-level object + /** + Returns the object's own range only if a top-level object. + */ wxRichTextRange GetOwnRangeIfTopLevel() const { return IsTopLevel() ? m_ownRange : m_range; } - /// Is this composite? + /** + Returns @true if this object this composite. + */ virtual bool IsComposite() const { return false; } - /// Get/set the parent. + /** + Returns a pointer to the parent object. + */ virtual wxRichTextObject* GetParent() const { return m_parent; } + + /** + Sets the pointer to the parent object. + */ virtual void SetParent(wxRichTextObject* parent) { m_parent = parent; } - /// Get/set the top-level container of this object. - /// May return itself if it's a container; use GetParentContainer to return - /// a different container. + /** + Returns the top-level container of this object. + May return itself if it's a container; use GetParentContainer to return + a different container. + */ virtual wxRichTextParagraphLayoutBox* GetContainer() const; - /// Get/set the top-level container of this object. - /// Returns a different container than itself, unless there's no parent, in which case it will return NULL. + /** + Returns the top-level container of this object. + Returns a different container than itself, unless there's no parent, in which case it will return NULL. + */ virtual wxRichTextParagraphLayoutBox* GetParentContainer() const { return GetParent() ? GetParent()->GetContainer() : GetContainer(); } - /// Set the margin around the object, in pixels + /** + Set the margin around the object, in pixels. + */ virtual void SetMargins(int margin); + + /** + Set the margin around the object, in pixels. + */ virtual void SetMargins(int leftMargin, int rightMargin, int topMargin, int bottomMargin); + + /** + Returns the left margin of the object, in pixels. + */ virtual int GetLeftMargin() const; + + /** + Returns the right margin of the object, in pixels. + */ virtual int GetRightMargin() const; + + /** + Returns the top margin of the object, in pixels. + */ virtual int GetTopMargin() const; + + /** + Returns the bottom margin of the object, in pixels. + */ virtual int GetBottomMargin() const; - /// Calculate the available content space in the given rectangle, given the - /// margins, border and padding specified in the object's attributes. + /** + Calculates the available content space in the given rectangle, given the + margins, border and padding specified in the object's attributes. + */ virtual wxRect GetAvailableContentArea(wxDC& dc, const wxRect& outerRect) const; - /// Lays out the object first with a given amount of space, and then if no width was specified in attr, - /// lays out the object again using the minimum size + /** + Lays out the object first with a given amount of space, and then if no width was specified in attr, + lays out the object again using the minimum size + */ virtual bool LayoutToBestSize(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& parentAttr, const wxRichTextAttr& attr, const wxRect& availableParentSpace, int style); - /// Set/get attributes object + /** + Sets the object's attributes. + */ void SetAttributes(const wxRichTextAttr& attr) { m_attributes = attr; } + + /** + Returns the object's attributes. + */ const wxRichTextAttr& GetAttributes() const { return m_attributes; } + + /** + Returns the object's attributes. + */ wxRichTextAttr& GetAttributes() { return m_attributes; } - /// Set/get properties + /** + Sets the object's properties. + */ wxRichTextProperties& GetProperties() { return m_properties; } + + /** + Returns the object's properties. + */ const wxRichTextProperties& GetProperties() const { return m_properties; } + + /** + Returns the object's properties. + */ void SetProperties(const wxRichTextProperties& props) { m_properties = props; } - /// Set/get stored descent + /** + Sets the stored descent value. + */ void SetDescent(int descent) { m_descent = descent; } + + /** + Returns the stored descent value. + */ int GetDescent() const { return m_descent; } - /// Gets the containing buffer + /** + Returns the containing buffer. + */ wxRichTextBuffer* GetBuffer() const; - /// Sets the identifying name for this object, as a property. + /** + Sets the identifying name for this object as a property using the "name" key. + */ void SetName(const wxString& name) { m_properties.SetProperty(wxT("name"), name); } - /// Gets the identifying name for this object. + /** + Returns the identifying name for this object from the properties, using the "name" key. + */ wxString GetName() const { return m_properties.GetPropertyString(wxT("name")); } - /// Is this object top-level, i.e. with its own paragraphs, such as a text box? + /** + Returns @true if this object is top-level, i.e. contains its own paragraphs, such as a text box. + */ virtual bool IsTopLevel() const { return false; } - /// Returns @true if the object will be shown, @false otherwise. + /** + Returns @true if the object will be shown, @false otherwise. + */ bool IsShown() const { return m_show; } // Operations - /// Call to show or hide this object. This function does not cause the content to be - /// laid out or redrawn. + /** + Call to show or hide this object. This function does not cause the content to be + laid out or redrawn. + */ virtual void Show(bool show) { m_show = show; } - /// Clone the object + /** + Clones the object. + */ virtual wxRichTextObject* Clone() const { return NULL; } - /// Copy + /** + Copies the object. + */ void Copy(const wxRichTextObject& obj); - /// Reference-counting allows us to use the same object in multiple - /// lists (not yet used) + /** + Reference-counting allows us to use the same object in multiple + lists (not yet used). + */ + void Reference() { m_refCount ++; } + + /** + Reference-counting allows us to use the same object in multiple + lists (not yet used). + */ void Dereference(); - /// Move the object recursively, by adding the offset from old to new + /** + Moves the object recursively, by adding the offset from old to new. + */ virtual void Move(const wxPoint& pt); - /// Convert units in tenths of a millimetre to device units + /** + Converts units in tenths of a millimetre to device units. + */ int ConvertTenthsMMToPixels(wxDC& dc, int units) const; + + /** + Converts units in tenths of a millimetre to device units. + */ static int ConvertTenthsMMToPixels(int ppi, int units, double scale = 1.0); - /// Convert units in pixels to tenths of a millimetre + /** + Convert units in pixels to tenths of a millimetre. + */ int ConvertPixelsToTenthsMM(wxDC& dc, int pixels) const; + + /** + Convert units in pixels to tenths of a millimetre. + */ static int ConvertPixelsToTenthsMM(int ppi, int pixels, double scale = 1.0); - /// Draw the borders and background for the given rectangle and attributes. - /// Width and height are taken to be the outer margin size, not the content. + /** + Draws the borders and background for the given rectangle and attributes. + @a boxRect is taken to be the outer margin box, not the box around the content. + */ static bool DrawBoxAttributes(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, const wxRect& boxRect, int flags = 0); - /// Draw a border + /** + Draws a border. + */ static bool DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxTextAttrBorders& attr, const wxRect& rect, int flags = 0); - /// Get the various rectangles of the box model in pixels. You can either specify contentRect (inner) - /// or marginRect (outer), and the other must be the default rectangle (no width or height). - /// Note that the outline doesn't affect the position of the rectangle, it's drawn in whatever space - /// is available. + /** + Returns the various rectangles of the box model in pixels. You can either specify @a contentRect (inner) + or @a marginRect (outer), and the other must be the default rectangle (no width or height). + Note that the outline doesn't affect the position of the rectangle, it's drawn in whatever space + is available. + */ static bool GetBoxRects(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, wxRect& marginRect, wxRect& borderRect, wxRect& contentRect, wxRect& paddingRect, wxRect& outlineRect); - /// Get the total margin for the object in pixels, taking into account margin, padding and border size + /** + Returns the total margin for the object in pixels, taking into account margin, padding and border size. + */ static bool GetTotalMargin(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, int& leftMargin, int& rightMargin, int& topMargin, int& bottomMargin); - /// Returns the rectangle which the child has available to it given restrictions specified in the - /// child attribute, e.g. 50% width of the parent, 400 pixels, x position 20% of the parent, etc. + /** + Returns the rectangle which the child has available to it given restrictions specified in the + child attribute, e.g. 50% width of the parent, 400 pixels, x position 20% of the parent, etc. + */ static wxRect AdjustAvailableSpace(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& parentAttr, const wxRichTextAttr& childAttr, const wxRect& availableParentSpace); protected: @@ -1940,25 +2484,31 @@ protected: bool m_show; wxRichTextObject* m_parent; - /// The range of this object (start position to end position) + // The range of this object (start position to end position) wxRichTextRange m_range; - /// The internal range of this object, if it's a top-level object with its own range space + // The internal range of this object, if it's a top-level object with its own range space wxRichTextRange m_ownRange; - /// Attributes + // Attributes wxRichTextAttr m_attributes; - /// Properties + // Properties wxRichTextProperties m_properties; }; WX_DECLARE_LIST_WITH_DECL( wxRichTextObject, wxRichTextObjectList, class WXDLLIMPEXP_RICHTEXT ); -/*! - * wxRichTextCompositeObject class declaration - * Objects of this class can contain other objects. - */ +/** + @class wxRichTextCompositeObject + + Objects of this class can contain other objects. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextObject, wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextCompositeObject: public wxRichTextObject { @@ -2048,10 +2598,16 @@ protected: wxRichTextObjectList m_children; }; -/*! - * wxRichTextParagraphBox class declaration - * This box knows how to lay out paragraphs. - */ +/** + @class wxRichTextParagraphBox + + This class knows how to lay out paragraphs. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextCompositeObject, wxRichTextObject, wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraphLayoutBox: public wxRichTextCompositeObject { @@ -2373,8 +2929,13 @@ protected: /** @class wxRichTextBox - wxRichTextBox is a floating or inline text box, containing paragraphs. - */ + This class implements a floating or inline text box, containing paragraphs. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextParagraphLayoutBox, wxRichTextObject, wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextBox: public wxRichTextParagraphLayoutBox { @@ -2434,12 +2995,18 @@ public: protected: }; -/*! - * wxRichTextLine class declaration - * This object represents a line in a paragraph, and stores - * offsets from the start of the paragraph representing the - * start and end positions of the line. - */ +/** + @class wxRichTextLine + + This object represents a line in a paragraph, and stores + offsets from the start of the paragraph representing the + start and end positions of the line. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextLine { @@ -2525,10 +3092,16 @@ protected: WX_DECLARE_LIST_WITH_DECL( wxRichTextLine, wxRichTextLineList , class WXDLLIMPEXP_RICHTEXT ); -/*! - * wxRichTextParagraph class declaration - * This object represents a single paragraph (or in a straight text editor, a line). - */ +/** + @class wxRichTextParagraph + + This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph: public wxRichTextCompositeObject { @@ -2652,10 +3225,16 @@ protected: friend class wxRichTextFloatCollector; }; -/*! - * wxRichTextPlainText class declaration - * This object represents a single piece of text. - */ +/** + @class wxRichTextPlainText + + This object represents a single piece of text. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextPlainText: public wxRichTextObject { @@ -2750,12 +3329,16 @@ protected: wxString m_text; }; -/*! - * wxRichTextImageBlock stores information about an image, in binary in-memory form - */ +/** + @class wxRichTextImageBlock -class WXDLLIMPEXP_FWD_BASE wxDataInputStream; -class WXDLLIMPEXP_FWD_BASE wxDataOutputStream; + This class stores information about an image, in binary in-memory form. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextImageBlock: public wxObject { @@ -2839,10 +3422,16 @@ protected: wxBitmapType m_imageType; }; -/*! - * wxRichTextImage class declaration - * This object represents an image. - */ +/** + @class wxRichTextImage + + This class implements a graphic object. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl, wxRichTextImageBlock +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextImage: public wxRichTextObject { @@ -2937,15 +3526,20 @@ protected: wxBitmap m_imageCache; }; - -/*! - * wxRichTextBuffer class declaration - * This is a kind of box, used to represent the whole buffer - */ - class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextCommand; class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextAction; +/** + @class wxRichTextBuffer + + This is a kind of paragraph layout box, used to represent the whole buffer. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextParagraphLayoutBox, wxRichTextCtrl +*/ + class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer: public wxRichTextParagraphLayoutBox { DECLARE_DYNAMIC_CLASS(wxRichTextBuffer) @@ -3584,13 +4178,19 @@ enum wxRichTextCommandId wxRICHTEXT_CHANGE_OBJECT }; -/*! - * A class for specifying an object anywhere in an object hierarchy, - * without using a pointer, necessary since wxRTC commands may delete - * and recreate sub-objects so physical object addresses change. An array - * of positions (one per hierarchy level) is used. - * - */ +/** + @class wxRichTextObjectAddress + + A class for specifying an object anywhere in an object hierarchy, + without using a pointer, necessary since wxRTC commands may delete + and recreate sub-objects so physical object addresses change. An array + of positions (one per hierarchy level) is used. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextCommand +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextObjectAddress { @@ -3616,12 +4216,20 @@ protected: wxArrayInt m_address; }; -/*! - * Command classes for undo/redo - * - */ - class WXDLLIMPEXP_FWD_RICHTEXT wxRichTextAction; + +/** + @class wxRichTextCommand + + Implements a command on the undo/redo stack. A wxRichTextCommand object contains one or more wxRichTextAction + objects, allowing aggregation of a number of operations into one command. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextAction +*/ + class WXDLLIMPEXP_RICHTEXT wxRichTextCommand: public wxCommand { public: @@ -3647,10 +4255,16 @@ protected: wxList m_actions; }; -/*! - * wxRichTextAction class declaration - * There can be more than one action in a command. - */ +/** + @class wxRichTextAction + + Implements a part of a command. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextCommand +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextAction: public wxObject { @@ -3779,10 +4393,16 @@ protected: // in a larger document #define wxRICHTEXT_HANDLER_CONVERT_FACENAMES 0x0100 -/*! - * wxRichTextFileHandler - * Base class for file handlers - */ +/** + @class wxRichTextFileHandler + + The base class for file handlers. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextFileHandler: public wxObject { @@ -3852,10 +4472,16 @@ protected: bool m_visible; }; -/*! - * wxRichTextPlainTextHandler - * Plain text handler - */ +/** + @class wxRichTextPlainTextHandler + + Implements saving a buffer to plain text. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextFileHandler, wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextPlainTextHandler: public wxRichTextFileHandler { @@ -3884,9 +4510,16 @@ protected: #if wxUSE_DATAOBJ -/*! - * The data object for a wxRichTextBuffer - */ +/** + @class wxRichTextBufferDataObject + + Implements a rich text data object for clipboard transfer. + + @library{wxrichtext} + @category{richtext} + + @see wxDataObjectSimple, wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextBufferDataObject: public wxDataObjectSimple { @@ -3924,9 +4557,16 @@ private: #endif -/*! - * wxRichTextRenderer isolates common drawing functionality - */ +/** + @class wxRichTextRenderer + + This class isolates some common drawing functionality. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextRenderer: public wxObject { @@ -3947,9 +4587,16 @@ public: virtual bool EnumerateStandardBulletNames(wxArrayString& bulletNames) = 0; }; -/*! - * wxRichTextStdRenderer: standard renderer - */ +/** + @class wxRichTextStdRenderer + + The standard renderer for drawing bullets. + + @library{wxrichtext} + @category{richtext} + + @see wxRichTextRenderer, wxRichTextBuffer, wxRichTextCtrl +*/ class WXDLLIMPEXP_RICHTEXT wxRichTextStdRenderer: public wxRichTextRenderer {