xref: /aoo42x/main/sfx2/source/sidebar/Deck.hxx (revision 95a18594)
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"
26*95a18594SAndre Fischer #include "vcl/image.hxx"
2722de8995SAndre Fischer 
2822de8995SAndre Fischer 
29ff12d537SAndre Fischer namespace sfx2 { namespace sidebar {
3022de8995SAndre Fischer 
3122de8995SAndre Fischer class DeckDescriptor;
32ff12d537SAndre Fischer class Panel;
3322de8995SAndre Fischer class TitleBar;
3422de8995SAndre Fischer 
3522de8995SAndre Fischer 
3622de8995SAndre Fischer /** This is the parent window of the panels.
3722de8995SAndre Fischer     It displays the deck title.
3822de8995SAndre Fischer */
3922de8995SAndre Fischer class Deck
4022de8995SAndre Fischer     : public Window
4122de8995SAndre Fischer {
4222de8995SAndre Fischer public:
4322de8995SAndre Fischer     Deck (
4422de8995SAndre Fischer         const DeckDescriptor& rDeckDescriptor,
4522de8995SAndre Fischer         Window* pParentWindow);
4622de8995SAndre Fischer     virtual ~Deck (void);
4722de8995SAndre Fischer 
48ff12d537SAndre Fischer     void Dispose (void);
49ff12d537SAndre Fischer 
5022de8995SAndre Fischer     const ::rtl::OUString& GetId (void) const;
5122de8995SAndre Fischer     TitleBar* GetTitleBar (void) const;
52ff12d537SAndre Fischer     Rectangle GetContentArea (void) const;
53ff12d537SAndre Fischer     ::rtl::OUString GetIconURL (const bool bIsHighContrastModeActive) const;
54ff12d537SAndre Fischer     void SetPanels (const ::std::vector<Panel*>& rPanels);
55ff12d537SAndre Fischer     void RequestLayout (void);
5622de8995SAndre Fischer 
5722de8995SAndre Fischer     virtual void Paint (const Rectangle& rUpdateArea);
58b9e67834SAndre Fischer     virtual void DataChanged (const DataChangedEvent& rEvent);
5922de8995SAndre Fischer 
6022de8995SAndre Fischer private:
6122de8995SAndre Fischer     const ::rtl::OUString msTitle;
6222de8995SAndre Fischer     const ::rtl::OUString msId;
6322de8995SAndre Fischer     TitleBar* mpTitleBar;
64ff12d537SAndre Fischer     Image maIcon;
65ff12d537SAndre Fischer     const ::rtl::OUString msIconURL;
66ff12d537SAndre Fischer     const ::rtl::OUString msHighContrastIconURL;
67ff12d537SAndre Fischer     ::std::vector<Panel*> maPanels;
68b9e67834SAndre Fischer     ::std::vector<sal_Int32> maSeparators;
69ff12d537SAndre Fischer     Window* mpFiller;
70ff12d537SAndre Fischer 
71ff12d537SAndre Fischer     void LayoutSinglePanel (void);
72ff12d537SAndre Fischer     void LayoutMultiplePanels (void);
73ff12d537SAndre Fischer     Rectangle PlaceDeckTitle (
74ff12d537SAndre Fischer         TitleBar* pDeckTitleBar,
75ff12d537SAndre Fischer         const Rectangle& rAvailableSpace);
76ff12d537SAndre Fischer     void ShowFiller (const Rectangle& rBox);
77ff12d537SAndre Fischer     void HideFiller (void);
7822de8995SAndre Fischer };
7922de8995SAndre Fischer 
8022de8995SAndre Fischer 
81ff12d537SAndre Fischer } } // end of namespace sfx2::sidebar
8222de8995SAndre Fischer 
8322de8995SAndre Fischer #endif
84