LibreOffice Module sdext (master)
1
|
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 SharedPresenterTextCaret & | GetCaret () 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< SharedPresenterTextParagraph > | maParagraphs |
SharedPresenterTextCaret | mpCaret |
double | mnLeftOffset |
double | mnTopOffset |
bool | mbIsFormatPending |
::std::function< void()> | maTextChangeBroadcaster |
A simple text view that paints text onto a given canvas.
Definition at line 214 of file PresenterTextView.hxx.
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 | ||
) |
|
private |
Definition at line 397 of file PresenterTextView.cxx.
const SharedPresenterTextCaret & sdext::presenter::PresenterTextView::GetCaret | ( | ) | const |
Definition at line 373 of file PresenterTextView.cxx.
|
private |
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.
void sdext::presenter::PresenterTextView::MoveCaret | ( | const sal_Int32 | nDistance, |
const sal_Int16 | nTextType | ||
) |
Move the caret forward or backward by character or by word.
nDistance | Should be either -1 or +1 to move caret backwards or forwards, respectively. |
nTextType | Valid 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.
|
private |
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.
void sdext::presenter::PresenterTextView::SetTextChangeBroadcaster | ( | const ::std::function< void()> & | rBroadcaster | ) |
Definition at line 135 of file PresenterTextView.cxx.
|
private |
Definition at line 258 of file PresenterTextView.hxx.
|
private |
Definition at line 261 of file PresenterTextView.hxx.
|
private |
Definition at line 259 of file PresenterTextView.hxx.
|
private |
Definition at line 266 of file PresenterTextView.hxx.
|
private |
Definition at line 265 of file PresenterTextView.hxx.
|
private |
Definition at line 263 of file PresenterTextView.hxx.
|
private |
Definition at line 264 of file PresenterTextView.hxx.
|
private |
Definition at line 262 of file PresenterTextView.hxx.
|
private |
Definition at line 260 of file PresenterTextView.hxx.
|
private |
Definition at line 256 of file PresenterTextView.hxx.
|
private |
Definition at line 255 of file PresenterTextView.hxx.
|
private |
Definition at line 257 of file PresenterTextView.hxx.