1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <sfx2/dllapi.h>
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <vcl/toolbox.hxx>
25 namespace com::sun::star::awt
{ class XWindow
; }
26 namespace com::sun::star::frame
{ class XController
; }
27 namespace com::sun::star::frame
{ class XFrame
; }
28 namespace com::sun::star::frame
{ class XToolbarController
; }
37 namespace sfx2::sidebar
{
39 /** Convenience class for the easy creation of toolbox controllers.
41 class ControllerFactory
44 static css::uno::Reference
<css::frame::XToolbarController
> CreateToolBoxController(
46 const ToolBoxItemId nItemId
,
47 const OUString
& rsCommandName
,
48 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
49 const css::uno::Reference
<css::frame::XController
>& rxController
,
50 const css::uno::Reference
<css::awt::XWindow
>& rxParentWindow
,
51 const sal_Int32 nItemWidth
, bool bSideBar
);
53 static css::uno::Reference
<css::frame::XToolbarController
> CreateToolBoxController(
54 weld::Toolbar
& rToolbar
,
55 weld::Builder
& rBuilder
,
56 const OUString
& rsCommandName
,
57 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
58 const css::uno::Reference
<css::frame::XController
>& rxController
,
62 static css::uno::Reference
<css::frame::XToolbarController
> CreateToolBarController(
63 const css::uno::Reference
<css::awt::XWindow
>& rToolbar
,
64 const OUString
& rsCommandName
,
65 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
,
66 const css::uno::Reference
<css::frame::XController
>& rxController
,
67 const sal_Int32 nWidth
, bool bSideBar
);
71 } // end of namespace sfx2::sidebar
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */