| Version: 3.2.8

Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
wxRichTextParagraph Class Reference
Class List by Category » Rich Text

`#include <wx/richtext/richtextbuffer.h>`

Inheritance diagram for wxRichTextParagraph:
[legend]

## Detailed Description

This object represents a single paragraph containing various objects such as text content, images, and further paragraph layout objects.

##

Library: wxRichText
Category: Rich Text

See also
  wxRichTextBuffer, wxRichTextCtrl

## Public Member Functions
| wxRichTextParagraph (wxRichTextObject *parent=NULL, wxRichTextAttr *style=NULL)
| Constructor taking a parent and style. More...
| wxRichTextParagraph (const wxString &text, wxRichTextObject *parent=NULL, wxRichTextAttr *paraStyle=NULL, wxRichTextAttr *charStyle=NULL)
| Constructor taking a text string, a parent and paragraph and character attributes. More...
virtual | ~wxRichTextParagraph ()
| wxRichTextParagraph (const wxRichTextParagraph &obj)
void | Init ()
virtual bool | Draw (wxDC &dc, wxRichTextDrawingContext &context, const wxRichTextRange &range, const wxRichTextSelection &selection, const wxRect &rect, int descent, int style)
| Draw the item, within the given range. More...
virtual bool | Layout (wxDC &dc, wxRichTextDrawingContext &context, const wxRect &rect, const wxRect &parentRect, int style)
| Lay the item out at the specified position with the given size constraint. More...
virtual bool | GetRangeSize (const wxRichTextRange &range, wxSize &size, int &descent, wxDC &dc, wxRichTextDrawingContext &context, int flags, const wxPoint &position=wxPoint(0, 0), const wxSize &parentSize=wxDefaultSize, wxArrayInt *partialExtents=NULL) const
| Returns the object size for the given range. More...
virtual bool | FindPosition (wxDC &dc, wxRichTextDrawingContext &context, long index, wxPoint &pt, int *height, bool forceLineStart)
| Finds the absolute position and row height for the given character position. More...
virtual int | HitTest (wxDC &dc, wxRichTextDrawingContext &context, const wxPoint &pt, long &textPosition, wxRichTextObject **obj, wxRichTextObject **contextObj, int flags=0)
| Hit-testing: returns a flag indicating hit test details, plus information about position. More...
virtual void | CalculateRange (long start, long &end)
| Calculates the range of the object. More...
virtual wxString | GetXMLNodeName () const
| Returns the XML node name of this object. More...
const wxRichTextLineVector & | GetLines () const
| Returns the cached lines. More...
void | Copy (const wxRichTextParagraph &obj)
| Copies the object. More...
virtual wxRichTextObject * | Clone () const
| Clones the object. More...
void | ClearLines ()
| Clears the cached lines. More...
virtual void | ApplyParagraphStyle (wxRichTextLine *line, const wxRichTextAttr &attr, const wxRect &rect, wxDC &dc)
| Applies paragraph styles such as centering to the wrapped lines. More...
virtual bool | InsertText (long pos, const wxString &text)
| Inserts text at the given position. More...
virtual wxRichTextObject * | SplitAt (long pos, wxRichTextObject **previousObject=NULL)
| Splits an object at this position if necessary, and returns the previous object, or NULL if inserting at the beginning. More...
virtual void | MoveToList (wxRichTextObject *obj, wxList &list)
| Moves content to a list from this point. More...
virtual void | MoveFromList (wxList &list)
| Adds content back from a list. More...
bool | GetContiguousPlainText (wxString &text, const wxRichTextRange &range, bool fromStart=true)
| Returns the plain text searching from the start or end of the range. More...
bool | FindWrapPosition (const wxRichTextRange &range, wxDC &dc, wxRichTextDrawingContext &context, int availableSpace, long &wrapPosition, wxArrayInt *partialExtents)
| Finds a suitable wrap position. More...
wxRichTextObject * | FindObjectAtPosition (long position)
| Finds the object at the given position. More...
wxString | GetBulletText ()
| Returns the bullet text for this paragraph. More...
wxRichTextLine * | AllocateLine (int pos)
| Allocates or reuses a line object. More...
bool | ClearUnusedLines (int lineCount)
| Clears remaining unused line objects, if any. More...
wxRichTextAttr | GetCombinedAttributes (const wxRichTextAttr &contentStyle, bool includingBoxAttr=false) const
| Returns combined attributes of the base style, paragraph style and character style. More...
wxRichTextAttr | GetCombinedAttributes (bool includingBoxAttr=false) const
| Returns the combined attributes of the base style and paragraph style. More...
long | GetFirstLineBreakPosition (long pos)
| Returns the first position from pos that has a line break character. More...
void | LayoutFloat (wxDC &dc, wxRichTextDrawingContext &context, const wxRect &rect, const wxRect &parentRect, int style, wxRichTextFloatCollector *floatCollector)
| Lays out the floating objects. More...
int | GetImpactedByFloatingObjects () const
| Whether the paragraph is impacted by floating objects from above. More...
void | SetImpactedByFloatingObjects (int i)
| Sets whether the paragraph is impacted by floating objects from above. More...
Public Member Functions inherited from wxRichTextCompositeObject
| wxRichTextCompositeObject (wxRichTextObject *parent=NULL)
virtual | ~wxRichTextCompositeObject ()
virtual bool | DeleteRange (const wxRichTextRange &range)
| Deletes the given range. More...
virtual wxString | GetTextForRange (const wxRichTextRange &range) const
| Returns any text in this object for the given range. More...
virtual void | Dump (wxTextOutputStream &stream)
| Dump object data to the given output stream for debugging. More...
virtual void | Invalidate (const wxRichTextRange &invalidRange=wxRICHTEXT_ALL)
| Invalidates the object at the given range. More...
wxRichTextObjectList & | GetChildren ()
| Returns the children. More...
const wxRichTextObjectList & | GetChildren () const
| Returns the children. More...
size_t | GetChildCount () const
| Returns the number of children. More...
wxRichTextObject * | GetChild (size_t n) const
| Returns the nth child. More...
virtual bool | IsComposite () const
| Returns true if this object is composite. More...
virtual bool | IsAtomic () const
| Returns true if no user editing can be done inside the object. More...
virtual bool | IsEmpty () const
| Returns true if the buffer is empty. More...
virtual wxRichTextObject * | GetChildAtPosition (long pos) const
| Returns the child object at the given character position. More...
void | Copy (const wxRichTextCompositeObject &obj)
void | operator= (const wxRichTextCompositeObject &obj)
size_t | AppendChild (wxRichTextObject *child)
| Appends a child, returning the position. More...
bool | InsertChild (wxRichTextObject *child, wxRichTextObject *inFrontOf)
| Inserts the child in front of the given object, or at the beginning. More...
bool | RemoveChild (wxRichTextObject *child, bool deleteChild=false)
| Removes and optionally deletes the specified child. More...
bool | DeleteChildren ()
| Deletes all the children. More...
bool | Defragment (wxRichTextDrawingContext &context, const wxRichTextRange &range=wxRICHTEXT_ALL)
| Recursively merges all pieces that can be merged. More...
virtual void | Move (const wxPoint &pt)
| Moves the object recursively, by adding the offset from old to new. More...
Public Member Functions inherited from wxRichTextObject
| wxRichTextObject (wxRichTextObject *parent=NULL)
| Constructor, taking an optional parent pointer. More...
virtual | ~wxRichTextObject ()
virtual wxSize | GetBestSize () const
| Returns the best size, i.e. the ideal starting size for this object irrespective of available space. More...
virtual wxRichTextObject * | DoSplit (long pos)
| Do a split from pos, returning an object containing the second part, and setting the first part in 'this'. More...
virtual bool | IsFloatable () const
| Returns true if this class of object is floatable. More...
virtual bool | IsFloating () const
| Returns true if this object is currently floating. More...
virtual int | GetFloatDirection () const
| Returns the floating direction. More...
virtual bool | CanMerge (wxRichTextObject *object, wxRichTextDrawingContext &context) const
| Returns true if this object can merge itself with the given one. More...
virtual bool | Merge (wxRichTextObject *object, wxRichTextDrawingContext &context)
| Returns true if this object merged itself with the given one. More...
virtual bool | CanSplit (wxRichTextDrawingContext &context) const
| Returns true if this object can potentially be split, by virtue of having different virtual attributes for individual sub-objects. More...
virtual wxRichTextObject * | Split (wxRichTextDrawingContext &context)
| Returns the final object in the split objects if this object was split due to differences between sub-object virtual attributes. More...
virtual bool | CanEditProperties () const
| Returns true if we can edit the object's properties via a GUI. More...
virtual bool | EditProperties (wxWindow *parent, wxRichTextBuffer *buffer)
| Edits the object's properties via a GUI. More...
virtual wxString | GetPropertiesMenuLabel () const
| Returns the label to be used for the properties context menu item. More...
virtual bool | AcceptsFocus () const
| Returns true if objects of this class can accept the focus, i.e. a call to SetFocusObject is possible. More...
virtual bool | ImportFromXML (wxRichTextBuffer *buffer, wxXmlNode *node, wxRichTextXMLHandler *handler, bool *recurse)
| Imports this object from XML. More...
virtual bool | UsesParagraphAttributes () const
| Returns true if this object takes note of paragraph attributes (text and image objects don't). More...
virtual bool | HandlesChildSelections () const
| Returns true if this object can handle the selections of its children, fOr example a table. More...
virtual wxRichTextSelection | GetSelection (long start, long end) const
| Returns a selection object specifying the selections between start and end character positions. More...
virtual wxSize | GetCachedSize () const
| Gets the cached object size as calculated by Layout. More...
virtual void | SetCachedSize (const wxSize &sz)
| Sets the cached object size as calculated by Layout. More...
virtual wxSize | GetMaxSize () const
| Gets the maximum object size as calculated by Layout. More...
virtual void | SetMaxSize (const wxSize &sz)
| Sets the maximum object size as calculated by Layout. More...
virtual wxSize | GetMinSize () const
| Gets the minimum object size as calculated by Layout. More...
virtual void | SetMinSize (const wxSize &sz)
| Sets the minimum object size as calculated by Layout. More...
virtual wxTextAttrSize | GetNaturalSize () const
| Gets the 'natural' size for an object. More...
virtual wxPoint | GetPosition () const
| Returns the object position in pixels. More...
virtual void | SetPosition (const wxPoint &pos)
| Sets the object position in pixels. More...
virtual wxPoint | GetAbsolutePosition () const
| Returns the absolute object position, by traversing up the child/parent hierarchy. More...
virtual wxRect | GetRect () const
| Returns the rectangle enclosing the object. More...
void | SetRange (const wxRichTextRange &range)
| Sets the object's range within its container. More...
const wxRichTextRange & | GetRange () const
| Returns the object's range. More...
wxRichTextRange & | GetRange ()
| Returns the object's range. More...
void | SetOwnRange (const wxRichTextRange &range)
| Set the object's own range, for a top-level object with its own position space. More...
const wxRichTextRange & | GetOwnRange () const
| Returns the object's own range (valid if top-level). More...
wxRichTextRange & | GetOwnRange ()
| Returns the object's own range (valid if top-level). More...
wxRichTextRange | GetOwnRangeIfTopLevel () const
| Returns the object's own range only if a top-level object. More...
virtual wxRichTextObject * | GetParent () const
| Returns a pointer to the parent object. More...
virtual void | SetParent (wxRichTextObject *parent)
| Sets the pointer to the parent object. More...
virtual wxRichTextParagraphLayoutBox * | GetContainer () const
| Returns the top-level container of this object. More...
virtual wxRichTextParagraphLayoutBox * | GetParentContainer () const
| Returns the top-level container of this object. More...
virtual void | SetMargins (int margin)
| Set the margin around the object, in pixels. More...
virtual void | SetMargins (int leftMargin, int rightMargin, int topMargin, int bottomMargin)
| Set the margin around the object, in pixels. More...
virtual int | GetLeftMargin () const
| Returns the left margin of the object, in pixels. More...
virtual int | GetRightMargin () const
| Returns the right margin of the object, in pixels. More...
virtual int | GetTopMargin () const
| Returns the top margin of the object, in pixels. More...
virtual int | GetBottomMargin () const
| Returns the bottom margin of the object, in pixels. More...
virtual wxRect | GetAvailableContentArea (wxDC &dc, wxRichTextDrawingContext &context, const wxRect &outerRect) const
| Calculates the available content space in the given rectangle, given the margins, border and padding specified in the object's attributes. More...
virtual bool | LayoutToBestSize (wxDC &dc, wxRichTextDrawingContext &context, wxRichTextBuffer *buffer, const wxRichTextAttr &parentAttr, const wxRichTextAttr &attr, const wxRect &availableParentSpace, const wxRect &availableContainerSpace, int style)
| 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. More...
virtual bool | AdjustAttributes (wxRichTextAttr &attr, wxRichTextDrawingContext &context)
| Adjusts the attributes for virtual attribute provision, collapsed borders, etc. More...
void | SetAttributes (const wxRichTextAttr &attr)
| Sets the object's attributes. More...
const wxRichTextAttr & | GetAttributes () const
| Returns the object's attributes. More...
wxRichTextAttr & | GetAttributes ()
| Returns the object's attributes. More...
wxRichTextProperties & | GetProperties ()
| Returns the object's properties. More...
const wxRichTextProperties & | GetProperties () const
| Returns the object's properties. More...
void | SetProperties (const wxRichTextProperties &props)
| Sets the object's properties. More...
void | SetDescent (int descent)
| Sets the stored descent value. More...
int | GetDescent () const
| Returns the stored descent value. More...
wxRichTextBuffer * | GetBuffer () const
| Returns the containing buffer. More...
void | SetName (const wxString &name)
| Sets the identifying name for this object as a property using the "name" key. More...
wxString | GetName () const
| Returns the identifying name for this object from the properties, using the "name" key. More...
virtual bool | IsTopLevel () const
| Returns true if this object is top-level, i.e. contains its own paragraphs, such as a text box. More...
bool | IsShown () const
| Returns true if the object will be shown, false otherwise. More...
virtual void | Show (bool show)
| Call to show or hide this object. More...
void | Copy (const wxRichTextObject &obj)
| Copies the object. More...
void | Reference ()
| Reference-counting allows us to use the same object in multiple lists (not yet used). More...
void | Dereference ()
| Reference-counting allows us to use the same object in multiple lists (not yet used). More...
int | ConvertTenthsMMToPixels (wxDC &dc, int units) const
| Converts units in tenths of a millimetre to device units. More...
int | ConvertPixelsToTenthsMM (wxDC &dc, int pixels) const
| Convert units in pixels to tenths of a millimetre. More...
Public Member Functions inherited from wxObject
| wxObject ()
| Default ctor; initializes to NULL the internal reference data. More...
| wxObject (const wxObject &other)
| Copy ctor. More...
virtual | ~wxObject ()
| Destructor. More...
virtual wxClassInfo * | GetClassInfo () const
| This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). More...
wxObjectRefData * | GetRefData () const
| Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. More...
bool | IsKindOf (const wxClassInfo *info) const
| Determines whether this class is a subclass of (or the same class as) the given class. More...
bool | IsSameAs (const wxObject &obj) const
| Returns true if this object has the same data pointer as obj. More...
void | Ref (const wxObject &clone)
| Makes this object refer to the data in clone. More...
void | SetRefData (wxObjectRefData *data)
| Sets the wxObject::m_refData pointer. More...
void | UnRef ()
| Decrements the reference count in the associated data, and if it is zero, deletes the data. More...
void | UnShare ()
| This is the same of AllocExclusive() but this method is public. More...
void | operator delete (void *buf)
| The delete operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined. More...
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
| The new operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined. More...

## Static Public Member Functions
static void | InitDefaultTabs ()
| Creates a default tabstop array. More...
static void | ClearDefaultTabs ()
| Clears the default tabstop array. More...
static const wxArrayInt & | GetDefaultTabs ()
| Returns the default tabstop array. More...
Static Public Member Functions inherited from wxRichTextObject
static int | ConvertTenthsMMToPixels (int ppi, int units, double scale=1.0)
| Converts units in tenths of a millimetre to device units. More...
static int | ConvertPixelsToTenthsMM (int ppi, int pixels, double scale=1.0)
| Convert units in pixels to tenths of a millimetre. More...
static bool | DrawBoxAttributes (wxDC &dc, wxRichTextBuffer *buffer, const wxRichTextAttr &attr, const wxRect &boxRect, int flags=0, wxRichTextObject *obj=NULL)
| Draws the borders and background for the given rectangle and attributes. More...
static bool | DrawBorder (wxDC &dc, wxRichTextBuffer *buffer, const wxRichTextAttr &attr, const wxTextAttrBorders &borders, const wxRect &rect, int flags=0)
| Draws a border. More...
static bool | GetBoxRects (wxDC &dc, wxRichTextBuffer *buffer, const wxRichTextAttr &attr, wxRect &marginRect, wxRect &borderRect, wxRect &contentRect, wxRect &paddingRect, wxRect &outlineRect)
| Returns the various rectangles of the box model in pixels. More...
static bool | GetTotalMargin (wxDC &dc, wxRichTextBuffer *buffer, const wxRichTextAttr &attr, int &leftMargin, int &rightMargin, int &topMargin, int &bottomMargin)
| Returns the total margin for the object in pixels, taking into account margin, padding and border size. More...
static wxRect | AdjustAvailableSpace (wxDC &dc, wxRichTextBuffer *buffer, const wxRichTextAttr &parentAttr, const wxRichTextAttr &childAttr, const wxRect &availableParentSpace, const wxRect &availableContainerSpace)
| Returns the rectangle which the child has available to it given restrictions specified in the child attribute, e.g. More...

## Protected Attributes
wxRichTextLineVector | m_cachedLines
int | m_impactedByFloatingObjects
Protected Attributes inherited from wxRichTextCompositeObject
wxRichTextObjectList | m_children
Protected Attributes inherited from wxRichTextObject
wxSize | m_size
wxSize | m_maxSize
wxSize | m_minSize
wxPoint | m_pos
int | m_descent
int | m_refCount
bool | m_show
wxRichTextObject * | m_parent
wxRichTextRange | m_range
wxRichTextRange | m_ownRange
wxRichTextAttr | m_attributes
wxRichTextProperties | m_properties
Protected Attributes inherited from wxObject
wxObjectRefData * | m_refData
| Pointer to an object which is the object's reference-counted data. More...

## Static Protected Attributes
static wxArrayInt | sm_defaultTabs

## Friends
class | wxRichTextFloatCollector

## Additional Inherited Members
Protected Member Functions inherited from wxObject
void | AllocExclusive ()
| Ensure that this object's data is not shared with any other object. More...
virtual wxObjectRefData * | CreateRefData () const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. More...
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. More...

## Constructor & Destructor Documentation

## ◆ wxRichTextParagraph() [1/3]

wxRichTextParagraph::wxRichTextParagraph | ( | wxRichTextObject * | parent = `NULL`,
|  | wxRichTextAttr * | style = `NULL`
| ) |  |

Constructor taking a parent and style.

## ◆ wxRichTextParagraph() [2/3]

wxRichTextParagraph::wxRichTextParagraph | ( | const wxString & | text,
|  | wxRichTextObject * | parent = `NULL`,
|  | wxRichTextAttr * | paraStyle = `NULL`,
|  | wxRichTextAttr * | charStyle = `NULL`
| ) |  |

Constructor taking a text string, a parent and paragraph and character attributes.

## ◆ ~wxRichTextParagraph()

virtual wxRichTextParagraph::~wxRichTextParagraph | ( |  | ) |
| virtual

## ◆ wxRichTextParagraph() [3/3]

wxRichTextParagraph::wxRichTextParagraph | ( | const wxRichTextParagraph & | obj | ) |
| inline

## Member Function Documentation

## ◆ AllocateLine()

wxRichTextLine* wxRichTextParagraph::AllocateLine | ( | int | pos | ) |

Allocates or reuses a line object.

## ◆ ApplyParagraphStyle()

virtual void wxRichTextParagraph::ApplyParagraphStyle | ( | wxRichTextLine * | line,
|  | const wxRichTextAttr & | attr,
|  | const wxRect & | rect,
|  | wxDC & | dc
| ) |  |
| virtual

Applies paragraph styles such as centering to the wrapped lines.

## ◆ CalculateRange()

virtual void wxRichTextParagraph::CalculateRange | ( | long | start,
|  | long & | end
| ) |  |
| virtual

Calculates the range of the object.

By default, guess that the object is 1 unit long.

Reimplemented from wxRichTextCompositeObject.

## ◆ ClearDefaultTabs()

static void wxRichTextParagraph::ClearDefaultTabs | ( |  | ) |
| static

Clears the default tabstop array.

## ◆ ClearLines()

void wxRichTextParagraph::ClearLines | ( |  | ) |

Clears the cached lines.

## ◆ ClearUnusedLines()

bool wxRichTextParagraph::ClearUnusedLines | ( | int | lineCount | ) |

Clears remaining unused line objects, if any.

## ◆ Clone()

virtual wxRichTextObject* wxRichTextParagraph::Clone | ( |  | ) | const
| inline virtual

Clones the object.

Reimplemented from wxRichTextObject.

## ◆ Copy()

void wxRichTextParagraph::Copy | ( | const wxRichTextParagraph & | obj | ) |

Copies the object.

## ◆ Draw()

virtual bool wxRichTextParagraph::Draw | ( | wxDC & | dc,
|  | wxRichTextDrawingContext & | context,
|  | const wxRichTextRange & | range,
|  | const wxRichTextSelection & | selection,
|  | const wxRect & | rect,
|  | int | descent,
|  | int | style
| ) |  |
| virtual

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)

Implements wxRichTextObject.

## ◆ FindObjectAtPosition()

wxRichTextObject* wxRichTextParagraph::FindObjectAtPosition | ( | long | position | ) |

Finds the object at the given position.

## ◆ FindPosition()

virtual bool wxRichTextParagraph::FindPosition | ( | wxDC & | dc,
|  | wxRichTextDrawingContext & | context,
|  | long | index,
|  | wxPoint & | pt,
|  | int * | height,
|  | bool | forceLineStart
| ) |  |
| virtual

Finds the absolute position and row height for the given character position.

Reimplemented from wxRichTextCompositeObject.

## ◆ FindWrapPosition()

bool wxRichTextParagraph::FindWrapPosition | ( | const wxRichTextRange & | range,
|  | wxDC & | dc,
|  | wxRichTextDrawingContext & | context,
|  | int | availableSpace,
|  | long & | wrapPosition,
|  | wxArrayInt * | partialExtents
| ) |  |

Finds a suitable wrap position.

wrapPosition is the last position in the line to the left of the split.

## ◆ GetBulletText()

wxString wxRichTextParagraph::GetBulletText | ( |  | ) |

Returns the bullet text for this paragraph.

## ◆ GetCombinedAttributes() [1/2]

wxRichTextAttr wxRichTextParagraph::GetCombinedAttributes | ( | bool | includingBoxAttr = `false` | ) | const

Returns the combined attributes of the base style and paragraph style.

## ◆ GetCombinedAttributes() [2/2]

wxRichTextAttr wxRichTextParagraph::GetCombinedAttributes | ( | const wxRichTextAttr & | contentStyle,
|  | bool | includingBoxAttr = `false`
| ) |  | const

Returns combined attributes of the base style, paragraph style and character style.

We use this to dynamically retrieve the actual style.

## ◆ GetContiguousPlainText()

bool wxRichTextParagraph::GetContiguousPlainText | ( | wxString & | text,
|  | const wxRichTextRange & | range,
|  | bool | fromStart = `true`
| ) |  |

Returns the plain text searching from the start or end of the range.

The resulting string may be shorter than the range given.

## ◆ GetDefaultTabs()

static const wxArrayInt& wxRichTextParagraph::GetDefaultTabs | ( |  | ) |
| inline static

Returns the default tabstop array.

## ◆ GetFirstLineBreakPosition()

long wxRichTextParagraph::GetFirstLineBreakPosition | ( | long | pos | ) |

Returns the first position from pos that has a line break character.

## ◆ GetImpactedByFloatingObjects()

int wxRichTextParagraph::GetImpactedByFloatingObjects | ( |  | ) | const
| inline

Whether the paragraph is impacted by floating objects from above.

## ◆ GetLines()

const wxRichTextLineVector& wxRichTextParagraph::GetLines | ( |  | ) | const
| inline

Returns the cached lines.

