LibreOffice Module sw (master) 1
FrameControl.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_FRAMECONTROL_HXX
10#define INCLUDED_SW_SOURCE_UIBASE_INC_FRAMECONTROL_HXX
11
13#include <vcl/virdev.hxx>
14
15#include "edtwin.hxx"
16
17class SwEditWin;
18class SwPageFrame;
19class SwFrame;
20class Point;
21
23class SAL_LOPLUGIN_ANNOTATE("crosscast") ISwFrameControl
24{
25public:
26 virtual ~ISwFrameControl();
27 virtual void SetReadonly( bool bReadonly ) = 0;
28 virtual void ShowAll( bool bShow ) = 0;
29
31 virtual bool Contains( const Point &rDocPt ) const = 0;
32
33 virtual const SwFrame* GetFrame() = 0;
34 virtual SwEditWin* GetEditWin() = 0;
35};
36
37class SwFrameControl final
38{
40 ISwFrameControl *mpIFace;
41public:
42 SwFrameControl( const VclPtr<vcl::Window> &pWindow );
44
46 ISwFrameControl* GetIFacePtr() { return mpIFace; }
47
48 void SetReadonly( bool bReadonly ) { mpIFace->SetReadonly( bReadonly ); }
49 void ShowAll( bool bShow ) { mpIFace->ShowAll( bShow ); }
50 bool Contains( const Point &rDocPt ) const { return mpIFace->Contains( rDocPt ); }
51};
52
55class SwFrameMenuButtonBase : public InterimItemWindow, public ISwFrameControl
56{
57protected:
59private:
62
63protected:
64 virtual ~SwFrameMenuButtonBase() override { disposeOnce(); }
65 virtual void dispose() override;
66
67 void SetVirDevFont();
68
69public:
70 SwFrameMenuButtonBase(SwEditWin* pEditWin, const SwFrame* pFrame,
71 const OUString& rUIXMLDescription, const OUString& rID);
72
73 virtual const SwFrame* GetFrame() override { return m_pFrame; }
74 virtual SwEditWin* GetEditWin() override { return m_pEditWin; }
75 const SwPageFrame* GetPageFrame() const;
76
77 static const SwPageFrame* GetPageFrame(const SwFrame* pFrame);
78 static void SetVirDevFont(OutputDevice& rDevice);
79};
80
81#endif
82
83/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
class SAL_LOPLUGIN_ANNOTATE("crosscast") ISwFrameControl
Abstract interface to be implemented by writer FrameControls.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:61
SwFrameControl(const VclPtr< vcl::Window > &pWindow)
ISwFrameControl * mpIFace
vcl::Window * GetWindow()
bool Contains(const Point &rDocPt) const
VclPtr< vcl::Window > mxWindow
ISwFrameControl * GetIFacePtr()
void SetReadonly(bool bReadonly)
void ShowAll(bool bShow)
Class sharing some MenuButton code.
VclPtr< VirtualDevice > m_xVirDev
virtual const SwFrame * GetFrame() override
const SwFrame * m_pFrame
SwFrameMenuButtonBase(SwEditWin *pEditWin, const SwFrame *pFrame, const OUString &rUIXMLDescription, const OUString &rID)
const SwPageFrame * GetPageFrame() const
virtual SwEditWin * GetEditWin() override
virtual ~SwFrameMenuButtonBase() override
virtual void dispose() override
VclPtr< SwEditWin > m_pEditWin
Base class of the Writer layout elements.
Definition: frame.hxx:315
A page of the document layout.
Definition: pagefrm.hxx:60
reference_type * get() const