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

Button for the presenter screen. More...

#include <PresenterButton.hxx>

Inheritance diagram for sdext::presenter::PresenterButton:
[legend]
Collaboration diagram for sdext::presenter::PresenterButton:
[legend]

Public Member Functions

static ::rtl::Reference< PresenterButtonCreate (const css::uno::Reference< css::uno::XComponentContext > &rxComponentContext, const ::rtl::Reference< PresenterController > &rpPresenterController, const std::shared_ptr< PresenterTheme > &rpTheme, const css::uno::Reference< css::awt::XWindow > &rxParentWindow, const css::uno::Reference< css::rendering::XCanvas > &rxParentCanvas, const OUString &rsConfigurationName)
 
virtual ~PresenterButton () override
 
 PresenterButton (const PresenterButton &)=delete
 
PresenterButtonoperator= (const PresenterButton &)=delete
 
virtual void SAL_CALL disposing () override
 
void SetCenter (const css::geometry::RealPoint2D &rLocation)
 
void SetCanvas (const css::uno::Reference< css::rendering::XCanvas > &rxParentCanvas, const css::uno::Reference< css::awt::XWindow > &rxParentWindow)
 
css::geometry::IntegerSize2D const & GetSize ()
 
virtual void SAL_CALL windowPaint (const css::awt::PaintEvent &rEvent) override
 
virtual void SAL_CALL mousePressed (const css::awt::MouseEvent &rEvent) override
 
virtual void SAL_CALL mouseReleased (const css::awt::MouseEvent &rEvent) override
 
virtual void SAL_CALL mouseEntered (const css::awt::MouseEvent &rEvent) override
 
virtual void SAL_CALL mouseExited (const css::awt::MouseEvent &rEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEvent) override
 

Private Member Functions

 PresenterButton (const css::uno::Reference< css::uno::XComponentContext > &rxComponentContext, ::rtl::Reference< PresenterController > xPresenterController, std::shared_ptr< PresenterTheme > xTheme, const css::uno::Reference< css::awt::XWindow > &rxParentWindow, PresenterTheme::SharedFontDescriptor aFont, PresenterTheme::SharedFontDescriptor aMouseOverFont, OUString sText, OUString sAction)
 
void RenderButton (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas, const css::geometry::IntegerSize2D &rSize, const PresenterTheme::SharedFontDescriptor &rFont, const PresenterBitmapDescriptor::Mode eMode, const SharedBitmapDescriptor &rpLeft, const SharedBitmapDescriptor &rpCenter, const SharedBitmapDescriptor &rpRight)
 
css::geometry::IntegerSize2D CalculateButtonSize ()
 
void Invalidate ()
 
void SetupButtonBitmaps ()
 
void ThrowIfDisposed () const
 

Static Private Member Functions

static css::uno::Reference< css::rendering::XBitmap > GetBitmap (const SharedBitmapDescriptor &mpIcon, const PresenterBitmapDescriptor::Mode eMode)
 
static css::uno::Reference< css::beans::XPropertySetGetConfigurationProperties (const css::uno::Reference< css::uno::XComponentContext > &rxComponentContext, const OUString &rsConfigurationName)
 

Private Attributes

::rtl::Reference< PresenterControllermpPresenterController
 
std::shared_ptr< PresenterThemempTheme
 
css::uno::Reference< css::awt::XWindow > mxWindow
 
css::uno::Reference< css::rendering::XCanvas > mxCanvas
 
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
 
const OUString msText
 
const PresenterTheme::SharedFontDescriptor mpFont
 
const PresenterTheme::SharedFontDescriptor mpMouseOverFont
 
const OUString msAction
 
css::geometry::RealPoint2D maCenter
 
css::geometry::IntegerSize2D maButtonSize
 
PresenterBitmapDescriptor::Mode meState
 
css::uno::Reference< css::rendering::XBitmap > mxNormalBitmap
 
css::uno::Reference< css::rendering::XBitmap > mxMouseOverBitmap
 
- Private Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

Button for the presenter screen.

It displays a text surrounded by a frame.

Definition at line 46 of file PresenterButton.hxx.

Constructor & Destructor Documentation

◆ ~PresenterButton()

sdext::presenter::PresenterButton::~PresenterButton ( )
overridevirtual

Definition at line 135 of file PresenterButton.cxx.

