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 "FrameControl.hxx"
14 #include <vcl/timer.hxx>
15 #include <vcl/virdev.hxx>
17 
23 {
24 public:
25 
27  const tools::Rectangle& rRect, bool bOnTop);
28 };
29 
36 {
37  std::unique_ptr<weld::MenuButton> m_xMenuButton;
38  std::unique_ptr<weld::Button> m_xPushButton;
39  OUString m_sLabel;
45 
46 public:
47  SwHeaderFooterWin( SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader );
48  virtual ~SwHeaderFooterWin( ) override;
49  virtual void dispose() override;
50 
51  void SetOffset( Point aOffset, tools::Long nXLineStart, tools::Long nXLineEnd );
52 
53  virtual void ShowAll( bool bShow ) override;
54  virtual bool Contains( const Point &rDocPt ) const override;
55 
56  bool IsHeader() const { return m_bIsHeader; };
57  bool IsEmptyHeaderFooter( ) const;
58 
59  void ExecuteCommand(std::string_view rIdent);
60 
61  void SetReadonly( bool bReadonly ) override;
62 
63 private:
64  DECL_LINK(FadeHandler, Timer *, void);
65  DECL_LINK(ClickHdl, weld::Button&, void);
66  DECL_LINK(SelectHdl, const OString&, void);
67  void PaintButton();
68 };
69 
70 #endif
71 
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:315
SwHeaderFooterWin(SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader)
bool IsEmptyHeaderFooter() const
long Long
void SetReadonly(bool bReadonly) override
virtual void ShowAll(bool bShow) override
DECL_LINK(FadeHandler, Timer *, void)
virtual ~SwHeaderFooterWin() override
std::unique_ptr< weld::MenuButton > m_xMenuButton
Button painter helper class used to paint a runtime button positioned to a writer frame...
virtual void dispose() override
void ExecuteCommand(std::string_view rIdent)
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
static void PaintButton(drawinglayer::primitive2d::Primitive2DContainer &rSeq, const tools::Rectangle &rRect, bool bOnTop)
void SetOffset(Point aOffset, tools::Long nXLineStart, tools::Long nXLineEnd)
virtual bool Contains(const Point &rDocPt) const override
Returns true if the point is inside the control.
Class sharing some MenuButton code.
Class for the header and footer separator control window.
std::unique_ptr< weld::Button > m_xPushButton
VclPtr< vcl::Window > m_pLine
bool IsHeader() const