LibreOffice Module sw (master)  1
PageBreakWin.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_PAGEBREAKWIN_HXX
10 #define INCLUDED_SW_SOURCE_UIBASE_INC_PAGEBREAKWIN_HXX
11 
12 #include "edtwin.hxx"
13 #include "FrameControl.hxx"
14 #include <vcl/timer.hxx>
15 #include <optional>
16 
17 class Menu;
18 class SwPageFrame;
19 
26 {
27  std::unique_ptr<weld::MenuButton> m_xMenuButton;
34 
35  std::optional<Point> m_xMousePt;
36 
37 public:
38  SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame );
39  virtual ~SwPageBreakWin() override;
40  virtual void dispose() override;
41 
42  void execute(std::string_view rIdent);
43  void UpdatePosition(const std::optional<Point>& xEvtPt = std::optional<Point>());
44 
45  virtual void ShowAll( bool bShow ) override;
46  virtual bool Contains( const Point &rDocPt ) const override;
47 
48  void SetReadonly( bool bReadonly ) override;
49 
50  void Fade( bool bFadeIn );
51 
52  virtual FactoryFunction GetUITestFactory() const override;
53 
54 private:
55  DECL_LINK( FadeHandler, Timer *, void );
57  DECL_LINK(ToggleHdl, weld::ToggleButton&, void);
58  DECL_LINK(SelectHdl, const OString&, void);
59  void PaintButton();
60 };
61 
62 #endif
63 
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:298
void UpdatePosition(const std::optional< Point > &xEvtPt=std::optional< Point >())
VclPtr< vcl::Window > m_pLine
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
std::optional< Point > m_xMousePt
Class for the page break control window.
void SetReadonly(bool bReadonly) override
int m_nDelayAppearing
Before we show the control, let it transparent for a few timer ticks to avoid appearing with every mo...
virtual bool Contains(const Point &rDocPt) const override
Returns true if the point is inside the control.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:58
virtual void dispose() override
virtual FactoryFunction GetUITestFactory() const override
void execute(std::string_view rIdent)
Class sharing some MenuButton code.
A page of the document layout.
Definition: pagefrm.hxx:41
virtual void ShowAll(bool bShow) override
std::unique_ptr< weld::MenuButton > m_xMenuButton
void Fade(bool bFadeIn)
DECL_LINK(FadeHandler, Timer *, void)
virtual ~SwPageBreakWin() override
SwPageBreakWin(SwEditWin *pEditWin, const SwFrame *pFrame)