LibreOffice Module sw (master)
1
sw
source
uibase
inc
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
12
#include <
vcl/InterimItemWindow.hxx
>
13
#include <
vcl/virdev.hxx
>
14
15
#include "
edtwin.hxx
"
16
17
class
SwEditWin
;
18
class
SwPageFrame
;
19
class
SwFrame
;
20
class
Point
;
21
23
class
SAL_LOPLUGIN_ANNOTATE
("crosscast") ISwFrameControl
24
{
25
public
:
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
37
class
SwFrameControl
final
38
{
39
VclPtr<vcl::Window>
mxWindow
;
40
ISwFrameControl *
mpIFace
;
41
public
:
42
SwFrameControl
(
const
VclPtr<vcl::Window>
&pWindow );
43
~SwFrameControl
();
44
45
vcl::Window
*
GetWindow
() {
return
mxWindow
.
get
(); }
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
55
class
SwFrameMenuButtonBase
:
public
InterimItemWindow
,
public
ISwFrameControl
56
{
57
protected
:
58
VclPtr<VirtualDevice>
m_xVirDev
;
59
private
:
60
VclPtr<SwEditWin>
m_pEditWin
;
61
const
SwFrame
*
m_pFrame
;
62
63
protected
:
64
virtual
~SwFrameMenuButtonBase
()
override
{
disposeOnce
(); }
65
virtual
void
dispose
()
override
;
66
67
void
SetVirDevFont
();
68
69
public
:
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: */
SAL_LOPLUGIN_ANNOTATE
class SAL_LOPLUGIN_ANNOTATE("crosscast") ISwFrameControl
Abstract interface to be implemented by writer FrameControls.
Definition:
FrameControl.hxx:23
InterimItemWindow.hxx
InterimItemWindow
Point
SwEditWin
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition:
edtwin.hxx:61
SwFrameControl
Definition:
FrameControl.hxx:38
SwFrameControl::SwFrameControl
SwFrameControl(const VclPtr< vcl::Window > &pWindow)
Definition:
FrameControlsManager.cxx:279
SwFrameControl::mpIFace
ISwFrameControl * mpIFace
Definition:
FrameControl.hxx:40
SwFrameControl::GetWindow
vcl::Window * GetWindow()
Definition:
FrameControl.hxx:45
SwFrameControl::Contains
bool Contains(const Point &rDocPt) const
Definition:
FrameControl.hxx:50
SwFrameControl::mxWindow
VclPtr< vcl::Window > mxWindow
Definition:
FrameControl.hxx:39
SwFrameControl::~SwFrameControl
~SwFrameControl()
Definition:
FrameControlsManager.cxx:286
SwFrameControl::GetIFacePtr
ISwFrameControl * GetIFacePtr()
Definition:
FrameControl.hxx:46
SwFrameControl::SetReadonly
void SetReadonly(bool bReadonly)
Definition:
FrameControl.hxx:48
SwFrameControl::ShowAll
void ShowAll(bool bShow)
Definition:
FrameControl.hxx:49
SwFrameMenuButtonBase
Class sharing some MenuButton code.
Definition:
FrameControl.hxx:56
SwFrameMenuButtonBase::m_xVirDev
VclPtr< VirtualDevice > m_xVirDev
Definition:
FrameControl.hxx:58
SwFrameMenuButtonBase::GetFrame
virtual const SwFrame * GetFrame() override
Definition:
FrameControl.hxx:73
SwFrameMenuButtonBase::SetVirDevFont
void SetVirDevFont()
Definition:
FrameControlsManager.cxx:274
SwFrameMenuButtonBase::m_pFrame
const SwFrame * m_pFrame
Definition:
FrameControl.hxx:61
SwFrameMenuButtonBase::SwFrameMenuButtonBase
SwFrameMenuButtonBase(SwEditWin *pEditWin, const SwFrame *pFrame, const OUString &rUIXMLDescription, const OUString &rID)
Definition:
FrameControlsManager.cxx:204
SwFrameMenuButtonBase::GetPageFrame
const SwPageFrame * GetPageFrame() const
Definition:
FrameControlsManager.cxx:254
SwFrameMenuButtonBase::GetEditWin
virtual SwEditWin * GetEditWin() override
Definition:
FrameControl.hxx:74
SwFrameMenuButtonBase::~SwFrameMenuButtonBase
virtual ~SwFrameMenuButtonBase() override
Definition:
FrameControl.hxx:64
SwFrameMenuButtonBase::dispose
virtual void dispose() override
Definition:
FrameControlsManager.cxx:259
SwFrameMenuButtonBase::m_pEditWin
VclPtr< SwEditWin > m_pEditWin
Definition:
FrameControl.hxx:60
SwFrame
Base class of the Writer layout elements.
Definition:
frame.hxx:315
SwPageFrame
A page of the document layout.
Definition:
pagefrm.hxx:60
VclPtr< vcl::Window >
VclPtr::get
reference_type * get() const
VclReferenceBase::disposeOnce
void disposeOnce()
edtwin.hxx
OutputDevice
vcl::Window
virdev.hxx
Generated on Sun Jul 30 2023 04:29:55 for LibreOffice Module sw (master) by
1.9.3