1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_HEADERFOOTERWIN_HXX
10 #define INCLUDED_SW_SOURCE_UIBASE_INC_HEADERFOOTERWIN_HXX
13 #include "FrameControl.hxx"
14 #include <vcl/builder.hxx>
15 #include <vcl/timer.hxx>
16 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
19 * Button painter helper class used to paint a runtime button positioned to a writer frame.
20 * See header/footer button.
22 class SwFrameButtonPainter
26 static void PaintButton(drawinglayer::primitive2d::Primitive2DContainer
& rSeq
,
27 const tools::Rectangle
& rRect
, bool bOnTop
);
30 /** Class for the header and footer separator control window.
32 This control is showing the header / footer style name and provides
33 a few useful actions to the user.
35 class SwHeaderFooterWin
: public SwFrameMenuButtonBase
37 VclBuilder m_aBuilder
;
40 VclPtr
<PopupMenu
> m_pPopupMenu
;
41 VclPtr
<vcl::Window
> m_pLine
;
47 SwHeaderFooterWin( SwEditWin
*pEditWin
, const SwFrame
*pFrame
, bool bHeader
);
48 virtual ~SwHeaderFooterWin( ) override
;
49 virtual void dispose() override
;
51 void SetOffset( Point aOffset
, tools::Long nXLineStart
, tools::Long nXLineEnd
);
53 virtual void Paint( vcl::RenderContext
& rRenderContext
, const tools::Rectangle
& rRect
) override
;
54 virtual void MouseButtonDown( const MouseEvent
& rMEvt
) override
;
55 virtual void Select( ) override
;
57 virtual void ShowAll( bool bShow
) override
;
58 virtual bool Contains( const Point
&rDocPt
) const override
;
60 bool IsHeader() const { return m_bIsHeader
; };
61 bool IsEmptyHeaderFooter( ) const;
63 void ExecuteCommand(const OString
&rIdent
);
65 void SetReadonly( bool bReadonly
) override
;
68 DECL_LINK( FadeHandler
, Timer
*, void );
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */