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

The controller of the presenter screen is responsible for telling the individual views which slides to show. More...

#include <PresenterController.hxx>

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

Public Member Functions

static ::rtl::Reference< PresenterControllerInstance (const css::uno::Reference< css::frame::XFrame > &rxFrame)
 
 PresenterController (unotools::WeakReference< PresenterScreen > xScreen, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const rtl::Reference<::sd::DrawController > &rxController, const css::uno::Reference< css::presentation::XSlideShowController > &rxSlideShowController, rtl::Reference< PresenterPaneContainer > xPaneContainer, const css::uno::Reference< css::drawing::framework::XResourceId > &rxMainPaneId)
 
virtual ~PresenterController () override
 
virtual void SAL_CALL disposing () override
 
void UpdateCurrentSlide (const sal_Int32 nOffset)
 
SharedBitmapDescriptor GetViewBackground (const OUString &rsViewURL) const
 
PresenterTheme::SharedFontDescriptor GetViewFont (const OUString &rsViewURL) const
 
const std::shared_ptr< PresenterTheme > & GetTheme () const
 
const ::rtl::Reference< PresenterWindowManager > & GetWindowManager () const
 
const css::uno::Reference< css::presentation::XSlideShowController > & GetSlideShowController () const
 
const rtl::Reference< PresenterPaneContainer > & GetPaneContainer () const
 
const ::rtl::Reference< PresenterPaneBorderPainter > & GetPaneBorderPainter () const
 
const std::shared_ptr< PresenterCanvasHelper > & GetCanvasHelper () const
 
const css::uno::Reference< css::drawing::XPresenterHelper > & GetPresenterHelper () const
 
const std::shared_ptr< PresenterPaintManager > & GetPaintManager () const
 
double GetSlideAspectRatio () const
 
void ShowView (const OUString &rsViewURL)
 
void HideView (const OUString &rsViewURL)
 
void SwitchMonitors ()
 
void ExitPresenter ()
 
void DispatchUnoCommand (const OUString &rsCommand) const
 
css::uno::Reference< css::frame::XDispatch > GetDispatch (const css::util::URL &rURL) const
 
css::util::URL CreateURLFromString (const OUString &rsURL) const
 
const css::uno::Reference< css::drawing::framework::XConfigurationController > & GetConfigurationController () const
 
const css::uno::Reference< css::drawing::XDrawPage > & GetCurrentSlide () const
 
void SetAccessibilityActiveState (const bool bIsActive)
 
bool IsAccessibilityActive () const
 
void HandleMouseClick (const css::awt::MouseEvent &rEvent)
 
void UpdatePaneTitles ()
 
void RequestViews (const bool bIsSlideSorterActive, const bool bIsNotesViewActive, const bool bIsHelpViewActive)
 Request activation or deactivation of (some of) the views according to the given parameters. More...
 
void SetPresentationTime (IPresentationTime *pPresentationTime)
 
IPresentationTimeGetPresentationTime ()
 
virtual void SAL_CALL notifyConfigurationChange (const css::drawing::framework::ConfigurationChangeEvent &rEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEvent) override
 
virtual void SAL_CALL frameAction (const css::frame::FrameActionEvent &rEvent) override
 
virtual void SAL_CALL keyPressed (const css::awt::KeyEvent &rEvent) override
 
virtual void SAL_CALL keyReleased (const css::awt::KeyEvent &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
 

Static Public Member Functions

static bool HasTransition (css::uno::Reference< css::drawing::XDrawPage > const &rxPage)
 
static bool HasCustomAnimation (css::uno::Reference< css::drawing::XDrawPage > const &rxPage)
 

Private Types

typedef ::std::map< css::uno::Reference< css::frame::XFrame >, rtl::Reference< PresenterController > > InstanceContainer
 

Private Member Functions

void GetSlides (const sal_Int32 nOffset)
 
void UpdateViews ()
 
void InitializeMainPane (const css::uno::Reference< css::drawing::framework::XPane > &rxPane)
 
void LoadTheme (const css::uno::Reference< css::drawing::framework::XPane > &rxPane)
 
void UpdatePendingSlideNumber (const sal_Int32 nPendingSlideNumber)
 
void HandleNumericKeyPress (const sal_Int32 nKey, const sal_Int32 nModifiers)
 This method is called when the user pressed one of the numerical keys. More...
 

Private Attributes

unotools::WeakReference< PresenterScreenmxScreen
 
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
 
css::uno::Reference< css::rendering::XSpriteCanvas > mxCanvas
 
rtl::Reference<::sd::DrawControllermxController
 
css::uno::Reference< css::drawing::framework::XConfigurationController > mxConfigurationController
 
css::uno::Reference< css::presentation::XSlideShowController > mxSlideShowController
 
css::uno::Reference< css::drawing::framework::XResourceId > mxMainPaneId
 
rtl::Reference< PresenterPaneContainermpPaneContainer
 
sal_Int32 mnCurrentSlideIndex
 
css::uno::Reference< css::drawing::XDrawPage > mxCurrentSlide
 
css::uno::Reference< css::drawing::XDrawPage > mxNextSlide
 
::rtl::Reference< PresenterWindowManagermpWindowManager
 
std::shared_ptr< PresenterThemempTheme
 
css::uno::Reference< css::awt::XWindow > mxMainWindow
 
::rtl::Reference< PresenterPaneBorderPaintermpPaneBorderPainter
 
std::shared_ptr< PresenterCanvasHelpermpCanvasHelper
 
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
 
std::shared_ptr< PresenterPaintManagermpPaintManager
 
sal_Int32 mnPendingSlideNumber
 
css::uno::Reference< css::util::XURLTransformer > mxUrlTransformer
 
::rtl::Reference< PresenterAccessiblempAccessibleObject
 
bool mbIsAccessibilityActive
 
IPresentationTimempPresentationTime
 

Static Private Attributes

static InstanceContainer maInstances
 

Additional Inherited Members

- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

The controller of the presenter screen is responsible for telling the individual views which slides to show.

Additionally it provides access to frequently used values of the current theme.

Definition at line 79 of file PresenterController.hxx.

Member Typedef Documentation

◆ InstanceContainer

Definition at line 175 of file PresenterController.hxx.

Constructor & Destructor Documentation

◆ PresenterController()

sdext::presenter::PresenterController::PresenterController ( unotools::WeakReference< PresenterScreen xScreen,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const rtl::Reference<::sd::DrawController > &  rxController,
const css::uno::Reference< css::presentation::XSlideShowController > &  rxSlideShowController,
rtl::Reference< PresenterPaneContainer xPaneContainer,
const css::uno::Reference< css::drawing::framework::XResourceId > &  rxMainPaneId 
)

◆ ~PresenterController()

sdext::presenter::PresenterController::~PresenterController ( )
overridevirtual

Definition at line 178 of file PresenterController.cxx.

Member Function Documentation

◆ CreateURLFromString()

util::URL sdext::presenter::PresenterController::CreateURLFromString ( const OUString &  rsURL) const

Definition at line 532 of file PresenterController.cxx.

References aURL, and mxUrlTransformer.

◆ DispatchUnoCommand()

void sdext::presenter::PresenterController::DispatchUnoCommand ( const OUString &  rsCommand) const

Definition at line 501 of file PresenterController.cxx.

References aURL, GetDispatch(), mxUrlTransformer, and xDispatch.

◆ disposing() [1/2]

void sdext::presenter::PresenterController::disposing ( )
overridevirtual

◆ disposing() [2/2]

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

◆ ExitPresenter()

void sdext::presenter::PresenterController::ExitPresenter ( )

Definition at line 1165 of file PresenterController.cxx.

References mxController.

◆ frameAction()

void SAL_CALL sdext::presenter::PresenterController::frameAction ( const css::frame::FrameActionEvent &  rEvent)
overridevirtual

Definition at line 786 of file PresenterController.cxx.

References mxSlideShowController.

◆ GetCanvasHelper()

const std::shared_ptr< PresenterCanvasHelper > & sdext::presenter::PresenterController::GetCanvasHelper ( ) const

Definition at line 453 of file PresenterController.cxx.

References mpCanvasHelper.

◆ GetConfigurationController()

const Reference< drawing::framework::XConfigurationController > & sdext::presenter::PresenterController::GetConfigurationController ( ) const

Definition at line 546 of file PresenterController.cxx.

References mxConfigurationController.

◆ GetCurrentSlide()

const Reference< drawing::XDrawPage > & sdext::presenter::PresenterController::GetCurrentSlide ( ) const

Definition at line 551 of file PresenterController.cxx.

References mxCurrentSlide.

◆ GetDispatch()

Reference< css::frame::XDispatch > sdext::presenter::PresenterController::GetDispatch ( const css::util::URL &  rURL) const

Definition at line 517 of file PresenterController.cxx.

References mxController.

Referenced by DispatchUnoCommand().

◆ GetPaintManager()

const std::shared_ptr< PresenterPaintManager > & sdext::presenter::PresenterController::GetPaintManager ( ) const

Definition at line 463 of file PresenterController.cxx.

References mpPaintManager.

Referenced by notifyConfigurationChange().

◆ GetPaneBorderPainter()

const ::rtl::Reference< PresenterPaneBorderPainter > & sdext::presenter::PresenterController::GetPaneBorderPainter ( ) const

Definition at line 448 of file PresenterController.cxx.

References mpPaneBorderPainter.

◆ GetPaneContainer()

const rtl::Reference< PresenterPaneContainer > & sdext::presenter::PresenterController::GetPaneContainer ( ) const

Definition at line 443 of file PresenterController.cxx.

References mpPaneContainer.

◆ GetPresentationTime()

IPresentationTime * sdext::presenter::PresenterController::GetPresentationTime ( )

Definition at line 686 of file PresenterController.cxx.

References mpPresentationTime.

◆ GetPresenterHelper()

const Reference< drawing::XPresenterHelper > & sdext::presenter::PresenterController::GetPresenterHelper ( ) const

Definition at line 458 of file PresenterController.cxx.

References mxPresenterHelper.

◆ GetSlideAspectRatio()

double sdext::presenter::PresenterController::GetSlideAspectRatio ( ) const

Definition at line 1096 of file PresenterController.cxx.

References mxController.

◆ GetSlides()

void sdext::presenter::PresenterController::GetSlides ( const sal_Int32  nOffset)
private

◆ GetSlideShowController()

const Reference< presentation::XSlideShowController > & sdext::presenter::PresenterController::GetSlideShowController ( ) const

Definition at line 438 of file PresenterController.cxx.

References mxSlideShowController.

◆ GetTheme()

const std::shared_ptr< PresenterTheme > & sdext::presenter::PresenterController::GetTheme ( ) const

Definition at line 427 of file PresenterController.cxx.

References mpTheme.

◆ GetViewBackground()

SharedBitmapDescriptor sdext::presenter::PresenterController::GetViewBackground ( const OUString &  rsViewURL) const

Definition at line 406 of file PresenterController.cxx.

References mpTheme.

◆ GetViewFont()

PresenterTheme::SharedFontDescriptor sdext::presenter::PresenterController::GetViewFont ( const OUString &  rsViewURL) const

Definition at line 417 of file PresenterController.cxx.

References mpTheme.

◆ GetWindowManager()

const ::rtl::Reference< PresenterWindowManager > & sdext::presenter::PresenterController::GetWindowManager ( ) const

Definition at line 432 of file PresenterController.cxx.

References mpWindowManager.

◆ HandleMouseClick()

void sdext::presenter::PresenterController::HandleMouseClick ( const css::awt::MouseEvent &  rEvent)

Definition at line 619 of file PresenterController.cxx.

References mxSlideShowController.

◆ HandleNumericKeyPress()

void sdext::presenter::PresenterController::HandleNumericKeyPress ( const sal_Int32  nKey,
const sal_Int32  nModifiers 
)
private

This method is called when the user pressed one of the numerical keys.

Depending on the modifier, numeric keys switch to another slide (no modifier), or change to another view (Ctrl modifier).

Parameters
nKeyNumeric value that is printed on the pressed key. For example pressing the key '4' will result in the value 4, not the ASCII code (0x34?).
nModifiersThe modifier bit field as provided by the key up event.

Definition at line 990 of file PresenterController.cxx.

References mnPendingSlideNumber, mpWindowManager, SwitchMonitors(), UpdatePendingSlideNumber(), sdext::presenter::PresenterWindowManager::VM_Notes, sdext::presenter::PresenterWindowManager::VM_SlideOverview, and sdext::presenter::PresenterWindowManager::VM_Standard.

Referenced by keyReleased().

◆ HasCustomAnimation()

bool sdext::presenter::PresenterController::HasCustomAnimation ( css::uno::Reference< css::drawing::XDrawPage > const &  rxPage)
static

Definition at line 578 of file PresenterController.cxx.

References i, and nCount.

Referenced by sdext::presenter::PresenterSlideSorter::PaintPreview().

◆ HasTransition()

bool sdext::presenter::PresenterController::HasTransition ( css::uno::Reference< css::drawing::XDrawPage > const &  rxPage)
static

◆ HideView()

void sdext::presenter::PresenterController::HideView ( const OUString &  rsViewURL)

Definition at line 487 of file PresenterController.cxx.

References mpPaneContainer, mxComponentContext, and mxConfigurationController.

Referenced by RequestViews().

◆ InitializeMainPane()

void sdext::presenter::PresenterController::InitializeMainPane ( const css::uno::Reference< css::drawing::framework::XPane > &  rxPane)
private

◆ Instance()

rtl::Reference< PresenterController > sdext::presenter::PresenterController::Instance ( const css::uno::Reference< css::frame::XFrame > &  rxFrame)

◆ IsAccessibilityActive()

bool sdext::presenter::PresenterController::IsAccessibilityActive ( ) const
inline

◆ keyPressed()

void SAL_CALL sdext::presenter::PresenterController::keyPressed ( const css::awt::KeyEvent &  rEvent)
overridevirtual

Definition at line 798 of file PresenterController.cxx.

References mpPaneContainer.

◆ keyReleased()

void SAL_CALL sdext::presenter::PresenterController::keyReleased ( const css::awt::KeyEvent &  rEvent)
overridevirtual

◆ LoadTheme()

void sdext::presenter::PresenterController::LoadTheme ( const css::uno::Reference< css::drawing::framework::XPane > &  rxPane)
private

Definition at line 1089 of file PresenterController.cxx.

References mpTheme, and mxComponentContext.

Referenced by InitializeMainPane().

◆ mouseEntered()

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

Definition at line 1044 of file PresenterController.cxx.

◆ mouseExited()

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

Definition at line 1046 of file PresenterController.cxx.

◆ mousePressed()

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

Definition at line 1036 of file PresenterController.cxx.

References mxMainWindow.

◆ mouseReleased()

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

Definition at line 1042 of file PresenterController.cxx.

◆ notifyConfigurationChange()

void SAL_CALL sdext::presenter::PresenterController::notifyConfigurationChange ( const css::drawing::framework::ConfigurationChangeEvent &  rEvent)
overridevirtual

◆ RequestViews()

void sdext::presenter::PresenterController::RequestViews ( const bool  bIsSlideSorterActive,
const bool  bIsNotesViewActive,
const bool  bIsHelpViewActive 
)

◆ SetAccessibilityActiveState()

void sdext::presenter::PresenterController::SetAccessibilityActiveState ( const bool  bIsActive)

Definition at line 609 of file PresenterController.cxx.

References mbIsAccessibilityActive, and UpdatePaneTitles().

◆ SetPresentationTime()

void sdext::presenter::PresenterController::SetPresentationTime ( IPresentationTime pPresentationTime)

Definition at line 681 of file PresenterController.cxx.

References mpPresentationTime.

◆ ShowView()

void sdext::presenter::PresenterController::ShowView ( const OUString &  rsViewURL)

Definition at line 468 of file PresenterController.cxx.

References mpPaneContainer, mxComponentContext, and mxConfigurationController.

Referenced by RequestViews().

◆ SwitchMonitors()

void sdext::presenter::PresenterController::SwitchMonitors ( )

Definition at line 1156 of file PresenterController.cxx.

References mxScreen.

Referenced by HandleNumericKeyPress().

◆ UpdateCurrentSlide()

void sdext::presenter::PresenterController::UpdateCurrentSlide ( const sal_Int32  nOffset)

◆ UpdatePaneTitles()

void sdext::presenter::PresenterController::UpdatePaneTitles ( )

◆ UpdatePendingSlideNumber()

void sdext::presenter::PresenterController::UpdatePendingSlideNumber ( const sal_Int32  nPendingSlideNumber)
private

Definition at line 1129 of file PresenterController.cxx.

References mnPendingSlideNumber, mpTheme, mxCanvas, and mxMainWindow.

Referenced by HandleNumericKeyPress().

◆ UpdateViews()

void sdext::presenter::PresenterController::UpdateViews ( )
private

Definition at line 394 of file PresenterController.cxx.

References mpPaneContainer, and mxCurrentSlide.

Referenced by notifyConfigurationChange(), and UpdateCurrentSlide().

Member Data Documentation

◆ maInstances

PresenterController::InstanceContainer sdext::presenter::PresenterController::maInstances
staticprivate

Definition at line 176 of file PresenterController.hxx.

Referenced by disposing(), Instance(), and PresenterController().

◆ mbIsAccessibilityActive

bool sdext::presenter::PresenterController::mbIsAccessibilityActive
private

Definition at line 200 of file PresenterController.hxx.

Referenced by IsAccessibilityActive(), and SetAccessibilityActiveState().

◆ mnCurrentSlideIndex

sal_Int32 sdext::presenter::PresenterController::mnCurrentSlideIndex
private

Definition at line 187 of file PresenterController.hxx.

Referenced by disposing(), GetSlides(), and UpdatePaneTitles().

◆ mnPendingSlideNumber

sal_Int32 sdext::presenter::PresenterController::mnPendingSlideNumber
private

◆ mpAccessibleObject

::rtl::Reference<PresenterAccessible> sdext::presenter::PresenterController::mpAccessibleObject
private

◆ mpCanvasHelper

std::shared_ptr<PresenterCanvasHelper> sdext::presenter::PresenterController::mpCanvasHelper
private

Definition at line 194 of file PresenterController.hxx.

Referenced by disposing(), and GetCanvasHelper().

◆ mpPaintManager

std::shared_ptr<PresenterPaintManager> sdext::presenter::PresenterController::mpPaintManager
private

Definition at line 196 of file PresenterController.hxx.

Referenced by disposing(), GetPaintManager(), and InitializeMainPane().

◆ mpPaneBorderPainter

::rtl::Reference<PresenterPaneBorderPainter> sdext::presenter::PresenterController::mpPaneBorderPainter
private

◆ mpPaneContainer

rtl::Reference<PresenterPaneContainer> sdext::presenter::PresenterController::mpPaneContainer
private

◆ mpPresentationTime

IPresentationTime* sdext::presenter::PresenterController::mpPresentationTime
private

Definition at line 201 of file PresenterController.hxx.

Referenced by GetPresentationTime(), and SetPresentationTime().

◆ mpTheme

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

◆ mpWindowManager

::rtl::Reference<PresenterWindowManager> sdext::presenter::PresenterController::mpWindowManager
private

◆ mxCanvas

css::uno::Reference<css::rendering::XSpriteCanvas> sdext::presenter::PresenterController::mxCanvas
private

Definition at line 180 of file PresenterController.hxx.

Referenced by InitializeMainPane(), and UpdatePendingSlideNumber().

◆ mxComponentContext

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

◆ mxConfigurationController

css::uno::Reference<css::drawing::framework::XConfigurationController> sdext::presenter::PresenterController::mxConfigurationController
private

◆ mxController

rtl::Reference<::sd::DrawController> sdext::presenter::PresenterController::mxController
private

◆ mxCurrentSlide

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

◆ mxMainPaneId

css::uno::Reference<css::drawing::framework::XResourceId> sdext::presenter::PresenterController::mxMainPaneId
private

Definition at line 185 of file PresenterController.hxx.

Referenced by disposing(), and notifyConfigurationChange().

◆ mxMainWindow

css::uno::Reference<css::awt::XWindow> sdext::presenter::PresenterController::mxMainWindow
private

◆ mxNextSlide

css::uno::Reference<css::drawing::XDrawPage> sdext::presenter::PresenterController::mxNextSlide
private

Definition at line 189 of file PresenterController.hxx.

Referenced by disposing(), and GetSlides().

◆ mxPresenterHelper

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

◆ mxScreen

unotools::WeakReference<PresenterScreen> sdext::presenter::PresenterController::mxScreen
private

Definition at line 178 of file PresenterController.hxx.

Referenced by SwitchMonitors().

◆ mxSlideShowController

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

◆ mxUrlTransformer

css::uno::Reference<css::util::XURLTransformer> sdext::presenter::PresenterController::mxUrlTransformer
private

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