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_DECK_HXX 2322de8995SAndre Fischer #define SFX_SIDEBAR_DECK_HXX 2422de8995SAndre Fischer 2522de8995SAndre Fischer #include "vcl/window.hxx" 2622de8995SAndre Fischer 2722de8995SAndre Fischer 28ff12d537SAndre Fischer namespace sfx2 { namespace sidebar { 2922de8995SAndre Fischer 3022de8995SAndre Fischer class DeckDescriptor; 31ff12d537SAndre Fischer class Panel; 3222de8995SAndre Fischer class TitleBar; 3322de8995SAndre Fischer 3422de8995SAndre Fischer 3522de8995SAndre Fischer /** This is the parent window of the panels. 3622de8995SAndre Fischer It displays the deck title. 3722de8995SAndre Fischer */ 3822de8995SAndre Fischer class Deck 3922de8995SAndre Fischer : public Window 4022de8995SAndre Fischer { 4122de8995SAndre Fischer public: 4222de8995SAndre Fischer Deck ( 4322de8995SAndre Fischer const DeckDescriptor& rDeckDescriptor, 4422de8995SAndre Fischer Window* pParentWindow); 4522de8995SAndre Fischer virtual ~Deck (void); 4622de8995SAndre Fischer 47ff12d537SAndre Fischer void Dispose (void); 48ff12d537SAndre Fischer 4922de8995SAndre Fischer const ::rtl::OUString& GetId (void) const; 5022de8995SAndre Fischer TitleBar* GetTitleBar (void) const; 51ff12d537SAndre Fischer Rectangle GetContentArea (void) const; 52ff12d537SAndre Fischer ::rtl::OUString GetIconURL (const bool bIsHighContrastModeActive) const; 53ff12d537SAndre Fischer void SetPanels (const ::std::vector<Panel*>& rPanels); 54ff12d537SAndre Fischer void RequestLayout (void); 5522de8995SAndre Fischer 5622de8995SAndre Fischer virtual void Paint (const Rectangle& rUpdateArea); 57*b9e67834SAndre Fischer virtual void DataChanged (const DataChangedEvent& rEvent); 5822de8995SAndre Fischer 5922de8995SAndre Fischer private: 6022de8995SAndre Fischer const ::rtl::OUString msTitle; 6122de8995SAndre Fischer const ::rtl::OUString msId; 6222de8995SAndre Fischer TitleBar* mpTitleBar; 63ff12d537SAndre Fischer Image maIcon; 64ff12d537SAndre Fischer const ::rtl::OUString msIconURL; 65ff12d537SAndre Fischer const ::rtl::OUString msHighContrastIconURL; 66ff12d537SAndre Fischer ::std::vector<Panel*> maPanels; 67*b9e67834SAndre Fischer ::std::vector<sal_Int32> maSeparators; 68ff12d537SAndre Fischer Window* mpFiller; 69ff12d537SAndre Fischer 70ff12d537SAndre Fischer void LayoutSinglePanel (void); 71ff12d537SAndre Fischer void LayoutMultiplePanels (void); 72ff12d537SAndre Fischer Rectangle PlaceDeckTitle ( 73ff12d537SAndre Fischer TitleBar* pDeckTitleBar, 74ff12d537SAndre Fischer const Rectangle& rAvailableSpace); 75ff12d537SAndre Fischer void ShowFiller (const Rectangle& rBox); 76ff12d537SAndre Fischer void HideFiller (void); 7722de8995SAndre Fischer }; 7822de8995SAndre Fischer 7922de8995SAndre Fischer 80ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar 8122de8995SAndre Fischer 8222de8995SAndre Fischer #endif 83