summaryrefslogtreecommitdiff
path: root/framework/inc
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-10-18 17:40:11 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-11-04 01:20:00 +0100
commit2187cff2d452e20aa1fdfd5d8aa7473242cd1eb6 (patch)
treec1cfb47ab6b186abbd9ea786b339e12dd0985749 /framework/inc
parent8349e919a8a6d6b8c81956806e13b567261c8853 (diff)
Toolbar: Added usage of ImageControl as toolbar control
Reviewed-on: https://gerrit.libreoffice.org/81064 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de> (cherry picked from commit 48f945a3be16ee0eba0c526e51280dc8deafc316) Change-Id: I2536a505650b6e4c98e79f749c3b237518cc995d Reviewed-on: https://gerrit.libreoffice.org/81872 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'framework/inc')
-rw-r--r--framework/inc/uielement/FixedImageToolbarController.hxx59
-rw-r--r--framework/inc/uielement/toolbarmerger.hxx1
2 files changed, 60 insertions, 0 deletions
diff --git a/framework/inc/uielement/FixedImageToolbarController.hxx b/framework/inc/uielement/FixedImageToolbarController.hxx
new file mode 100644
index 000000000000..2fa55e4e8cc5
--- /dev/null
+++ b/framework/inc/uielement/FixedImageToolbarController.hxx
@@ -0,0 +1,59 @@
+/* -*- 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_FRAMEWORK_INC_UIELEMENT_FIXEDIMAGETOOLBARCONTROLLER_HXX
+#define INCLUDED_FRAMEWORK_INC_UIELEMENT_FIXEDIMAGETOOLBARCONTROLLER_HXX
+
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/frame/ControlCommand.hpp>
+
+#include <uielement/complextoolbarcontroller.hxx>
+
+class ToolBox;
+class ImageControl;
+
+namespace framework
+{
+class FixedImageToolbarController : public ComplexToolbarController
+{
+public:
+ FixedImageToolbarController(const css::uno::Reference<css::uno::XComponentContext>& rxContext,
+ const css::uno::Reference<css::frame::XFrame>& rFrame,
+ ToolBox* pToolBar, sal_uInt16 nID, const OUString& aCommand);
+
+ // XComponent
+ virtual void SAL_CALL dispose() override;
+
+ void CheckAndUpdateImages();
+
+protected:
+ virtual void executeControlCommand(const css::frame::ControlCommand& rControlCommand) override;
+
+protected:
+ DECL_LINK(MiscOptionsChanged, LinkParamNone*, void);
+
+private:
+ VclPtr<ImageControl> m_pFixedImageControl;
+ sal_Int16 m_eSymbolSize;
+};
+} // namespace framework
+
+#endif // INCLUDED_FRAMEWORK_INC_UIELEMENT_FIXEDIMAGETOOLBARCONTROLLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/framework/inc/uielement/toolbarmerger.hxx b/framework/inc/uielement/toolbarmerger.hxx
index cfe236f8328a..bb41a2bece60 100644
--- a/framework/inc/uielement/toolbarmerger.hxx
+++ b/framework/inc/uielement/toolbarmerger.hxx
@@ -27,6 +27,7 @@
#include <uielement/spinfieldtoolbarcontroller.hxx>
#include <uielement/edittoolbarcontroller.hxx>
#include <uielement/dropdownboxtoolbarcontroller.hxx>
+#include <uielement/FixedImageToolbarController.hxx>
#include <uielement/FixedTextToolbarController.hxx>
#include <uielement/commandinfo.hxx>