LibreOffice Module sdext (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sdext::presenter::PresenterTextView Class Reference

A simple text view that paints text onto a given canvas. More...

#include <PresenterTextView.hxx>

Public Member Functions

 PresenterTextView (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::rendering::XCanvas > &rxCanvas, const ::std::function< void(const css::awt::Rectangle &)> &rInvalidator)
 
void SetText (const css::uno::Reference< css::text::XText > &rxText)
 
void SetTextChangeBroadcaster (const ::std::function< void()> &rBroadcaster)
 
void SetLocation (const css::geometry::RealPoint2D &rLocation)
 
void SetSize (const css::geometry::RealSize2D &rSize)
 
double GetTotalTextHeight ()
 
void SetFont (const PresenterTheme::SharedFontDescriptor &rpFont)
 
void SetOffset (const double nLeft, const double nTop)
 
void MoveCaret (const sal_Int32 nDistance, const sal_Int16 nTextType)
 Move the caret forward or backward by character or by word. More...
 
void Paint (const css::awt::Rectangle &rUpdateBox)
 
const SharedPresenterTextCaretGetCaret () const
 
sal_Int32 GetParagraphCount () const
 
SharedPresenterTextParagraph GetParagraph (const sal_Int32 nParagraphIndex) const
 

Private Member Functions

void RequestFormat ()
 
void Format ()
 
css::awt::Rectangle GetCaretBounds (const sal_Int32 nParagraphIndex, const sal_Int32 nCharacterIndex) const
 

Private Attributes

css::uno::Reference< css::rendering::XCanvas > mxCanvas
 
css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator
 
css::uno::Reference< css::i18n::XScriptTypeDetector > mxScriptTypeDetector
 
css::geometry::RealPoint2D maLocation
 
css::geometry::RealSize2D maSize
 
PresenterTheme::SharedFontDescriptor mpFont
 
::std::vector< SharedPresenterTextParagraphmaParagraphs
 
SharedPresenterTextCaret mpCaret
 
double mnLeftOffset
 
double mnTopOffset
 
bool mbIsFormatPending
 
::std::function< void()> maTextChangeBroadcaster
 

Detailed Description

A simple text view that paints text onto a given canvas.

Definition at line 214 of file PresenterTextView.hxx.

Constructor & Destructor Documentation

sdext::presenter::PresenterTextView::PresenterTextView ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas,
const ::std::function< void(const css::awt::Rectangle &)> &  rInvalidator 
)

Member Function Documentation

void sdext::presenter::PresenterTextView::Format ( )
private

Definition at line 401 of file PresenterTextView.cxx.

References maSize, and mpFont.

const SharedPresenterTextCaret & sdext::presenter::PresenterTextView::GetCaret ( ) const

Definition at line 377 of file PresenterTextView.cxx.

awt::Rectangle sdext::presenter::PresenterTextView::GetCaretBounds ( const sal_Int32  nParagraphIndex,
const sal_Int32  nCharacterIndex 
) const
private

Definition at line 382 of file PresenterTextView.cxx.

SharedPresenterTextParagraph sdext::presenter::PresenterTextView::GetParagraph ( const sal_Int32  nParagraphIndex) const

Definition at line 421 of file PresenterTextView.cxx.

sal_Int32 sdext::presenter::PresenterTextView::GetParagraphCount ( ) const

Definition at line 416 of file PresenterTextView.cxx.

double sdext::presenter::PresenterTextView::GetTotalTextHeight ( )

Definition at line 163 of file PresenterTextView.cxx.

References Format, mpFont, and mxCanvas.

void sdext::presenter::PresenterTextView::MoveCaret ( const sal_Int32  nDistance,
const sal_Int16  nTextType 
)

Move the caret forward or backward by character or by word.

Parameters
nDistanceShould be either -1 or +1 to move caret backwards or forwards, respectively.
nTextTypeValid values are the css::accessibility::AccessibleTextType constants.

Definition at line 195 of file PresenterTextView.cxx.

void sdext::presenter::PresenterTextView::Paint ( const css::awt::Rectangle &  rUpdateBox)

Definition at line 277 of file PresenterTextView.cxx.

References Format, maLocation, maSize, mpFont, and mxCanvas.

void sdext::presenter::PresenterTextView::RequestFormat ( )
private

Definition at line 396 of file PresenterTextView.cxx.

void sdext::presenter::PresenterTextView::SetFont ( const PresenterTheme::SharedFontDescriptor rpFont)

Definition at line 178 of file PresenterTextView.cxx.

References mpFont.

void sdext::presenter::PresenterTextView::SetLocation ( const css::geometry::RealPoint2D &  rLocation)

Definition at line 145 of file PresenterTextView.cxx.

References maLocation.

void sdext::presenter::PresenterTextView::SetOffset ( const double  nLeft,
const double  nTop 
)

Definition at line 184 of file PresenterTextView.cxx.

References maLocation.

void sdext::presenter::PresenterTextView::SetSize ( const css::geometry::RealSize2D &  rSize)

Definition at line 157 of file PresenterTextView.cxx.

References maSize.

void sdext::presenter::PresenterTextView::SetText ( const css::uno::Reference< css::text::XText > &  rxText)

Definition at line 102 of file PresenterTextView.cxx.

References mpFont, and mxCanvas.

void sdext::presenter::PresenterTextView::SetTextChangeBroadcaster ( const ::std::function< void()> &  rBroadcaster)

Definition at line 139 of file PresenterTextView.cxx.

Member Data Documentation

css::geometry::RealPoint2D sdext::presenter::PresenterTextView::maLocation
private

Definition at line 258 of file PresenterTextView.hxx.

::std::vector<SharedPresenterTextParagraph> sdext::presenter::PresenterTextView::maParagraphs
private

Definition at line 261 of file PresenterTextView.hxx.

css::geometry::RealSize2D sdext::presenter::PresenterTextView::maSize
private

Definition at line 259 of file PresenterTextView.hxx.

::std::function<void ()> sdext::presenter::PresenterTextView::maTextChangeBroadcaster
private

Definition at line 266 of file PresenterTextView.hxx.

bool sdext::presenter::PresenterTextView::mbIsFormatPending
private

Definition at line 265 of file PresenterTextView.hxx.

double sdext::presenter::PresenterTextView::mnLeftOffset
private

Definition at line 263 of file PresenterTextView.hxx.

double sdext::presenter::PresenterTextView::mnTopOffset
private

Definition at line 264 of file PresenterTextView.hxx.

SharedPresenterTextCaret sdext::presenter::PresenterTextView::mpCaret
private

Definition at line 262 of file PresenterTextView.hxx.

PresenterTheme::SharedFontDescriptor sdext::presenter::PresenterTextView::mpFont
private

Definition at line 260 of file PresenterTextView.hxx.

css::uno::Reference<css::i18n::XBreakIterator> sdext::presenter::PresenterTextView::mxBreakIterator
private

Definition at line 256 of file PresenterTextView.hxx.

css::uno::Reference<css::rendering::XCanvas> sdext::presenter::PresenterTextView::mxCanvas
private

Definition at line 255 of file PresenterTextView.hxx.

css::uno::Reference<css::i18n::XScriptTypeDetector> sdext::presenter::PresenterTextView::mxScriptTypeDetector
private

Definition at line 257 of file PresenterTextView.hxx.


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