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

A simple tool bar that can display bitmapped buttons and labels. More...

#include <PresenterToolBar.hxx>

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

Classes

class  Context
 
class  ElementContainerPart
 

Public Types

enum  Anchor {
  Left ,
  Center
}
 
typedef ::std::function< void()> Action
 

Public Member Functions

 PresenterToolBar (const css::uno::Reference< css::uno::XComponentContext > &rxContext, css::uno::Reference< css::awt::XWindow > xWindow, css::uno::Reference< css::rendering::XCanvas > xCanvas, ::rtl::Reference< PresenterController > pPresenterController, const Anchor eAnchor)
 
virtual ~PresenterToolBar () override
 
 PresenterToolBar (const PresenterToolBar &)=delete
 
PresenterToolBaroperator= (const PresenterToolBar &)=delete
 
void Initialize (const OUString &rsConfigurationPath)
 
virtual void SAL_CALL disposing () override
 
void InvalidateArea (const css::awt::Rectangle &rRepaintBox, const bool bSynchronous)
 
void RequestLayout ()
 
css::geometry::RealSize2D const & GetMinimalSize ()
 
const ::rtl::Reference< PresenterController > & GetPresenterController () const
 
const css::uno::Reference< css::uno::XComponentContext > & GetComponentContext () const
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEventObject) override
 
virtual void SAL_CALL windowResized (const css::awt::WindowEvent &rEvent) override
 
virtual void SAL_CALL windowMoved (const css::awt::WindowEvent &rEvent) override
 
virtual void SAL_CALL windowShown (const css::lang::EventObject &rEvent) override
 
virtual void SAL_CALL windowHidden (const css::lang::EventObject &rEvent) override
 
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 mouseMoved (const css::awt::MouseEvent &rEvent) override
 
virtual void SAL_CALL mouseDragged (const css::awt::MouseEvent &rEvent) override
 
virtual void SAL_CALL setCurrentPage (const css::uno::Reference< css::drawing::XDrawPage > &rxSlide) override
 
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getCurrentPage () override
 

Private Types

typedef std::shared_ptr< ElementContainerPartSharedElementContainerPart
 
typedef ::std::vector< SharedElementContainerPartElementContainer
 

Private Member Functions

void CreateControls (const OUString &rsConfigurationPath)
 
void Layout (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas)
 
css::geometry::RealSize2D CalculatePartSize (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas, const SharedElementContainerPart &rpPart, const bool bIsHorizontal)
 
void Paint (const css::awt::Rectangle &rUpdateBox, const css::rendering::ViewState &rViewState)
 
void UpdateSlideNumber ()
 
void CheckMouseOver (const css::awt::MouseEvent &rEvent, const bool bOverWindow, const bool bMouseDown=false)
 
void ProcessEntry (const css::uno::Reference< css::beans::XPropertySet > &rProperties, Context const &rContext)
 
void ThrowIfDisposed () const
 

Static Private Member Functions

static void LayoutPart (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas, const SharedElementContainerPart &rpPart, const css::geometry::RealRectangle2D &rBoundingBox, const css::geometry::RealSize2D &rPartSize, const bool bIsHorizontal)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxComponentContext
 
ElementContainer maElementContainer
 
SharedElementContainerPart mpCurrentContainerPart
 
css::uno::Reference< css::awt::XWindow > mxWindow
 
css::uno::Reference< css::rendering::XCanvas > mxCanvas
 
css::uno::Reference< css::presentation::XSlideShowController > mxSlideShowController
 
css::uno::Reference< css::drawing::XDrawPage > mxCurrentSlide
 
::rtl::Reference< PresenterControllermpPresenterController
 
bool mbIsLayoutPending
 
const Anchor meAnchor
 
css::geometry::RealSize2D maMinimalSize
 The minimal size that is necessary to display all elements without overlap and with minimal gaps between them. More...
 
- Private Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

A simple tool bar that can display bitmapped buttons and labels.

At the moment there are buttons for moving to the next and previous slide and to the next effect. A label displays the index of the current slide and the total number of slides.

Definition at line 61 of file PresenterToolBar.hxx.

Member Typedef Documentation

◆ Action

typedef ::std::function<void ()> sdext::presenter::PresenterToolBar::Action

Definition at line 67 of file PresenterToolBar.hxx.

◆ ElementContainer

Definition at line 144 of file PresenterToolBar.hxx.

◆ SharedElementContainerPart

Definition at line 143 of file PresenterToolBar.hxx.

Member Enumeration Documentation

◆ Anchor

Enumerator
Left 
Center 

Definition at line 69 of file PresenterToolBar.hxx.

Constructor & Destructor Documentation

◆ PresenterToolBar() [1/2]

sdext::presenter::PresenterToolBar::PresenterToolBar ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
css::uno::Reference< css::awt::XWindow >  xWindow,
css::uno::Reference< css::rendering::XCanvas >  xCanvas,
::rtl::Reference< PresenterController pPresenterController,
const Anchor  eAnchor 
)

◆ ~PresenterToolBar()

sdext::presenter::PresenterToolBar::~PresenterToolBar ( )
overridevirtual

Definition at line 400 of file PresenterToolBar.cxx.

◆ PresenterToolBar() [2/2]

sdext::presenter::PresenterToolBar::PresenterToolBar ( const PresenterToolBar )
delete

Member Function Documentation

◆ CalculatePartSize()

geometry::RealSize2D sdext::presenter::PresenterToolBar::CalculatePartSize ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas,
const SharedElementContainerPart rpPart,
const bool  bIsHorizontal 
)
private

Definition at line 792 of file PresenterToolBar.cxx.

◆ CheckMouseOver()

void sdext::presenter::PresenterToolBar::CheckMouseOver ( const css::awt::MouseEvent &  rEvent,
const bool  bOverWindow,
const bool  bMouseDown = false 
)
private

Definition at line 965 of file PresenterToolBar.cxx.

References AllSettings::GetLayoutRTL().

◆ CreateControls()

void sdext::presenter::PresenterToolBar::CreateControls ( const OUString &  rsConfigurationPath)
private

◆ disposing() [1/2]

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

Definition at line 404 of file PresenterToolBar.cxx.

◆ disposing() [2/2]

virtual void SAL_CALL sdext::presenter::PresenterToolBar::disposing ( const css::lang::EventObject &  rEventObject)
overridevirtual

◆ GetComponentContext()

const Reference< XComponentContext > & sdext::presenter::PresenterToolBar::GetComponentContext ( ) const

Definition at line 470 of file PresenterToolBar.cxx.

References mxComponentContext.

◆ getCurrentPage()

Reference< drawing::XDrawPage > SAL_CALL sdext::presenter::PresenterToolBar::getCurrentPage ( )
overridevirtual

Definition at line 572 of file PresenterToolBar.cxx.

◆ GetMinimalSize()

geometry::RealSize2D const & sdext::presenter::PresenterToolBar::GetMinimalSize ( )

Definition at line 458 of file PresenterToolBar.cxx.

References Layout, and mxCanvas.

◆ GetPresenterController()

const ::rtl::Reference< PresenterController > & sdext::presenter::PresenterToolBar::GetPresenterController ( ) const

Definition at line 465 of file PresenterToolBar.cxx.

References mpPresenterController.

◆ Initialize()

void sdext::presenter::PresenterToolBar::Initialize ( const OUString &  rsConfigurationPath)

Definition at line 367 of file PresenterToolBar.cxx.

References mpPresenterController.

◆ InvalidateArea()

void sdext::presenter::PresenterToolBar::InvalidateArea ( const css::awt::Rectangle &  rRepaintBox,
const bool  bSynchronous 
)

Definition at line 434 of file PresenterToolBar.cxx.

References mpPresenterController.

◆ Layout()

void sdext::presenter::PresenterToolBar::Layout ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas)
private

check whether RTL interface or not

Definition at line 672 of file PresenterToolBar.cxx.

References Center, AllSettings::GetLayoutRTL(), sdext::presenter::gnGapSize(), Left, mpPresenterController, nIndex, and Width.

◆ LayoutPart()

void sdext::presenter::PresenterToolBar::LayoutPart ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas,
const SharedElementContainerPart rpPart,
const css::geometry::RealRectangle2D &  rBoundingBox,
const css::geometry::RealSize2D &  rPartSize,
const bool  bIsHorizontal 
)
staticprivate

check whether RTL interface or not

Definition at line 825 of file PresenterToolBar.cxx.

References AllSettings::GetLayoutRTL().

◆ mouseDragged()

void SAL_CALL sdext::presenter::PresenterToolBar::mouseDragged ( const css::awt::MouseEvent &  rEvent)
overridevirtual

Definition at line 556 of file PresenterToolBar.cxx.

◆ mouseEntered()

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

Definition at line 536 of file PresenterToolBar.cxx.

◆ mouseExited()

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

Definition at line 542 of file PresenterToolBar.cxx.

◆ mouseMoved()

void SAL_CALL sdext::presenter::PresenterToolBar::mouseMoved ( const css::awt::MouseEvent &  rEvent)
overridevirtual

Definition at line 550 of file PresenterToolBar.cxx.

◆ mousePressed()

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

Definition at line 524 of file PresenterToolBar.cxx.

◆ mouseReleased()

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

Definition at line 530 of file PresenterToolBar.cxx.

◆ operator=()

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

◆ Paint()

void sdext::presenter::PresenterToolBar::Paint ( const css::awt::Rectangle &  rUpdateBox,
const css::rendering::ViewState rViewState 
)
private

Definition at line 931 of file PresenterToolBar.cxx.

References mxCanvas.

◆ ProcessEntry()

void sdext::presenter::PresenterToolBar::ProcessEntry ( const css::uno::Reference< css::beans::XPropertySet > &  rProperties,
Context const &  rContext 
)
private

Definition at line 619 of file PresenterToolBar.cxx.

References Label, and sType.

◆ RequestLayout()

void sdext::presenter::PresenterToolBar::RequestLayout ( )

Definition at line 447 of file PresenterToolBar.cxx.

References mpPresenterController.

◆ setCurrentPage()

void SAL_CALL sdext::presenter::PresenterToolBar::setCurrentPage ( const css::uno::Reference< css::drawing::XDrawPage > &  rxSlide)
overridevirtual

Definition at line 563 of file PresenterToolBar.cxx.

◆ ThrowIfDisposed()

void sdext::presenter::PresenterToolBar::ThrowIfDisposed ( ) const
private
Exceptions
css::lang::DisposedExceptionwhen the object has already been disposed.

Definition at line 995 of file PresenterToolBar.cxx.

◆ UpdateSlideNumber()

void sdext::presenter::PresenterToolBar::UpdateSlideNumber ( )
private

Definition at line 950 of file PresenterToolBar.cxx.

◆ windowHidden()

void SAL_CALL sdext::presenter::PresenterToolBar::windowHidden ( const css::lang::EventObject &  rEvent)
overridevirtual

Definition at line 497 of file PresenterToolBar.cxx.

◆ windowMoved()

void SAL_CALL sdext::presenter::PresenterToolBar::windowMoved ( const css::awt::WindowEvent &  rEvent)
overridevirtual

Definition at line 490 of file PresenterToolBar.cxx.

◆ windowPaint()

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

Definition at line 500 of file PresenterToolBar.cxx.

References Layout, mxCanvas, and Paint.

◆ windowResized()

void SAL_CALL sdext::presenter::PresenterToolBar::windowResized ( const css::awt::WindowEvent &  rEvent)
overridevirtual

Definition at line 485 of file PresenterToolBar.cxx.

◆ windowShown()

void SAL_CALL sdext::presenter::PresenterToolBar::windowShown ( const css::lang::EventObject &  rEvent)
overridevirtual

Definition at line 492 of file PresenterToolBar.cxx.

Member Data Documentation

◆ maElementContainer

ElementContainer sdext::presenter::PresenterToolBar::maElementContainer
private

Definition at line 145 of file PresenterToolBar.hxx.

◆ maMinimalSize

css::geometry::RealSize2D sdext::presenter::PresenterToolBar::maMinimalSize
private

The minimal size that is necessary to display all elements without overlap and with minimal gaps between them.

Definition at line 157 of file PresenterToolBar.hxx.

◆ mbIsLayoutPending

bool sdext::presenter::PresenterToolBar::mbIsLayoutPending
private

Definition at line 152 of file PresenterToolBar.hxx.

◆ meAnchor

const Anchor sdext::presenter::PresenterToolBar::meAnchor
private

Definition at line 153 of file PresenterToolBar.hxx.

◆ mpCurrentContainerPart

SharedElementContainerPart sdext::presenter::PresenterToolBar::mpCurrentContainerPart
private

Definition at line 146 of file PresenterToolBar.hxx.

◆ mpPresenterController

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

Definition at line 151 of file PresenterToolBar.hxx.

◆ mxCanvas

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

Definition at line 148 of file PresenterToolBar.hxx.

◆ mxComponentContext

css::uno::Reference<css::uno::XComponentContext> sdext::presenter::PresenterToolBar::mxComponentContext
private

Definition at line 140 of file PresenterToolBar.hxx.

◆ mxCurrentSlide

css::uno::Reference<css::drawing::XDrawPage> sdext::presenter::PresenterToolBar::mxCurrentSlide
private

Definition at line 150 of file PresenterToolBar.hxx.

◆ mxSlideShowController

css::uno::Reference<css::presentation::XSlideShowController> sdext::presenter::PresenterToolBar::mxSlideShowController
private

Definition at line 149 of file PresenterToolBar.hxx.

◆ mxWindow

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

Definition at line 147 of file PresenterToolBar.hxx.


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