◆ PresenterButton() [1/2]

sdext::presenter::PresenterButton::PresenterButton ( const PresenterButton )
delete

Referenced by Create().

◆ PresenterButton() [2/2]

sdext::presenter::PresenterButton::PresenterButton ( const css::uno::Reference< css::uno::XComponentContext > &  rxComponentContext,
::rtl::Reference< PresenterController xPresenterController,
std::shared_ptr< PresenterTheme xTheme,
const css::uno::Reference< css::awt::XWindow > &  rxParentWindow,
PresenterTheme::SharedFontDescriptor  aFont,
PresenterTheme::SharedFontDescriptor  aMouseOverFont,
OUString  sText,
OUString  sAction 
)
private

Definition at line 84 of file PresenterButton.cxx.

References m_aMutex, mxPresenterHelper, mxWindow, Normal, and xFactory.

Member Function Documentation

◆ CalculateButtonSize()

css::geometry::IntegerSize2D sdext::presenter::PresenterButton::CalculateButtonSize ( )
private

◆ Create()

rtl::Reference< PresenterButton > sdext::presenter::PresenterButton::Create ( const css::uno::Reference< css::uno::XComponentContext > &  rxComponentContext,
const ::rtl::Reference< PresenterController > &  rpPresenterController,
const std::shared_ptr< PresenterTheme > &  rpTheme,
const css::uno::Reference< css::awt::XWindow > &  rxParentWindow,
const css::uno::Reference< css::rendering::XCanvas > &  rxParentCanvas,
const OUString &  rsConfigurationName 
)

◆ disposing() [1/2]

void SAL_CALL sdext::presenter::PresenterButton::disposing ( )
overridevirtual

Definition at line 139 of file PresenterButton.cxx.

References mxCanvas, and mxWindow.

◆ disposing() [2/2]

void SAL_CALL sdext::presenter::PresenterButton::disposing ( const css::lang::EventObject &  rEvent)
overridevirtual

Definition at line 288 of file PresenterButton.cxx.

References mxWindow.

◆ GetBitmap()

Reference< rendering::XBitmap > sdext::presenter::PresenterButton::GetBitmap ( const SharedBitmapDescriptor mpIcon,
const PresenterBitmapDescriptor::Mode  eMode 
)
staticprivate

Definition at line 358 of file PresenterButton.cxx.

References eMode, and mpIcon.

Referenced by RenderButton().

◆ GetConfigurationProperties()

Reference< beans::XPropertySet > sdext::presenter::PresenterButton::GetConfigurationProperties ( const css::uno::Reference< css::uno::XComponentContext > &  rxComponentContext,
const OUString &  rsConfigurationName 
)
staticprivate

◆ GetSize()

css::geometry::IntegerSize2D const & sdext::presenter::PresenterButton::GetSize ( )

Definition at line 211 of file PresenterButton.cxx.

References CalculateButtonSize(), and maButtonSize.

◆ Invalidate()

void sdext::presenter::PresenterButton::Invalidate ( )
private

Definition at line 353 of file PresenterButton.cxx.

References mpPresenterController, and mxWindow.

Referenced by mouseEntered(), mouseExited(), mouseReleased(), and SetCenter().

◆ mouseEntered()

void SAL_CALL sdext::presenter::PresenterButton::mouseEntered ( const css::awt::MouseEvent &  rEvent)
overridevirtual

◆ mouseExited()

void SAL_CALL sdext::presenter::PresenterButton::mouseExited ( const css::awt::MouseEvent &  rEvent)
overridevirtual

◆ mousePressed()

void SAL_CALL sdext::presenter::PresenterButton::mousePressed ( const css::awt::MouseEvent &  rEvent)
overridevirtual

◆ mouseReleased()

void SAL_CALL sdext::presenter::PresenterButton::mouseReleased ( const css::awt::MouseEvent &  rEvent)
overridevirtual

◆ operator=()

PresenterButton & sdext::presenter::PresenterButton::operator= ( const PresenterButton )
delete

◆ RenderButton()

void sdext::presenter::PresenterButton::RenderButton ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas,
const css::geometry::IntegerSize2D &  rSize,
const PresenterTheme::SharedFontDescriptor rFont,
const PresenterBitmapDescriptor::Mode  eMode,
const SharedBitmapDescriptor rpLeft,
const SharedBitmapDescriptor rpCenter,
const SharedBitmapDescriptor rpRight 
)
private

◆ SetCanvas()

void sdext::presenter::PresenterButton::SetCanvas ( const css::uno::Reference< css::rendering::XCanvas > &  rxParentCanvas,
const css::uno::Reference< css::awt::XWindow > &  rxParentWindow 
)

◆ SetCenter()

void sdext::presenter::PresenterButton::SetCenter ( const css::geometry::RealPoint2D &  rLocation)

Definition at line 160 of file PresenterButton.cxx.

References Invalidate(), maButtonSize, maCenter, mxCanvas, and mxWindow.

Referenced by SetCanvas().

◆ SetupButtonBitmaps()

void sdext::presenter::PresenterButton::SetupButtonBitmaps ( )
private

◆ ThrowIfDisposed()

void sdext::presenter::PresenterButton::ThrowIfDisposed ( ) const
private
Exceptions
css::lang::DisposedException

Definition at line 436 of file PresenterButton.cxx.

Referenced by mouseEntered(), mouseExited(), mousePressed(), mouseReleased(), and windowPaint().

◆ windowPaint()

void SAL_CALL sdext::presenter::PresenterButton::windowPaint ( const css::awt::PaintEvent &  rEvent)
overridevirtual

Member Data Documentation

◆ maButtonSize

css::geometry::IntegerSize2D sdext::presenter::PresenterButton::maButtonSize
private

Definition at line 98 of file PresenterButton.hxx.

Referenced by GetSize(), SetCenter(), and SetupButtonBitmaps().

◆ maCenter

css::geometry::RealPoint2D sdext::presenter::PresenterButton::maCenter
private

Definition at line 97 of file PresenterButton.hxx.

Referenced by SetCanvas(), and SetCenter().

◆ meState

PresenterBitmapDescriptor::Mode sdext::presenter::PresenterButton::meState
private

◆ mpFont

const PresenterTheme::SharedFontDescriptor sdext::presenter::PresenterButton::mpFont
private

Definition at line 94 of file PresenterButton.hxx.

Referenced by CalculateButtonSize(), and SetupButtonBitmaps().

◆ mpMouseOverFont

const PresenterTheme::SharedFontDescriptor sdext::presenter::PresenterButton::mpMouseOverFont
private

Definition at line 95 of file PresenterButton.hxx.

Referenced by SetupButtonBitmaps().

◆ mpPresenterController

::rtl::Reference<PresenterController> sdext::presenter::PresenterButton::mpPresenterController
private

Definition at line 88 of file PresenterButton.hxx.

Referenced by Invalidate(), and mouseReleased().

◆ mpTheme

std::shared_ptr<PresenterTheme> sdext::presenter::PresenterButton::mpTheme
private

Definition at line 89 of file PresenterButton.hxx.

Referenced by SetupButtonBitmaps().

◆ msAction

const OUString sdext::presenter::PresenterButton::msAction
private

Definition at line 96 of file PresenterButton.hxx.

Referenced by mouseReleased().

◆ msText

const OUString sdext::presenter::PresenterButton::msText
private

Definition at line 93 of file PresenterButton.hxx.

Referenced by CalculateButtonSize(), and RenderButton().

◆ mxCanvas

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

◆ mxMouseOverBitmap

css::uno::Reference<css::rendering::XBitmap> sdext::presenter::PresenterButton::mxMouseOverBitmap
private

Definition at line 101 of file PresenterButton.hxx.

Referenced by SetupButtonBitmaps(), and windowPaint().

◆ mxNormalBitmap

css::uno::Reference<css::rendering::XBitmap> sdext::presenter::PresenterButton::mxNormalBitmap
private

Definition at line 100 of file PresenterButton.hxx.

Referenced by SetupButtonBitmaps(), and windowPaint().

◆ mxPresenterHelper

css::uno::Reference<css::drawing::XPresenterHelper> sdext::presenter::PresenterButton::mxPresenterHelper
private

Definition at line 92 of file PresenterButton.hxx.

Referenced by PresenterButton(), and SetCanvas().

◆ mxWindow

css::uno::Reference<css::awt::XWindow> sdext::presenter::PresenterButton::mxWindow
private

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