xref: /AOO41X/main/sd/source/ui/sidebar/PanelBase.hxx (revision ca62e2c2083b5d0995f1245bad6c2edfb455fbec)
1*02c50d82SAndre Fischer /**************************************************************
2*02c50d82SAndre Fischer  *
3*02c50d82SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
4*02c50d82SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
5*02c50d82SAndre Fischer  * distributed with this work for additional information
6*02c50d82SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
7*02c50d82SAndre Fischer  * to you under the Apache License, Version 2.0 (the
8*02c50d82SAndre Fischer  * "License"); you may not use this file except in compliance
9*02c50d82SAndre Fischer  * with the License.  You may obtain a copy of the License at
10*02c50d82SAndre Fischer  *
11*02c50d82SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
12*02c50d82SAndre Fischer  *
13*02c50d82SAndre Fischer  * Unless required by applicable law or agreed to in writing,
14*02c50d82SAndre Fischer  * software distributed under the License is distributed on an
15*02c50d82SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*02c50d82SAndre Fischer  * KIND, either express or implied.  See the License for the
17*02c50d82SAndre Fischer  * specific language governing permissions and limitations
18*02c50d82SAndre Fischer  * under the License.
19*02c50d82SAndre Fischer  *
20*02c50d82SAndre Fischer  *************************************************************/
21*02c50d82SAndre Fischer 
22*02c50d82SAndre Fischer #ifndef SD_SIDEBAR_PANELS_PANEL_BASE_HXX
23*02c50d82SAndre Fischer #define SD_SIDEBAR_PANELS_PANEL_BASE_HXX
24*02c50d82SAndre Fischer 
25*02c50d82SAndre Fischer #include "IDisposable.hxx"
26*02c50d82SAndre Fischer #include "ISidebarReceiver.hxx"
27*02c50d82SAndre Fischer #include <sfx2/sidebar/ILayoutableWindow.hxx>
28*02c50d82SAndre Fischer 
29*02c50d82SAndre Fischer #include <vcl/ctrl.hxx>
30*02c50d82SAndre Fischer 
31*02c50d82SAndre Fischer #include <boost/scoped_ptr.hpp>
32*02c50d82SAndre Fischer 
33*02c50d82SAndre Fischer 
34*02c50d82SAndre Fischer namespace css = ::com::sun::star;
35*02c50d82SAndre Fischer namespace cssu = ::com::sun::star::uno;
36*02c50d82SAndre Fischer 
37*02c50d82SAndre Fischer namespace sd {
38*02c50d82SAndre Fischer     class ViewShellBase;
39*02c50d82SAndre Fischer }
40*02c50d82SAndre Fischer 
41*02c50d82SAndre Fischer 
42*02c50d82SAndre Fischer 
43*02c50d82SAndre Fischer 
44*02c50d82SAndre Fischer namespace sd { namespace sidebar {
45*02c50d82SAndre Fischer 
46*02c50d82SAndre Fischer 
47*02c50d82SAndre Fischer class PanelBase
48*02c50d82SAndre Fischer     : public Control,
49*02c50d82SAndre Fischer       public sfx2::sidebar::ILayoutableWindow,
50*02c50d82SAndre Fischer       public IDisposable,
51*02c50d82SAndre Fischer       public ISidebarReceiver
52*02c50d82SAndre Fischer {
53*02c50d82SAndre Fischer public:
54*02c50d82SAndre Fischer     PanelBase (
55*02c50d82SAndre Fischer         ::Window* pParentWindow,
56*02c50d82SAndre Fischer         ViewShellBase& rViewShellBase);
57*02c50d82SAndre Fischer     virtual ~PanelBase (void);
58*02c50d82SAndre Fischer 
59*02c50d82SAndre Fischer     virtual void Resize (void);
60*02c50d82SAndre Fischer 
61*02c50d82SAndre Fischer     // IDisposable
62*02c50d82SAndre Fischer     virtual void Dispose (void);
63*02c50d82SAndre Fischer 
64*02c50d82SAndre Fischer     // ILayoutableWindow
65*02c50d82SAndre Fischer     virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth);
66*02c50d82SAndre Fischer 
67*02c50d82SAndre Fischer     // ISidebarReceiver
68*02c50d82SAndre Fischer     virtual void SetSidebar (const cssu::Reference<css::ui::XSidebar>& rxSidebar);
69*02c50d82SAndre Fischer 
70*02c50d82SAndre Fischer     virtual ::com::sun::star::uno::Reference<
71*02c50d82SAndre Fischer         ::com::sun::star::accessibility::XAccessible > CreateAccessibleObject (
72*02c50d82SAndre Fischer             const ::com::sun::star::uno::Reference<
73*02c50d82SAndre Fischer             ::com::sun::star::accessibility::XAccessible>& rxParent);
74*02c50d82SAndre Fischer 
75*02c50d82SAndre Fischer protected:
76*02c50d82SAndre Fischer     ::boost::scoped_ptr< ::Window> mpWrappedControl;
77*02c50d82SAndre Fischer     virtual ::Window* CreateWrappedControl (
78*02c50d82SAndre Fischer         ::Window* pParentWindow,
79*02c50d82SAndre Fischer         ViewShellBase& rViewShellBase) = 0;
80*02c50d82SAndre Fischer 
81*02c50d82SAndre Fischer private:
82*02c50d82SAndre Fischer     cssu::Reference<css::ui::XSidebar> mxSidebar;
83*02c50d82SAndre Fischer     ViewShellBase& mrViewShellBase;
84*02c50d82SAndre Fischer 
85*02c50d82SAndre Fischer     bool ProvideWrappedControl (void);
86*02c50d82SAndre Fischer };
87*02c50d82SAndre Fischer 
88*02c50d82SAndre Fischer } } // end of namespace sd::sidebar
89*02c50d82SAndre Fischer 
90*02c50d82SAndre Fischer #endif
91