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
22ff12d537SAndre Fischer #include "precompiled_sfx2.hxx"
23ff12d537SAndre Fischer
24b9e67834SAndre Fischer #include "sidebar/ControlFactory.hxx"
25ff12d537SAndre Fischer
26ff12d537SAndre Fischer #include "MenuButton.hxx"
27ff12d537SAndre Fischer #include "TabItem.hxx"
28ae13266dSAndre Fischer #include "sfx2/sidebar/SidebarToolBox.hxx"
2995a18594SAndre Fischer #include "ToolBoxBackground.hxx"
30721f296aSOliver-Rainer Wittmann #include "CustomImageRadioButton.hxx"
31b9e67834SAndre Fischer #include <vcl/toolbox.hxx>
32ff12d537SAndre Fischer
33ff12d537SAndre Fischer
34ff12d537SAndre Fischer namespace sfx2 { namespace sidebar {
35ff12d537SAndre Fischer
36ff12d537SAndre Fischer
CreateMenuButton(Window * pParentWindow)37ff12d537SAndre Fischer CheckBox* ControlFactory::CreateMenuButton (Window* pParentWindow)
38ff12d537SAndre Fischer {
39ff12d537SAndre Fischer return new MenuButton(pParentWindow);
40ff12d537SAndre Fischer }
41ff12d537SAndre Fischer
42ff12d537SAndre Fischer
43ff12d537SAndre Fischer
44ff12d537SAndre Fischer
CreateTabItem(Window * pParentWindow)45ff12d537SAndre Fischer ImageRadioButton* ControlFactory::CreateTabItem (Window* pParentWindow)
46ff12d537SAndre Fischer {
47ff12d537SAndre Fischer return new TabItem(pParentWindow);
48ff12d537SAndre Fischer }
49ff12d537SAndre Fischer
50ff12d537SAndre Fischer
51b9e67834SAndre Fischer
52b9e67834SAndre Fischer
CreateToolBox(Window * pParentWindow,const ResId & rResId)53ae13266dSAndre Fischer SidebarToolBox* ControlFactory::CreateToolBox (
54b9e67834SAndre Fischer Window* pParentWindow,
55b9e67834SAndre Fischer const ResId& rResId)
56b9e67834SAndre Fischer {
57ae13266dSAndre Fischer SidebarToolBox* pToolBox = new SidebarToolBox(pParentWindow, rResId, NULL);
58ae13266dSAndre Fischer pToolBox->SetBorderWindow(pParentWindow);
59ae13266dSAndre Fischer
60ae13266dSAndre Fischer pToolBox->Invalidate();
61ae13266dSAndre Fischer
62ae13266dSAndre Fischer return pToolBox;
63ae13266dSAndre Fischer }
64ae13266dSAndre Fischer
65ae13266dSAndre Fischer
66ae13266dSAndre Fischer
67ae13266dSAndre Fischer
CreateToolBox(Window * pParentWindow,const ResId & rResId,const cssu::Reference<css::frame::XFrame> & rxFrame)68ae13266dSAndre Fischer SidebarToolBox* ControlFactory::CreateToolBox (
69ae13266dSAndre Fischer Window* pParentWindow,
70ae13266dSAndre Fischer const ResId& rResId,
71ae13266dSAndre Fischer const cssu::Reference<css::frame::XFrame>& rxFrame)
72ae13266dSAndre Fischer {
73ae13266dSAndre Fischer SidebarToolBox* pToolBox = new SidebarToolBox(pParentWindow, rResId, rxFrame);
747a32b0c8SAndre Fischer pToolBox->SetBorderWindow(pParentWindow);
7595a18594SAndre Fischer
7695a18594SAndre Fischer pToolBox->Invalidate();
7795a18594SAndre Fischer
7895a18594SAndre Fischer return pToolBox;
79b9e67834SAndre Fischer }
80b9e67834SAndre Fischer
817a32b0c8SAndre Fischer
827a32b0c8SAndre Fischer
837a32b0c8SAndre Fischer
CreateToolBoxBackground(Window * pParentWindow,const bool bShowBorder)847a32b0c8SAndre Fischer Window* ControlFactory::CreateToolBoxBackground (
85*d46a1e42SAndre Fischer Window* pParentWindow,
86*d46a1e42SAndre Fischer const bool bShowBorder)
877a32b0c8SAndre Fischer {
88*d46a1e42SAndre Fischer ToolBoxBackground* pBorderWindow = new ToolBoxBackground(pParentWindow, bShowBorder);
897a32b0c8SAndre Fischer pBorderWindow->Show();
907a32b0c8SAndre Fischer return pBorderWindow;
917a32b0c8SAndre Fischer }
927a32b0c8SAndre Fischer
93721f296aSOliver-Rainer Wittmann
94721f296aSOliver-Rainer Wittmann
95721f296aSOliver-Rainer Wittmann
CreateCustomImageRadionButton(Window * pParentWindow,const ResId & rResId)96721f296aSOliver-Rainer Wittmann ImageRadioButton* ControlFactory::CreateCustomImageRadionButton(
97721f296aSOliver-Rainer Wittmann Window* pParentWindow,
98721f296aSOliver-Rainer Wittmann const ResId& rResId )
99721f296aSOliver-Rainer Wittmann {
100721f296aSOliver-Rainer Wittmann return new CustomImageRadioButton(
101721f296aSOliver-Rainer Wittmann pParentWindow,
102721f296aSOliver-Rainer Wittmann rResId );
103721f296aSOliver-Rainer Wittmann }
104721f296aSOliver-Rainer Wittmann
105ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar
106