LibreOffice Module sfx2 (master) 1
weldutils.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef INCLUDED_SFX2_WELDUTILS_HXX
11#define INCLUDED_SFX2_WELDUTILS_HXX
12
13#include <com/sun/star/frame/XFrame.hpp>
14#include <com/sun/star/frame/XToolbarController.hpp>
15
16#include <com/sun/star/uno/Reference.hxx>
17#include <tools/link.hxx>
18#include <sfx2/dllapi.h>
19#include <svtools/miscopt.hxx>
20#include <vcl/weld.hxx>
21
22#include <map>
23
24namespace weld
25{
26class Builder;
27class Toolbar;
28}
29
31{
32private:
33 css::uno::Reference<css::frame::XFrame> m_xFrame;
34 css::uno::Reference<css::lang::XComponent> m_xImageController;
39
40 DECL_DLLPRIVATE_LINK(SelectHdl, const OUString&, void);
41 DECL_DLLPRIVATE_LINK(ToggleMenuHdl, const OUString&, void);
42 DECL_DLLPRIVATE_LINK(ChangedIconSizeHandler, LinkParamNone*, void);
43
44 void CreateController(const OUString& rCommand);
45 static vcl::ImageType GetIconSize();
46
47 typedef std::map<OUString, css::uno::Reference<css::frame::XToolbarController>>
50
51public:
52 // fill in the label and icons for actions and dispatch the action on item click
54 const css::uno::Reference<css::frame::XFrame>& rFrame,
55 bool bSideBar = true);
56
57 css::uno::Reference<css::frame::XToolbarController>
58 GetControllerForCommand(const OUString& rCommand) const;
59
60 const css::uno::Reference<css::frame::XFrame>& GetFrame() const { return m_xFrame; }
61
62 void dispose();
64};
65
66#endif
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::lang::XComponent > m_xFrame
SvtMiscOptions m_aToolbarOptions
Definition: weldutils.hxx:35
css::uno::Reference< css::lang::XComponent > m_xImageController
Definition: weldutils.hxx:34
ControllerContainer maControllers
Definition: weldutils.hxx:49
weld::Toolbar * m_pToolbar
Definition: weldutils.hxx:36
DECL_DLLPRIVATE_LINK(SelectHdl, const OUString &, void)
std::map< OUString, css::uno::Reference< css::frame::XToolbarController > > ControllerContainer
Definition: weldutils.hxx:48
DECL_DLLPRIVATE_LINK(ToggleMenuHdl, const OUString &, void)
css::uno::Reference< css::frame::XFrame > m_xFrame
Definition: weldutils.hxx:33
weld::Builder * m_pBuilder
Definition: weldutils.hxx:37
const css::uno::Reference< css::frame::XFrame > & GetFrame() const
Definition: weldutils.hxx:60
DECL_DLLPRIVATE_LINK(ChangedIconSizeHandler, LinkParamNone *, void)
#define SFX2_DLLPUBLIC
Definition: dllapi.h:29
void dispose()