1ff12d537SAndre Fischer /**************************************************************
2ff12d537SAndre Fischer  *
3ff12d537SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
4ff12d537SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
5ff12d537SAndre Fischer  * distributed with this work for additional information
6ff12d537SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
7ff12d537SAndre Fischer  * to you under the Apache License, Version 2.0 (the
8ff12d537SAndre Fischer  * "License"); you may not use this file except in compliance
9ff12d537SAndre Fischer  * with the License.  You may obtain a copy of the License at
10ff12d537SAndre Fischer  *
11ff12d537SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
12ff12d537SAndre Fischer  *
13ff12d537SAndre Fischer  * Unless required by applicable law or agreed to in writing,
14ff12d537SAndre Fischer  * software distributed under the License is distributed on an
15ff12d537SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ff12d537SAndre Fischer  * KIND, either express or implied.  See the License for the
17ff12d537SAndre Fischer  * specific language governing permissions and limitations
18ff12d537SAndre Fischer  * under the License.
19ff12d537SAndre Fischer  *
20ff12d537SAndre Fischer  *************************************************************/
21ff12d537SAndre Fischer 
22ae13266dSAndre Fischer #ifndef SFX_SIDEBAR_CONTROLLER_FACTORY_HXX
23ae13266dSAndre Fischer #define SFX_SIDEBAR_CONTROLLER_FACTORY_HXX
24b9e67834SAndre Fischer 
25ae13266dSAndre Fischer #include "sfx2/dllapi.h"
26*d46a1e42SAndre Fischer #include <com/sun/star/awt/XWindow.hpp>
27ae13266dSAndre Fischer #include <com/sun/star/frame/XFrame.hpp>
28*d46a1e42SAndre Fischer #include <com/sun/star/frame/XToolbarController.hpp>
29ff12d537SAndre Fischer 
30ae13266dSAndre Fischer namespace css = ::com::sun::star;
31ae13266dSAndre Fischer namespace cssu = ::com::sun::star::uno;
32ff12d537SAndre Fischer 
33edc7f530SAndre Fischer class ToolBox;
34edc7f530SAndre Fischer 
35ff12d537SAndre Fischer namespace sfx2 { namespace sidebar {
36ff12d537SAndre Fischer 
37*d46a1e42SAndre Fischer /** Convenience class for the easy creation of toolbox controllers.
38ae13266dSAndre Fischer */
39ae13266dSAndre Fischer class SFX2_DLLPUBLIC ControllerFactory
40ff12d537SAndre Fischer {
41ff12d537SAndre Fischer public:
42ae13266dSAndre Fischer     static cssu::Reference<css::frame::XToolbarController> CreateToolBoxController(
43ae13266dSAndre Fischer         ToolBox* pToolBox,
44ae13266dSAndre Fischer         const sal_uInt16 nItemId,
45ae13266dSAndre Fischer         const ::rtl::OUString& rsCommandName,
46*d46a1e42SAndre Fischer         const cssu::Reference<css::frame::XFrame>& rxFrame,
47*d46a1e42SAndre Fischer         const cssu::Reference<css::awt::XWindow>& rxParentWindow,
48*d46a1e42SAndre Fischer         const sal_Int32 nItemWidth);
49*d46a1e42SAndre Fischer 
50*d46a1e42SAndre Fischer private:
51*d46a1e42SAndre Fischer     static cssu::Reference<css::frame::XToolbarController> CreateToolBarController(
52*d46a1e42SAndre Fischer         ToolBox* pToolBox,
53*d46a1e42SAndre Fischer         const ::rtl::OUString& rsCommandName,
54*d46a1e42SAndre Fischer         const cssu::Reference<css::frame::XFrame>& rxFrame,
55*d46a1e42SAndre Fischer         const sal_Int32 nWidth);
56ff12d537SAndre Fischer };
57ff12d537SAndre Fischer 
58ff12d537SAndre Fischer 
59ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar
60ff12d537SAndre Fischer 
61ff12d537SAndre Fischer #endif
62