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>
16 
22 {
23 public:
24 
26  const tools::Rectangle& rRect, bool bOnTop);
27 };
28 
35 {
36  std::unique_ptr<weld::MenuButton> m_xMenuButton;
37  std::unique_ptr<weld::Button> m_xPushButton;
38  OUString m_sLabel;
44 
45 public:
46  SwHeaderFooterWin( SwEditWin *pEditWin, const SwFrame *pFrame, bool bHeader );
47  virtual ~SwHeaderFooterWin( ) override;
48  virtual void dispose() override;
49 
50  void SetOffset( Point aOffset, tools::Long nXLineStart, tools::Long nXLineEnd );
51 
52  virtual void ShowAll( bool bShow ) override;
53  virtual bool Contains( const Point &rDocPt ) const override;
54 
55  bool IsHeader() const { return m_bIsHeader; };
56  bool IsEmptyHeaderFooter( ) const;
57 
58  void ExecuteCommand(std::string_view rIdent);
59 
60  void SetReadonly( bool bReadonly ) override;
61 
62 private:
63  DECL_LINK(FadeHandler, Timer *, void);
64  DECL_LINK(ClickHdl, weld::Button&, void);
65  DECL_LINK(SelectHdl, const OString&, void);
66  void PaintButton();
67 };
68 
69 #endif
70 
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:314
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:59
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