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

A simple slide sorter for the presenter screen. More...

#include <PresenterSlideSorter.hxx>

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

Classes

class  CurrentSlideFrameRenderer
 
class  Layout
 
class  MouseOverManager
 

Public Member Functions

 PresenterSlideSorter (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::drawing::framework::XResourceId > &rxViewId, const rtl::Reference<::sd::DrawController > &rxController, const ::rtl::Reference< PresenterController > &rpPresenterController)
 
virtual ~PresenterSlideSorter () override
 
virtual void SAL_CALL disposing () override
 
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 css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL getResourceId () override
 
virtual sal_Bool SAL_CALL isAnchorOnly () override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &rEvent) override
 
virtual void SAL_CALL notifyPreviewCreation (sal_Int32 nSlideIndex) 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 Member Functions

void UpdateLayout ()
 
css::geometry::RealRectangle2D PlaceScrollBars (const css::geometry::RealRectangle2D &rUpperBox)
 
void PlaceCloseButton (const PresenterPaneContainer::SharedPaneDescriptor &rpPane, const css::awt::Rectangle &rCenterBox, const sal_Int32 nLeftFrameWidth)
 
void ClearBackground (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas, const css::awt::Rectangle &rRedrawArea)
 
double GetSlideAspectRatio () const
 
css::uno::Reference< css::rendering::XBitmap > GetPreview (const sal_Int32 nSlideIndex)
 
void PaintPreview (const css::uno::Reference< css::rendering::XCanvas > &rxCanvas, const css::awt::Rectangle &rUpdateBox, const sal_Int32 nSlideIndex)
 
void Paint (const css::awt::Rectangle &rUpdateBox)
 
void SetHorizontalOffset (const double nXOffset)
 
void SetVerticalOffset (const double nYOffset)
 
void GotoSlide (const sal_Int32 nSlideIndex)
 
bool ProvideCanvas ()
 
void ThrowIfDisposed ()
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxComponentContext
 
css::uno::Reference< css::drawing::framework::XResourceId > mxViewId
 
css::uno::Reference< css::drawing::framework::XPane > mxPane
 
css::uno::Reference< css::rendering::XCanvas > mxCanvas
 
css::uno::Reference< css::awt::XWindow > mxWindow
 
::rtl::Reference< PresenterControllermpPresenterController
 
css::uno::Reference< css::presentation::XSlideShowController > mxSlideShowController
 
css::uno::Reference< css::drawing::XSlidePreviewCache > mxPreviewCache
 
bool mbIsLayoutPending
 
std::shared_ptr< LayoutmpLayout
 
::rtl::Reference< PresenterScrollBarmpVerticalScrollBar
 
::rtl::Reference< PresenterButtonmpCloseButton
 
std::unique_ptr< MouseOverManagermpMouseOverManager
 
sal_Int32 mnSlideIndexMousePressed
 
sal_Int32 mnCurrentSlideIndex
 
sal_Int32 mnSeparatorY
 
css::util::Color maSeparatorColor
 
css::awt::Rectangle maCurrentSlideFrameBoundingBox
 
std::shared_ptr< CurrentSlideFrameRenderermpCurrentSlideFrameRenderer
 
css::uno::Reference< css::rendering::XPolyPolygon2D > mxPreviewFrame
 
- Private Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

A simple slide sorter for the presenter screen.

It uses a preview cache to create the slide previews. Painting is done via a canvas.

Definition at line 59 of file PresenterSlideSorter.hxx.

Constructor & Destructor Documentation

◆ PresenterSlideSorter()

sdext::presenter::PresenterSlideSorter::PresenterSlideSorter ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::drawing::framework::XResourceId > &  rxViewId,
const rtl::Reference<::sd::DrawController > &  rxController,
const ::rtl::Reference< PresenterController > &  rpPresenterController 
)

◆ ~PresenterSlideSorter()

sdext::presenter::PresenterSlideSorter::~PresenterSlideSorter ( )
overridevirtual

Definition at line 341 of file PresenterSlideSorter.cxx.

Member Function Documentation

◆ ClearBackground()

void sdext::presenter::PresenterSlideSorter::ClearBackground ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas,
const css::awt::Rectangle &  rRedrawArea 
)
private

Definition at line 754 of file PresenterSlideSorter.cxx.

References mpPresenterController, mxViewId, and mxWindow.

Referenced by Paint().

◆ disposing() [1/2]

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

◆ disposing() [2/2]

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

◆ getCurrentPage()

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

Definition at line 606 of file PresenterSlideSorter.cxx.

References ThrowIfDisposed().

◆ GetPreview()

Reference< rendering::XBitmap > sdext::presenter::PresenterSlideSorter::GetPreview ( const sal_Int32  nSlideIndex)
private

Definition at line 797 of file PresenterSlideSorter.cxx.

References mpLayout, mxPane, and mxPreviewCache.

Referenced by PaintPreview().

◆ getResourceId()

Reference< XResourceId > SAL_CALL sdext::presenter::PresenterSlideSorter::getResourceId ( )
overridevirtual

Definition at line 547 of file PresenterSlideSorter.cxx.

References mxViewId, and ThrowIfDisposed().

◆ GetSlideAspectRatio()

double sdext::presenter::PresenterSlideSorter::GetSlideAspectRatio ( ) const
private

Definition at line 769 of file PresenterSlideSorter.cxx.

References mxSlideShowController.

Referenced by PlaceScrollBars(), and UpdateLayout().

◆ GotoSlide()

void sdext::presenter::PresenterSlideSorter::GotoSlide ( const sal_Int32  nSlideIndex)
private

Definition at line 1014 of file PresenterSlideSorter.cxx.

References mxSlideShowController.

Referenced by mouseReleased().

◆ isAnchorOnly()

sal_Bool SAL_CALL sdext::presenter::PresenterSlideSorter::isAnchorOnly ( )
overridevirtual

Definition at line 553 of file PresenterSlideSorter.cxx.

◆ mouseDragged()

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

Definition at line 543 of file PresenterSlideSorter.cxx.

◆ mouseEntered()

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

Definition at line 505 of file PresenterSlideSorter.cxx.

◆ mouseExited()

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

Definition at line 507 of file PresenterSlideSorter.cxx.

References mnSlideIndexMousePressed, and mpMouseOverManager.

◆ mouseMoved()

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

check whether RTL interface or not

Definition at line 516 of file PresenterSlideSorter.cxx.

References AllSettings::GetLayoutRTL(), mnSlideIndexMousePressed, mpLayout, mpMouseOverManager, and mxWindow.

◆ mousePressed()

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

check whether RTL interface or not

Definition at line 463 of file PresenterSlideSorter.cxx.

References AllSettings::GetLayoutRTL(), mnSlideIndexMousePressed, mpLayout, and mxWindow.

◆ mouseReleased()

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

check whether RTL interface or not

Definition at line 475 of file PresenterSlideSorter.cxx.

References AllSettings::GetLayoutRTL(), GotoSlide(), mnSlideIndexMousePressed, mpLayout, mpPresenterController, and mxWindow.

◆ notifyPreviewCreation()

void SAL_CALL sdext::presenter::PresenterSlideSorter::notifyPreviewCreation ( sal_Int32  nSlideIndex)
overridevirtual

Definition at line 566 of file PresenterSlideSorter.cxx.

References mpLayout, mpPresenterController, and mxWindow.

◆ Paint()

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

◆ PaintPreview()

void sdext::presenter::PresenterSlideSorter::PaintPreview ( const css::uno::Reference< css::rendering::XCanvas > &  rxCanvas,
const css::awt::Rectangle &  rUpdateBox,
const sal_Int32  nSlideIndex 
)
private

◆ PlaceCloseButton()

void sdext::presenter::PresenterSlideSorter::PlaceCloseButton ( const PresenterPaneContainer::SharedPaneDescriptor rpPane,
const css::awt::Rectangle &  rCenterBox,
const sal_Int32  nLeftFrameWidth 
)
private

Definition at line 724 of file PresenterSlideSorter.cxx.

References abs(), mpCloseButton, and nButtonWidth.

Referenced by UpdateLayout().

◆ PlaceScrollBars()

geometry::RealRectangle2D sdext::presenter::PresenterSlideSorter::PlaceScrollBars ( const css::geometry::RealRectangle2D &  rUpperBox)
private

◆ propertyChange()

void SAL_CALL sdext::presenter::PresenterSlideSorter::propertyChange ( const css::beans::PropertyChangeEvent &  rEvent)
overridevirtual

Definition at line 560 of file PresenterSlideSorter.cxx.

◆ ProvideCanvas()

bool sdext::presenter::PresenterSlideSorter::ProvideCanvas ( )
private

Definition at line 1019 of file PresenterSlideSorter.cxx.

References mpCurrentSlideFrameRenderer, mxCanvas, mxComponentContext, and mxPane.

Referenced by Paint().

◆ setCurrentPage()

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

◆ SetHorizontalOffset()

void sdext::presenter::PresenterSlideSorter::SetHorizontalOffset ( const double  nXOffset)
private

Definition at line 990 of file PresenterSlideSorter.cxx.

References mpLayout, mpPresenterController, mxPreviewCache, and mxWindow.

Referenced by PresenterSlideSorter().

◆ SetVerticalOffset()

void sdext::presenter::PresenterSlideSorter::SetVerticalOffset ( const double  nYOffset)
private

Definition at line 1002 of file PresenterSlideSorter.cxx.

References mpLayout, mpPresenterController, mxPreviewCache, and mxWindow.

◆ ThrowIfDisposed()

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

Definition at line 1038 of file PresenterSlideSorter.cxx.

Referenced by getCurrentPage(), getResourceId(), setCurrentPage(), windowHidden(), windowMoved(), windowResized(), and windowShown().

◆ UpdateLayout()

void sdext::presenter::PresenterSlideSorter::UpdateLayout ( )
private

◆ windowHidden()

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

Definition at line 441 of file PresenterSlideSorter.cxx.

References ThrowIfDisposed().

◆ windowMoved()

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

Definition at line 429 of file PresenterSlideSorter.cxx.

References ThrowIfDisposed().

◆ windowPaint()

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

Definition at line 448 of file PresenterSlideSorter.cxx.

References mxCanvas, and Paint().

◆ windowResized()

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

◆ windowShown()

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

Member Data Documentation

◆ maCurrentSlideFrameBoundingBox

css::awt::Rectangle sdext::presenter::PresenterSlideSorter::maCurrentSlideFrameBoundingBox
private

Definition at line 152 of file PresenterSlideSorter.hxx.

Referenced by PaintPreview(), and setCurrentPage().

◆ maSeparatorColor

css::util::Color sdext::presenter::PresenterSlideSorter::maSeparatorColor
private

Definition at line 151 of file PresenterSlideSorter.hxx.

Referenced by Paint(), and PresenterSlideSorter().

◆ mbIsLayoutPending

bool sdext::presenter::PresenterSlideSorter::mbIsLayoutPending
private

Definition at line 141 of file PresenterSlideSorter.hxx.

Referenced by Paint(), UpdateLayout(), windowResized(), and windowShown().

◆ mnCurrentSlideIndex

sal_Int32 sdext::presenter::PresenterSlideSorter::mnCurrentSlideIndex
private

Definition at line 149 of file PresenterSlideSorter.hxx.

Referenced by PaintPreview(), PresenterSlideSorter(), and setCurrentPage().

◆ mnSeparatorY

sal_Int32 sdext::presenter::PresenterSlideSorter::mnSeparatorY
private

Definition at line 150 of file PresenterSlideSorter.hxx.

Referenced by Paint(), and UpdateLayout().

◆ mnSlideIndexMousePressed

sal_Int32 sdext::presenter::PresenterSlideSorter::mnSlideIndexMousePressed
private

Definition at line 148 of file PresenterSlideSorter.hxx.

Referenced by mouseExited(), mouseMoved(), mousePressed(), and mouseReleased().

◆ mpCloseButton

::rtl::Reference<PresenterButton> sdext::presenter::PresenterSlideSorter::mpCloseButton
private

◆ mpCurrentSlideFrameRenderer

std::shared_ptr<CurrentSlideFrameRenderer> sdext::presenter::PresenterSlideSorter::mpCurrentSlideFrameRenderer
private

Definition at line 154 of file PresenterSlideSorter.hxx.

Referenced by PaintPreview(), ProvideCanvas(), and setCurrentPage().

◆ mpLayout

std::shared_ptr<Layout> sdext::presenter::PresenterSlideSorter::mpLayout
private

◆ mpMouseOverManager

std::unique_ptr<MouseOverManager> sdext::presenter::PresenterSlideSorter::mpMouseOverManager
private

◆ mpPresenterController

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

◆ mpVerticalScrollBar

::rtl::Reference<PresenterScrollBar> sdext::presenter::PresenterSlideSorter::mpVerticalScrollBar
private

◆ mxCanvas

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

◆ mxComponentContext

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

◆ mxPane

css::uno::Reference<css::drawing::framework::XPane> sdext::presenter::PresenterSlideSorter::mxPane
private

◆ mxPreviewCache

css::uno::Reference<css::drawing::XSlidePreviewCache> sdext::presenter::PresenterSlideSorter::mxPreviewCache
private

◆ mxPreviewFrame

css::uno::Reference<css::rendering::XPolyPolygon2D> sdext::presenter::PresenterSlideSorter::mxPreviewFrame
private

Definition at line 155 of file PresenterSlideSorter.hxx.

Referenced by PaintPreview(), and UpdateLayout().

◆ mxSlideShowController

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

◆ mxViewId

css::uno::Reference<css::drawing::framework::XResourceId> sdext::presenter::PresenterSlideSorter::mxViewId
private

Definition at line 134 of file PresenterSlideSorter.hxx.

Referenced by ClearBackground(), disposing(), getResourceId(), and UpdateLayout().

◆ mxWindow

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

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