LibreOffice Module sdext (master)
1
|
A simple manager of the positions of the panes of the presenter screen. More...
#include <PresenterWindowManager.hxx>
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 | |
PresenterWindowManager & | operator= (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 | SetPauseState (bool bIsPaused) |
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< PresenterController > | mpPresenterController |
css::uno::Reference< css::awt::XWindow > | mxParentWindow |
css::uno::Reference< css::rendering::XCanvas > | mxParentCanvas |
css::uno::Reference< css::uno::XInterface > | mxPaneBorderManager |
::rtl::Reference< PresenterPaneBorderPainter > | mpPaneBorderPainter |
::rtl::Reference< PresenterPaneContainer > | mpPaneContainer |
bool | mbIsLayoutPending |
bool | mbIsLayouting |
This flag is set to <TRUE> while the Layout() method is being executed. More... | |
std::shared_ptr< PresenterTheme > | mpTheme |
SharedBitmapDescriptor | mpBackgroundBitmap |
css::uno::Reference< css::rendering::XBitmap > | mxScaledBackgroundBitmap |
css::uno::Reference< css::rendering::XPolyPolygon2D > | mxClipPolygon |
LayoutMode | meLayoutMode |
bool | mbIsSlideSorterActive |
bool | mbIsHelpViewActive |
bool | mbisPaused |
LayoutListenerContainer | maLayoutListeners |
bool | mbIsMouseClickPending |
Additional Inherited Members | |
![]() | |
mutable::osl::Mutex | m_aMutex |
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.
|
private |
Definition at line 169 of file PresenterWindowManager.hxx.
Enumerator | |
---|---|
LM_Standard | |
LM_Notes | |
LM_Generic |
Definition at line 88 of file PresenterWindowManager.hxx.
Enumerator | |
---|---|
VM_Standard | |
VM_Notes | |
VM_SlideOverview | |
VM_Help |
Definition at line 93 of file PresenterWindowManager.hxx.
sdext::presenter::PresenterWindowManager::PresenterWindowManager | ( | const css::uno::Reference< css::uno::XComponentContext > & | rxContext, |
const ::rtl::Reference< PresenterPaneContainer > & | rpPaneContainer, | ||
const ::rtl::Reference< PresenterController > & | rpPresenterController | ||
) |
|
overridevirtual |
Definition at line 68 of file PresenterWindowManager.cxx.
|
delete |
void sdext::presenter::PresenterWindowManager::AddLayoutListener | ( | const css::uno::Reference< css::document::XEventListener > & | rxListener | ) |
Definition at line 518 of file PresenterWindowManager.cxx.
References maLayoutListeners.
|
private |
Definition at line 797 of file PresenterWindowManager.cxx.
References mpPaneBorderPainter, and mpPresenterController.
Referenced by LayoutNotesMode(), and LayoutStandardMode().
|
private |
Definition at line 988 of file PresenterWindowManager.cxx.
References sdext::presenter::PresenterGeometryHelper::CreatePolygon(), mpPaneContainer, mxParentCanvas, and mxParentWindow.
Referenced by PaintBackground().
|
override |
Definition at line 72 of file PresenterWindowManager.cxx.
References mpPaneContainer, mxPaneBorderManager, NotifyDisposing(), and SetParentPane().
|
overridevirtual |
|
overridevirtual |
Definition at line 281 of file PresenterWindowManager.cxx.
References ThrowIfDisposed().
|
overridevirtual |
Definition at line 286 of file PresenterWindowManager.cxx.
References ThrowIfDisposed().
PresenterWindowManager::ViewMode sdext::presenter::PresenterWindowManager::GetViewMode | ( | ) | const |
Definition at line 447 of file PresenterWindowManager.cxx.
References LM_Notes, mbIsHelpViewActive, mbIsSlideSorterActive, meLayoutMode, VM_Help, VM_Notes, VM_SlideOverview, and VM_Standard.
Referenced by SetHelpViewState(), and SetSlideSorterState().
void sdext::presenter::PresenterWindowManager::Layout | ( | ) |
Definition at line 533 of file PresenterWindowManager.cxx.
References Exception, LayoutHelpMode(), LayoutNotesMode(), LayoutSlideSorterMode(), LayoutStandardMode(), LM_Notes, LM_Standard, mbIsHelpViewActive, mbIsLayouting, mbIsLayoutPending, mbIsSlideSorterActive, meLayoutMode, mxClipPolygon, mxParentWindow, and mxScaledBackgroundBitmap.
Referenced by NotifyViewCreation(), SetHelpViewState(), SetLayoutMode(), SetSlideSorterState(), windowPaint(), and windowResized().
|
private |
Definition at line 726 of file PresenterWindowManager.cxx.
References LayoutToolBar(), mpPaneContainer, sdext::presenter::PresenterViewFactory::msHelpViewURL, mxParentWindow, and SetPanePosSizeAbsolute().
Referenced by Layout().
|
private |
check whether RTL interface or not
check whether RTL interface or not
check whether RTL interface or not
check whether RTL interface or not
Definition at line 628 of file PresenterWindowManager.cxx.
References CalculatePaneSize(), AllSettings::GetLayoutRTL(), LayoutToolBar(), mpPaneContainer, sdext::presenter::PresenterPaneFactory::msCurrentSlidePreviewPaneURL, sdext::presenter::PresenterPaneFactory::msNextSlidePreviewPaneURL, sdext::presenter::PresenterPaneFactory::msNotesPaneURL, mxParentWindow, and SetPanePosSizeAbsolute().
Referenced by Layout().
|
private |
Definition at line 712 of file PresenterWindowManager.cxx.
References LayoutToolBar(), mpPaneContainer, sdext::presenter::PresenterViewFactory::msSlideSorterURL, mxParentWindow, and SetPanePosSizeAbsolute().
Referenced by Layout().
|
private |
check whether RTL interface or not
check whether RTL interface or not
Definition at line 571 of file PresenterWindowManager.cxx.
References CalculatePaneSize(), AllSettings::GetLayoutRTL(), LayoutToolBar(), mpPaneContainer, sdext::presenter::PresenterPaneFactory::msCurrentSlidePreviewPaneURL, sdext::presenter::PresenterPaneFactory::msNextSlidePreviewPaneURL, mxParentWindow, and SetPanePosSizeAbsolute().
Referenced by Layout().
|
private |
Layout the tool bar and return its outer bounding box.
Definition at line 742 of file PresenterWindowManager.cxx.
References sdext::presenter::PresenterToolBarView::GetPresenterToolBar(), mpPaneBorderPainter, mpPaneContainer, sdext::presenter::PresenterPaneFactory::msToolBarPaneURL, mxParentWindow, sdext::presenter::PresenterGeometryHelper::Round(), and SetPanePosSizeAbsolute().
Referenced by LayoutHelpMode(), LayoutNotesMode(), LayoutSlideSorterMode(), and LayoutStandardMode().
|
overridevirtual |
Definition at line 269 of file PresenterWindowManager.cxx.
References mbIsMouseClickPending.
|
overridevirtual |
Definition at line 274 of file PresenterWindowManager.cxx.
References mbIsMouseClickPending.
|
overridevirtual |
Definition at line 254 of file PresenterWindowManager.cxx.
References mbIsMouseClickPending, and mbIsSlideSorterActive.
|
overridevirtual |
Definition at line 260 of file PresenterWindowManager.cxx.
References mbIsMouseClickPending, and mpPresenterController.
|
private |
Definition at line 847 of file PresenterWindowManager.cxx.
References aEvent, and maLayoutListeners.
Referenced by disposing().
|
private |
Notify changes of the layout mode and of the slide sorter state.
Definition at line 822 of file PresenterWindowManager.cxx.
References aEvent, maLayoutListeners, and RemoveLayoutListener().
Referenced by SetHelpViewState(), SetLayoutMode(), SetPauseState(), and SetSlideSorterState().
void sdext::presenter::PresenterWindowManager::NotifyViewCreation | ( | const css::uno::Reference< css::drawing::framework::XView > & | rxView | ) |
Definition at line 143 of file PresenterWindowManager.cxx.
References Layout(), mpPaneContainer, and mpPresenterController.
|
delete |
|
private |
Definition at line 886 of file PresenterWindowManager.cxx.
References CreateClipPolyPolygon(), sdext::presenter::PresenterGeometryHelper::CreatePolygon(), mpBackgroundBitmap, mxClipPolygon, mxParentCanvas, mxParentWindow, mxScaledBackgroundBitmap, and ProvideBackgroundBitmap().
Referenced by windowPaint().
|
private |
Definition at line 300 of file PresenterWindowManager.cxx.
References sdext::presenter::PresenterGeometryHelper::Intersection(), mpPaneContainer, mpPresenterController, and sdext::presenter::PresenterGeometryHelper::TranslateRectangle().
Referenced by windowPaint().
|
private |
Definition at line 956 of file PresenterWindowManager.cxx.
References mpBackgroundBitmap, mxParentWindow, mxScaledBackgroundBitmap, and sdext::presenter::PresenterBitmapContainer::BitmapDescriptor::Stretch.
Referenced by PaintBackground().
void sdext::presenter::PresenterWindowManager::RemoveLayoutListener | ( | const css::uno::Reference< css::document::XEventListener > & | rxListener | ) |
Definition at line 524 of file PresenterWindowManager.cxx.
References maLayoutListeners.
Referenced by NotifyLayoutModeChange().
void sdext::presenter::PresenterWindowManager::RestoreViewMode | ( | ) |
Restore the layout mode (or slide sorter state) from the configuration.
Definition at line 459 of file PresenterWindowManager.cxx.
References sdext::presenter::PresenterConfigurationAccess::GetConfigurationNode(), mxComponentContext, sdext::presenter::PresenterConfigurationAccess::READ_ONLY, SetViewMode(), VM_Notes, VM_SlideOverview, and VM_Standard.
void sdext::presenter::PresenterWindowManager::SetHelpViewState | ( | bool | bIsActive | ) |
Definition at line 389 of file PresenterWindowManager.cxx.
References GetViewMode(), Layout(), LM_Notes, mbIsHelpViewActive, mbIsSlideSorterActive, meLayoutMode, mpPresenterController, NotifyLayoutModeChange(), and StoreViewMode().
Referenced by SetViewMode().
|
private |
Definition at line 350 of file PresenterWindowManager.cxx.
References Layout(), LM_Notes, mbIsHelpViewActive, mbIsSlideSorterActive, meLayoutMode, mpPresenterController, and NotifyLayoutModeChange().
Referenced by SetViewMode().
void sdext::presenter::PresenterWindowManager::SetPaneBorderPainter | ( | const ::rtl::Reference< PresenterPaneBorderPainter > & | rPainter | ) |
Definition at line 180 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 | ||
) |
Definition at line 159 of file PresenterWindowManager.cxx.
References mpPaneContainer.
Referenced by LayoutHelpMode(), LayoutNotesMode(), LayoutSlideSorterMode(), LayoutStandardMode(), and LayoutToolBar().
void sdext::presenter::PresenterWindowManager::SetParentPane | ( | const css::uno::Reference< css::drawing::framework::XPane > & | rxPane | ) |
Definition at line 94 of file PresenterWindowManager.cxx.
References mxParentCanvas, and mxParentWindow.
Referenced by disposing().
void sdext::presenter::PresenterWindowManager::SetPauseState | ( | bool | bIsPaused | ) |
Definition at line 407 of file PresenterWindowManager.cxx.
References mbisPaused, and NotifyLayoutModeChange().
void sdext::presenter::PresenterWindowManager::SetSlideSorterState | ( | bool | bIsActive | ) |
Definition at line 371 of file PresenterWindowManager.cxx.
References GetViewMode(), Layout(), LM_Notes, mbIsHelpViewActive, mbIsSlideSorterActive, meLayoutMode, mpPresenterController, NotifyLayoutModeChange(), and StoreViewMode().
Referenced by SetViewMode().
void sdext::presenter::PresenterWindowManager::SetTheme | ( | const std::shared_ptr< PresenterTheme > & | rpTheme | ) |
Definition at line 131 of file PresenterWindowManager.cxx.
References mpBackgroundBitmap, and mpTheme.
The high-level method to switch the view mode.
Use this instead of SetLayoutMode and Set(Help|SlideSorter)State when possible.
Definition at line 417 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().
Definition at line 484 of file PresenterWindowManager.cxx.
References Any, sdext::presenter::PresenterConfigurationAccess::CommitChanges(), Exception, sdext::presenter::PresenterConfigurationAccess::GoToChild(), mxComponentContext, sdext::presenter::PresenterConfigurationAccess::READ_WRITE, sdext::presenter::PresenterConfigurationAccess::SetProperty(), VM_Notes, VM_SlideOverview, and VM_Standard.
Referenced by SetHelpViewState(), SetSlideSorterState(), and SetViewMode().
|
private |
css::lang::DisposedException |
Definition at line 1031 of file PresenterWindowManager.cxx.
Referenced by focusGained(), focusLost(), windowMoved(), windowPaint(), and windowResized().
void sdext::presenter::PresenterWindowManager::Update | ( | ) |
Definition at line 1023 of file PresenterWindowManager.cxx.
References mbIsLayoutPending, mpPresenterController, mxClipPolygon, and mxParentWindow.
|
private |
Definition at line 872 of file PresenterWindowManager.cxx.
References mbIsLayouting, mpPaneContainer, and mxClipPolygon.
Referenced by windowMoved(), and windowResized().
|
overridevirtual |
Definition at line 223 of file PresenterWindowManager.cxx.
|
overridevirtual |
Definition at line 208 of file PresenterWindowManager.cxx.
References mpPresenterController, mxParentWindow, ThrowIfDisposed(), and UpdateWindowSize().
|
overridevirtual |
Definition at line 227 of file PresenterWindowManager.cxx.
References Layout(), mbIsLayoutPending, mpTheme, mxParentCanvas, mxParentWindow, PaintBackground(), PaintChildren(), and ThrowIfDisposed().
|
overridevirtual |
Definition at line 188 of file PresenterWindowManager.cxx.
References Layout(), mpPresenterController, mxParentWindow, ThrowIfDisposed(), and UpdateWindowSize().
|
overridevirtual |
Definition at line 221 of file PresenterWindowManager.cxx.
|
private |
Definition at line 170 of file PresenterWindowManager.hxx.
Referenced by AddLayoutListener(), NotifyDisposing(), NotifyLayoutModeChange(), and RemoveLayoutListener().
|
private |
Definition at line 166 of file PresenterWindowManager.hxx.
Referenced by GetViewMode(), Layout(), SetHelpViewState(), SetLayoutMode(), and SetSlideSorterState().
|
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 159 of file PresenterWindowManager.hxx.
Referenced by Layout(), and UpdateWindowSize().
|
private |
Definition at line 154 of file PresenterWindowManager.hxx.
Referenced by Layout(), Update(), and windowPaint().
|
private |
Definition at line 171 of file PresenterWindowManager.hxx.
Referenced by mouseEntered(), mouseExited(), mousePressed(), and mouseReleased().
|
private |
Definition at line 167 of file PresenterWindowManager.hxx.
Referenced by SetPauseState().
|
private |
Definition at line 165 of file PresenterWindowManager.hxx.
Referenced by GetViewMode(), Layout(), mousePressed(), SetHelpViewState(), SetLayoutMode(), and SetSlideSorterState().
|
private |
Definition at line 164 of file PresenterWindowManager.hxx.
Referenced by GetViewMode(), Layout(), SetHelpViewState(), SetLayoutMode(), and SetSlideSorterState().
|
private |
Definition at line 161 of file PresenterWindowManager.hxx.
Referenced by PaintBackground(), ProvideBackgroundBitmap(), and SetTheme().
|
private |
Definition at line 152 of file PresenterWindowManager.hxx.
Referenced by CalculatePaneSize(), LayoutToolBar(), and SetPaneBorderPainter().
|
private |
Definition at line 153 of file PresenterWindowManager.hxx.
Referenced by CreateClipPolyPolygon(), disposing(), LayoutHelpMode(), LayoutNotesMode(), LayoutSlideSorterMode(), LayoutStandardMode(), LayoutToolBar(), NotifyViewCreation(), PaintChildren(), SetPanePosSizeAbsolute(), and UpdateWindowSize().
|
private |
Definition at line 148 of file PresenterWindowManager.hxx.
Referenced by CalculatePaneSize(), mouseReleased(), NotifyViewCreation(), PaintChildren(), SetHelpViewState(), SetLayoutMode(), SetSlideSorterState(), Update(), windowMoved(), and windowResized().
|
private |
Definition at line 160 of file PresenterWindowManager.hxx.
Referenced by SetTheme(), and windowPaint().
|
private |
Definition at line 163 of file PresenterWindowManager.hxx.
Referenced by Layout(), PaintBackground(), Update(), and UpdateWindowSize().
|
private |
Definition at line 147 of file PresenterWindowManager.hxx.
Referenced by RestoreViewMode(), and StoreViewMode().
|
private |
Definition at line 151 of file PresenterWindowManager.hxx.
Referenced by disposing().
|
private |
Definition at line 150 of file PresenterWindowManager.hxx.
Referenced by CreateClipPolyPolygon(), PaintBackground(), SetParentPane(), and windowPaint().
|
private |
Definition at line 149 of file PresenterWindowManager.hxx.
Referenced by CreateClipPolyPolygon(), Layout(), LayoutHelpMode(), LayoutNotesMode(), LayoutSlideSorterMode(), LayoutStandardMode(), LayoutToolBar(), PaintBackground(), ProvideBackgroundBitmap(), SetParentPane(), Update(), windowMoved(), windowPaint(), and windowResized().
|
private |
Definition at line 162 of file PresenterWindowManager.hxx.
Referenced by Layout(), PaintBackground(), and ProvideBackgroundBitmap().