bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / FrameControlsManager.hxx
blobe86d110b758110e46e7260bcd9d52bcdf2a63554
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9 #ifndef _FRAMECONTROLSMANAGER_HXX
10 #define _FRAMECONTROLSMANAGER_HXX
12 #include <viewsh.hxx>
13 #include <FrameControl.hxx>
15 #include <boost/shared_ptr.hpp>
16 #include <tools/gen.hxx>
18 #include <map>
19 #include <vector>
21 class SwPageFrm;
22 class SwEditWin;
24 typedef boost::shared_ptr< SwFrameControl > SwFrameControlPtr;
26 typedef std::map<const SwFrm*, SwFrameControlPtr> SwFrameControlPtrMap;
28 /** A container for the Header/Footer, or PageBreak controls.
30 class SwFrameControlsManager
32 private:
33 SwEditWin* m_pEditWin;
34 std::map< FrameControlType, SwFrameControlPtrMap > m_aControls;
36 public:
37 SwFrameControlsManager( SwEditWin* pEditWin );
38 ~SwFrameControlsManager( );
40 SwFrameControlsManager( const SwFrameControlsManager& rCopy );
41 const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy );
43 SwFrameControlPtr GetControl( FrameControlType eType, const SwFrm* pFrm );
44 void RemoveControls( const SwFrm* pFrm );
45 void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm );
46 void HideControls( FrameControlType eType );
47 void SetReadonlyControls( bool bReadonly );
49 // Helper methods
50 void SetHeaderFooterControl( const SwPageFrm* pPageFrm, FrameControlType eType, Point aOffset );
51 void SetPageBreakControl( const SwPageFrm* pPageFrm );
54 #endif
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */