summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-01 13:49:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-02 15:54:40 +0100
commitb461740a9ca89eb3b036c366ba60f24c7aad2b60 (patch)
tree073f7b021ed770d2569982e62d75dba201a4a6a9 /include
parent47c88b2c4db23f33a4371139745b8427564d3667 (diff)
weld SfxRecordingFloat_Impl utility window
we can't abuse action_name anymore as the uno command are not legal actions Change-Id: Iaf9306c6e3eec852d2a50df9161bd20383881a04 Reviewed-on: https://gerrit.libreoffice.org/81902 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/childwin.hxx8
-rw-r--r--include/vcl/image.hxx13
-rw-r--r--include/vcl/vclenum.hxx12
-rw-r--r--include/vcl/weld.hxx9
-rw-r--r--include/vcl/weldutils.hxx36
5 files changed, 66 insertions, 12 deletions
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 60eb83261d49..f5e64fdfedf3 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -280,6 +280,14 @@ public:
static_cast<SfxFloatingWindow*>(GetWindow())->FillInfo( aInfo ); \
return aInfo; }
+#define SFX_IMPL_MODELESSDIALOGCONTOLLER(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ static_cast<const SfxModelessDialogController*>(GetController().get())->FillInfo( aInfo ); \
+ return aInfo; }
+
#define SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(Class, MyID) \
SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
SfxChildWinInfo Class::GetInfo() const \
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index 07ea7a7764b3..f01c1747280d 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -23,6 +23,7 @@
#include <vcl/dllapi.h>
#include <tools/gen.hxx>
#include <vcl/bitmapex.hxx>
+#include <vcl/vclenum.hxx>
#include <vcl/outdev.hxx>
#include <memory>
@@ -32,18 +33,6 @@ class ImplImage;
namespace com::sun::star::graphic { class XGraphic; }
namespace com::sun::star::uno { template <class interface_type> class Reference; }
-namespace vcl
-{
- enum class ImageType
- {
- Size16,
- Size26,
- Size32,
- Small = Size16,
- LAST = Size32,
- };
-}
-
#define IMAGELIST_IMAGE_NOTFOUND (sal_uInt16(0xFFFF))
enum class StockImage { Yes };
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 90bfa9900566..95650b2ed889 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -314,6 +314,18 @@ namespace o3tl
template<> struct typed_flags<WindowStateState> : is_typed_flags<WindowStateState, 0xffff> {};
}
+namespace vcl
+{
+ enum class ImageType
+ {
+ Size16,
+ Size26,
+ Size32,
+ Small = Size16,
+ LAST = Size32,
+ };
+}
+
#endif // INCLUDED_VCL_VCLENUM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e7dce7660dd8..ac926469c60e 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1920,6 +1920,15 @@ public:
virtual void insert_separator(int pos, const OUString& rId) = 0;
void append_separator(const OUString& rId) { insert_separator(-1, rId); }
+ virtual int get_n_items() const = 0;
+ virtual OString get_item_ident(int nIndex) const = 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)
+ = 0;
+ virtual void set_item_tooltip_text(int nIndex, const OUString& rTip) = 0;
+
+ virtual vcl::ImageType get_icon_size() const = 0;
+
void connect_clicked(const Link<const OString&, void>& rLink) { m_aClickHdl = rLink; }
};
diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx
new file mode 100644
index 000000000000..4144803e8b3d
--- /dev/null
+++ b/include/vcl/weldutils.hxx
@@ -0,0 +1,36 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_VCL_WELDUTILS_HXX
+#define INCLUDED_VCL_WELDUTILS_HXX
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <tools/link.hxx>
+#include <vcl/dllapi.h>
+
+namespace weld
+{
+class Toolbar;
+
+class VCL_DLLPUBLIC ToolbarUnoDispatcher
+{
+private:
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
+ DECL_LINK(SelectHdl, const OString&, void);
+
+public:
+ // fill in the label and icons for actions and dispatch the action on item click
+ ToolbarUnoDispatcher(Toolbar& rToolbar, const css::uno::Reference<css::frame::XFrame>& rFrame);
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */