122de8995SAndre Fischer /************************************************************** 222de8995SAndre Fischer * 322de8995SAndre Fischer * Licensed to the Apache Software Foundation (ASF) under one 422de8995SAndre Fischer * or more contributor license agreements. See the NOTICE file 522de8995SAndre Fischer * distributed with this work for additional information 622de8995SAndre Fischer * regarding copyright ownership. The ASF licenses this file 722de8995SAndre Fischer * to you under the Apache License, Version 2.0 (the 822de8995SAndre Fischer * "License"); you may not use this file except in compliance 922de8995SAndre Fischer * with the License. You may obtain a copy of the License at 1022de8995SAndre Fischer * 1122de8995SAndre Fischer * http://www.apache.org/licenses/LICENSE-2.0 1222de8995SAndre Fischer * 1322de8995SAndre Fischer * Unless required by applicable law or agreed to in writing, 1422de8995SAndre Fischer * software distributed under the License is distributed on an 1522de8995SAndre Fischer * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1622de8995SAndre Fischer * KIND, either express or implied. See the License for the 1722de8995SAndre Fischer * specific language governing permissions and limitations 1822de8995SAndre Fischer * under the License. 1922de8995SAndre Fischer * 2022de8995SAndre Fischer *************************************************************/ 2122de8995SAndre Fischer 2222de8995SAndre Fischer #ifndef SFX_SIDEBAR_PANEL_HXX 2322de8995SAndre Fischer #define SFX_SIDEBAR_PANEL_HXX 2422de8995SAndre Fischer 257e429a12SAndre Fischer #include "Context.hxx" 26ff12d537SAndre Fischer #include <vcl/window.hxx> 27ff12d537SAndre Fischer 2822de8995SAndre Fischer #include <com/sun/star/ui/XUIElement.hpp> 297a32b0c8SAndre Fischer #include <com/sun/star/ui/XSidebarPanel.hpp> 3022de8995SAndre Fischer 31ff12d537SAndre Fischer #include <boost/function.hpp> 327a32b0c8SAndre Fischer #include <boost/scoped_ptr.hpp> 33f120fe41SAndre Fischer #include <boost/shared_ptr.hpp> 34f120fe41SAndre Fischer #include <vector> 35ff12d537SAndre Fischer 3622de8995SAndre Fischer namespace css = ::com::sun::star; 3722de8995SAndre Fischer namespace cssu = ::com::sun::star::uno; 3822de8995SAndre Fischer 39ff12d537SAndre Fischer namespace sfx2 { namespace sidebar { 4022de8995SAndre Fischer 41ff12d537SAndre Fischer class PanelDescriptor; 4222de8995SAndre Fischer class TitleBar; 43c545150fSOliver-Rainer Wittmann class PanelTitleBar; 4422de8995SAndre Fischer 4522de8995SAndre Fischer 4622de8995SAndre Fischer class Panel 4722de8995SAndre Fischer : public Window 4822de8995SAndre Fischer { 4922de8995SAndre Fischer public: 5022de8995SAndre Fischer Panel ( 51ff12d537SAndre Fischer const PanelDescriptor& rPanelDescriptor, 52ff12d537SAndre Fischer Window* pParentWindow, 537e429a12SAndre Fischer const bool bIsInitiallyExpanded, 547e429a12SAndre Fischer const ::boost::function<void(void)>& rDeckLayoutTrigger, 557e429a12SAndre Fischer const ::boost::function<Context(void)>& rContextAccess); 5622de8995SAndre Fischer virtual ~Panel (void); 5722de8995SAndre Fischer 58ff12d537SAndre Fischer void Dispose (void); 59c545150fSOliver-Rainer Wittmann 60*8a1a651aSAndre Fischer PanelTitleBar* GetTitleBar (void) const; 6122de8995SAndre Fischer bool IsTitleBarOptional (void) const; 6222de8995SAndre Fischer void SetUIElement (const cssu::Reference<css::ui::XUIElement>& rxElement); 637a32b0c8SAndre Fischer cssu::Reference<css::ui::XSidebarPanel> GetPanelComponent (void) const; 6465908a7eSAndre Fischer cssu::Reference<css::awt::XWindow> GetElementWindow (void); 65ff12d537SAndre Fischer void SetExpanded (const bool bIsExpanded); 66ff12d537SAndre Fischer bool IsExpanded (void) const; 6795a18594SAndre Fischer bool HasIdPredicate (const ::rtl::OUString& rsId) const; 6802c50d82SAndre Fischer const ::rtl::OUString& GetId (void) const; 6922de8995SAndre Fischer 7022de8995SAndre Fischer virtual void Paint (const Rectangle& rUpdateArea); 717a32b0c8SAndre Fischer virtual void Resize (void); 72b9e67834SAndre Fischer virtual void DataChanged (const DataChangedEvent& rEvent); 73b9e67834SAndre Fischer virtual void Activate (void); 7422de8995SAndre Fischer 757a32b0c8SAndre Fischer void PrintWindowTree (void); 767a32b0c8SAndre Fischer 7722de8995SAndre Fischer private: 7895a18594SAndre Fischer const ::rtl::OUString msPanelId; 79c545150fSOliver-Rainer Wittmann ::boost::scoped_ptr<PanelTitleBar> mpTitleBar; 8022de8995SAndre Fischer const bool mbIsTitleBarOptional; 8122de8995SAndre Fischer cssu::Reference<css::ui::XUIElement> mxElement; 827a32b0c8SAndre Fischer cssu::Reference<css::ui::XSidebarPanel> mxPanelComponent; 83ff12d537SAndre Fischer bool mbIsExpanded; 84ff12d537SAndre Fischer const ::boost::function<void(void)> maDeckLayoutTrigger; 857e429a12SAndre Fischer const ::boost::function<Context(void)> maContextAccess; 8622de8995SAndre Fischer }; 87f120fe41SAndre Fischer typedef ::boost::shared_ptr<Panel> SharedPanel; 88f120fe41SAndre Fischer typedef ::std::vector<SharedPanel> SharedPanelContainer; 8995a18594SAndre Fischer 9022de8995SAndre Fischer 91ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 9222de8995SAndre Fischer 9322de8995SAndre Fischer #endif 94