LibreOffice Module sfx2 (master) 1
|
#include <SidebarController.hxx>
Public Member Functions | |
virtual | ~SidebarController () override |
SidebarController (const SidebarController &)=delete | |
SidebarController & | operator= (const SidebarController &)=delete |
void | registerSidebarForFrame (const css::uno::Reference< css::frame::XController > &xFrame) |
void | unregisterSidebarForFrame (const css::uno::Reference< css::frame::XController > &xFrame) |
virtual void SAL_CALL | notifyContextChangeEvent (const css::ui::ContextChangeEventObject &rEvent) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &rEventObject) override |
virtual void SAL_CALL | propertyChange (const css::beans::PropertyChangeEvent &rEvent) override |
virtual void SAL_CALL | statusChanged (const css::frame::FeatureStateEvent &rEvent) override |
virtual void SAL_CALL | frameAction (const css::frame::FrameActionEvent &rEvent) override |
virtual void SAL_CALL | requestLayout () override |
void | NotifyResize () |
void | OpenThenSwitchToDeck (std::u16string_view rsDeckId) |
void | OpenThenToggleDeck (const OUString &rsDeckId) |
void | RequestCloseDeck () |
Show only the tab bar, not the deck. More... | |
void | RequestOpenDeck () |
Open the deck area and restore the parent window to its old width. More... | |
bool | IsDeckVisible (std::u16string_view rsDeckId) |
Returns true when the given deck is the currently visible deck. More... | |
bool | IsDeckOpen (const sal_Int32 nIndex=-1) |
FocusManager & | GetFocusManager () |
ResourceManager * | GetResourceManager () |
const Context & | GetCurrentContext () const |
bool | IsDocumentReadOnly (void) const |
void | SwitchToDeck (std::u16string_view rsDeckId) |
void | SwitchToDefaultDeck () |
bool | WasFloatingDeckClosed () const |
void | SetFloatingDeckClosed (bool bWasClosed) |
void | CreateDeck (std::u16string_view rDeckId) |
void | CreateDeck (std::u16string_view rDeckId, const Context &rContext, bool bForceCreate=false) |
ResourceManager::DeckContextDescriptorContainer | GetMatchingDecks () |
ResourceManager::PanelContextDescriptorContainer | GetMatchingPanels (std::u16string_view rDeckId) |
void | notifyDeckTitle (std::u16string_view targetDeckId) |
void | updateModel (const css::uno::Reference< css::frame::XModel > &xModel) |
void | disposeDecks () |
void | FadeIn () |
void | FadeOut () |
tools::Rectangle | GetDeckDragArea () const |
css::uno::Reference< css::frame::XFrame > const & | getXFrame () const |
sal_Int32 | getMaximumWidth () const |
void | setMaximumWidth (sal_Int32 nMaximumWidth) |
void | saveDeckState () |
void | SyncUpdate () |
bool | hasChartOrMathContextCurrently () const |
Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc > | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
Public Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
Public Member Functions inherited from comphelper::UnoImplBase | |
virtual | ~UnoImplBase () |
Static Public Member Functions | |
static rtl::Reference< SidebarController > | create (SidebarDockingWindow *pParentWindow, const SfxViewFrame *pViewFrame) |
static SidebarController * | GetSidebarControllerForFrame (const css::uno::Reference< css::frame::XFrame > &rxFrame) |
Return the SidebarController object that is associated with the given XFrame. More... | |
static SidebarController * | GetSidebarControllerForView (const SfxViewShell *pViewShell) |
Static Public Attributes | |
static const sal_Int32 | SwitchFlag_NoForce = 0x00 |
In some situations it is necessary to force an update of the current deck and its panels. More... | |
static const sal_Int32 | SwitchFlag_ForceSwitch = 0x01 |
static const sal_Int32 | SwitchFlag_ForceNewDeck = 0x02 |
static const sal_Int32 | SwitchFlag_ForceNewPanels = 0x02 |
Private Member Functions | |
SidebarController (SidebarDockingWindow *pParentWindow, const SfxViewFrame *pViewFrame) | |
DECL_DLLPRIVATE_LINK (WindowEventHandler, VclWindowEvent &, void) | |
void | UpdateConfigurations () |
Make maRequestedContext the current context. More... | |
css::uno::Reference< css::ui::XUIElement > | CreateUIElement (const css::uno::Reference< css::awt::XWindow > &rxWindow, const OUString &rsImplementationURL, const bool bWantsCanvas, const Context &rContext) |
void | CreatePanels (std::u16string_view rDeckId, const Context &rContext) |
std::shared_ptr< Panel > | CreatePanel (std::u16string_view rsPanelId, weld::Widget *pParentWindow, const bool bIsInitiallyExpanded, const Context &rContext, const VclPtr< Deck > &pDeck) |
void | SwitchToDeck (const DeckDescriptor &rDeckDescriptor, const Context &rContext) |
void | ShowPopupMenu (weld::Menu &rMainMenu, weld::Menu &rSubMenu, const ::std::vector< TabBar::DeckMenuData > &rMenuData) const |
void | PopulatePopupMenus (weld::Menu &rMainButton, weld::Menu &rSubMenu, const ::std::vector< TabBar::DeckMenuData > &rMenuData) const |
DECL_DLLPRIVATE_LINK (OnMenuItemSelected, const OUString &, void) | |
DECL_DLLPRIVATE_LINK (OnSubMenuItemSelected, const OUString &, void) | |
void | BroadcastPropertyChange () |
bool | CanModifyChildWindowWidth () |
The close of the deck changes the width of the child window. More... | |
sal_Int32 | SetChildWindowWidth (const sal_Int32 nNewWidth) |
Set the child window container to a new width. More... | |
void | UpdateTitleBarIcons () |
Update the icons displayed in the title bars of the deck and the panels. More... | |
void | UpdateDeckOpenState () |
void | RestrictWidth (sal_Int32 nWidth) |
SfxSplitWindow * | GetSplitWindow () |
void | ProcessNewWidth (const sal_Int32 nNewWidth) |
void | UpdateCloseIndicator (const bool bIsIndicatorVisible) |
void | ShowPanel (const Panel &rPanel) |
Typically called when a panel is focused via keyboard. More... | |
virtual void | disposing (std::unique_lock< std::mutex > &) override |
Private Attributes | |
VclPtr< Deck > | mpCurrentDeck |
VclPtr< SidebarDockingWindow > | mpParentWindow |
const SfxViewFrame * | mpViewFrame |
css::uno::Reference< css::frame::XFrame > | mxFrame |
VclPtr< TabBar > | mpTabBar |
Context | maCurrentContext |
Context | maRequestedContext |
css::uno::Reference< css::frame::XController > | mxCurrentController |
sal_Int32 | mnRequestedForceFlags |
Use a combination of SwitchFlag_* as value. More... | |
sal_Int32 | mnMaximumSidebarWidth |
bool | mbMinimumSidebarWidth |
OUString | msCurrentDeckId |
AsynchronousCall | maPropertyChangeForwarder |
AsynchronousCall | maContextChangeUpdate |
css::uno::Reference< css::beans::XPropertySet > | mxThemePropertySet |
::std::optional< bool > | mbIsDeckRequestedOpen |
Two flags control whether the deck is displayed or if only the tab bar remains visible. More... | |
::std::optional< bool > | mbIsDeckOpen |
bool | mbFloatingDeckClosed |
sal_Int32 | mnSavedSidebarWidth |
Before the deck is closed the sidebar width is saved into this variable, so that it can be restored when the deck is reopened. More... | |
FocusManager | maFocusManager |
css::uno::Reference< css::frame::XDispatch > | mxReadOnlyModeDispatch |
bool | mbIsDocumentReadOnly |
VclPtr< SfxSplitWindow > | mpSplitWindow |
sal_Int32 | mnWidthOnSplitterButtonDown |
When the user moves the splitter then we remember the width at that time. More... | |
VclPtr< vcl::Window > | mpCloseIndicator |
Control that is temporarily used as replacement for the deck to indicate that when the current mouse drag operation ends, the sidebar will only show the tab bar. More... | |
std::unique_ptr< ResourceManager > | mpResourceManager |
Additional Inherited Members | |
Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
Protected Attributes inherited from comphelper::WeakComponentImplHelperBase | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
Protected Attributes inherited from comphelper::UnoImplBase | |
std::mutex | m_aMutex |
bool | m_bDisposed |
Definition at line 62 of file SidebarController.hxx.
|
overridevirtual |
Definition at line 171 of file SidebarController.cxx.
|
delete |
Referenced by create().
|
private |
Definition at line 110 of file SidebarController.cxx.
References Create(), and OpenThenToggleDeck().
|
private |
Definition at line 409 of file SidebarController.cxx.
References mpParentWindow.
|
private |
The close of the deck changes the width of the child window.
That is only possible if there is no other docking window docked above or below the sidebar. Return whether the width of the child window can be modified.
Definition at line 1377 of file SidebarController.cxx.
References GetSplitWindow(), SfxSplitWindow::GetWindowCount(), SfxSplitWindow::GetWindowPos(), and mpParentWindow.
Referenced by NotifyResize().
|
static |
Definition at line 142 of file SidebarController.cxx.
References aURL, sfx2::sidebar::Tools::GetDispatch(), SfxViewFrame::GetFrame(), SfxFrame::GetFrameInterface(), sfx2::sidebar::Theme::GetPropertySet(), sfx2::sidebar::Tools::GetURL(), LINK, and SidebarController().
Referenced by sfx2::sidebar::SidebarDockingWindow::GetOrCreateSidebarController().
void sfx2::sidebar::SidebarController::CreateDeck | ( | std::u16string_view | rDeckId | ) |
Definition at line 696 of file SidebarController.cxx.
References CreateDeck(), and maCurrentContext.
Referenced by CreateDeck(), and SwitchToDeck().
void sfx2::sidebar::SidebarController::CreateDeck | ( | std::u16string_view | rDeckId, |
const Context & | rContext, | ||
bool | bForceCreate = false |
||
) |
Definition at line 700 of file SidebarController.cxx.
References VclPtr< class reference_type >::Create(), CreatePanels(), VclPtr< class reference_type >::disposeAndClear(), mpParentWindow, mpResourceManager, and RequestCloseDeck().
|
private |
Definition at line 930 of file SidebarController.cxx.
References CreateUIElement(), GetCurrentContext(), mpResourceManager, and mxFrame.
Referenced by CreatePanels().
|
private |
Definition at line 722 of file SidebarController.cxx.
References CreatePanel(), mbIsDocumentReadOnly, sfx2::sidebar::ResourceManager::PanelContextDescriptor::mbIsInitiallyVisible, sfx2::sidebar::ResourceManager::PanelContextDescriptor::mbShowForReadOnlyDocuments, mpResourceManager, sfx2::sidebar::ResourceManager::PanelContextDescriptor::msId, sfx2::sidebar::ResourceManager::PanelContextDescriptor::msMenuCommand, mxCurrentController, mxFrame, sfx2::sidebar::PanelTitleBar::SetMoreOptionsCommand(), and xController.
Referenced by CreateDeck(), and SwitchToDeck().
|
private |
Definition at line 970 of file SidebarController.cxx.
References Any, Exception, SfxDockingWindow::GetBindings(), sfx2::sidebar::Tools::GetModuleName(), sfx2::sidebar::Theme::GetPropertySet(), comphelper::NamedValueCollection::getPropertyValues(), VCLUnoHelper::GetWindow(), mpParentWindow, sfx2::sidebar::Context::msApplication, sfx2::sidebar::Context::msContext, mxCurrentController, mxFrame, comphelper::NamedValueCollection::put(), and TOOLS_WARN_EXCEPTION.
Referenced by CreatePanel().
|
private |
|
private |
|
private |
void sfx2::sidebar::SidebarController::disposeDecks | ( | ) |
Definition at line 219 of file SidebarController.cxx.
References sfx2::sidebar::FocusManager::Clear(), GetCurrentContext(), SfxShell::GetViewShell(), comphelper::LibreOfficeKit::isActive(), maFocusManager, mpCurrentDeck, mpParentWindow, mpResourceManager, mpViewFrame, and msCurrentDeckId.
Referenced by unregisterSidebarForFrame().
|
overridevirtual |
Definition at line 360 of file SidebarController.cxx.
References comphelper::WeakComponentImplHelper< typename... Ifc >::dispose().
|
overrideprivatevirtual |
Reimplemented from comphelper::WeakComponentImplHelperBase.
Definition at line 276 of file SidebarController.cxx.
References sfx2::sidebar::AsynchronousCall::CancelRequest(), sfx2::sidebar::FocusManager::Clear(), VclPtr< class reference_type >::disposeAndClear(), GetCurrentContext(), sfx2::sidebar::Tools::GetURL(), IsDocumentReadOnly(), LINK, maContextChangeUpdate, maFocusManager, mpCloseIndicator, mpParentWindow, mpResourceManager, mpSplitWindow, mpTabBar, mxCurrentController, mxFrame, mxReadOnlyModeDispatch, mxThemePropertySet, saveDeckState(), unregisterSidebarForFrame(), and xController.
void sfx2::sidebar::SidebarController::FadeIn | ( | ) |
Definition at line 1564 of file SidebarController.cxx.
References mpSplitWindow.
Referenced by SfxApplication::MiscExec_Impl().
void sfx2::sidebar::SidebarController::FadeOut | ( | ) |
Definition at line 1558 of file SidebarController.cxx.
References mpSplitWindow.
Referenced by SfxApplication::MiscExec_Impl().
|
overridevirtual |
Definition at line 1583 of file SidebarController.cxx.
References mxFrame, registerSidebarForFrame(), and unregisterSidebarForFrame().
|
inline |
Definition at line 139 of file SidebarController.hxx.
Referenced by CreatePanel(), disposeDecks(), disposing(), GetMatchingDecks(), GetMatchingPanels(), saveDeckState(), SwitchToDeck(), sfx2::sidebar::TabBar::ToggleHideFlag(), UpdateConfigurations(), and UpdateDeckOpenState().
tools::Rectangle sfx2::sidebar::SidebarController::GetDeckDragArea | ( | ) | const |
Definition at line 1570 of file SidebarController.cxx.
References mpCurrentDeck.
|
inline |
Definition at line 133 of file SidebarController.hxx.
Referenced by sfx2::sidebar::Sidebar::ShowDeck(), and sfx2::sidebar::Sidebar::ShowPanel().
ResourceManager::DeckContextDescriptorContainer sfx2::sidebar::SidebarController::GetMatchingDecks | ( | ) |
Definition at line 1532 of file SidebarController.cxx.
References GetCurrentContext(), IsDocumentReadOnly(), mpResourceManager, and mxFrame.
ResourceManager::PanelContextDescriptorContainer sfx2::sidebar::SidebarController::GetMatchingPanels | ( | std::u16string_view | rDeckId | ) |
Definition at line 1542 of file SidebarController.cxx.
References GetCurrentContext(), mpResourceManager, and mxFrame.
|
inline |
Definition at line 166 of file SidebarController.hxx.
Referenced by RestrictWidth().
|
inline |
Definition at line 135 of file SidebarController.hxx.
Referenced by sfx2::sidebar::IMPL_LINK_NOARG(), sfx2::sidebar::Sidebar::IsPanelVisible(), sfx2::sidebar::TabBar::RestoreHideFlags(), sfx2::sidebar::TabBar::SetDecks(), sfx2::sidebar::Panel::SetExpanded(), sfx2::sidebar::Sidebar::ShowPanel(), sfx2::sidebar::TabBar::ToggleHideFlag(), sfx2::sidebar::Sidebar::TogglePanel(), and sfx2::sidebar::TabBar::UpdateButtonIcons().
|
static |
Return the SidebarController object that is associated with the given XFrame.
Definition at line 175 of file SidebarController.cxx.
References framework::GetFirstListenerWith(), SAL_WARN, and xController.
Referenced by sfx2::sidebar::Sidebar::IsPanelVisible(), SfxApplication::MiscExec_Impl(), sfx2::sidebar::Panel::SetExpanded(), sfx2::sidebar::Sidebar::ShowDeck(), sfx2::sidebar::Sidebar::ShowPanel(), and sfx2::sidebar::Sidebar::TogglePanel().
|
static |
Definition at line 1620 of file SidebarController.cxx.
References SfxViewShell::GetController(), and xController.
|
private |
Definition at line 1434 of file SidebarController.cxx.
References LINK, mpParentWindow, and mpSplitWindow.
Referenced by CanModifyChildWindowWidth(), NotifyResize(), OpenThenToggleDeck(), RequestOpenDeck(), RestrictWidth(), SetChildWindowWidth(), and SwitchToDeck().
|
inline |
Definition at line 164 of file SidebarController.hxx.
bool sfx2::sidebar::SidebarController::hasChartOrMathContextCurrently | ( | ) | const |
Definition at line 1612 of file SidebarController.cxx.
References sfx2::sidebar::isChartOrMathContext(), maCurrentContext, and maRequestedContext.
bool sfx2::sidebar::SidebarController::IsDeckOpen | ( | const sal_Int32 | nIndex = -1 | ) |
Definition at line 1268 of file SidebarController.cxx.
References IsDeckVisible(), mbIsDeckOpen, mpTabBar, and nIndex.
Referenced by ShowPanel().
bool sfx2::sidebar::SidebarController::IsDeckVisible | ( | std::u16string_view | rsDeckId | ) |
Returns true when the given deck is the currently visible deck.
Definition at line 1278 of file SidebarController.cxx.
References mbIsDeckOpen, and msCurrentDeckId.
Referenced by IsDeckOpen(), sfx2::sidebar::Sidebar::IsPanelVisible(), OpenThenToggleDeck(), and sfx2::sidebar::Sidebar::ShowDeck().
|
inline |
Definition at line 140 of file SidebarController.hxx.
Referenced by disposing(), and GetMatchingDecks().
|
overridevirtual |
Definition at line 336 of file SidebarController.cxx.
References comphelper::LibreOfficeKit::isActive(), maContextChangeUpdate, maCurrentContext, maRequestedContext, mxCurrentController, sfx2::sidebar::AsynchronousCall::RequestCall(), and UpdateConfigurations().
void sfx2::sidebar::SidebarController::notifyDeckTitle | ( | std::u16string_view | targetDeckId | ) |
Definition at line 920 of file SidebarController.cxx.
References maFocusManager, mpCurrentDeck, mpTabBar, msCurrentDeckId, sfx2::sidebar::FocusManager::SetDeck(), and UpdateTitleBarIcons().
void sfx2::sidebar::SidebarController::NotifyResize | ( | ) |
Definition at line 414 of file SidebarController.cxx.
References CanModifyChildWindowWidth(), SplitWindow::GetAlign(), sfx2::sidebar::TabBar::GetDefaultWidth(), GetSplitWindow(), sfx2::sidebar::TitleBar::GetVisible(), comphelper::LibreOfficeKit::isActive(), mbIsDeckOpen, mbIsDeckRequestedOpen, mbMinimumSidebarWidth, mnSavedSidebarWidth, mnWidthOnSplitterButtonDown, mpCurrentDeck, mpParentWindow, mpTabBar, msCurrentDeckId, RestrictWidth(), sfx2::sidebar::DeckTitleBar::SetCloserVisible(), and UpdateCloseIndicator().
Referenced by SwitchToDeck(), and UpdateDeckOpenState().
void sfx2::sidebar::SidebarController::OpenThenSwitchToDeck | ( | std::u16string_view | rsDeckId | ) |
Definition at line 666 of file SidebarController.cxx.
References RequestOpenDeck(), and SwitchToDeck().
Referenced by sfx2::sidebar::Sidebar::ShowDeck(), and sfx2::sidebar::Sidebar::ShowPanel().
void sfx2::sidebar::SidebarController::OpenThenToggleDeck | ( | const OUString & | rsDeckId | ) |
Definition at line 626 of file SidebarController.cxx.
References SfxSplitWindow::FadeIn(), sfx2::sidebar::TabBar::GetDefaultWidth(), GetSplitWindow(), IsDeckVisible(), SfxSplitWindow::IsFadeIn(), mnWidthOnSplitterButtonDown, mpCurrentDeck, mpParentWindow, mpTabBar, RequestCloseDeck(), RequestOpenDeck(), SetChildWindowWidth(), SwitchToDeck(), and WasFloatingDeckClosed().
Referenced by SidebarController(), and sfx2::sidebar::Sidebar::TogglePanel().
|
delete |
|
private |
Definition at line 1090 of file SidebarController.cxx.
References weld::Menu::insert(), comphelper::LibreOfficeKit::isActive(), mpParentWindow, nIndex, weld::Menu::set_active(), weld::Menu::set_sensitive(), weld::Menu::set_visible(), TRISTATE_FALSE, and TRISTATE_TRUE.
Referenced by ShowPopupMenu().
|
private |
Definition at line 503 of file SidebarController.cxx.
References sfx2::sidebar::TabBar::GetDefaultWidth(), mbIsDeckOpen, mbIsDeckRequestedOpen, mnSavedSidebarWidth, mnWidthOnSplitterButtonDown, RequestCloseDeck(), and RequestOpenDeck().
|
overridevirtual |
Definition at line 365 of file SidebarController.cxx.
References maPropertyChangeForwarder, and sfx2::sidebar::AsynchronousCall::RequestCall().
void sfx2::sidebar::SidebarController::registerSidebarForFrame | ( | const css::uno::Reference< css::frame::XController > & | xFrame | ) |
Definition at line 195 of file SidebarController.cxx.
References xController.
Referenced by frameAction().
void sfx2::sidebar::SidebarController::RequestCloseDeck | ( | ) |
Show only the tab bar, not the deck.
Definition at line 1226 of file SidebarController.cxx.
References SfxViewShell::Current(), tools::JsonWriter::finishAndGetAsOString(), comphelper::LibreOfficeKit::isActive(), SfxViewShell::isLOKMobilePhone(), SfxViewShell::libreOfficeKitViewCallback(), mbIsDeckRequestedOpen, mpCurrentDeck, mpParentWindow, mpTabBar, tools::JsonWriter::put(), and UpdateDeckOpenState().
Referenced by CreateDeck(), SfxApplication::MiscExec_Impl(), OpenThenToggleDeck(), ProcessNewWidth(), and UpdateConfigurations().
|
overridevirtual |
Definition at line 396 of file SidebarController.cxx.
References mbMinimumSidebarWidth, mpCurrentDeck, and RestrictWidth().
void sfx2::sidebar::SidebarController::RequestOpenDeck | ( | ) |
Open the deck area and restore the parent window to its old width.
Definition at line 1257 of file SidebarController.cxx.
References SfxSplitWindow::FadeIn(), GetSplitWindow(), SfxSplitWindow::IsFadeIn(), mbIsDeckRequestedOpen, and UpdateDeckOpenState().
Referenced by SfxApplication::MiscExec_Impl(), OpenThenSwitchToDeck(), OpenThenToggleDeck(), ProcessNewWidth(), and ShowPanel().
|
private |
Definition at line 1419 of file SidebarController.cxx.
References sfx2::sidebar::TabBar::GetDefaultWidth(), SplitWindow::GetItemId(), getMaximumWidth(), SplitWindow::GetSet(), GetSplitWindow(), mpParentWindow, nId, and SplitWindow::SetItemSizeRange().
Referenced by NotifyResize(), and requestLayout().
void sfx2::sidebar::SidebarController::saveDeckState | ( | ) |
Definition at line 1594 of file SidebarController.cxx.
References GetCurrentContext(), mpResourceManager, and msCurrentDeckId.
Referenced by disposing(), and unregisterSidebarForFrame().
|
private |
Set the child window container to a new width.
Return the old width.
Definition at line 1394 of file SidebarController.cxx.
References SfxSplitWindow::GetLineSize(), vcl::Window::GetSizePixel(), GetSplitWindow(), SfxSplitWindow::GetWindowPos(), Size::Height(), SfxSplitWindow::MoveWindow(), mpParentWindow, and Split.
Referenced by OpenThenToggleDeck(), and UpdateDeckOpenState().
|
inline |
Definition at line 145 of file SidebarController.hxx.
|
inline |
Definition at line 167 of file SidebarController.hxx.
|
private |
Typically called when a panel is focused via keyboard.
Tries to scroll the deck up or down to make the given panel completely visible.
Definition at line 1522 of file SidebarController.cxx.
References IsDeckOpen(), mpCurrentDeck, and RequestOpenDeck().
|
private |
Definition at line 1081 of file SidebarController.cxx.
References weld::Menu::connect_activate(), LINK, and PopulatePopupMenus().
|
overridevirtual |
Definition at line 374 of file SidebarController.cxx.
References maContextChangeUpdate, mbIsDocumentReadOnly, mnRequestedForceFlags, sfx2::sidebar::AsynchronousCall::RequestCall(), SwitchFlag_ForceSwitch, and SwitchToDefaultDeck().
|
private |
Definition at line 795 of file SidebarController.cxx.
References sfx2::sidebar::FocusManager::Clear(), CreateDeck(), CreatePanels(), vcl::EnumContext::Empty, SplitWindow::GetAlign(), vcl::EnumContext::GetContextEnum(), vcl::EnumContext::GetContextName(), GetCurrentContext(), sfx2::sidebar::TabBar::GetDefaultWidth(), GetSplitWindow(), SfxShell::GetViewShell(), comphelper::LibreOfficeKit::isActive(), maCurrentContext, maFocusManager, mnRequestedForceFlags, mpCurrentDeck, sfx2::sidebar::DeckDescriptor::mpDeck, mpParentWindow, mpResourceManager, mpTabBar, mpViewFrame, sfx2::sidebar::Context::msApplication, sfx2::sidebar::Context::msContext, msCurrentDeckId, sfx2::sidebar::DeckDescriptor::msId, sfx2::sidebar::DeckDescriptor::msTitle, mxCurrentController, mxFrame, NotifyResize(), sfx2::sidebar::FocusManager::SetDeck(), sfx2::sidebar::FocusManager::SetPanels(), sfx2::sidebar::DeckTitleBar::SetTitle(), SwitchFlag_ForceNewDeck, SwitchFlag_ForceNewPanels, SwitchFlag_NoForce, SwitchToDeck(), UpdateTitleBarIcons(), and xController.
void sfx2::sidebar::SidebarController::SwitchToDeck | ( | std::u16string_view | rsDeckId | ) |
Definition at line 679 of file SidebarController.cxx.
References sfx2::sidebar::Deck::LOKSendSidebarFullUpdate(), maCurrentContext, mbIsDeckOpen, mnRequestedForceFlags, mpResourceManager, msCurrentDeckId, SwitchFlag_NoForce, and SwitchToDeck().
Referenced by OpenThenSwitchToDeck(), OpenThenToggleDeck(), SwitchToDeck(), SwitchToDefaultDeck(), and UpdateConfigurations().
void sfx2::sidebar::SidebarController::SwitchToDefaultDeck | ( | ) |
Definition at line 674 of file SidebarController.cxx.
References SwitchToDeck().
Referenced by statusChanged().
void sfx2::sidebar::SidebarController::SyncUpdate | ( | ) |
Definition at line 530 of file SidebarController.cxx.
References maContextChangeUpdate, maPropertyChangeForwarder, and sfx2::sidebar::AsynchronousCall::Sync().
void sfx2::sidebar::SidebarController::unregisterSidebarForFrame | ( | const css::uno::Reference< css::frame::XController > & | xFrame | ) |
Definition at line 206 of file SidebarController.cxx.
References disposeDecks(), saveDeckState(), and xController.
Referenced by disposing(), and frameAction().
|
private |
Definition at line 1455 of file SidebarController.cxx.
References sfx2::sidebar::TabBar::GetDefaultWidth(), Size::Height(), mpCloseIndicator, mpParentWindow, VclPtr< class reference_type >::reset(), and Size::Width().
Referenced by NotifyResize().
|
private |
Make maRequestedContext the current context.
Definition at line 536 of file SidebarController.cxx.
References sfx2::sidebar::FocusManager::Clear(), GetCurrentContext(), maCurrentContext, maFocusManager, maRequestedContext, mbIsDocumentReadOnly, mnRequestedForceFlags, mpResourceManager, mpTabBar, sfx2::sidebar::Context::msApplication, msCurrentDeckId, mxCurrentController, mxFrame, RequestCloseDeck(), SwitchFlag_NoForce, SwitchToDeck(), and xController.
Referenced by notifyContextChangeEvent().
|
private |
Definition at line 1283 of file SidebarController.cxx.
References GetCurrentContext(), sfx2::sidebar::TabBar::GetDefaultWidth(), sfx2::sidebar::SidebarChildWindow::GetDefaultWidth(), SfxShell::GetViewShell(), comphelper::LibreOfficeKit::isActive(), mbIsDeckOpen, mbIsDeckRequestedOpen, mnSavedSidebarWidth, mnWidthOnSplitterButtonDown, mpParentWindow, mpTabBar, mpViewFrame, msCurrentDeckId, NotifyResize(), SetChildWindowWidth(), Size::setWidth(), Point::setX(), WB_SIZEABLE, Size::Width(), and Point::X().
Referenced by RequestCloseDeck(), and RequestOpenDeck().
void sfx2::sidebar::SidebarController::updateModel | ( | const css::uno::Reference< css::frame::XModel > & | xModel | ) |
Definition at line 1553 of file SidebarController.cxx.
References mpResourceManager, and xModel.
|
private |
Update the icons displayed in the title bars of the deck and the panels.
This is called once when a deck is created and every time when a data change event is processed.
Definition at line 1483 of file SidebarController.cxx.
References sfx2::sidebar::ResourceManager::GetDeckDescriptor(), sfx2::sidebar::Tools::GetImage(), sfx2::sidebar::ResourceManager::GetPanelDescriptor(), sfx2::sidebar::Theme::IsHighContrastMode(), mpCurrentDeck, mpResourceManager, and mxFrame.
Referenced by notifyDeckTitle(), and SwitchToDeck().
|
inline |
Definition at line 144 of file SidebarController.hxx.
Referenced by OpenThenToggleDeck().
|
private |
Definition at line 195 of file SidebarController.hxx.
Referenced by disposing(), notifyContextChangeEvent(), statusChanged(), and SyncUpdate().
|
private |
Definition at line 186 of file SidebarController.hxx.
Referenced by CreateDeck(), hasChartOrMathContextCurrently(), notifyContextChangeEvent(), SwitchToDeck(), and UpdateConfigurations().
|
private |
Definition at line 215 of file SidebarController.hxx.
Referenced by disposeDecks(), disposing(), notifyDeckTitle(), SwitchToDeck(), and UpdateConfigurations().
|
private |
Definition at line 194 of file SidebarController.hxx.
Referenced by propertyChange(), and SyncUpdate().
|
private |
Definition at line 187 of file SidebarController.hxx.
Referenced by hasChartOrMathContextCurrently(), notifyContextChangeEvent(), and UpdateConfigurations().
|
private |
Definition at line 209 of file SidebarController.hxx.
|
private |
Definition at line 207 of file SidebarController.hxx.
Referenced by IsDeckOpen(), IsDeckVisible(), NotifyResize(), ProcessNewWidth(), SwitchToDeck(), and UpdateDeckOpenState().
|
private |
Two flags control whether the deck is displayed or if only the tab bar remains visible.
The mbIsDeckOpen flag stores the current state while mbIsDeckRequestedOpen stores how this state should be. User actions like clicking on the deck closer affect the mbIsDeckRequestedOpen. Normally both flags have the same value. A document being read-only can prevent the deck from opening.
Definition at line 206 of file SidebarController.hxx.
Referenced by NotifyResize(), ProcessNewWidth(), RequestCloseDeck(), RequestOpenDeck(), and UpdateDeckOpenState().
|
private |
Definition at line 217 of file SidebarController.hxx.
Referenced by CreatePanels(), statusChanged(), and UpdateConfigurations().
|
private |
Definition at line 192 of file SidebarController.hxx.
Referenced by NotifyResize(), and requestLayout().
|
private |
Definition at line 191 of file SidebarController.hxx.
|
private |
Use a combination of SwitchFlag_* as value.
Definition at line 190 of file SidebarController.hxx.
Referenced by statusChanged(), SwitchToDeck(), and UpdateConfigurations().
|
private |
Before the deck is closed the sidebar width is saved into this variable, so that it can be restored when the deck is reopened.
Definition at line 214 of file SidebarController.hxx.
Referenced by NotifyResize(), ProcessNewWidth(), and UpdateDeckOpenState().
|
private |
When the user moves the splitter then we remember the width at that time.
Definition at line 222 of file SidebarController.hxx.
Referenced by NotifyResize(), OpenThenToggleDeck(), ProcessNewWidth(), and UpdateDeckOpenState().
|
private |
Control that is temporarily used as replacement for the deck to indicate that when the current mouse drag operation ends, the sidebar will only show the tab bar.
Definition at line 227 of file SidebarController.hxx.
Referenced by disposing(), and UpdateCloseIndicator().
Definition at line 181 of file SidebarController.hxx.
Referenced by disposeDecks(), GetDeckDragArea(), notifyDeckTitle(), NotifyResize(), OpenThenToggleDeck(), RequestCloseDeck(), requestLayout(), ShowPanel(), SwitchToDeck(), and UpdateTitleBarIcons().
|
private |
Definition at line 182 of file SidebarController.hxx.
Referenced by BroadcastPropertyChange(), CanModifyChildWindowWidth(), CreateDeck(), CreateUIElement(), disposeDecks(), disposing(), GetSplitWindow(), NotifyResize(), OpenThenToggleDeck(), PopulatePopupMenus(), RequestCloseDeck(), RestrictWidth(), SetChildWindowWidth(), SwitchToDeck(), UpdateCloseIndicator(), and UpdateDeckOpenState().
|
private |
Definition at line 297 of file SidebarController.hxx.
Referenced by CreateDeck(), CreatePanel(), CreatePanels(), disposeDecks(), disposing(), GetMatchingDecks(), GetMatchingPanels(), saveDeckState(), SwitchToDeck(), UpdateConfigurations(), updateModel(), and UpdateTitleBarIcons().
|
private |
Definition at line 218 of file SidebarController.hxx.
Referenced by disposing(), FadeIn(), FadeOut(), and GetSplitWindow().
Definition at line 185 of file SidebarController.hxx.
Referenced by disposing(), IsDeckOpen(), notifyDeckTitle(), NotifyResize(), OpenThenToggleDeck(), RequestCloseDeck(), SwitchToDeck(), UpdateConfigurations(), and UpdateDeckOpenState().
|
private |
Definition at line 183 of file SidebarController.hxx.
Referenced by disposeDecks(), SwitchToDeck(), and UpdateDeckOpenState().
|
private |
Definition at line 193 of file SidebarController.hxx.
Referenced by disposeDecks(), IsDeckVisible(), notifyDeckTitle(), NotifyResize(), saveDeckState(), SwitchToDeck(), UpdateConfigurations(), and UpdateDeckOpenState().
|
private |
Definition at line 188 of file SidebarController.hxx.
Referenced by CreatePanels(), CreateUIElement(), disposing(), notifyContextChangeEvent(), SwitchToDeck(), and UpdateConfigurations().
|
private |
Definition at line 184 of file SidebarController.hxx.
Referenced by CreatePanel(), CreatePanels(), CreateUIElement(), disposing(), frameAction(), GetMatchingDecks(), GetMatchingPanels(), SwitchToDeck(), UpdateConfigurations(), and UpdateTitleBarIcons().
|
private |
Definition at line 216 of file SidebarController.hxx.
Referenced by disposing().
|
private |
Definition at line 196 of file SidebarController.hxx.
Referenced by disposing().
|
static |
Definition at line 113 of file SidebarController.hxx.
Referenced by SwitchToDeck().
|
static |
Definition at line 114 of file SidebarController.hxx.
Referenced by SwitchToDeck().
|
static |
Definition at line 112 of file SidebarController.hxx.
Referenced by statusChanged().
|
static |
In some situations it is necessary to force an update of the current deck and its panels.
One reason is a change of the view scale. Some panels can handle this only when constructed. In this case we have to a context change and also force that all panels are destroyed and created new.
Definition at line 111 of file SidebarController.hxx.
Referenced by SwitchToDeck(), and UpdateConfigurations().