1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 #ifndef _FRAMECONTROLSMANAGER_HXX
10 #define _FRAMECONTROLSMANAGER_HXX
13 #include <FrameControl.hxx>
15 #include <boost/shared_ptr.hpp>
16 #include <tools/gen.hxx>
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
33 SwEditWin
* m_pEditWin
;
34 std::map
< FrameControlType
, SwFrameControlPtrMap
> m_aControls
;
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
);
50 void SetHeaderFooterControl( const SwPageFrm
* pPageFrm
, FrameControlType eType
, Point aOffset
);
51 void SetPageBreakControl( const SwPageFrm
* pPageFrm
);
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */