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

#include <controllayout.hxx>

Inheritance diagram for vcl::ControlLayoutData:
[legend]
Collaboration diagram for vcl::ControlLayoutData:
[legend]

Public Member Functions

 ControlLayoutData ()
 
 ~ControlLayoutData ()
 
tools::Rectangle GetCharacterBounds (long nIndex) const
 
long GetIndexForPoint (const Point &rPoint) const
 
long GetLineCount () const
 
::Pair GetLineStartEnd (long nLine) const
 
long ToRelativeLineIndex (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< long > m_aLineIndices
 
VclPtr< const Controlm_pParent
 

Detailed Description

Definition at line 32 of file controllayout.hxx.

Constructor & Destructor Documentation

ControlLayoutData::ControlLayoutData ( )

Definition at line 101 of file ctrl.cxx.

ControlLayoutData::~ControlLayoutData ( )

Definition at line 368 of file ctrl.cxx.

References Control::ImplClearLayoutData(), and m_pParent.

Member Function Documentation

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

Definition at line 105 of file ctrl.cxx.

References m_aUnicodeBoundRects.

long ControlLayoutData::GetIndexForPoint ( const Point rPoint) const

Definition at line 117 of file ctrl.cxx.

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

long ControlLayoutData::GetLineCount ( ) const

Definition at line 141 of file ctrl.cxx.

References m_aDisplayText, and m_aLineIndices.

Pair ControlLayoutData::GetLineStartEnd ( long  nLine) const

Definition at line 149 of file ctrl.cxx.

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

long ControlLayoutData::ToRelativeLineIndex ( 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 179 of file ctrl.cxx.

References m_aDisplayText, m_aLineIndices, and SAL_WARN_IF.

Member Data Documentation

OUString vcl::ControlLayoutData::m_aDisplayText

Definition at line 37 of file controllayout.hxx.

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

std::vector< long > vcl::ControlLayoutData::m_aLineIndices

Definition at line 42 of file controllayout.hxx.

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

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

Definition at line 40 of file controllayout.hxx.

Referenced by GetCharacterBounds(), and GetIndexForPoint().

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

Definition at line 44 of file controllayout.hxx.

Referenced by ~ControlLayoutData().


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