## ◆ GetRangeSize()

virtual bool wxRichTextParagraph::GetRangeSize | ( | const wxRichTextRange & | range,
|  | wxSize & | size,
|  | int & | descent,
|  | wxDC & | dc,
|  | wxRichTextDrawingContext & | context,
|  | int | flags,
|  | const wxPoint & | position = `wxPoint(0, 0)`,
|  | const wxSize & | parentSize = `wxDefaultSize`,
|  | wxArrayInt * | partialExtents = `NULL`
| ) |  | const
| virtual

Returns the object size for the given range.

Returns false if the range is invalid for this object.

Reimplemented from wxRichTextCompositeObject.

## ◆ GetXMLNodeName()

virtual wxString wxRichTextParagraph::GetXMLNodeName | ( |  | ) | const
| inline virtual

Returns the XML node name of this object.

This must be overridden for wxXmlNode-base XML export to work.

Reimplemented from wxRichTextObject.

## ◆ HitTest()

virtual int wxRichTextParagraph::HitTest | ( | wxDC & | dc,
|  | wxRichTextDrawingContext & | context,
|  | const wxPoint & | pt,
|  | long & | textPosition,
|  | wxRichTextObject ** | obj,
|  | wxRichTextObject ** | contextObj,
|  | int | flags = `0`
| ) |  |
| virtual

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 might not be 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.

The function puts the position in textPosition if one is found. pt is in logical units (a zero y position is at the beginning of the buffer).

Returns
  One of the wxRichTextHitTestFlags values.

Reimplemented from wxRichTextCompositeObject.

## ◆ Init()

void wxRichTextParagraph::Init | ( |  | ) |

## ◆ InitDefaultTabs()

static void wxRichTextParagraph::InitDefaultTabs | ( |  | ) |
| static

Creates a default tabstop array.

## ◆ InsertText()

virtual bool wxRichTextParagraph::InsertText | ( | long | pos,
|  | const wxString & | text
| ) |  |
| virtual

Inserts text at the given position.

## ◆ Layout()

virtual bool wxRichTextParagraph::Layout | ( | wxDC & | dc,
|  | wxRichTextDrawingContext & | context,
|  | const wxRect & | rect,
|  | const wxRect & | parentRect,
|  | int | style
| ) |  |
| virtual

Lay the item out at the specified position with the given size constraint.

Layout must set the cached size. rect is the available space for the object, and parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box).

Implements wxRichTextObject.

## ◆ LayoutFloat()

void wxRichTextParagraph::LayoutFloat | ( | wxDC & | dc,
|  | wxRichTextDrawingContext & | context,
|  | const wxRect & | rect,
|  | const wxRect & | parentRect,
|  | int | style,
|  | wxRichTextFloatCollector * | floatCollector
| ) |  |

Lays out the floating objects.

## ◆ MoveFromList()

virtual void wxRichTextParagraph::MoveFromList | ( | wxList & | list | ) |
| virtual

Adds content back from a list.

## ◆ MoveToList()

virtual void wxRichTextParagraph::MoveToList | ( | wxRichTextObject * | obj,
|  | wxList & | list
| ) |  |
| virtual

Moves content to a list from this point.

## ◆ SetImpactedByFloatingObjects()

void wxRichTextParagraph::SetImpactedByFloatingObjects | ( | int | i | ) |
| inline

Sets whether the paragraph is impacted by floating objects from above.

## ◆ SplitAt()

virtual wxRichTextObject* wxRichTextParagraph::SplitAt | ( | long | pos,
|  | wxRichTextObject ** | previousObject = `NULL`
| ) |  |
| virtual

Splits an object at this position if necessary, and returns the previous object, or NULL if inserting at the beginning.

## Friends And Related Function Documentation

## ◆ wxRichTextFloatCollector

friend class wxRichTextFloatCollector
| friend

## Member Data Documentation

## ◆ m_cachedLines

wxRichTextLineVector wxRichTextParagraph::m_cachedLines
| protected

## ◆ m_impactedByFloatingObjects

int wxRichTextParagraph::m_impactedByFloatingObjects
| protected

## ◆ sm_defaultTabs

wxArrayInt wxRichTextParagraph::sm_defaultTabs
| static protected