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:
[legend]
Collaboration diagram for vcl::ControlLayoutData:
[legend]

Public Member Functions

 ControlLayoutData ()
 
 ~ControlLayoutData ()
 
tools::Rectangle GetCharacterBounds (tools::Long nIndex) const
 
tools::Long GetIndexForPoint (const Point &rPoint) 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 104 of file ctrl.cxx.

◆ ~ControlLayoutData()

ControlLayoutData::~ControlLayoutData ( )

Definition at line 363 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 108 of file ctrl.cxx.

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

◆ GetIndexForPoint()

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

Definition at line 120 of file ctrl.cxx.

References i, m_aUnicodeBoundRects, nIndex, Point::X(), and Point::Y().

◆ GetLineStartEnd()

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

Definition at line 144 of file ctrl.cxx.

◆ 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

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

Definition at line 174 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 Calendar::ImplInitSettings(), and ToRelativeLineIndex().

◆ m_aLineIndices

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

Definition at line 48 of file ctrl.hxx.

Referenced by Calendar::ImplInitSettings(), and ToRelativeLineIndex().

◆ 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: