Line data Source code
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_UI_INC_FRAMECONTROL_HXX
10 : #define INCLUDED_SW_SOURCE_UI_INC_FRAMECONTROL_HXX
11 :
12 : class SwEditWin;
13 : class SwFrm;
14 : class Point;
15 :
16 : /** Class representing a control linked to a SwFrm.
17 : */
18 : class SwFrameControl
19 : {
20 : SwEditWin* m_pEditWin;
21 : const SwFrm* m_pFrm;
22 :
23 : public:
24 0 : SwFrameControl( SwEditWin* pEditWin, const SwFrm* pFrm ) :
25 0 : m_pEditWin( pEditWin ), m_pFrm( pFrm ) {};
26 0 : virtual ~SwFrameControl( ) {};
27 :
28 : SwFrameControl( const SwFrameControl& rCopy ) :
29 : m_pEditWin( rCopy.m_pEditWin ),
30 : m_pFrm( rCopy.m_pFrm )
31 : {
32 : }
33 :
34 : const SwFrameControl& operator=( const SwFrameControl& rCopy )
35 : {
36 : m_pEditWin = rCopy.m_pEditWin;
37 : m_pFrm = rCopy.m_pFrm;
38 : return *this;
39 : }
40 :
41 0 : const SwFrm* GetFrame( ) { return m_pFrm; }
42 0 : SwEditWin* GetEditWin( ) { return m_pEditWin; }
43 :
44 : virtual void SetReadonly( bool bReadonly ) = 0;
45 : virtual void ShowAll( bool bShow ) = 0;
46 :
47 : /// Returns true if the point is inside the control.
48 : virtual bool Contains( const Point &rDocPt ) const = 0;
49 : };
50 :
51 : #endif
52 :
53 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|