LibreOffice Module sw (master) 1
HeaderFooterWin.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_HEADERFOOTERWIN_HXX
10#define INCLUDED_SW_SOURCE_UIBASE_INC_HEADERFOOTERWIN_HXX
11
12#include "edtwin.hxx"
13#include "DashedLine.hxx"
14#include "FrameControl.hxx"
15#include <vcl/timer.hxx>
17
23{
24public:
25
27 const tools::Rectangle& rRect, bool bOnTop);
28};
29
31
37class SwHeaderFooterDashedLine final : public SwDashedLine, public ISwFrameControl
38{
39private:
44
45 void EnsureWin();
46
47 bool IsOnScreen();
48
49public:
50 SwHeaderFooterDashedLine(SwEditWin* pEditWin, const SwFrame *pFrame, bool bIsHeader);
51
52 virtual ~SwHeaderFooterDashedLine() override { disposeOnce(); }
54
55 virtual const SwFrame* GetFrame() override { return m_pFrame; }
56 virtual SwEditWin* GetEditWin() override { return m_pEditWin; }
57 virtual void ShowAll(bool bShow) override;
58 virtual bool Contains(const Point &rDocPt) const override;
59 virtual void SetReadonly(bool bReadonly) override;
60
61 void SetOffset( Point aOffset, tools::Long nXLineStart, tools::Long nXLineEnd );
62 bool IsHeader() const { return m_bIsHeader; };
63};
64
66{
67 std::unique_ptr<weld::MenuButton> m_xMenuButton;
68 std::unique_ptr<weld::Button> m_xPushButton;
72 OUString m_sLabel;
77
78public:
79 SwHeaderFooterWin(SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader);
80 virtual ~SwHeaderFooterWin( ) override;
81 virtual void dispose() override;
82
83 void SetOffset(Point aOffset);
84 void ShowAll(bool bShow);
85 bool Contains(const Point &rDocPt) const;
86
87 bool IsEmptyHeaderFooter( ) const;
88
89 void ExecuteCommand(std::u16string_view rIdent);
90
91private:
92 DECL_LINK(FadeHandler, Timer *, void);
93 DECL_LINK(ClickHdl, weld::Button&, void);
94 DECL_LINK(SelectHdl, const OUString&, void);
95 void PaintButton();
96};
97
98#endif
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void dispose() override
Class for displaying a dashed line in the Writer GUI.
Definition: DashedLine.hxx:18
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:61
Button painter helper class used to paint a runtime button positioned to a writer frame.
static void PaintButton(drawinglayer::primitive2d::Primitive2DContainer &rSeq, const tools::Rectangle &rRect, bool bOnTop)
Base class of the Writer layout elements.
Definition: frame.hxx:315
Class for the header and footer separator control window.
virtual void ShowAll(bool bShow) override
virtual void dispose() override
SwHeaderFooterDashedLine(SwEditWin *pEditWin, const SwFrame *pFrame, bool bIsHeader)
virtual void SetReadonly(bool bReadonly) override
virtual SwEditWin * GetEditWin() override
void SetOffset(Point aOffset, tools::Long nXLineStart, tools::Long nXLineEnd)
virtual ~SwHeaderFooterDashedLine() override
VclPtr< SwEditWin > m_pEditWin
virtual const SwFrame * GetFrame() override
VclPtr< SwHeaderFooterWin > m_pWin
virtual bool Contains(const Point &rDocPt) const override
DECL_LINK(FadeHandler, Timer *, void)
void ShowAll(bool bShow)
void SetOffset(Point aOffset)
virtual ~SwHeaderFooterWin() override
VclPtr< VirtualDevice > m_xVirDev
std::unique_ptr< weld::MenuButton > m_xMenuButton
bool IsEmptyHeaderFooter() const
DECL_LINK(ClickHdl, weld::Button &, void)
const SwFrame * m_pFrame
DECL_LINK(SelectHdl, const OUString &, void)
virtual void dispose() override
SwHeaderFooterWin(SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader)
bool Contains(const Point &rDocPt) const
void ExecuteCommand(std::u16string_view rIdent)
std::unique_ptr< weld::Button > m_xPushButton
VclPtr< SwEditWin > m_pEditWin
void disposeAndClear()
void clear()
long Long