LibreOffice Module vcl (master) 1
Public Member Functions | Public Attributes | List of all members
vcl::ControlLayoutData Struct Reference

#include <ctrl.hxx>

Inheritance diagram for vcl::ControlLayoutData:
Collaboration diagram for vcl::ControlLayoutData:

Public Member Functions

 ControlLayoutData ()
 ~ControlLayoutData ()
tools::Rectangle GetCharacterBounds (tools::Long nIndex) const
tools::Long GetIndexForPoint (const Point &rPoint) const
tools::Long GetLineCount () const
::Pair GetLineStartEnd (tools::Long nLine) const
tools::Long ToRelativeLineIndex (tools::Long nIndex) const
 ToRelativeLineIndex changes a layout data index to a count relative to its line. More...

Public Attributes

OUString m_aDisplayText
std::vector< tools::Rectanglem_aUnicodeBoundRects
std::vector< tools::Longm_aLineIndices
VclPtr< const Controlm_pParent

Detailed Description

Definition at line 38 of file ctrl.hxx.

Constructor & Destructor Documentation

◆ ControlLayoutData()

ControlLayoutData::ControlLayoutData ( )

Definition at line 102 of file ctrl.cxx.

◆ ~ControlLayoutData()

ControlLayoutData::~ControlLayoutData ( )

Definition at line 364 of file ctrl.cxx.

References Control::ImplClearLayoutData(), and m_pParent.

Member Function Documentation

◆ GetCharacterBounds()

tools::Rectangle ControlLayoutData::GetCharacterBounds ( tools::Long  nIndex) const

Definition at line 106 of file ctrl.cxx.

References m_aUnicodeBoundRects, o3tl::make_unsigned(), and nIndex.

◆ GetIndexForPoint()

tools::Long ControlLayoutData::GetIndexForPoint ( const Point &  rPoint) const

Definition at line 118 of file ctrl.cxx.

References i, m_aUnicodeBoundRects, nIndex, and Point.

◆ GetLineCount()

tools::Long ControlLayoutData::GetLineCount ( ) const

Definition at line 142 of file ctrl.cxx.

References m_aDisplayText, and m_aLineIndices.

◆ GetLineStartEnd()

Pair ControlLayoutData::GetLineStartEnd ( tools::Long  nLine) const

Definition at line 150 of file ctrl.cxx.

References Pair::A(), Pair::B(), m_aDisplayText, and m_aLineIndices.

◆ ToRelativeLineIndex()

tools::Long ControlLayoutData::ToRelativeLineIndex ( tools::Long  nIndex) const

ToRelativeLineIndex changes a layout data index to a count relative to its line.

This is equivalent to getting the line start/end pairs with GetLineStartEnd until the index lies within [start,end] of a line

nIndexthe absolute index inside the display text to be changed to a relative index
the relative index inside the displayed line or -1 if the absolute index does not match any line

Definition at line 180 of file ctrl.cxx.

References m_aDisplayText, m_aLineIndices, and nIndex.

Member Data Documentation

◆ m_aDisplayText

OUString vcl::ControlLayoutData::m_aDisplayText

Definition at line 43 of file ctrl.hxx.

Referenced by GetLineCount(), GetLineStartEnd(), and ToRelativeLineIndex().

◆ m_aLineIndices

std::vector< tools::Long > vcl::ControlLayoutData::m_aLineIndices

◆ m_aUnicodeBoundRects

std::vector< tools::Rectangle > vcl::ControlLayoutData::m_aUnicodeBoundRects

Definition at line 46 of file ctrl.hxx.

Referenced by GetCharacterBounds(), and GetIndexForPoint().

◆ m_pParent

VclPtr<const Control> vcl::ControlLayoutData::m_pParent

Definition at line 50 of file ctrl.hxx.

Referenced by ~ControlLayoutData().

The documentation for this struct was generated from the following files: