1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef TOOLPANELCOLLECTION_HXX 25 #define TOOLPANELCOLLECTION_HXX 26 27 #include "svtools/toolpanel/toolpaneldeck.hxx" 28 29 #include <memory> 30 31 //........................................................................ 32 namespace svt 33 { 34 //........................................................................ 35 36 struct ToolPanelCollection_Data; 37 38 //==================================================================== 39 //= ToolPanelCollection 40 //==================================================================== 41 class ToolPanelCollection : public IToolPanelDeck 42 { 43 public: 44 ToolPanelCollection(); 45 ~ToolPanelCollection(); 46 47 // IToolPanelDeck 48 virtual size_t GetPanelCount() const; 49 virtual PToolPanel GetPanel( const size_t i_nPos ) const; 50 virtual ::boost::optional< size_t > 51 GetActivePanel() const; 52 virtual void ActivatePanel( const ::boost::optional< size_t >& i_rPanel ); 53 virtual size_t InsertPanel( const PToolPanel& i_pPanel, const size_t i_nPosition ); 54 virtual PToolPanel RemovePanel( const size_t i_nPosition ); 55 virtual void AddListener( IToolPanelDeckListener& i_rListener ); 56 virtual void RemoveListener( IToolPanelDeckListener& i_rListener ); 57 58 private: 59 ::std::auto_ptr< ToolPanelCollection_Data > m_pData; 60 }; 61 62 //........................................................................ 63 } // namespace svt 64 //........................................................................ 65 66 #endif // TOOLPANELCOLLECTION_HXX 67