diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2015-12-15 17:22:39 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2015-12-17 08:27:55 +0000 |
commit | 7dd77a12713c0557c5826d3541e97ef6120e1d00 (patch) | |
tree | 7b6654d6cd90616e96256deb6e3933d80235b7c0 /include | |
parent | 5b44a9733a79decc2eebfc2360fdd837349b5759 (diff) |
Remove unused ToolPanel (aka TaskPane)
Superseded by the Sidebar
Change-Id: I54970d71cd9d42de4f47b223e50dd9474b40632a
Reviewed-on: https://gerrit.libreoffice.org/20724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/framework/sfxhelperfunctions.hxx | 9 | ||||
-rw-r--r-- | include/sfx2/module.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sfxsids.hrc | 1 | ||||
-rw-r--r-- | include/sfx2/taskpane.hxx | 190 | ||||
-rw-r--r-- | include/sfx2/viewfrm.hxx | 3 | ||||
-rw-r--r-- | include/svtools/accessiblefactory.hxx | 14 | ||||
-rw-r--r-- | include/svtools/svtools.hrc | 6 | ||||
-rw-r--r-- | include/svtools/toolpanel/decklayouter.hxx | 100 | ||||
-rw-r--r-- | include/svtools/toolpanel/drawerlayouter.hxx | 88 | ||||
-rw-r--r-- | include/svtools/toolpanel/paneltabbar.hxx | 97 | ||||
-rw-r--r-- | include/svtools/toolpanel/tabalignment.hxx | 42 | ||||
-rw-r--r-- | include/svtools/toolpanel/tabitemcontent.hxx | 43 | ||||
-rw-r--r-- | include/svtools/toolpanel/tablayouter.hxx | 94 | ||||
-rw-r--r-- | include/svtools/toolpanel/toolpanel.hxx | 134 | ||||
-rw-r--r-- | include/svtools/toolpanel/toolpaneldeck.hxx | 185 |
15 files changed, 1 insertions, 1007 deletions
diff --git a/include/framework/sfxhelperfunctions.hxx b/include/framework/sfxhelperfunctions.hxx index e88e1708a05a..5c39b12ebd46 100644 --- a/include/framework/sfxhelperfunctions.hxx +++ b/include/framework/sfxhelperfunctions.hxx @@ -51,10 +51,6 @@ typedef bool ( *pfunc_isDockingWindowVisible)( const css::uno::Reference< css::frame::XFrame >& rFrame, const OUString& rResourceURL ); -typedef void ( *pfunc_activateToolPanel)( - const css::uno::Reference< css::frame::XFrame >& i_rFrame, - const OUString& i_rPanelURL ); - namespace framework { @@ -85,11 +81,6 @@ FWE_DLLPUBLIC pfunc_isDockingWindowVisible SAL_CALL SetIsDockingWindowVisible( p FWE_DLLPUBLIC bool SAL_CALL IsDockingWindowVisible( const css::uno::Reference< css::frame::XFrame >& rFrame, const OUString& rResourceURL ); - -FWE_DLLPUBLIC pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator ); -FWE_DLLPUBLIC void SAL_CALL ActivateToolPanel( - const css::uno::Reference< css::frame::XFrame >& i_rFrame, - const OUString& i_rPanelURL ); } #endif // INCLUDED_FRAMEWORK_SFXHELPERFUNCTIONS_HXX diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx index 824a9c8624b2..9d8e8a195092 100644 --- a/include/sfx2/module.hxx +++ b/include/sfx2/module.hxx @@ -87,8 +87,6 @@ public: const SfxItemSet& rSet ); virtual void Invalidate(sal_uInt16 nId = 0) override; - bool IsChildWindowAvailable( const sal_uInt16 i_nId, const SfxViewFrame* i_pViewFrame ) const; - static SfxModule* GetActiveModule( SfxViewFrame* pFrame=nullptr ); static FieldUnit GetCurrentFieldUnit(); /** retrieves the field unit of the module belonging to the document displayed in the given frame diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 081b69c423fc..e288708b3f1c 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -574,7 +574,6 @@ #define SID_HYPERLINK_SETLINK (SID_SVX_START + 362) #define SID_INFOBAR (SID_SVX_START + 365) #define SID_NAVIGATOR (SID_SVX_START + 366) -#define SID_TASKPANE (SID_SVX_START + 370) #define SID_ZOOM_NEXT (SID_SVX_START + 402) #define SID_ZOOM_PREV (SID_SVX_START + 403) #define SID_INET_DLG (SID_SVX_START + 416) diff --git a/include/sfx2/taskpane.hxx b/include/sfx2/taskpane.hxx deleted file mode 100644 index 31b5e6eb0dff..000000000000 --- a/include/sfx2/taskpane.hxx +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SFX2_TASKPANE_HXX -#define INCLUDED_SFX2_TASKPANE_HXX - -#include <sfx2/dllapi.h> -#include <sfx2/childwin.hxx> -#include <sfx2/titledockwin.hxx> - -#include <svtools/toolpanel/tabalignment.hxx> -#include <svtools/toolpanel/tabitemcontent.hxx> - -#include <boost/optional.hpp> - -namespace svt -{ - class ToolPanelDeck; -} - - -namespace sfx2 -{ - - - - //= ITaskPaneToolPanelAccess - - class SAL_NO_VTABLE ITaskPaneToolPanelAccess - { - public: - virtual void ActivateToolPanel( const OUString& i_rPanelURL ) = 0; - - protected: - ~ITaskPaneToolPanelAccess() {} - }; - - - //= TaskPaneWrapper - - class SFX2_DLLPUBLIC TaskPaneWrapper :public SfxChildWindow - ,public ITaskPaneToolPanelAccess - { - public: - TaskPaneWrapper( - vcl::Window* i_pParent, - sal_uInt16 i_nId, - SfxBindings* i_pBindings, - SfxChildWinInfo* i_pInfo - ); - - SFX_DECL_CHILDWINDOW( TaskPaneWrapper ); - - // ITaskPaneToolPanelAccess - virtual void ActivateToolPanel( const OUString& i_rPanelURL ) override; - }; - - - //= ModuleTaskPane - - class ModuleTaskPane_Impl; - /** SFX-less version of a module dependent task pane, filled with tool panels as specified in the respective - module's configuration - */ - class SFX2_DLLPUBLIC ModuleTaskPane : public vcl::Window - { - public: - /** creates a new instance - @param i_rParentWindow - the parent window - @param i_rDocumentFrame - the frame to which the task pane belongs. Will be passed to any custom tool panels created - via an XUIElementFactory. Also, it is used to determine the module which the task pane is - responsible for, thus controlling which tool panels are actually available. - */ - ModuleTaskPane( - vcl::Window& i_rParentWindow, - const css::uno::Reference< css::frame::XFrame >& i_rDocumentFrame - ); - virtual ~ModuleTaskPane(); - - /** determines whether a given module has any registered tool panels - */ - static bool ModuleHasToolPanels( const css::uno::Reference< css::frame::XFrame >& i_rDocumentFrame ); - - /** provides access to the Window aspect of the PanelDeck - - Be careful with this method. For instance, you're not allowed to insert arbitrary IToolPanel implementations - into the deck, as the ModuleTaskPane has certain assumptions about the panel implementations. However, - you're allowed to remove and re-insert panels, which have originally been created by the ModuleTaskPane - itself. - */ - ::svt::ToolPanelDeck& GetPanelDeck(); - const ::svt::ToolPanelDeck& GetPanelDeck() const; - - /** returns the position of the panel with the given resource URL - */ - ::boost::optional< size_t > - GetPanelPos( const OUString& i_rResourceURL ); - - /// sets the "classical" layout of the tool panel deck, using drawers - void SetDrawersLayout(); - /// sets the new layout of the tool panel deck, using tabs - void SetTabsLayout( const ::svt::TabAlignment i_eTabAlignment, const ::svt::TabItemContent i_eTabContent ); - - protected: - // Window overridables - virtual void Resize() override; - virtual void GetFocus() override; - - private: - std::unique_ptr<ModuleTaskPane_Impl> m_xImpl; - }; - - - //= TaskPaneController - - class TaskPaneController_Impl; - /** is a helper class for connecting a ModuleTaskPane and a TitledDockingWindow, for clients of the ModuleTaskPane - which do not use the TaskPaneDockingWindow - - The controller will add a drop down menu to the docking window which contains one item for each panel in the - panel deck, and allows toggling their visibility. - */ - class SFX2_DLLPUBLIC TaskPaneController - { - public: - TaskPaneController( - ModuleTaskPane& i_rTaskPane, - TitledDockingWindow& i_rDockingWindow - ); - ~TaskPaneController(); - - /// activates the panel with the given URL - void ActivateToolPanel( const OUString& i_rPanelURL ); - - private: - std::unique_ptr<TaskPaneController_Impl> m_xImpl; - }; - - - //= TaskPaneDockingWindow - - class TaskPaneDockingWindow :public TitledDockingWindow - ,public ITaskPaneToolPanelAccess - { - public: - TaskPaneDockingWindow( SfxBindings* i_pBindings, TaskPaneWrapper& i_rWrapper, - vcl::Window* i_pParent, WinBits i_nBits ); - virtual ~TaskPaneDockingWindow(); - virtual void dispose() override; - - // ITaskPaneToolPanelAccess - virtual void ActivateToolPanel( const OUString& i_rPanelURL ) override; - - protected: - // Window overridables - virtual void GetFocus() override; - - // TitledDockingWindow overridables - virtual void onLayoutDone() override; - - private: - VclPtr<ModuleTaskPane> m_aTaskPane; - TaskPaneController m_aPaneController; - }; - - -} // namespace sfx2 - - -#endif // INCLUDED_SFX2_TASKPANE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index b2bb8237ff14..5134da26edbc 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -140,8 +140,6 @@ public: void UpdateTitle(); - static void ActivateToolPanel( const css::uno::Reference< css::frame::XFrame >& i_rFrame, const OUString& i_rPanelURL ); - // interne Handler SAL_DLLPRIVATE bool SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder ); SAL_DLLPRIVATE const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const; @@ -217,7 +215,6 @@ public: SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &); SAL_DLLPRIVATE void SetCurViewId_Impl( const sal_uInt16 i_nID ); - SAL_DLLPRIVATE void ActivateToolPanel_Impl( const OUString& i_rPanelURL ); private: SAL_DLLPRIVATE bool SwitchToViewShell_Impl( sal_uInt16 nNo, bool bIsIndex = false ); diff --git a/include/svtools/accessiblefactory.hxx b/include/svtools/accessiblefactory.hxx index 6327c9735c3f..7898426803b7 100644 --- a/include/svtools/accessiblefactory.hxx +++ b/include/svtools/accessiblefactory.hxx @@ -50,8 +50,6 @@ namespace svt { - class ToolPanelDeck; - class IToolPanelDeck; class PanelTabBar; namespace table { @@ -160,18 +158,6 @@ namespace svt sal_uInt16 _nColPos ) const = 0; - virtual css::uno::Reference< css::accessibility::XAccessibleContext > - createAccessibleToolPanelDeck( - const css::uno::Reference< css::accessibility::XAccessible >& i_rAccessibleParent, - ::svt::ToolPanelDeck& i_rPanelDeck - ) = 0; - virtual css::uno::Reference< css::accessibility::XAccessibleContext > - createAccessibleToolPanelTabBar( - const css::uno::Reference< css::accessibility::XAccessible >& i_rAccessibleParent, - ::svt::IToolPanelDeck& i_rPanelDeck, - ::svt::PanelTabBar& i_rTabBar - ) = 0; - protected: virtual ~IAccessibleFactory() {} }; diff --git a/include/svtools/svtools.hrc b/include/svtools/svtools.hrc index 570809b61ec3..f04fb3e31ac2 100644 --- a/include/svtools/svtools.hrc +++ b/include/svtools/svtools.hrc @@ -161,8 +161,7 @@ // String-Ids for accessibility #define STR_SVT_ACC_BEGIN (STR_SVT_COLLATE_END+1) -#define STR_SVT_TOOL_PANEL_BUTTON_FWD (STR_SVT_ACC_BEGIN+0) -#define STR_SVT_TOOL_PANEL_BUTTON_BACK (STR_SVT_ACC_BEGIN+1) +// free #define STR_SVT_ACC_DESC_TABLISTBOX (STR_SVT_ACC_BEGIN+2) #define STR_SVT_ACC_DESC_FILEVIEW (STR_SVT_ACC_BEGIN+3) #define STR_SVT_ACC_DESC_FOLDER (STR_SVT_ACC_BEGIN+4) @@ -259,9 +258,6 @@ #define RID_IMG_TREENODE_COLLAPSED (RID_SVTOOLS_START + 0) #define RID_IMG_TREENODE_EXPANDED (RID_SVTOOLS_START + 1) -#define IMG_TRIANGLE_RIGHT (RID_SVTOOLS_START + 18) -#define IMG_TRIANGLE_DOWN (RID_SVTOOLS_START + 20) - #define IMG_SVT_FOLDER (RID_SVTOOLS_START + 42) #define IMG_SVT_FOLDER_OPEN (RID_SVTOOLS_START + 43) diff --git a/include/svtools/toolpanel/decklayouter.hxx b/include/svtools/toolpanel/decklayouter.hxx deleted file mode 100644 index 04de02cee180..000000000000 --- a/include/svtools/toolpanel/decklayouter.hxx +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX - -#include <com/sun/star/uno/Reference.hxx> - -#include <rtl/ref.hxx> -#include <salhelper/simplereferenceobject.hxx> - -#include <boost/optional.hpp> - -namespace com { namespace sun { namespace star { namespace accessibility { - class XAccessible; -} } } } -class Rectangle; -class Point; - - -namespace svt -{ - - - - //= IDeckLayouter - - class IDeckLayouter : public salhelper::SimpleReferenceObject - { - public: - /** re-arranges the elements of the tool deck, taking into account the - available space for the complete deck. - - @param i_rDeckPlayground - the playground for the complete tool panel deck - @return - the content area for a single tool panel - */ - virtual ::Rectangle Layout( const ::Rectangle& i_rDeckPlayground ) = 0; - - /** destroys the instance - - Since the layouter is ref-counted, but might keep references to non-ref-counted objects - (in particular, the ToolPanelDeck, which is a VCL-Window, and thus cannot be ref-counted), - Destroy is the definitive way to dispose the instance. Technically, it's still alive afterwards, - but non-functional. - */ - virtual void Destroy() = 0; - - /** assuming that a layouter needs to provide some kind of panel selector control, this method - requests to set the focus to this control. - */ - virtual void SetFocusToPanelSelector() = 0; - - /** returns the number of components in the XAccessible hierarchy which are needed to represent all elements - the layouter is responsible form. - - Note that the implementation must guarantee that the count is fixed over the life time of the layouter. - */ - virtual size_t GetAccessibleChildCount() const = 0; - - /** retrieves the XAccessible implementation for the <code>i_nChildIndex</code>'th child in the XAccessible - hierarchy. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > - GetAccessibleChild( - const size_t i_nChildIndex, - const css::uno::Reference< css::accessibility::XAccessible >& i_rParentAccessible - ) = 0; - - virtual ~IDeckLayouter() - { - } - }; - - typedef ::rtl::Reference< IDeckLayouter > PDeckLayouter; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_DECKLAYOUTER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/toolpanel/drawerlayouter.hxx b/include/svtools/toolpanel/drawerlayouter.hxx deleted file mode 100644 index 0e123be0b499..000000000000 --- a/include/svtools/toolpanel/drawerlayouter.hxx +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_DRAWERLAYOUTER_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_DRAWERLAYOUTER_HXX - -#include <svtools/svtdllapi.h> -#include <svtools/toolpanel/toolpaneldeck.hxx> -#include <svtools/toolpanel/decklayouter.hxx> - -#include <memory> - - -namespace svt -{ - class ToolPanelViewShell; - class ToolPanelDrawer; - - //= ToolPanelDrawer - - /** a class which implements a tool panel selector in the form of the classical drawers - */ - class SVT_DLLPUBLIC DrawerDeckLayouter :public IDeckLayouter - ,public IToolPanelDeckListener - { - public: - DrawerDeckLayouter( - vcl::Window& i_rParentWindow, - IToolPanelDeck& i_rPanels - ); - virtual ~DrawerDeckLayouter(); - - // IDeckLayouter - virtual Rectangle Layout( const Rectangle& i_rDeckPlayground ) override; - virtual void Destroy() override; - virtual void SetFocusToPanelSelector() override; - virtual size_t GetAccessibleChildCount() const override; - virtual css::uno::Reference< css::accessibility::XAccessible > - GetAccessibleChild( - const size_t i_nChildIndex, - const css::uno::Reference< css::accessibility::XAccessible >& i_rParentAccessible - ) override; - - // IToolPanelDeckListener - virtual void PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition ) override; - virtual void PanelRemoved( const size_t i_nPosition ) override; - virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive ) override; - virtual void LayouterChanged( const PDeckLayouter& i_rNewLayouter ) override; - virtual void Dying() override; - - private: - // triggers a re-arrange of the panel deck elements - void impl_triggerRearrange() const; - size_t impl_getPanelPositionFromWindow( const vcl::Window* i_pDrawerWindow ) const; - void impl_removeDrawer( const size_t i_nPosition ); - - DECL_LINK_TYPED( OnWindowEvent, VclWindowEvent&, void ); - -private: - vcl::Window& m_rParentWindow; - IToolPanelDeck& m_rPanelDeck; - ::std::vector< VclPtr<ToolPanelDrawer> > m_aDrawers; - ::boost::optional< size_t > m_aLastKnownActivePanel; - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_DRAWERLAYOUTER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/toolpanel/paneltabbar.hxx b/include/svtools/toolpanel/paneltabbar.hxx deleted file mode 100644 index 84f8a0cce95d..000000000000 --- a/include/svtools/toolpanel/paneltabbar.hxx +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_PANELTABBAR_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_PANELTABBAR_HXX - -#include <svtools/svtdllapi.h> -#include <svtools/toolpanel/tabalignment.hxx> -#include <svtools/toolpanel/tabitemcontent.hxx> - -#include <vcl/ctrl.hxx> - -#include <memory> -#include <boost/optional.hpp> - -class PushButton; - - -namespace svt -{ - - - class PanelTabBar_Impl; - class IToolPanelDeck; - - - //= PanelTabBar - - /** a tab bar for selecting panels - - At the moment, this control aligns the tabs vertically, this might be extended to also support a horizontal - layout in the future. - */ - class SVT_DLLPUBLIC PanelTabBar : public Control - { - public: - PanelTabBar( vcl::Window& i_rParentWindow, IToolPanelDeck& i_rPanelDeck, const TabAlignment i_eAlignment, const TabItemContent i_eItemContent ); - virtual ~PanelTabBar(); - virtual void dispose() override; - - // attribute access - TabItemContent GetTabItemContent() const; - void SetTabItemContent( const TabItemContent& i_eItemContent ); - - ::boost::optional< size_t > GetFocusedPanelItem() const; - void FocusPanelItem( const size_t i_nItemPos ); - Rectangle GetItemScreenRect( const size_t i_nItemPos ) const; - bool IsVertical() const; - IToolPanelDeck& GetPanelDeck() const; - PushButton& GetScrollButton( const bool i_bForward ); - - // Window overridables - virtual Size GetOptimalSize() const override; - - protected: - // Window overridables - virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& i_rRect ) override; - virtual void Resize() override; - virtual void MouseMove( const MouseEvent& i_rMouseEvent ) override; - virtual void MouseButtonDown( const MouseEvent& i_rMouseEvent ) override; - virtual void MouseButtonUp( const MouseEvent& i_rMouseEvent ) override; - virtual void RequestHelp( const HelpEvent& i_rHelpEvent ) override; - virtual void GetFocus() override; - virtual void LoseFocus() override; - virtual void KeyInput( const KeyEvent& i_rKeyEvent ) override; - virtual void DataChanged( const DataChangedEvent& i_rDataChanedEvent ) override; - - virtual css::uno::Reference< css::awt::XWindowPeer > - GetComponentInterface( bool i_bCreate ) override; - - private: - ::std::unique_ptr< PanelTabBar_Impl > m_pImpl; - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_PANELTABBAR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/toolpanel/tabalignment.hxx b/include/svtools/toolpanel/tabalignment.hxx deleted file mode 100644 index e75ffb83339f..000000000000 --- a/include/svtools/toolpanel/tabalignment.hxx +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_TABALIGNMENT_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_TABALIGNMENT_HXX - - -namespace svt -{ - - - enum TabAlignment - { - TABS_LEFT, - TABS_RIGHT, - TABS_TOP, - TABS_BOTTOM - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_TABALIGNMENT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/toolpanel/tabitemcontent.hxx b/include/svtools/toolpanel/tabitemcontent.hxx deleted file mode 100644 index 5198cdd349f7..000000000000 --- a/include/svtools/toolpanel/tabitemcontent.hxx +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_TABITEMCONTENT_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_TABITEMCONTENT_HXX - - -namespace svt -{ - - - enum TabItemContent - { - TABITEM_IMAGE_AND_TEXT, - TABITEM_IMAGE_ONLY, - TABITEM_TEXT_ONLY, - - TABITEM_AUTO - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_TABITEMCONTENT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/toolpanel/tablayouter.hxx b/include/svtools/toolpanel/tablayouter.hxx deleted file mode 100644 index 6bcb4a3f3baf..000000000000 --- a/include/svtools/toolpanel/tablayouter.hxx +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_TABLAYOUTER_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_TABLAYOUTER_HXX - -#include <svtools/svtdllapi.h> -#include <svtools/toolpanel/decklayouter.hxx> -#include <svtools/toolpanel/tabalignment.hxx> -#include <svtools/toolpanel/tabitemcontent.hxx> -#include <salhelper/simplereferenceobject.hxx> - -#include <memory> - -namespace vcl { class Window; } - - -namespace svt -{ - - - class IToolPanelDeck; - - struct TabDeckLayouter_Data; - - - //= TabDeckLayouter - - class SVT_DLLPUBLIC TabDeckLayouter :public IDeckLayouter - { - TabDeckLayouter(const TabDeckLayouter&) = delete; - TabDeckLayouter& operator=( const TabDeckLayouter& ) = delete; - public: - /** creates a new layouter - @param i_rParent - is the parent window for any VCL windows the layouter needs to create. - @param i_rPanels - is the panel deck which the layouter is responsible for. - @param i_eAlignment - specifies the alignment of the panel selector - @param TabItemContent - specifies the content to show on the tab items - */ - TabDeckLayouter( - vcl::Window& i_rParent, - IToolPanelDeck& i_rPanels, - const TabAlignment i_eAlignment, - const TabItemContent i_eItemContent - ); - virtual ~TabDeckLayouter(); - - // attribute access - TabItemContent GetTabItemContent() const; - void SetTabItemContent( const TabItemContent& i_eItemContent ); - TabAlignment GetTabAlignment() const; - - // IDeckLayouter - virtual Rectangle Layout( const Rectangle& i_rDeckPlayground ) override; - virtual void Destroy() override; - virtual void SetFocusToPanelSelector() override; - virtual size_t GetAccessibleChildCount() const override; - virtual css::uno::Reference< css::accessibility::XAccessible > - GetAccessibleChild( - const size_t i_nChildIndex, - const css::uno::Reference< css::accessibility::XAccessible >& i_rParentAccessible - ) override; - - private: - ::std::unique_ptr< TabDeckLayouter_Data > m_pData; - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_TABLAYOUTER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/toolpanel/toolpanel.hxx b/include/svtools/toolpanel/toolpanel.hxx deleted file mode 100644 index e2c9aef2161a..000000000000 --- a/include/svtools/toolpanel/toolpanel.hxx +++ /dev/null @@ -1,134 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_TOOLPANEL_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_TOOLPANEL_HXX - -#include <svtools/svtdllapi.h> -#include <salhelper/simplereferenceobject.hxx> - -#include <rtl/ref.hxx> -#include <rtl/ustring.hxx> -#include <vcl/image.hxx> - -class Rectangle; -namespace vcl { class Window; } -namespace com { namespace sun { namespace star { namespace accessibility { - class XAccessible; -} } } } - - -namespace svt -{ - - - - //= IToolPanel - - /** abstract interface for a single tool panel - */ - class SVT_DLLPUBLIC IToolPanel : public salhelper::SimpleReferenceObject - { - public: - /// retrieves the display name of the panel - virtual OUString GetDisplayName() const = 0; - - /// retrieves the image associated with the panel, if any - virtual Image GetImage() const = 0; - - /// retrieves the help ID associated with the panel, if any. - virtual OString GetHelpID() const = 0; - - /** activates the panel - - Usually, this means the panel's Window is created (if not previosly done so) and shown. - - @param i_rParentWindow - the parent window to anchor the panel window at. Subsequent calls to the Activate - method will always get the same parent window. The complete area of this window is - available, and should be used, for the panel window. - */ - virtual void Activate( vcl::Window& i_rParentWindow ) = 0; - - /** deactivates the panel - - There are different ways how an implementation could deactivate a panel. The easiest way - would be to simply hide the associated Window. Alternatively, you could completely destroy it, - or decide to cache it by re-parenting it to another (temporary, invisible) window. - */ - virtual void Deactivate() = 0; - - /** sets a new size for the panel's Window - - The panel window is always expected to be positioned at (0,0), relative to the parent window - which was passed to the Activate member. Resizing the panel window is necessary when the size of - this parent window changes. Effectively, this method is a means of convenience, to relief panel - implementations from reacting on size changes of their parent window themselves. - */ - virtual void SetSizePixel( const Size& i_rPanelWindowSize ) = 0; - - /// sets the focus to the panel window - virtual void GrabFocus() = 0; - - /** release any resources associated with the panel. - - In particular, implementations should ultimately destroy the VCL window which implements the panel - window. No subsequent calls to any other method will happen after Destroy has been called. - */ - virtual void Dispose() = 0; - - /** creates an XAccessible for the tool panel - - Implementations are allowed to create a new instance each time this method is called, the caller - is responsible for caching the XAccessible implementation, if this is desired. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > - CreatePanelAccessible( - const css::uno::Reference< css::accessibility::XAccessible >& i_rParentAccessible - ) = 0; - - virtual ~IToolPanel() - { - } - }; - - typedef ::rtl::Reference< IToolPanel > PToolPanel; - - - //= ToolPanelBase - - /** base class for tool panel implementations, adding ref count implementation to the IToolPanel interface, - but still being abstract - */ - class SVT_DLLPUBLIC ToolPanelBase :public IToolPanel - { - ToolPanelBase(const ToolPanelBase&) = delete; - ToolPanelBase& operator=( const ToolPanelBase& ) = delete; - protected: - ToolPanelBase(); - virtual ~ToolPanelBase(); - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_TOOLPANEL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svtools/toolpanel/toolpaneldeck.hxx b/include/svtools/toolpanel/toolpaneldeck.hxx deleted file mode 100644 index fb1e9de24ab1..000000000000 --- a/include/svtools/toolpanel/toolpaneldeck.hxx +++ /dev/null @@ -1,185 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_TOOLPANEL_TOOLPANELDECK_HXX -#define INCLUDED_SVTOOLS_TOOLPANEL_TOOLPANELDECK_HXX - -#include <svtools/svtdllapi.h> -#include <svtools/toolpanel/toolpanel.hxx> -#include <svtools/toolpanel/decklayouter.hxx> - -#include <vcl/ctrl.hxx> - -#include <boost/optional.hpp> -#include <memory> - - -namespace svt -{ - - - class ToolPanelCollection; - class ToolPanelDeck_Impl; - - - //= IToolPanelDeckListener - - class SAL_NO_VTABLE IToolPanelDeckListener - { - public: - /** called when a panel has been inserted into the deck - */ - virtual void PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition ) = 0; - - /** called when a panel has been removed from the deck - */ - virtual void PanelRemoved( const size_t i_nPosition ) = 0; - - /** called when the active panel of the deck changed - */ - virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive ) = 0; - - /** called when a new layouter has been set at a tool panel deck. - - The method is called after the old layouter has been disposed (i.e. its Destroy method has been - invoked), and after the complete deck has been re-layouter. - */ - virtual void LayouterChanged( const PDeckLayouter& i_rNewLayouter ) = 0; - - /** called when the tool panel deck which the listener registered at is dying. The listener is required to - release all references to the deck then. - */ - virtual void Dying() = 0; - - protected: - ~IToolPanelDeckListener() {} - }; - - - //= IToolPanelDeck - - class SVT_DLLPUBLIC IToolPanelDeck - { - public: - /** returns the number of panels in the container - */ - virtual size_t GetPanelCount() const = 0; - - /** retrieves the panel with the given index. Invalid indexes will be reported via an assertion in the - non-product version, and silently ignored in the product version, with a NULL panel being returned. - */ - virtual PToolPanel GetPanel( const size_t i_nPos ) const = 0; - - /** returns the number of the currently active panel. - */ - virtual ::boost::optional< size_t > - GetActivePanel() const = 0; - - /** activates the panel with the given number. If the given number is larger or equal to the number of panels - in the deck, this will be reported via an assertion in non-product builds, and otherwise ignored. - @param i_rPanel - the number of the panel to activate. If this is not set, the currently active panel is de-activated, - and no new panel is activated at all. Whether or not this makes sense for your application is at - your own discretion. - */ - virtual void ActivatePanel( const ::boost::optional< size_t >& i_rPanel ) = 0; - - /** inserts a new panel into the container. NULL panels are not allowed, as are positions greater than the - current panel count. Violations of this will be reported via an assertion in the non-product version, and - silently ignored in the product version. - */ - virtual size_t InsertPanel( const PToolPanel& i_pPanel, const size_t i_nPosition ) = 0; - - /** removes a panel specified by its position. - - Note: It is the responsibility of the caller to ensure that the panel is destroyed appropriately. That is, - the tool panel deck will <em>not</em> invoke <member>IToolPanel::Dispose</member> on the removed panel. - The advantage is that the panel might be re-used later, with the disadvantage that the owner of the panel - deck must know whether Dispose must be invoked after removal, or whether the panel will properly - dispose itself when its ref count drops to 0. - */ - virtual PToolPanel RemovePanel( const size_t i_nPosition ) = 0; - - /** adds a new listener to be notified when the container content changes. The caller is responsible - for life time control, i.e. removing the listener before it actually dies. - */ - virtual void AddListener( IToolPanelDeckListener& i_rListener ) = 0; - - /** removes a container listener previously added via addListener. - */ - virtual void RemoveListener( IToolPanelDeckListener& i_rListener ) = 0; - - protected: - ~IToolPanelDeck() {} - }; - - - //= ToolPanelDeck - - class SVT_DLLPUBLIC ToolPanelDeck :public Control - ,public IToolPanelDeck - { - public: - ToolPanelDeck( vcl::Window& i_rParent, const WinBits i_nStyle = WB_DIALOGCONTROL ); - virtual ~ToolPanelDeck(); - virtual void dispose() override; - - // attributes - PDeckLayouter GetLayouter() const; - void SetLayouter( const PDeckLayouter& i_pNewLayouter ); - - /** returns the window which acts as anchor for the panel windows. - - This is a single dedicated window, which is passed to the IToolPanel::ActivatePanel method - whenever a panel is activated, to act as parent window for the panel's VCL-Window. - */ - vcl::Window& GetPanelWindowAnchor(); - const vcl::Window& GetPanelWindowAnchor() const; - - // IToolPanelDeck - virtual size_t GetPanelCount() const override; - virtual PToolPanel GetPanel( const size_t i_nPos ) const override; - virtual ::boost::optional< size_t > - GetActivePanel() const override; - virtual void ActivatePanel( const ::boost::optional< size_t >& i_rPanel ) override; - virtual size_t InsertPanel( const PToolPanel& i_pPanel, const size_t i_nPosition ) override; - virtual PToolPanel RemovePanel( const size_t i_nPosition ) override; - virtual void AddListener( IToolPanelDeckListener& i_rListener ) override; - virtual void RemoveListener( IToolPanelDeckListener& i_rListener ) override; - - protected: - // Window overridables - virtual void Resize() override; - virtual bool Notify( NotifyEvent& i_rNotifyEvent ) override; - virtual void GetFocus() override; - - virtual css::uno::Reference< css::awt::XWindowPeer > - GetComponentInterface( bool i_bCreate ) override; - - private: - ::std::unique_ptr< ToolPanelDeck_Impl > m_pImpl; - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_TOOLPANEL_TOOLPANELDECK_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |