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

This is the bootstrap class of the presenter screen. More...

#include <PresenterScreen.hxx>

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

Classes

class  ViewDescriptor
 

Public Member Functions

 PresenterScreen (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XModel2 > &rxModel)
 
virtual ~PresenterScreen () override
 
 PresenterScreen (const PresenterScreen &)=delete
 
PresenterScreenoperator= (const PresenterScreen &)=delete
 
virtual void SAL_CALL disposing () override
 
void InitializePresenterScreen ()
 Make the presenter screen visible. More...
 
void RequestShutdownPresenterScreen ()
 Do not call ShutdownPresenterScreen() directly. More...
 
void SwitchMonitors ()
 Switch / converse monitors between presenter view and slide output. More...
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEvent) override
 

Static Public Member Functions

static bool isPresenterScreenEnabled (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 

Private Types

typedef ::std::map< OUString, ViewDescriptorViewDescriptorContainer
 

Private Member Functions

void ShutdownPresenterScreen ()
 
void SetupPaneFactory (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 Create and initialize the factory for presenter view specific panes. More...
 
void SetupViewFactory (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 Create and initialize the factory for presenter view specific views. More...
 
void SetupConfiguration (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::drawing::framework::XResourceId > &rxAnchorId)
 Read the current layout from the configuration and call ProcessLayout to bring it on to the screen. More...
 
void ProcessLayout (PresenterConfigurationAccess &rConfiguration, const OUString &rsLayoutName, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::drawing::framework::XResourceId > &rxAnchorId)
 Read one layout from the configuration and make resource activation requests to bring it on to the screen. More...
 
void ProcessComponent (const ::std::vector< css::uno::Any > &rValues, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::drawing::framework::XResourceId > &rxAnchorId)
 Called by ProcessLayout for a single entry of a Layouts configuration list. More...
 
void ProcessViewDescriptions (PresenterConfigurationAccess &rConfiguration)
 Read the view descriptions from the configuration. More...
 
void ProcessViewDescription (const ::std::vector< css::uno::Any > &rValues)
 Called by ProcessViewDescriptions for a single entry. More...
 
void SetupView (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::drawing::framework::XResourceId > &rxAnchorId, const OUString &rsPaneURL, const OUString &rsViewURL, const PresenterPaneContainer::ViewInitializationFunction &rViewInitialization)
 
sal_Int32 GetPresenterScreenNumber (const css::uno::Reference< css::presentation::XPresentation2 > &rxPresentation) const
 Return the built-in screen number on the presentation will normally display the presenter console. More...
 
css::uno::Reference< css::drawing::framework::XResourceId > GetMainPaneId (const css::uno::Reference< css::presentation::XPresentation2 > &rxPresentation) const
 Create a resource id for the full screen background pane so that it is displayed on another screen than the full screen presentation. More...
 

Static Private Member Functions

static sal_Int32 GetPresenterScreenFromScreen (sal_Int32 nPresentationScreen)
 

Private Attributes

css::uno::Reference< css::frame::XModel2 > mxModel
 
css::uno::Reference< css::frame::XController > mxController
 
css::uno::WeakReference< css::drawing::framework::XConfigurationController > mxConfigurationControllerWeak
 
css::uno::WeakReference< css::uno::XComponentContext > mxContextWeak
 
::rtl::Reference< PresenterControllermpPresenterController
 
css::uno::Reference< css::drawing::framework::XConfiguration > mxSavedConfiguration
 
::rtl::Reference< PresenterPaneContainermpPaneContainer
 
css::uno::Reference< css::drawing::framework::XResourceFactory > mxPaneFactory
 
css::uno::Reference< css::drawing::framework::XResourceFactory > mxViewFactory
 
ViewDescriptorContainer maViewDescriptors
 
- Private Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

This is the bootstrap class of the presenter screen.

It is registered as drawing framework startup service. That means that every drawing framework instance creates an instance of this class.

A PresenterScreen object registers itself as listener for drawing framework configuration changes. It waits for the full screen marker (a top level resource) to appear in the current configuration. When that happens the actual presenter screen is initialized. A new PresenterController is created and takes over the task of controlling the presenter screen.

Definition at line 89 of file PresenterScreen.hxx.

Member Typedef Documentation

Definition at line 146 of file PresenterScreen.hxx.

Constructor & Destructor Documentation

sdext::presenter::PresenterScreen::PresenterScreen ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::frame::XModel2 > &  rxModel 
)
sdext::presenter::PresenterScreen::~PresenterScreen ( )
overridevirtual

Definition at line 249 of file PresenterScreen.cxx.

sdext::presenter::PresenterScreen::PresenterScreen ( const PresenterScreen )
delete

Member Function Documentation

void SAL_CALL sdext::presenter::PresenterScreen::disposing ( )
overridevirtual
virtual void SAL_CALL sdext::presenter::PresenterScreen::disposing ( const css::lang::EventObject &  rEvent)
overridevirtual
Reference< drawing::framework::XResourceId > sdext::presenter::PresenterScreen::GetMainPaneId ( const css::uno::Reference< css::presentation::XPresentation2 > &  rxPresentation) const
private

Create a resource id for the full screen background pane so that it is displayed on another screen than the full screen presentation.

Definition at line 509 of file PresenterScreen.cxx.

References GetPresenterScreenNumber(), sdext::presenter::PresenterHelper::msFullScreenPaneURL, and mxContextWeak.

Referenced by InitializePresenterScreen().

sal_Int32 sdext::presenter::PresenterScreen::GetPresenterScreenFromScreen ( sal_Int32  nPresentationScreen)
staticprivate

Definition at line 482 of file PresenterScreen.cxx.

References SAL_INFO.

Referenced by GetPresenterScreenNumber().

sal_Int32 sdext::presenter::PresenterScreen::GetPresenterScreenNumber ( const css::uno::Reference< css::presentation::XPresentation2 > &  rxPresentation) const
private

Return the built-in screen number on the presentation will normally display the presenter console.

Return the real VCL screen number to show the presenter console on or -1 to not show anything.

Returns
Returns -1 when the presenter screen can or shall not be displayed.

Definition at line 411 of file PresenterScreen.cxx.

References sdext::presenter::PresenterConfigurationAccess::GetConfigurationNode(), Application::GetDisplayExternalScreen(), GetPresenterScreenFromScreen(), Application::GetScreenCount(), mxContextWeak, sdext::presenter::PresenterConfigurationAccess::READ_ONLY, and SAL_INFO.

Referenced by GetMainPaneId(), and SwitchMonitors().

void sdext::presenter::PresenterScreen::InitializePresenterScreen ( )
bool sdext::presenter::PresenterScreen::isPresenterScreenEnabled ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)
static
PresenterScreen& sdext::presenter::PresenterScreen::operator= ( const PresenterScreen )
delete
void sdext::presenter::PresenterScreen::ProcessComponent ( const ::std::vector< css::uno::Any > &  rValues,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::drawing::framework::XResourceId > &  rxAnchorId 
)
private

Called by ProcessLayout for a single entry of a Layouts configuration list.

Definition at line 705 of file PresenterScreen.cxx.

References Exception, and SetupView().

Referenced by ProcessLayout().

void sdext::presenter::PresenterScreen::ProcessLayout ( PresenterConfigurationAccess rConfiguration,
const OUString &  rsLayoutName,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::drawing::framework::XResourceId > &  rxAnchorId 
)
private

Read one layout from the configuration and make resource activation requests to bring it on to the screen.

When one layout references a parent layout then this method calls itself recursively.

Definition at line 625 of file PresenterScreen.cxx.

References aProperties, sdext::presenter::PresenterConfigurationAccess::ForAll(), sdext::presenter::PresenterConfigurationAccess::GetConfigurationNode(), and ProcessComponent().

Referenced by SetupConfiguration().

void sdext::presenter::PresenterScreen::ProcessViewDescription ( const ::std::vector< css::uno::Any > &  rValues)
private
void sdext::presenter::PresenterScreen::ProcessViewDescriptions ( PresenterConfigurationAccess rConfiguration)
private
void sdext::presenter::PresenterScreen::RequestShutdownPresenterScreen ( )

Do not call ShutdownPresenterScreen() directly.

Call RequestShutdownPresenterScreen() instead. It will issue an asynchronous call to ShutdownPresenterScreen() when that is safe.

Definition at line 525 of file PresenterScreen.cxx.

References mxConfigurationControllerWeak, mxSavedConfiguration, and sdext::presenter::PresenterFrameworkObserver::RunOnUpdateEnd().

void sdext::presenter::PresenterScreen::SetupConfiguration ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::drawing::framework::XResourceId > &  rxAnchorId 
)
private

Read the current layout from the configuration and call ProcessLayout to bring it on to the screen.

Definition at line 603 of file PresenterScreen.cxx.

References sdext::presenter::PresenterConfigurationAccess::GetConfigurationNode(), maViewDescriptors, ProcessLayout(), ProcessViewDescriptions(), and sdext::presenter::PresenterConfigurationAccess::READ_ONLY.

Referenced by InitializePresenterScreen().

void sdext::presenter::PresenterScreen::SetupPaneFactory ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)
private

Create and initialize the factory for presenter view specific panes.

Definition at line 571 of file PresenterScreen.cxx.

References sdext::presenter::PresenterPaneFactory::Create(), mpPresenterController, mxController, and mxPaneFactory.

Referenced by InitializePresenterScreen().

void sdext::presenter::PresenterScreen::SetupView ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const css::uno::Reference< css::drawing::framework::XResourceId > &  rxAnchorId,
const OUString &  rsPaneURL,
const OUString &  rsViewURL,
const PresenterPaneContainer::ViewInitializationFunction rViewInitialization 
)
private
void sdext::presenter::PresenterScreen::SetupViewFactory ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)
private

Create and initialize the factory for presenter view specific views.

Definition at line 587 of file PresenterScreen.cxx.

References sdext::presenter::PresenterViewFactory::Create(), mpPresenterController, mxController, and mxViewFactory.

Referenced by InitializePresenterScreen().

void sdext::presenter::PresenterScreen::ShutdownPresenterScreen ( )
private
void sdext::presenter::PresenterScreen::SwitchMonitors ( )

Switch / converse monitors between presenter view and slide output.

Definition at line 380 of file PresenterScreen.cxx.

References Any, Application::GetDisplayExternalScreen(), GetPresenterScreenNumber(), and mxModel.

Referenced by sdext::presenter::PresenterController::SwitchMonitors().

Member Data Documentation

ViewDescriptorContainer sdext::presenter::PresenterScreen::maViewDescriptors
private

Definition at line 147 of file PresenterScreen.hxx.

Referenced by ProcessViewDescription(), SetupConfiguration(), and SetupView().

::rtl::Reference<PresenterPaneContainer> sdext::presenter::PresenterScreen::mpPaneContainer
private
::rtl::Reference<PresenterController> sdext::presenter::PresenterScreen::mpPresenterController
private
css::uno::WeakReference<css::drawing::framework::XConfigurationController> sdext::presenter::PresenterScreen::mxConfigurationControllerWeak
private
css::uno::WeakReference<css::uno::XComponentContext> sdext::presenter::PresenterScreen::mxContextWeak
private
css::uno::Reference<css::frame::XController> sdext::presenter::PresenterScreen::mxController
private
css::uno::Reference<css::frame::XModel2 > sdext::presenter::PresenterScreen::mxModel
private

Definition at line 124 of file PresenterScreen.hxx.

Referenced by disposing(), InitializePresenterScreen(), and SwitchMonitors().

css::uno::Reference<css::drawing::framework::XResourceFactory> sdext::presenter::PresenterScreen::mxPaneFactory
private

Definition at line 132 of file PresenterScreen.hxx.

Referenced by disposing(), SetupPaneFactory(), and ShutdownPresenterScreen().

css::uno::Reference<css::drawing::framework::XConfiguration> sdext::presenter::PresenterScreen::mxSavedConfiguration
private
css::uno::Reference<css::drawing::framework::XResourceFactory> sdext::presenter::PresenterScreen::mxViewFactory
private

Definition at line 133 of file PresenterScreen.hxx.

Referenced by disposing(), SetupViewFactory(), and ShutdownPresenterScreen().


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