diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-02 14:45:32 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-06 16:44:21 +0100 |
commit | 40fe5b93bc0838e04b46bfc7942d1ee6a2482ce0 (patch) | |
tree | 151814d0863c9912d18722732beb13b1e22e0ff1 /include | |
parent | d1133d71a6109d1999121fd6a91573d12dc4852b (diff) |
weld AreaPropertyPanel
Change-Id: I5f4c4b43067b99cd57f8ea941002481ef5977e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86144
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/weldutils.hxx | 7 | ||||
-rw-r--r-- | include/svtools/popupwindowcontroller.hxx | 10 | ||||
-rw-r--r-- | include/svtools/toolboxcontroller.hxx | 11 | ||||
-rw-r--r-- | include/svx/PaletteManager.hxx | 6 | ||||
-rw-r--r-- | include/svx/colorwindow.hxx | 8 | ||||
-rw-r--r-- | include/svx/itemwin.hxx | 1 | ||||
-rw-r--r-- | include/svx/sidebar/AreaPropertyPanelBase.hxx | 69 | ||||
-rw-r--r-- | include/svx/sidebar/AreaTransparencyGradientPopup.hxx | 46 | ||||
-rw-r--r-- | include/svx/tbcontrl.hxx | 13 | ||||
-rw-r--r-- | include/svx/tbxcolorupdate.hxx | 76 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 9 |
11 files changed, 164 insertions, 92 deletions
diff --git a/include/sfx2/weldutils.hxx b/include/sfx2/weldutils.hxx index ccca8b393042..e87295c23abc 100644 --- a/include/sfx2/weldutils.hxx +++ b/include/sfx2/weldutils.hxx @@ -38,13 +38,14 @@ private: ControllerContainer; ControllerContainer maControllers; - css::uno::Reference<css::frame::XToolbarController> - GetControllerForCommand(const OUString& rCommand) const; - public: // fill in the label and icons for actions and dispatch the action on item click ToolbarUnoDispatcher(weld::Toolbar& rToolbar, const css::uno::Reference<css::frame::XFrame>& rFrame); + + css::uno::Reference<css::frame::XToolbarController> + GetControllerForCommand(const OUString& rCommand) const; + void dispose(); ~ToolbarUnoDispatcher(); }; diff --git a/include/svtools/popupwindowcontroller.hxx b/include/svtools/popupwindowcontroller.hxx index 41de1cbee9c7..1666c8ad1513 100644 --- a/include/svtools/popupwindowcontroller.hxx +++ b/include/svtools/popupwindowcontroller.hxx @@ -32,6 +32,11 @@ namespace vcl { class Window; } +namespace svtools +{ + class ToolbarPopupBase; +} + namespace svt { class PopupWindowControllerImpl; @@ -45,6 +50,8 @@ public: const OUString& aCommandURL ); virtual ~PopupWindowController() override; + void EndPopupMode(); + virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) = 0; // XServiceInfo @@ -61,6 +68,9 @@ public: // XToolbarController virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow() override; +protected: + std::unique_ptr<svtools::ToolbarPopupBase> mxPopover; + private: std::unique_ptr<PopupWindowControllerImpl, o3tl::default_delete<PopupWindowControllerImpl>> mxImpl; }; diff --git a/include/svtools/toolboxcontroller.hxx b/include/svtools/toolboxcontroller.hxx index 5d86aeb35930..0ec7228fe5a8 100644 --- a/include/svtools/toolboxcontroller.hxx +++ b/include/svtools/toolboxcontroller.hxx @@ -45,6 +45,11 @@ namespace com :: sun :: star :: util { class XURLTransformer; } class ToolBox; +namespace weld +{ + class Toolbar; +} + namespace svt { @@ -165,8 +170,9 @@ class SVT_DLLPUBLIC ToolboxController : // TODO remove const css::uno::Reference< css::awt::XWindow >& getParent() const { return m_xParentWindow;} - bool m_bInitialized : 1, - m_bDisposed : 1; + bool m_bInitialized, + m_bDisposed, + m_bSidebar; sal_uInt16 m_nToolBoxId; css::uno::Reference< css::frame::XFrame > m_xFrame; css::uno::Reference< css::uno::XComponentContext > m_xContext; @@ -177,6 +183,7 @@ class SVT_DLLPUBLIC ToolboxController : css::uno::Reference< css::awt::XWindow > m_xParentWindow; css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer; OUString m_sModuleName; + weld::Toolbar* m_pToolbar; }; } diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx index 81621e436b0b..d468f0199588 100644 --- a/include/svx/PaletteManager.hxx +++ b/include/svx/PaletteManager.hxx @@ -29,7 +29,7 @@ class SvxColorValueSet; namespace com::sun::star::uno { class XComponentContext; } -namespace svx { class ToolboxButtonColorUpdater; } +namespace svx { class ToolboxButtonColorUpdaterBase; } namespace weld { class Window; } class SVX_DLLPUBLIC PaletteManager @@ -40,7 +40,7 @@ class SVX_DLLPUBLIC PaletteManager sal_uInt16 mnCurrentPalette; long mnColorCount; - svx::ToolboxButtonColorUpdater* mpBtnUpdater; + svx::ToolboxButtonColorUpdaterBase* mpBtnUpdater; XColorListRef pColorList; std::deque<NamedColor> maRecentColors; @@ -69,7 +69,7 @@ public: long GetRecentColorCount() const; void AddRecentColor(const Color& rRecentColor, const OUString& rColorName, bool bFront = true); - void SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater); + void SetBtnUpdater(svx::ToolboxButtonColorUpdaterBase* pBtnUpdater); void PopupColorPicker(weld::Window* pParent, const OUString& aCommand, const Color& rInitialColor); void SetColorSelectFunction(const std::function<void(const OUString&, const NamedColor&)>& aColorSelectFunction); diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx index acc18149e2ca..257d1e6801f7 100644 --- a/include/svx/colorwindow.hxx +++ b/include/svx/colorwindow.hxx @@ -132,6 +132,7 @@ private: std::unique_ptr<weld::Builder> m_xBuilder; const sal_uInt16 theSlotId; + OUString maCommand; weld::Window* const mpParentWindow; MenuOrToolMenuButton maMenuButton; std::shared_ptr<PaletteManager> mxPaletteManager; @@ -150,6 +151,7 @@ private: std::unique_ptr<weld::CustomWeld> mxRecentColorSetWin; weld::Button* mpDefaultButton; + Link<const NamedColor&, void> maSelectedLink; DECL_LINK(SelectHdl, SvtValueSet*, void); DECL_LINK(SelectPaletteHdl, weld::ComboBox&, void); DECL_LINK(AutoColorClickHdl, weld::Button&, void); @@ -160,13 +162,14 @@ private: NamedColor GetAutoColor() const; public: - ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager, + ColorWindow(const OUString& rCommand, + std::shared_ptr<PaletteManager> const & rPaletteManager, ColorStatus& rColorStatus, sal_uInt16 nSlotId, const css::uno::Reference< css::frame::XFrame >& rFrame, weld::Window* pParentWindow, const MenuOrToolMenuButton &rMenuButton, ColorSelectFunction const& rColorSelectFunction); - weld::Container* GetWidget() { return mxTopLevel.get(); } + weld::Container* getTopLevel() { return mxTopLevel.get(); } virtual ~ColorWindow() override; void ShowNoneButton(); void SetNoSelection(); @@ -179,6 +182,7 @@ public: virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override; + void SetSelectedHdl( const Link<const NamedColor&, void>& rLink ) { maSelectedLink = rLink; } }; #endif diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx index 4f4c3ec140a0..889a513586fe 100644 --- a/include/svx/itemwin.hxx +++ b/include/svx/itemwin.hxx @@ -113,6 +113,7 @@ public: void Fill( const XPatternListRef &pList ); static void Fill(weld::ComboBox&, const XHatchListRef &pList); + static void Fill(weld::ComboBox&, const XGradientListRef &pList); static void Fill(weld::ComboBox&, const XBitmapListRef &pList); static void Fill(weld::ComboBox&, const XPatternListRef &pList); diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index abe5a603514c..bc72b8b7c4aa 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -32,15 +32,11 @@ #include <svx/xflhtit.hxx> #include <svx/xbtmpit.hxx> #include <svx/sidebar/PanelLayout.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/field.hxx> -#include <vcl/slider.hxx> -#include <vcl/fixed.hxx> -#include <vcl/vclptr.hxx> #include <svl/intitem.hxx> #include <svx/svxdllapi.h> #include <sfx2/sidebar/Panel.hxx> +class ToolbarUnoDispatcher; class XFillFloatTransparenceItem; class XFillTransparenceItem; class XFillStyleItem; @@ -117,20 +113,22 @@ protected: XGradient maGradientRect; //ui controls - VclPtr<FixedText> mpColorTextFT; - VclPtr<SvxFillTypeBox> mpLbFillType; - VclPtr<SvxFillAttrBox> mpLbFillAttr; - VclPtr<SvxColorListBox> mpLbFillGradFrom; - VclPtr<SvxColorListBox> mpLbFillGradTo; - VclPtr<sfx2::sidebar::SidebarToolBox> mpToolBoxColor; // for new color picker - VclPtr<FixedText> mpTrspTextFT; - VclPtr<ListBox> mpLBTransType; - VclPtr<MetricField> mpMTRTransparent; - VclPtr<Slider> mpSldTransparent; - VclPtr<ToolBox> mpBTNGradient; - VclPtr<MetricField> mpMTRAngle; - VclPtr<ListBox> mpGradientStyle; - VclPtr<PushButton> mpBmpImport; + std::unique_ptr<weld::Label> mxColorTextFT; + std::unique_ptr<weld::ComboBox> mxLbFillType; + std::unique_ptr<weld::ComboBox> mxLbFillAttr; + std::unique_ptr<ColorListBox> mxLbFillGradFrom; + std::unique_ptr<ColorListBox> mxLbFillGradTo; + std::unique_ptr<weld::Toolbar> mxToolBoxColor; // for new color picker + std::unique_ptr<ToolbarUnoDispatcher> mxColorDispatch; + std::unique_ptr<weld::Label> mxTrspTextFT; + std::unique_ptr<weld::ComboBox> mxLBTransType; + std::unique_ptr<weld::MetricSpinButton> mxMTRTransparent; + std::unique_ptr<weld::Scale> mxSldTransparent; + std::unique_ptr<weld::Toolbar> mxBTNGradient; + std::unique_ptr<weld::MetricSpinButton> mxMTRAngle; + std::unique_ptr<weld::ComboBox> mxGradientStyle; + std::unique_ptr<weld::Button> mxBmpImport; + std::unique_ptr<AreaTransparencyGradientPopup> mxTrGrPopup; std::unique_ptr< XFillStyleItem > mpStyleItem; std::unique_ptr< XFillColorItem > mpColorItem; @@ -138,30 +136,27 @@ protected: std::unique_ptr< XFillHatchItem > mpHatchItem; std::unique_ptr< XFillBitmapItem > mpBitmapItem; - Image maImgAxial; - Image maImgElli; - Image maImgQuad; - Image maImgRadial; - Image maImgSquare; - Image maImgLinear; + OUString maImgAxial; + OUString maImgElli; + OUString maImgQuad; + OUString maImgRadial; + OUString maImgSquare; + OUString maImgLinear; - VclPtr<AreaTransparencyGradientPopup> mxTrGrPopup; VclPtr<sfx2::sidebar::Panel> mpPanel; std::unique_ptr< XFillFloatTransparenceItem > mpFloatTransparenceItem; std::unique_ptr< SfxUInt16Item > mpTransparanceItem; - DECL_LINK(SelectFillTypeHdl, ListBox&, void ); - DECL_LINK(SelectFillAttrHdl, ListBox&, void ); - DECL_LINK(SelectFillColorHdl, SvxColorListBox&, void); - DECL_LINK(ChangeGradientAngle, Edit&, void); - DECL_LINK(ChangeTrgrTypeHdl_Impl, ListBox&, void); - DECL_LINK(ModifyTransparentHdl_Impl, Edit&, void); - DECL_LINK(ModifyTransSliderHdl, Slider*, void); - DECL_LINK(ClickImportBitmapHdl, Button*, void); - - // for transparency gradient - DECL_LINK( ClickTrGrHdl_Impl, ToolBox*, void ); + DECL_LINK(SelectFillTypeHdl, weld::ComboBox&, void ); + DECL_LINK(SelectFillAttrHdl, weld::ComboBox&, void ); + DECL_LINK(SelectFillColorHdl, ColorListBox&, void); + DECL_LINK(ChangeGradientAngle, weld::MetricSpinButton&, void); + DECL_LINK(ChangeTrgrTypeHdl_Impl, weld::ComboBox&, void); + DECL_LINK(ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void); + DECL_LINK(ModifyTransSliderHdl, weld::Scale&, void); + DECL_LINK(ClickImportBitmapHdl, weld::Button&, void); + DECL_LINK(ToolbarHdl_Impl, const OString&, void); void Initialize(); void Update(); diff --git a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx index cbdc5e9a114e..67abcbf6a5cc 100644 --- a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx +++ b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx @@ -19,12 +19,8 @@ #ifndef INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX #define INCLUDED_SVX_SOURCE_SIDEBAR_AREA_AREATRANSPARENCYGRADIENTPOPUP_HXX -#include <vcl/edit.hxx> -#include <vcl/field.hxx> -#include <vcl/floatwin.hxx> -#include <vcl/toolbox.hxx> +#include <vcl/weld.hxx> -class VclContainer; class XFillFloatTransparenceItem; namespace svx { namespace sidebar { @@ -32,31 +28,35 @@ namespace svx { namespace sidebar { class AreaTransparencyGradientControl; class AreaPropertyPanelBase; -class AreaTransparencyGradientPopup final : public FloatingWindow +class AreaTransparencyGradientPopup final { private: AreaPropertyPanelBase& mrAreaPropertyPanel; - VclPtr<VclContainer> maCenterGrid; - VclPtr<VclContainer> maAngleGrid; - VclPtr<MetricField> maMtrTrgrCenterX; - VclPtr<MetricField> maMtrTrgrCenterY; - VclPtr<MetricField> maMtrTrgrAngle; - VclPtr<ToolBox> maBtnLeft45; - VclPtr<ToolBox> maBtnRight45; - VclPtr<MetricField> maMtrTrgrStartValue; - VclPtr<MetricField> maMtrTrgrEndValue; - VclPtr<MetricField> maMtrTrgrBorder; + std::unique_ptr<weld::Builder> mxBuilder; + std::unique_ptr<weld::Widget> mxTopLevel; + std::unique_ptr<weld::Widget> mxCenterGrid; + std::unique_ptr<weld::Widget> mxAngleGrid; + std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrCenterX; + std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrCenterY; + std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrAngle; + std::unique_ptr<weld::Toolbar> mxBtnLeft45; + std::unique_ptr<weld::Toolbar> mxBtnRight45; + std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrStartValue; + std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrEndValue; + std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrBorder; void InitStatus(XFillFloatTransparenceItem const * pGradientItem); void ExecuteValueModify(sal_uInt8 nStartCol, sal_uInt8 nEndCol); - DECL_LINK(ModifiedTrgrHdl_Impl, Edit&, void); - DECL_LINK(Left_Click45_Impl, ToolBox*, void); - DECL_LINK(Right_Click45_Impl, ToolBox*, void); + DECL_LINK(ModifiedTrgrHdl_Impl, weld::MetricSpinButton&, void); + DECL_LINK(Left_Click45_Impl, const OString&, void); + DECL_LINK(Right_Click45_Impl, const OString&, void); public: - AreaTransparencyGradientPopup(AreaPropertyPanelBase& rPanel); - virtual ~AreaTransparencyGradientPopup() override; - void Rearrange (XFillFloatTransparenceItem const * pItem); - virtual void dispose() override; + AreaTransparencyGradientPopup(AreaPropertyPanelBase& rPanel, weld::Widget* pParent); + ~AreaTransparencyGradientPopup(); + + weld::Widget* getTopLevel() const { return mxTopLevel.get(); } + + void Rearrange(XFillFloatTransparenceItem const * pItem); }; } } // end of namespace svx::sidebar diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx index 315fd9e1c57e..226160e422c0 100644 --- a/include/svx/tbcontrl.hxx +++ b/include/svx/tbcontrl.hxx @@ -150,7 +150,7 @@ class PaletteManager; namespace svx { - class ToolboxButtonColorUpdater; + class ToolboxButtonColorUpdaterBase; } class SVX_DLLPUBLIC SvxStyleToolBoxControl final : public SfxToolBoxControl @@ -204,13 +204,15 @@ typedef std::function<void(const OUString&, const NamedColor&)> ColorSelectFunct class SVX_DLLPUBLIC SvxColorToolBoxControl final : public cppu::ImplInheritanceHelper< svt::PopupWindowController, css::frame::XSubToolbarController > { - std::unique_ptr<svx::ToolboxButtonColorUpdater> m_xBtnUpdater; + std::unique_ptr<svx::ToolboxButtonColorUpdaterBase> m_xBtnUpdater; std::shared_ptr<PaletteManager> m_xPaletteManager; ColorStatus m_aColorStatus; bool m_bSplitButton; sal_uInt16 m_nSlotId; ColorSelectFunction m_aColorSelectFunction; DECL_LINK(SelectedHdl, const NamedColor&, void); + DECL_LINK(ToolbarHdl_Impl, const OString&, void); + public: explicit SvxColorToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext ); virtual ~SvxColorToolBoxControl() override; @@ -265,8 +267,6 @@ private: LanguageType m_eLanguage; sal_uInt32 m_nFormatKey; - weld::Toolbar* m_pToolbar; - std::unique_ptr<svtools::ToolbarPopupBase> m_xPopover; public: static void GetCurrencySymbols( std::vector<OUString>& rList, bool bFlag, std::vector<sal_uInt16>& rCurrencyList ); @@ -277,14 +277,9 @@ public: // XToolbarController virtual void SAL_CALL execute( sal_Int16 nSelectModifier ) override; - // XComponent - virtual void SAL_CALL dispose() override; - using svt::ToolboxController::createPopupWindow; virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) override; - void EndPopupMode(); - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override; diff --git a/include/svx/tbxcolorupdate.hxx b/include/svx/tbxcolorupdate.hxx index e37f7f1f0e4d..460635c0ac52 100644 --- a/include/svx/tbxcolorupdate.hxx +++ b/include/svx/tbxcolorupdate.hxx @@ -24,13 +24,18 @@ #include <tools/gen.hxx> #include <tools/color.hxx> +#include <vcl/vclenum.hxx> #include <vcl/vclptr.hxx> - #include <svx/Palette.hxx> +#include <com/sun/star/frame/XFrame.hpp> class ToolBox; class VirtualDevice; +namespace weld +{ + class Toolbar; +} namespace svx { @@ -42,12 +47,14 @@ namespace svx formerly known as SvxTbxButtonColorUpdater_Impl, residing in svx/source/tbxctrls/colorwindow.hxx. */ - class ToolboxButtonColorUpdater + class ToolboxButtonColorUpdaterBase { public: - ToolboxButtonColorUpdater( sal_uInt16 nSlotId, sal_uInt16 nTbxBtnId, ToolBox* ptrTbx, bool bWideButton, - const OUString& rCommandLabel ); - ~ToolboxButtonColorUpdater(); + ToolboxButtonColorUpdaterBase(bool bWideButton, const OUString& rCommandLabel, + const OUString& rCommandURL, + const css::uno::Reference<css::frame::XFrame>& rFrame); + + virtual ~ToolboxButtonColorUpdaterBase(); void Update( const NamedColor& rNamedColor ); void Update( const Color& rColor, bool bForceUpdate = false ); @@ -55,22 +62,67 @@ namespace svx OUString GetCurrentColorName(); private: - ToolboxButtonColorUpdater(ToolboxButtonColorUpdater const &) = delete; - ToolboxButtonColorUpdater& operator =(ToolboxButtonColorUpdater const &) = delete; + ToolboxButtonColorUpdaterBase(ToolboxButtonColorUpdaterBase const &) = delete; + ToolboxButtonColorUpdaterBase& operator =(ToolboxButtonColorUpdaterBase const &) = delete; - bool const mbWideButton; - sal_uInt16 const mnBtnId; - VclPtr<ToolBox> mpTbx; + protected: + bool const mbWideButton; + bool mbWasHiContrastMode; Color maCurColor; tools::Rectangle maUpdRect; Size maBmpSize; - bool mbWasHiContrastMode; OUString maCommandLabel; + OUString maCommandURL; + css::uno::Reference<css::frame::XFrame> mxFrame; + + void Init(sal_uInt16 nSlotId); + + virtual void SetQuickHelpText(const OUString& rText) = 0; + virtual OUString GetQuickHelpText() const = 0; + virtual void SetImage(VirtualDevice* pVirDev) = 0; + virtual VclPtr<VirtualDevice> CreateVirtualDevice() const = 0; + virtual vcl::ImageType GetImageSize() const = 0; + virtual Size GetItemSize() const = 0; }; + class VclToolboxButtonColorUpdater : public ToolboxButtonColorUpdaterBase + { + public: + VclToolboxButtonColorUpdater(sal_uInt16 nSlotId, sal_uInt16 nTbxBtnId, ToolBox* ptrTbx, bool bWideButton, + const OUString& rCommandLabel, const OUString& rCommandURL, + const css::uno::Reference<css::frame::XFrame>& rFrame); -} + private: + sal_uInt16 const mnBtnId; + VclPtr<ToolBox> mpTbx; + + virtual void SetQuickHelpText(const OUString& rText) override; + virtual OUString GetQuickHelpText() const override; + virtual void SetImage(VirtualDevice* pVirDev) override; + virtual VclPtr<VirtualDevice> CreateVirtualDevice() const override; + virtual vcl::ImageType GetImageSize() const override; + virtual Size GetItemSize() const override; + }; + + class ToolboxButtonColorUpdater : public ToolboxButtonColorUpdaterBase + { + public: + ToolboxButtonColorUpdater(sal_uInt16 nSlotId, const OString& rTbxBtnId, weld::Toolbar* ptrTbx, bool bWideButton, + const OUString& rCommandLabel, const css::uno::Reference<css::frame::XFrame>& rFrame); + + private: + OString msBtnId; + weld::Toolbar* mpTbx; + + virtual void SetQuickHelpText(const OUString& rText) override; + virtual OUString GetQuickHelpText() const override; + virtual void SetImage(VirtualDevice* pVirDev) override; + virtual VclPtr<VirtualDevice> CreateVirtualDevice() const override; + virtual vcl::ImageType GetImageSize() const override; + virtual Size GetItemSize() const override; + }; +} #endif // INCLUDED_SVX_TBXCOLORUPDATE_HXX diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 8c20ef58cda4..c8ccf4291338 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -1973,6 +1973,12 @@ public: virtual void set_item_label(const OString& rIdent, const OUString& rLabel) = 0; virtual OUString get_item_label(const OString& rIdent) const = 0; virtual void set_item_tooltip_text(const OString& rIdent, const OUString& rTip) = 0; + virtual OUString get_item_tooltip_text(const OString& rIdent) const = 0; + virtual void set_item_icon_name(const OString& rIdent, const OUString& rIconName) = 0; + virtual void set_item_image(const OString& rIdent, + const css::uno::Reference<css::graphic::XGraphic>& rIcon) + = 0; + virtual void set_item_image(const OString& rIdent, VirtualDevice* pDevice) = 0; virtual void insert_separator(int pos, const OUString& rId) = 0; void append_separator(const OUString& rId) { insert_separator(-1, rId); } @@ -1981,7 +1987,8 @@ public: virtual OString get_item_ident(int nIndex) const = 0; virtual void set_item_ident(int nIndex, const OString& rIdent) = 0; virtual void set_item_label(int nIndex, const OUString& rLabel) = 0; - virtual void set_item_icon(int nIndex, const css::uno::Reference<css::graphic::XGraphic>& rIcon) + virtual void set_item_image(int nIndex, + const css::uno::Reference<css::graphic::XGraphic>& rIcon) = 0; virtual void set_item_tooltip_text(int nIndex, const OUString& rTip) = 0; |