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 ( )

Definition at line 397 of file PresenterTextView.cxx.

References maSize, and mpFont.

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

Definition at line 373 of file PresenterTextView.cxx.

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

Definition at line 378 of file PresenterTextView.cxx.

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

Definition at line 417 of file PresenterTextView.cxx.

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

Definition at line 412 of file PresenterTextView.cxx.

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

Definition at line 159 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.

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

Definition at line 191 of file PresenterTextView.cxx.

References o3tl::make_unsigned().

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

Definition at line 273 of file PresenterTextView.cxx.

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

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

Definition at line 392 of file PresenterTextView.cxx.

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

Definition at line 174 of file PresenterTextView.cxx.

References mpFont.

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

Definition at line 141 of file PresenterTextView.cxx.

References maLocation.

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

Definition at line 180 of file PresenterTextView.cxx.

References maLocation.

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

Definition at line 153 of file PresenterTextView.cxx.

References maSize.

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

Definition at line 98 of file PresenterTextView.cxx.

References mpFont, and mxCanvas.

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

Definition at line 135 of file PresenterTextView.cxx.

Member Data Documentation

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

Definition at line 258 of file PresenterTextView.hxx.

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

Definition at line 261 of file PresenterTextView.hxx.

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

Definition at line 259 of file PresenterTextView.hxx.

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

Definition at line 266 of file PresenterTextView.hxx.

bool sdext::presenter::PresenterTextView::mbIsFormatPending

Definition at line 265 of file PresenterTextView.hxx.

double sdext::presenter::PresenterTextView::mnLeftOffset

Definition at line 263 of file PresenterTextView.hxx.

double sdext::presenter::PresenterTextView::mnTopOffset

Definition at line 264 of file PresenterTextView.hxx.

SharedPresenterTextCaret sdext::presenter::PresenterTextView::mpCaret

Definition at line 262 of file PresenterTextView.hxx.

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

Definition at line 260 of file PresenterTextView.hxx.

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

Definition at line 256 of file PresenterTextView.hxx.

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

Definition at line 255 of file PresenterTextView.hxx.

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

Definition at line 257 of file PresenterTextView.hxx.

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