LibreOffice Module sfx2 (master) 1
ControllerFactory.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <com/sun/star/uno/Reference.hxx>
22#include <vcl/toolbox.hxx>
23
24namespace com::sun::star::awt { class XWindow; }
25namespace com::sun::star::frame { class XController; }
26namespace com::sun::star::frame { class XFrame; }
27namespace com::sun::star::frame { class XToolbarController; }
28
29class ToolBox;
30
31namespace weld {
32 class Builder;
33 class Toolbar;
34}
35
36namespace sfx2::sidebar {
37
41{
42public:
43 static css::uno::Reference<css::lang::XComponent> CreateImageController(
44 const css::uno::Reference<css::frame::XFrame>& rxFrame,
45 const css::uno::Reference<css::awt::XWindow>& rxParentWindow);
46
47 static css::uno::Reference<css::frame::XToolbarController> CreateToolBoxController(
48 ToolBox* pToolBox,
49 const ToolBoxItemId nItemId,
50 const OUString& rsCommandName,
51 const css::uno::Reference<css::frame::XFrame>& rxFrame,
52 const css::uno::Reference<css::frame::XController>& rxController,
53 const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
54 const sal_Int32 nItemWidth, bool bSideBar);
55
56 static css::uno::Reference<css::frame::XToolbarController> CreateToolBoxController(
57 weld::Toolbar& rToolbar,
58 weld::Builder& rBuilder,
59 const OUString& rsCommandName,
60 const css::uno::Reference<css::frame::XFrame>& rxFrame,
61 const css::uno::Reference<css::frame::XController>& rxController,
62 bool bSideBar);
63
64private:
65 static css::uno::Reference<css::frame::XToolbarController> CreateToolBarController(
66 const css::uno::Reference<css::awt::XWindow>& rToolbar,
67 const OUString& rsCommandName,
68 const css::uno::Reference<css::frame::XFrame>& rxFrame,
69 const css::uno::Reference<css::frame::XController>& rxController,
70 const sal_Int32 nWidth, bool bSideBar);
71};
72
73
74} // end of namespace sfx2::sidebar
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Convenience class for the easy creation of toolbox controllers.
static css::uno::Reference< css::frame::XToolbarController > CreateToolBoxController(weld::Toolbar &rToolbar, weld::Builder &rBuilder, const OUString &rsCommandName, const css::uno::Reference< css::frame::XFrame > &rxFrame, const css::uno::Reference< css::frame::XController > &rxController, bool bSideBar)
static css::uno::Reference< css::frame::XToolbarController > CreateToolBoxController(ToolBox *pToolBox, const ToolBoxItemId nItemId, const OUString &rsCommandName, const css::uno::Reference< css::frame::XFrame > &rxFrame, const css::uno::Reference< css::frame::XController > &rxController, const css::uno::Reference< css::awt::XWindow > &rxParentWindow, const sal_Int32 nItemWidth, bool bSideBar)
static css::uno::Reference< css::frame::XToolbarController > CreateToolBarController(const css::uno::Reference< css::awt::XWindow > &rToolbar, const OUString &rsCommandName, const css::uno::Reference< css::frame::XFrame > &rxFrame, const css::uno::Reference< css::frame::XController > &rxController, const sal_Int32 nWidth, bool bSideBar)
static css::uno::Reference< css::lang::XComponent > CreateImageController(const css::uno::Reference< css::frame::XFrame > &rxFrame, const css::uno::Reference< css::awt::XWindow > &rxParentWindow)