LibreOffice Module sw (master)  1
FrameControlsManager.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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
11 
12 #include <viewsh.hxx>
13 #include "FrameControl.hxx"
14 
15 #include <tools/gen.hxx>
16 
17 #include <map>
18 #include <memory>
19 #include <vector>
20 
21 class SwPageFrame;
22 class SwEditWin;
23 
24 typedef std::shared_ptr< SwFrameControl > SwFrameControlPtr;
25 
26 typedef std::map<const SwFrame*, SwFrameControlPtr> SwFrameControlPtrMap;
27 
31 {
32  private:
34  std::map< FrameControlType, SwFrameControlPtrMap > m_aControls;
35 
36  public:
37  SwFrameControlsManager( SwEditWin* pEditWin );
39  void dispose();
40 
41  SwFrameControlPtr GetControl( FrameControlType eType, const SwFrame* pFrame );
42  void RemoveControls( const SwFrame* pFrame );
43  void RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame );
44  void HideControls( FrameControlType eType );
45  void SetReadonlyControls( bool bReadonly );
46 
47  // Helper methods
48  void SetHeaderFooterControl( const SwPageFrame* pPageFrame, FrameControlType eType, Point aOffset );
49  void SetPageBreakControl( const SwPageFrame* pPageFrame );
50  void SetUnfloatTableButton( const SwFlyFrame* pFlyFrame, bool bShow, Point aTopRightPixel = Point() );
51 };
52 
53 #endif
54 
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:295
VclPtr< SwEditWin > m_pEditWin
void HideControls(FrameControlType eType)
void RemoveControls(const SwFrame *pFrame)
void SetHeaderFooterControl(const SwPageFrame *pPageFrame, FrameControlType eType, Point aOffset)
void SetPageBreakControl(const SwPageFrame *pPageFrame)
void SetReadonlyControls(bool bReadonly)
void RemoveControlsByType(FrameControlType eType, const SwFrame *pFrame)
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
A page of the document layout.
Definition: pagefrm.hxx:40
FrameControlType
Definition: swtypes.hxx:246
general base class for all free-flowing frames
Definition: flyfrm.hxx:60
std::map< FrameControlType, SwFrameControlPtrMap > m_aControls
SwFrameControlPtr GetControl(FrameControlType eType, const SwFrame *pFrame)
void SetUnfloatTableButton(const SwFlyFrame *pFlyFrame, bool bShow, Point aTopRightPixel=Point())
A container for the Header/Footer, or PageBreak controls.
std::map< const SwFrame *, SwFrameControlPtr > SwFrameControlPtrMap
std::shared_ptr< SwFrameControl > SwFrameControlPtr
SwFrameControlsManager(SwEditWin *pEditWin)