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_CONTROLLER_HXX 2322de8995SAndre Fischer #define SFX_SIDEBAR_CONTROLLER_HXX 2422de8995SAndre Fischer 25*ff12d537SAndre Fischer #include "ResourceManager.hxx" 2622de8995SAndre Fischer 2722de8995SAndre Fischer #include <com/sun/star/ui/XContextChangeEventListener.hpp> 2822de8995SAndre Fischer #include <boost/noncopyable.hpp> 2922de8995SAndre Fischer #include <cppuhelper/compbase1.hxx> 3022de8995SAndre Fischer #include <cppuhelper/basemutex.hxx> 3122de8995SAndre Fischer 3222de8995SAndre Fischer namespace css = ::com::sun::star; 3322de8995SAndre Fischer namespace cssu = ::com::sun::star::uno; 3422de8995SAndre Fischer 3522de8995SAndre Fischer namespace 3622de8995SAndre Fischer { 3722de8995SAndre Fischer typedef ::cppu::WeakComponentImplHelper1 < 3822de8995SAndre Fischer css::ui::XContextChangeEventListener 3922de8995SAndre Fischer > SidebarControllerInterfaceBase; 4022de8995SAndre Fischer } 4122de8995SAndre Fischer 4222de8995SAndre Fischer 43*ff12d537SAndre Fischer class DockingWindow; 44*ff12d537SAndre Fischer 45*ff12d537SAndre Fischer namespace sfx2 { namespace sidebar { 4622de8995SAndre Fischer 4722de8995SAndre Fischer class TabBar; 48*ff12d537SAndre Fischer class TabBarConfiguration; 4922de8995SAndre Fischer class DeckDescriptor; 50*ff12d537SAndre Fischer class DeckConfiguration; 5122de8995SAndre Fischer class ContentPanelDescriptor; 5222de8995SAndre Fischer 5322de8995SAndre Fischer class SidebarController 5422de8995SAndre Fischer : private ::boost::noncopyable, 5522de8995SAndre Fischer private ::cppu::BaseMutex, 5622de8995SAndre Fischer public SidebarControllerInterfaceBase 5722de8995SAndre Fischer { 5822de8995SAndre Fischer public: 5922de8995SAndre Fischer SidebarController( 60*ff12d537SAndre Fischer DockingWindow* pParentWindow, 6122de8995SAndre Fischer const cssu::Reference<css::frame::XFrame>& rxFrame); 6222de8995SAndre Fischer virtual ~SidebarController (void); 6322de8995SAndre Fischer 6422de8995SAndre Fischer virtual void SAL_CALL notifyContextChangeEvent (const css::ui::ContextChangeEventObject& rEvent) 6522de8995SAndre Fischer throw(cssu::RuntimeException); 6622de8995SAndre Fischer 6722de8995SAndre Fischer virtual void SAL_CALL disposing (const css::lang::EventObject& rEventObject) 6822de8995SAndre Fischer throw(cssu::RuntimeException); 6922de8995SAndre Fischer 7022de8995SAndre Fischer void NotifyResize (void); 7122de8995SAndre Fischer 72*ff12d537SAndre Fischer void SwitchToDeck ( 73*ff12d537SAndre Fischer const DeckDescriptor& rDeckDescriptor); 74*ff12d537SAndre Fischer 7522de8995SAndre Fischer private: 76*ff12d537SAndre Fischer ::boost::shared_ptr<DeckConfiguration> mpCurrentConfiguration; 77*ff12d537SAndre Fischer DockingWindow* mpParentWindow; 7822de8995SAndre Fischer TabBar* mpTabBar; 7922de8995SAndre Fischer cssu::Reference<css::frame::XFrame> mxFrame; 80*ff12d537SAndre Fischer Context maCurrentContext; 8122de8995SAndre Fischer 8222de8995SAndre Fischer DECL_LINK(WindowEventHandler, VclWindowEvent*); 83*ff12d537SAndre Fischer void UpdateConfigurations (const Context& rContext); 84*ff12d537SAndre Fischer cssu::Reference<css::ui::XUIElement> CreateUIElement ( 85*ff12d537SAndre Fischer const cssu::Reference<css::awt::XWindowPeer>& rxWindow, 86*ff12d537SAndre Fischer const ::rtl::OUString& rsImplementationURL) const; 87*ff12d537SAndre Fischer void SwitchToDeck ( 88*ff12d537SAndre Fischer const DeckDescriptor& rDeckDescriptor, 8922de8995SAndre Fischer const Context& rContext); 90*ff12d537SAndre Fischer void MakeConfigurationCurrent (const ::boost::shared_ptr<DeckConfiguration>& rpConfiguration); 91*ff12d537SAndre Fischer void ShowPopupMenu (const Rectangle& rButtonBox) const; 92*ff12d537SAndre Fischer ::boost::shared_ptr<PopupMenu> CreatePopupMenu (void) const; 93*ff12d537SAndre Fischer DECL_LINK(OnMenuItemSelected, Menu*); 9422de8995SAndre Fischer 9522de8995SAndre Fischer virtual void SAL_CALL disposing (void); 9622de8995SAndre Fischer }; 9722de8995SAndre Fischer 9822de8995SAndre Fischer 99*ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 10022de8995SAndre Fischer 10122de8995SAndre Fischer #endif 102