xref: /aoo41x/main/sd/source/ui/sidebar/PanelBase.hxx (revision 02c50d82)
17a32b0c8SAndre Fischer /**************************************************************
27a32b0c8SAndre Fischer  *
37a32b0c8SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
47a32b0c8SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
57a32b0c8SAndre Fischer  * distributed with this work for additional information
67a32b0c8SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
77a32b0c8SAndre Fischer  * to you under the Apache License, Version 2.0 (the
87a32b0c8SAndre Fischer  * "License"); you may not use this file except in compliance
97a32b0c8SAndre Fischer  * with the License.  You may obtain a copy of the License at
107a32b0c8SAndre Fischer  *
117a32b0c8SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
127a32b0c8SAndre Fischer  *
137a32b0c8SAndre Fischer  * Unless required by applicable law or agreed to in writing,
147a32b0c8SAndre Fischer  * software distributed under the License is distributed on an
157a32b0c8SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167a32b0c8SAndre Fischer  * KIND, either express or implied.  See the License for the
177a32b0c8SAndre Fischer  * specific language governing permissions and limitations
187a32b0c8SAndre Fischer  * under the License.
197a32b0c8SAndre Fischer  *
207a32b0c8SAndre Fischer  *************************************************************/
217a32b0c8SAndre Fischer 
227a32b0c8SAndre Fischer #ifndef SD_SIDEBAR_PANELS_PANEL_BASE_HXX
237a32b0c8SAndre Fischer #define SD_SIDEBAR_PANELS_PANEL_BASE_HXX
247a32b0c8SAndre Fischer 
255d65efa0SAndre Fischer #include "IDisposable.hxx"
265d65efa0SAndre Fischer #include "ISidebarReceiver.hxx"
27*02c50d82SAndre Fischer #include <sfx2/sidebar/ILayoutableWindow.hxx>
287a32b0c8SAndre Fischer 
297a32b0c8SAndre Fischer #include <vcl/ctrl.hxx>
307a32b0c8SAndre Fischer 
317a32b0c8SAndre Fischer #include <boost/scoped_ptr.hpp>
327a32b0c8SAndre Fischer 
337a32b0c8SAndre Fischer 
347a32b0c8SAndre Fischer namespace css = ::com::sun::star;
357a32b0c8SAndre Fischer namespace cssu = ::com::sun::star::uno;
367a32b0c8SAndre Fischer 
377a32b0c8SAndre Fischer namespace sd {
387a32b0c8SAndre Fischer     class ViewShellBase;
397a32b0c8SAndre Fischer }
407a32b0c8SAndre Fischer 
417a32b0c8SAndre Fischer 
427a32b0c8SAndre Fischer 
437a32b0c8SAndre Fischer 
447a32b0c8SAndre Fischer namespace sd { namespace sidebar {
457a32b0c8SAndre Fischer 
467a32b0c8SAndre Fischer 
477a32b0c8SAndre Fischer class PanelBase
487a32b0c8SAndre Fischer     : public Control,
49*02c50d82SAndre Fischer       public sfx2::sidebar::ILayoutableWindow,
507a32b0c8SAndre Fischer       public IDisposable,
517a32b0c8SAndre Fischer       public ISidebarReceiver
527a32b0c8SAndre Fischer {
537a32b0c8SAndre Fischer public:
547a32b0c8SAndre Fischer     PanelBase (
557a32b0c8SAndre Fischer         ::Window* pParentWindow,
567a32b0c8SAndre Fischer         ViewShellBase& rViewShellBase);
577a32b0c8SAndre Fischer     virtual ~PanelBase (void);
587a32b0c8SAndre Fischer 
597a32b0c8SAndre Fischer     virtual void Resize (void);
607a32b0c8SAndre Fischer 
617a32b0c8SAndre Fischer     // IDisposable
627a32b0c8SAndre Fischer     virtual void Dispose (void);
637a32b0c8SAndre Fischer 
647a32b0c8SAndre Fischer     // ILayoutableWindow
657a32b0c8SAndre Fischer     virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth);
667a32b0c8SAndre Fischer 
677a32b0c8SAndre Fischer     // ISidebarReceiver
687a32b0c8SAndre Fischer     virtual void SetSidebar (const cssu::Reference<css::ui::XSidebar>& rxSidebar);
697a32b0c8SAndre Fischer 
707a32b0c8SAndre Fischer     virtual ::com::sun::star::uno::Reference<
717a32b0c8SAndre Fischer         ::com::sun::star::accessibility::XAccessible > CreateAccessibleObject (
727a32b0c8SAndre Fischer             const ::com::sun::star::uno::Reference<
737a32b0c8SAndre Fischer             ::com::sun::star::accessibility::XAccessible>& rxParent);
747a32b0c8SAndre Fischer 
757a32b0c8SAndre Fischer protected:
767a32b0c8SAndre Fischer     ::boost::scoped_ptr< ::Window> mpWrappedControl;
777a32b0c8SAndre Fischer     virtual ::Window* CreateWrappedControl (
787a32b0c8SAndre Fischer         ::Window* pParentWindow,
797a32b0c8SAndre Fischer         ViewShellBase& rViewShellBase) = 0;
807a32b0c8SAndre Fischer 
817a32b0c8SAndre Fischer private:
827a32b0c8SAndre Fischer     cssu::Reference<css::ui::XSidebar> mxSidebar;
837a32b0c8SAndre Fischer     ViewShellBase& mrViewShellBase;
847a32b0c8SAndre Fischer 
857a32b0c8SAndre Fischer     bool ProvideWrappedControl (void);
867a32b0c8SAndre Fischer };
877a32b0c8SAndre Fischer 
887a32b0c8SAndre Fischer } } // end of namespace sd::sidebar
897a32b0c8SAndre Fischer 
907a32b0c8SAndre Fischer #endif
91