Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / uibase / inc / contentcontrolaliasbutton.hxx
blob818a4415b937d8b77ecc1765fcae586cda3139ac
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 #pragma once
12 #include "FrameControl.hxx"
14 class SwEditWin;
15 class SwContentControl;
17 /// In case the content control has an alias/title, this widget shows it above the top left corner
18 /// of the content control till the cursor is inside the content control.
19 class SwContentControlAliasButton final : public SwFrameMenuButtonBase
21 std::unique_ptr<weld::Button> m_xPushButton;
22 OUString m_sLabel;
23 bool m_bReadOnly = false;
25 public:
26 SwContentControlAliasButton(SwEditWin* pEditWin, SwContentControl* pContentControl);
27 ~SwContentControlAliasButton() override;
29 bool Contains(const Point& rDocPt) const override;
30 void SetReadonly(bool bReadonly) override;
31 void ShowAll(bool bShow) override;
32 void dispose() override;
34 void SetContentControl(SwContentControl* pContentControl);
35 void SetOffset(Point aTopLeftPixel);
37 private:
38 DECL_LINK(ClickHdl, weld::Button&, void);
39 void PaintButton();
42 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */