diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-22 17:09:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-22 22:17:34 +0200 |
commit | e3bf5b17bf4b8c8a7abb2c524d0f0da34295766c (patch) | |
tree | 9b715ff390b89a4695bd029aea7daaf5d3a00e35 /include | |
parent | 2943666a7737d57e4307a24e08b8fd000f50e6d1 (diff) |
split SvxFmAbsRecWin up to make a reusable piece
Change-Id: I3c9992d39f7dd45ac354b8e4087bacfd9715b234
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99246
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/recorditemwindow.hxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/svx/recorditemwindow.hxx b/include/svx/recorditemwindow.hxx new file mode 100644 index 000000000000..d49db978c136 --- /dev/null +++ b/include/svx/recorditemwindow.hxx @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include <vcl/InterimItemWindow.hxx> +#include <svx/svxdllapi.h> + +class SVXCORE_DLLPUBLIC RecordItemWindow : public InterimItemWindow +{ +public: + RecordItemWindow(vcl::Window* _pParent); + virtual void dispose() override; + virtual ~RecordItemWindow() override; + + void set_text(const OUString& rText) { m_xWidget->set_text(rText); } + +private: + virtual void PositionFired(sal_Int64 nRecord) = 0; + + std::unique_ptr<weld::Entry> m_xWidget; + + DECL_LINK(KeyInputHdl, const KeyEvent&, bool); + DECL_LINK(ActivatedHdl, weld::Entry&, bool); + // for invalidating our content when losing the focus + DECL_LINK(FocusOutHdl, weld::Widget&, void); + + void FirePosition(bool bForce); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |