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

A simple manager of the positions of the panes of the presenter screen. More...

#include <PresenterWindowManager.hxx>

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

Public Types

enum  LayoutMode {
  LM_Standard,
  LM_Notes,
  LM_Generic
}
 
enum  ViewMode {
  VM_Standard,
  VM_Notes,
  VM_SlideOverview,
  VM_Help
}
 

Public Member Functions

 PresenterWindowManager (const css::uno::Reference< css::uno::XComponentContext > &rxContext, const ::rtl::Reference< PresenterPaneContainer > &rpPaneContainer, const ::rtl::Reference< PresenterController > &rpPresenterController)
 
virtual ~PresenterWindowManager () override
 
 PresenterWindowManager (const PresenterWindowManager &)=delete
 
PresenterWindowManageroperator= (const PresenterWindowManager &)=delete
 
void SAL_CALL disposing () override
 
void SetParentPane (const css::uno::Reference< css::drawing::framework::XPane > &rxPane)
 
void SetTheme (const std::shared_ptr< PresenterTheme > &rpTheme)
 
void NotifyViewCreation (const css::uno::Reference< css::drawing::framework::XView > &rxView)
 
void SetPanePosSizeAbsolute (const OUString &rsPaneURL, const double nX, const double nY, const double nWidth, const double nHeight)
 
void SetPaneBorderPainter (const ::rtl::Reference< PresenterPaneBorderPainter > &rPainter)
 
void Update ()
 
void Layout ()
 
void SetSlideSorterState (bool bIsActive)
 
void SetHelpViewState (bool bIsActive)
 
void SetViewMode (const ViewMode eMode)
 The high-level method to switch the view mode. More...
 
ViewMode GetViewMode () const
 
void RestoreViewMode ()
 Restore the layout mode (or slide sorter state) from the configuration. More...
 
void AddLayoutListener (const css::uno::Reference< css::document::XEventListener > &rxListener)
 
void RemoveLayoutListener (const css::uno::Reference< css::document::XEventListener > &rxListener)
 
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 focusGained (const css::awt::FocusEvent &rEvent) override
 
virtual void SAL_CALL focusLost (const css::awt::FocusEvent &rEvent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &rEvent) override
 

Private Types

typedef ::std::vector< css::uno::Reference< css::document::XEventListener > > LayoutListenerContainer
 

Private Member Functions

void SetLayoutMode (const LayoutMode eMode)
 
void PaintChildren (const css::awt::PaintEvent &rEvent) const
 
void UpdateWindowSize (const css::uno::Reference< css::awt::XWindow > &rxBorderWindow)
 
void PaintBackground (const css::awt::Rectangle &rUpdateBox)
 
void ProvideBackgroundBitmap ()
 
css::uno::Reference< css::rendering::XPolyPolygon2D > CreateClipPolyPolygon () const
 
void StoreViewMode (const ViewMode eViewMode)
 
void LayoutStandardMode ()
 
void LayoutNotesMode ()
 
void LayoutSlideSorterMode ()
 
void LayoutHelpMode ()
 
css::geometry::RealRectangle2D LayoutToolBar ()
 Layout the tool bar and return its outer bounding box. More...
 
css::awt::Size CalculatePaneSize (const double nOuterWidth, const OUString &rsPaneURL)
 
void NotifyLayoutModeChange ()
 Notify changes of the layout mode and of the slide sorter state. More...
 
void NotifyDisposing ()
 
void ThrowIfDisposed () const
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > mxComponentContext
 
::rtl::Reference< PresenterControllermpPresenterController
 
css::uno::Reference< css::awt::XWindow > mxParentWindow
 
css::uno::Reference< css::rendering::XCanvas > mxParentCanvas
 
css::uno::Reference< css::uno::XInterface > mxPaneBorderManager
 
::rtl::Reference< PresenterPaneBorderPaintermpPaneBorderPainter
 
::rtl::Reference< PresenterPaneContainermpPaneContainer
 
bool mbIsLayoutPending
 
bool mbIsLayouting
 This flag is set to <TRUE> while the Layout() method is being executed. More...
 
std::shared_ptr< PresenterThemempTheme
 
SharedBitmapDescriptor mpBackgroundBitmap
 
css::uno::Reference< css::rendering::XBitmap > mxScaledBackgroundBitmap
 
css::uno::Reference< css::rendering::XPolyPolygon2D > mxClipPolygon
 
LayoutMode meLayoutMode
 
bool mbIsSlideSorterActive
 
bool mbIsHelpViewActive
 
LayoutListenerContainer maLayoutListeners
 
bool mbIsMouseClickPending
 

Additional Inherited Members

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

Detailed Description

A simple manager of the positions of the panes of the presenter screen.

Uses relative coordinates of the four sides of each pane. Allows panes to be moved or resized with the mouse.

Definition at line 56 of file PresenterWindowManager.hxx.

Member Typedef Documentation

typedef ::std::vector<css::uno::Reference<css::document::XEventListener> > sdext::presenter::PresenterWindowManager::LayoutListenerContainer
private

Definition at line 167 of file PresenterWindowManager.hxx.

Member Enumeration Documentation

Enumerator
LM_Standard 
LM_Notes 
LM_Generic 

Definition at line 87 of file PresenterWindowManager.hxx.

Enumerator
VM_Standard 
VM_Notes 
VM_SlideOverview 
VM_Help 

Definition at line 92 of file PresenterWindowManager.hxx.

Constructor & Destructor Documentation

sdext::presenter::PresenterWindowManager::PresenterWindowManager ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext,
const ::rtl::Reference< PresenterPaneContainer > &  rpPaneContainer,
const ::rtl::Reference< PresenterController > &  rpPresenterController 
)
sdext::presenter::PresenterWindowManager::~PresenterWindowManager ( )
overridevirtual

Definition at line 76 of file PresenterWindowManager.cxx.

sdext::presenter::PresenterWindowManager::PresenterWindowManager ( const PresenterWindowManager )
delete

Member Function Documentation

void sdext::presenter::PresenterWindowManager::AddLayoutListener ( const css::uno::Reference< css::document::XEventListener > &  rxListener)

Definition at line 516 of file PresenterWindowManager.cxx.

References maLayoutListeners.

awt::Size sdext::presenter::PresenterWindowManager::CalculatePaneSize ( const double  nOuterWidth,
const OUString &  rsPaneURL 
)
private

Definition at line 795 of file PresenterWindowManager.cxx.

References mpPaneBorderPainter, and mpPresenterController.

Referenced by LayoutNotesMode(), and LayoutStandardMode().

Reference< rendering::XPolyPolygon2D > sdext::presenter::PresenterWindowManager::CreateClipPolyPolygon ( ) const
private
void SAL_CALL sdext::presenter::PresenterWindowManager::disposing ( )
override
virtual void SAL_CALL sdext::presenter::PresenterWindowManager::disposing ( const css::lang::EventObject &  rEvent)
overridevirtual
void SAL_CALL sdext::presenter::PresenterWindowManager::focusGained ( const css::awt::FocusEvent &  rEvent)
overridevirtual

Definition at line 289 of file PresenterWindowManager.cxx.

References ThrowIfDisposed().

void SAL_CALL sdext::presenter::PresenterWindowManager::focusLost ( const css::awt::FocusEvent &  rEvent)
overridevirtual

Definition at line 294 of file PresenterWindowManager.cxx.

References ThrowIfDisposed().

PresenterWindowManager::ViewMode sdext::presenter::PresenterWindowManager::GetViewMode ( ) const
void sdext::presenter::PresenterWindowManager::Layout ( )
void sdext::presenter::PresenterWindowManager::LayoutHelpMode ( )
private
void sdext::presenter::PresenterWindowManager::LayoutNotesMode ( )
private
void sdext::presenter::PresenterWindowManager::LayoutSlideSorterMode ( )
private
void sdext::presenter::PresenterWindowManager::LayoutStandardMode ( )
private
geometry::RealRectangle2D sdext::presenter::PresenterWindowManager::LayoutToolBar ( )
private
void SAL_CALL sdext::presenter::PresenterWindowManager::mouseEntered ( const css::awt::MouseEvent &  rEvent)
overridevirtual

Definition at line 277 of file PresenterWindowManager.cxx.

References mbIsMouseClickPending.

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

Definition at line 282 of file PresenterWindowManager.cxx.

References mbIsMouseClickPending.

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

Definition at line 262 of file PresenterWindowManager.cxx.

References mbIsMouseClickPending, and mbIsSlideSorterActive.

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

Definition at line 268 of file PresenterWindowManager.cxx.

References mbIsMouseClickPending, and mpPresenterController.

void sdext::presenter::PresenterWindowManager::NotifyDisposing ( )
private

Definition at line 845 of file PresenterWindowManager.cxx.

References aEvent, and maLayoutListeners.

Referenced by disposing().

void sdext::presenter::PresenterWindowManager::NotifyLayoutModeChange ( )
private

Notify changes of the layout mode and of the slide sorter state.

Definition at line 820 of file PresenterWindowManager.cxx.

References aEvent, maLayoutListeners, and RemoveLayoutListener().

Referenced by SetHelpViewState(), SetLayoutMode(), and SetSlideSorterState().

void sdext::presenter::PresenterWindowManager::NotifyViewCreation ( const css::uno::Reference< css::drawing::framework::XView > &  rxView)

Definition at line 151 of file PresenterWindowManager.cxx.

References Layout(), mpPaneContainer, and mpPresenterController.

PresenterWindowManager& sdext::presenter::PresenterWindowManager::operator= ( const PresenterWindowManager )
delete
void sdext::presenter::PresenterWindowManager::PaintBackground ( const css::awt::Rectangle &  rUpdateBox)
private
void sdext::presenter::PresenterWindowManager::PaintChildren ( const css::awt::PaintEvent &  rEvent) const
private
void sdext::presenter::PresenterWindowManager::ProvideBackgroundBitmap ( )
private
void sdext::presenter::PresenterWindowManager::RemoveLayoutListener ( const css::uno::Reference< css::document::XEventListener > &  rxListener)

Definition at line 522 of file PresenterWindowManager.cxx.

References maLayoutListeners.

Referenced by NotifyLayoutModeChange().

void sdext::presenter::PresenterWindowManager::RestoreViewMode ( )
void sdext::presenter::PresenterWindowManager::SetHelpViewState ( bool  bIsActive)
void sdext::presenter::PresenterWindowManager::SetLayoutMode ( const LayoutMode  eMode)
private
void sdext::presenter::PresenterWindowManager::SetPaneBorderPainter ( const ::rtl::Reference< PresenterPaneBorderPainter > &  rPainter)

Definition at line 188 of file PresenterWindowManager.cxx.

References mpPaneBorderPainter.

void sdext::presenter::PresenterWindowManager::SetPanePosSizeAbsolute ( const OUString &  rsPaneURL,
const double  nX,
const double  nY,
const double  nWidth,
const double  nHeight 
)
void sdext::presenter::PresenterWindowManager::SetParentPane ( const css::uno::Reference< css::drawing::framework::XPane > &  rxPane)

Definition at line 102 of file PresenterWindowManager.cxx.

References mxParentCanvas, and mxParentWindow.

Referenced by disposing().

void sdext::presenter::PresenterWindowManager::SetSlideSorterState ( bool  bIsActive)
void sdext::presenter::PresenterWindowManager::SetTheme ( const std::shared_ptr< PresenterTheme > &  rpTheme)

Definition at line 139 of file PresenterWindowManager.cxx.

References mpBackgroundBitmap, and mpTheme.

void sdext::presenter::PresenterWindowManager::SetViewMode ( const ViewMode  eMode)

The high-level method to switch the view mode.

Use this instead of SetLayoutMode and Set(Help|SlideSorter)State when possible.

Definition at line 415 of file PresenterWindowManager.cxx.

References LM_Notes, LM_Standard, SetHelpViewState(), SetLayoutMode(), SetSlideSorterState(), StoreViewMode(), VM_Help, VM_Notes, VM_SlideOverview, and VM_Standard.

Referenced by RestoreViewMode().

void sdext::presenter::PresenterWindowManager::StoreViewMode ( const ViewMode  eViewMode)
private
void sdext::presenter::PresenterWindowManager::ThrowIfDisposed ( ) const
private
Exceptions
css::lang::DisposedException

Definition at line 1027 of file PresenterWindowManager.cxx.

Referenced by focusGained(), focusLost(), windowMoved(), windowPaint(), and windowResized().

void sdext::presenter::PresenterWindowManager::Update ( )
void sdext::presenter::PresenterWindowManager::UpdateWindowSize ( const css::uno::Reference< css::awt::XWindow > &  rxBorderWindow)
private

Definition at line 870 of file PresenterWindowManager.cxx.

References mbIsLayouting, mpPaneContainer, and mxClipPolygon.

Referenced by windowMoved(), and windowResized().

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

Definition at line 231 of file PresenterWindowManager.cxx.

void SAL_CALL sdext::presenter::PresenterWindowManager::windowMoved ( const css::awt::WindowEvent &  rEvent)
overridevirtual
void SAL_CALL sdext::presenter::PresenterWindowManager::windowPaint ( const css::awt::PaintEvent &  rEvent)
overridevirtual
void SAL_CALL sdext::presenter::PresenterWindowManager::windowResized ( const css::awt::WindowEvent &  rEvent)
overridevirtual
void SAL_CALL sdext::presenter::PresenterWindowManager::windowShown ( const css::lang::EventObject &  rEvent)
overridevirtual

Definition at line 229 of file PresenterWindowManager.cxx.

Member Data Documentation

LayoutListenerContainer sdext::presenter::PresenterWindowManager::maLayoutListeners
private
bool sdext::presenter::PresenterWindowManager::mbIsHelpViewActive
private
bool sdext::presenter::PresenterWindowManager::mbIsLayouting
private

This flag is set to <TRUE> while the Layout() method is being executed.

Prevents windowMoved() and windowResized() from changing the window sizes.

Definition at line 158 of file PresenterWindowManager.hxx.

Referenced by Layout(), and UpdateWindowSize().

bool sdext::presenter::PresenterWindowManager::mbIsLayoutPending
private

Definition at line 153 of file PresenterWindowManager.hxx.

Referenced by Layout(), Update(), and windowPaint().

bool sdext::presenter::PresenterWindowManager::mbIsMouseClickPending
private

Definition at line 169 of file PresenterWindowManager.hxx.

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

bool sdext::presenter::PresenterWindowManager::mbIsSlideSorterActive
private
LayoutMode sdext::presenter::PresenterWindowManager::meLayoutMode
private
SharedBitmapDescriptor sdext::presenter::PresenterWindowManager::mpBackgroundBitmap
private

Definition at line 160 of file PresenterWindowManager.hxx.

Referenced by PaintBackground(), ProvideBackgroundBitmap(), and SetTheme().

::rtl::Reference<PresenterPaneBorderPainter> sdext::presenter::PresenterWindowManager::mpPaneBorderPainter
private
::rtl::Reference<PresenterPaneContainer> sdext::presenter::PresenterWindowManager::mpPaneContainer
private
::rtl::Reference<PresenterController> sdext::presenter::PresenterWindowManager::mpPresenterController
private
std::shared_ptr<PresenterTheme> sdext::presenter::PresenterWindowManager::mpTheme
private

Definition at line 159 of file PresenterWindowManager.hxx.

Referenced by SetTheme(), and windowPaint().

css::uno::Reference<css::rendering::XPolyPolygon2D> sdext::presenter::PresenterWindowManager::mxClipPolygon
private

Definition at line 162 of file PresenterWindowManager.hxx.

Referenced by Layout(), PaintBackground(), Update(), and UpdateWindowSize().

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

Definition at line 146 of file PresenterWindowManager.hxx.

Referenced by RestoreViewMode(), and StoreViewMode().

css::uno::Reference<css::uno::XInterface> sdext::presenter::PresenterWindowManager::mxPaneBorderManager
private

Definition at line 150 of file PresenterWindowManager.hxx.

Referenced by disposing().

css::uno::Reference<css::rendering::XCanvas> sdext::presenter::PresenterWindowManager::mxParentCanvas
private
css::uno::Reference<css::awt::XWindow> sdext::presenter::PresenterWindowManager::mxParentWindow
private
css::uno::Reference<css::rendering::XBitmap> sdext::presenter::PresenterWindowManager::mxScaledBackgroundBitmap
private

Definition at line 161 of file PresenterWindowManager.hxx.

Referenced by Layout(), PaintBackground(), and ProvideBackgroundBitmap().


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