Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / uibase / inc / FrameControlsManager.hxx
blob945534fcd31c905e763ca8271e1eb7e2af95c465
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 INCLUDED_SW_SOURCE_UIBASE_INC_FRAMECONTROLSMANAGER_HXX
10 #define INCLUDED_SW_SOURCE_UIBASE_INC_FRAMECONTROLSMANAGER_HXX
12 #include "FrameControl.hxx"
14 #include <tools/gen.hxx>
16 #include <map>
17 #include <memory>
19 class SwPageFrame;
20 class SwEditWin;
21 class SwContentFrame;
22 class SwTextNode;
23 class SwContentControl;
25 typedef std::shared_ptr< SwFrameControl > SwFrameControlPtr;
27 typedef std::map<const SwFrame*, SwFrameControlPtr> SwFrameControlPtrMap;
29 /** A container for the Header/Footer, PageBreak, and Outline Content Visibility controls.
31 class SwFrameControlsManager
33 private:
34 VclPtr<SwEditWin> m_pEditWin;
35 std::map< FrameControlType, SwFrameControlPtrMap > m_aControls;
37 public:
38 SwFrameControlsManager( SwEditWin* pEditWin );
39 ~SwFrameControlsManager();
40 void dispose();
42 SwFrameControlPtr GetControl( FrameControlType eType, const SwFrame* pFrame );
43 void RemoveControls( const SwFrame* pFrame );
44 void RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame );
45 void HideControls( FrameControlType eType );
46 void SetReadonlyControls( bool bReadonly );
48 // Helper methods
49 void SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset );
50 void SetPageBreakControl( const SwPageFrame* pPageFrame );
51 void SetUnfloatTableButton( const SwFlyFrame* pFlyFrame, bool bShow, Point aTopRightPixel = Point() );
52 void SetOutlineContentVisibilityButton(const SwContentFrame* pContentFrame);
53 void SetContentControlAliasButton( SwContentControl* pContentControl, Point aTopLeftPixel );
56 #endif
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */