nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / core / inc / FormFieldButton.hxx
blob93a7079651fbb6589586f47e0375fee0c408401d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_SW_SOURCE_CORE_TEXT_FORMEFIELDBUTTO_HXX
11 #define INCLUDED_SW_SOURCE_CORE_TEXT_FORMEFIELDBUTTO_HXX
13 #include <vcl/menubtn.hxx>
14 #include <swrect.hxx>
16 class SwEditWin;
17 class FloatingWindow;
18 namespace sw::mark
20 class Fieldmark;
23 /**
24 * This button is shown when the cursor is on a form field with drop-down capability.
26 class FormFieldButton : public MenuButton
28 public:
29 FormFieldButton(SwEditWin* pEditWin, sw::mark::Fieldmark& rFieldMark);
30 virtual ~FormFieldButton() override;
31 virtual void dispose() override;
33 void CalcPosAndSize(const SwRect& rPortionPaintArea);
35 virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
36 DECL_LINK(FieldPopupModeEndHdl, FloatingWindow*, void);
38 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
39 virtual WindowHitTest ImplHitTest(const Point& rFramePos) override;
41 virtual void InitPopup() = 0;
43 private:
44 tools::Rectangle m_aFieldFramePixel;
46 protected:
47 sw::mark::Fieldmark& m_rFieldmark;
48 VclPtr<FloatingWindow> m_pFieldPopup;
51 #endif
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */