summaryrefslogtreecommitdiff
path: root/include/svx/colorwindow.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-19 16:40:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-25 22:10:21 +0200
commitb047ae6e5bde45555a20a9ad8b7d570d93496187 (patch)
treef8c13e7cb38b93f0cf2a86b2bde0519423fb628c /include/svx/colorwindow.hxx
parent86d02e1fde746988adc17c9e8480ae9967c5a299 (diff)
weld SwWatermarkDialog
Change-Id: Iff3ddfb4dd75088e39ea7675b085f1bbde2c2045 Reviewed-on: https://gerrit.libreoffice.org/56247 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svx/colorwindow.hxx')
-rw-r--r--include/svx/colorwindow.hxx57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 16fb45da4ff3..118c69217aa8 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -109,6 +109,63 @@ public:
void SetSelectedHdl( const Link<const NamedColor&, void>& rLink ) { maSelectedLink = rLink; }
};
+class SVX_DLLPUBLIC ColorWindow : public svtools::ToolbarPopupBase
+{
+private:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+
+ const sal_uInt16 theSlotId;
+ OUString maCommand;
+ weld::Window* mpParentWindow;
+ weld::MenuButton* mpMenuButton;
+ std::shared_ptr<PaletteManager> mxPaletteManager;
+ BorderColorStatus& mrBorderColorStatus;
+ ColorSelectFunction maColorSelectFunction;
+
+ std::unique_ptr<ColorValueSet> mxColorSet;
+ std::unique_ptr<ColorValueSet> mxRecentColorSet;
+ std::unique_ptr<weld::Container> mxTopLevel;
+ std::unique_ptr<weld::ComboBoxText> mxPaletteListBox;
+ std::unique_ptr<weld::Button> mxButtonAutoColor;
+ std::unique_ptr<weld::Button> mxButtonNoneColor;
+ std::unique_ptr<weld::Button> mxButtonPicker;
+ std::unique_ptr<weld::Widget> mxAutomaticSeparator;
+ std::unique_ptr<weld::CustomWeld> mxColorSetWin;
+ std::unique_ptr<weld::CustomWeld> mxRecentColorSetWin;
+
+ Link<const NamedColor&, void> maSelectedLink;
+ DECL_LINK(SelectHdl, SvtValueSet*, void);
+ DECL_LINK(SelectPaletteHdl, weld::ComboBoxText&, void);
+ DECL_LINK(AutoColorClickHdl, weld::Button&, void);
+ DECL_LINK(OpenPickerClickHdl, weld::Button&, void);
+
+ static bool SelectValueSetEntry(ColorValueSet* pColorSet, const Color& rColor);
+ static NamedColor GetSelectEntryColor(SvtValueSet const * pColorSet);
+ NamedColor GetAutoColor() const;
+
+public:
+ ColorWindow(const OUString& rCommand,
+ std::shared_ptr<PaletteManager> const & rPaletteManager,
+ BorderColorStatus& rBorderColorStatus,
+ sal_uInt16 nSlotId,
+ const css::uno::Reference< css::frame::XFrame >& rFrame,
+ weld::Window* pParentWindow, weld::MenuButton* pMenuButton,
+ ColorSelectFunction const& rColorSelectFunction);
+ weld::Container* GetWidget() { return mxTopLevel.get(); }
+ virtual ~ColorWindow() override;
+ void ShowNoneButton();
+ void StartSelection();
+ void SetNoSelection();
+ bool IsNoSelection() const;
+ void SelectEntry(const NamedColor& rColor);
+ void SelectEntry(const Color& rColor);
+ NamedColor GetSelectEntryColor() const;
+
+ virtual void statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
+
+ void SetSelectedHdl( const Link<const NamedColor&, void>& rLink ) { maSelectedLink = rLink; }
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */