2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 #ifndef SFX_SIDEBAR_CONTROL_FACTORY_HXX
19 #define SFX_SIDEBAR_CONTROL_FACTORY_HXX
21 #include <sfx2/dllapi.h>
22 #include <sfx2/sidebar/SidebarToolBox.hxx>
23 #include <vcl/button.hxx>
24 #include <com/sun/star/frame/XFrame.hpp>
27 namespace sfx2
{ namespace sidebar
{
29 class ToolBoxBackground
;
31 /** Factory for controls used in sidebar panels.
32 The reason to use this factory instead of creating the controls
33 directly is that this way the sidebar has a little more control
34 over look and feel of its controls.
36 class SFX2_DLLPUBLIC ControlFactory
39 /** Create the menu button for the task bar.
41 static CheckBox
* CreateMenuButton (Window
* pParentWindow
);
43 static ImageRadioButton
* CreateTabItem (Window
* pParentWindow
);
45 /** Create a tool box that does *not* handle its items. The
46 caller has to register callbacks to process, among others,
47 click and selection events.
49 static SidebarToolBox
* CreateToolBox (
50 Window
* pParentWindow
,
53 /** Create a tool box that *does* handle its items. All event
54 processing is done by toolbox controllers.
56 static SidebarToolBox
* CreateToolBox (
57 Window
* pParentWindow
,
59 const ::com::sun::star::uno::Reference
<com::sun::star::frame::XFrame
>& rxFrame
);
61 /** Create a window that acts as background of a tool box.
62 In general it is slightly larger than the tool box.
64 The parent window of the new background control.
66 When <TRUE/> then the background control is made slightly
67 larger then its tool box child, once that is created.
68 Otherwise the background control will not be visible.
70 static Window
* CreateToolBoxBackground (
71 Window
* pParentWindow
,
72 const bool bShowBorder
= true);
74 static ImageRadioButton
* CreateCustomImageRadionButton(
75 Window
* pParentWindow
,
76 const ResId
& rResId
);
80 } } // end of namespace sfx2::sidebar