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

#include <PresenterTextView.hxx>

Public Member Functions

 PresenterTextCaret (css::uno::Reference< css::uno::XComponentContext > const &xContext, ::std::function< css::awt::Rectangle(const sal_Int32, const sal_Int32)> aCharacterBoundsAccess, ::std::function< void(const css::awt::Rectangle &)> aInvalidator)
 
 ~PresenterTextCaret ()
 
void ShowCaret ()
 
void HideCaret ()
 
sal_Int32 GetParagraphIndex () const
 
sal_Int32 GetCharacterIndex () const
 
void SetPosition (const sal_Int32 nParagraphIndex, const sal_Int32 nCharacterIndex)
 
bool IsVisible () const
 
void SetCaretMotionBroadcaster (const ::std::function< void(sal_Int32, sal_Int32, sal_Int32, sal_Int32)> &rBroadcaster)
 Set a (possibly empty) functor that broadcasts changes of the caret position. More...
 
const css::awt::Rectangle & GetBounds () const
 

Private Member Functions

void InvertCaret ()
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > const & m_xContext
 
sal_Int32 mnParagraphIndex
 
sal_Int32 mnCharacterIndex
 
sal_Int32 mnCaretBlinkTaskId
 
bool mbIsCaretVisible
 
const ::std::function< css::awt::Rectangle(const sal_Int32, const sal_Int32)> maCharacterBoundsAccess
 
const ::std::function< void(const css::awt::Rectangle &)> maInvalidator
 
::std::function< void(sal_Int32, sal_Int32, sal_Int32, sal_Int32)> maBroadcaster
 
css::awt::Rectangle maCaretBounds
 

Detailed Description

Definition at line 39 of file PresenterTextView.hxx.

Constructor & Destructor Documentation

◆ PresenterTextCaret()

sdext::presenter::PresenterTextCaret::PresenterTextCaret ( css::uno::Reference< css::uno::XComponentContext > const &  xContext,
::std::function< css::awt::Rectangle(const sal_Int32, const sal_Int32)>  aCharacterBoundsAccess,
::std::function< void(const css::awt::Rectangle &)>  aInvalidator 
)

Definition at line 1031 of file PresenterTextView.cxx.

References mnParagraphIndex.

◆ ~PresenterTextCaret()

sdext::presenter::PresenterTextCaret::~PresenterTextCaret ( )

Definition at line 1045 of file PresenterTextView.cxx.

References HideCaret(), and TOOLS_WARN_EXCEPTION.

Member Function Documentation

◆ GetBounds()

const css::awt::Rectangle & sdext::presenter::PresenterTextCaret::GetBounds ( ) const

Definition at line 1123 of file PresenterTextView.cxx.

References maCaretBounds.

◆ GetCharacterIndex()

sal_Int32 sdext::presenter::PresenterTextCaret::GetCharacterIndex ( ) const
inline

Definition at line 54 of file PresenterTextView.hxx.

References mnCharacterIndex.

◆ GetParagraphIndex()

sal_Int32 sdext::presenter::PresenterTextCaret::GetParagraphIndex ( ) const
inline

Definition at line 53 of file PresenterTextView.hxx.

References mnParagraphIndex.

◆ HideCaret()

void sdext::presenter::PresenterTextCaret::HideCaret ( )

◆ InvertCaret()

void sdext::presenter::PresenterTextCaret::InvertCaret ( )
private

Definition at line 1128 of file PresenterTextView.cxx.

References maCaretBounds, maInvalidator, mbIsCaretVisible, and mnParagraphIndex.

Referenced by ShowCaret().

◆ IsVisible()

bool sdext::presenter::PresenterTextCaret::IsVisible ( ) const
inline

Definition at line 59 of file PresenterTextView.hxx.

References mbIsCaretVisible.

◆ SetCaretMotionBroadcaster()

void sdext::presenter::PresenterTextCaret::SetCaretMotionBroadcaster ( const ::std::function< void(sal_Int32, sal_Int32, sal_Int32, sal_Int32)> &  rBroadcaster)

Set a (possibly empty) functor that broadcasts changes of the caret position.

This is used when a PresenterTextView object is set at the accessibility object so that accessibility events can be sent when the caret changes position.

Definition at line 1117 of file PresenterTextView.cxx.

References maBroadcaster.

◆ SetPosition()

void sdext::presenter::PresenterTextCaret::SetPosition ( const sal_Int32  nParagraphIndex,
const sal_Int32  nCharacterIndex 
)

◆ ShowCaret()

void sdext::presenter::PresenterTextCaret::ShowCaret ( )

Member Data Documentation

◆ m_xContext

css::uno::Reference<css::uno::XComponentContext> const& sdext::presenter::PresenterTextCaret::m_xContext
private

Definition at line 72 of file PresenterTextView.hxx.

Referenced by ShowCaret().

◆ maBroadcaster

::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)> sdext::presenter::PresenterTextCaret::maBroadcaster
private

Definition at line 79 of file PresenterTextView.hxx.

Referenced by SetCaretMotionBroadcaster(), and SetPosition().

◆ maCaretBounds

css::awt::Rectangle sdext::presenter::PresenterTextCaret::maCaretBounds
private

Definition at line 80 of file PresenterTextView.hxx.

Referenced by GetBounds(), InvertCaret(), and SetPosition().

◆ maCharacterBoundsAccess

const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)> sdext::presenter::PresenterTextCaret::maCharacterBoundsAccess
private

Definition at line 77 of file PresenterTextView.hxx.

Referenced by SetPosition().

◆ maInvalidator

const ::std::function<void (const css::awt::Rectangle&)> sdext::presenter::PresenterTextCaret::maInvalidator
private

Definition at line 78 of file PresenterTextView.hxx.

Referenced by InvertCaret(), and SetPosition().

◆ mbIsCaretVisible

bool sdext::presenter::PresenterTextCaret::mbIsCaretVisible
private

Definition at line 76 of file PresenterTextView.hxx.

Referenced by HideCaret(), InvertCaret(), IsVisible(), and ShowCaret().

◆ mnCaretBlinkTaskId

sal_Int32 sdext::presenter::PresenterTextCaret::mnCaretBlinkTaskId
private

Definition at line 75 of file PresenterTextView.hxx.

Referenced by HideCaret(), and ShowCaret().

◆ mnCharacterIndex

sal_Int32 sdext::presenter::PresenterTextCaret::mnCharacterIndex
private

Definition at line 74 of file PresenterTextView.hxx.

Referenced by GetCharacterIndex(), HideCaret(), and SetPosition().

◆ mnParagraphIndex

sal_Int32 sdext::presenter::PresenterTextCaret::mnParagraphIndex
private

Definition at line 73 of file PresenterTextView.hxx.

Referenced by GetParagraphIndex(), HideCaret(), InvertCaret(), and SetPosition().


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