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 "FrameControl.hxx"
13
14#include <tools/gen.hxx>
15
16#include <map>
17#include <memory>
18
19class SwPageFrame;
20class SwEditWin;
21class SwContentFrame;
22class SwTextNode;
24
25typedef std::shared_ptr< SwFrameControl > SwFrameControlPtr;
26
27typedef std::map<const SwFrame*, SwFrameControlPtr> SwFrameControlPtrMap;
28
32{
33 private:
35 std::map< FrameControlType, SwFrameControlPtrMap > m_aControls;
36
37 public:
40 void dispose();
41
43 void RemoveControls( const SwFrame* pFrame );
44 void RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame );
45 void HideControls( FrameControlType eType );
46 void SetReadonlyControls( bool bReadonly );
47
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 );
54};
55
56#endif
57
58/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::map< const SwFrame *, SwFrameControlPtr > SwFrameControlPtrMap
std::shared_ptr< SwFrameControl > SwFrameControlPtr
Stores the properties of a content control.
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:59
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:61
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
A container for the Header/Footer, PageBreak, and Outline Content Visibility controls.
void HideControls(FrameControlType eType)
void SetReadonlyControls(bool bReadonly)
std::map< FrameControlType, SwFrameControlPtrMap > m_aControls
void SetHeaderFooterControl(const SwPageFrame *pPageFrame, FrameControlType eType, Point aOffset)
void SetContentControlAliasButton(SwContentControl *pContentControl, Point aTopLeftPixel)
void SetPageBreakControl(const SwPageFrame *pPageFrame)
void RemoveControlsByType(FrameControlType eType, const SwFrame *pFrame)
VclPtr< SwEditWin > m_pEditWin
void SetOutlineContentVisibilityButton(const SwContentFrame *pContentFrame)
void SetUnfloatTableButton(const SwFlyFrame *pFlyFrame, bool bShow, Point aTopRightPixel=Point())
SwFrameControlsManager(SwEditWin *pEditWin)
SwFrameControlPtr GetControl(FrameControlType eType, const SwFrame *pFrame)
void RemoveControls(const SwFrame *pFrame)
Base class of the Writer layout elements.
Definition: frame.hxx:315
A page of the document layout.
Definition: pagefrm.hxx:60
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
FrameControlType
Definition: swtypes.hxx:246