LibreOffice Module svtools (master) 1
recorditemwindow.hxx
Go to the documentation of this file.
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.
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
10#pragma once
11
13#include <svtools/svtdllapi.h>
14
16{
17public:
18 RecordItemWindowBase(std::unique_ptr<weld::Entry> xEntry);
19 virtual ~RecordItemWindowBase();
20
21 void set_text(const OUString& rText) { m_xWidget->set_text(rText); }
22 void set_font(const vcl::Font& rFont) { m_xWidget->set_font(rFont); }
23 void set_help_id(const OUString& rHelpId) { m_xWidget->set_help_id(rHelpId); }
24
25protected:
26 std::unique_ptr<weld::Entry> m_xWidget;
27
28 virtual bool DoKeyInput(const KeyEvent& rEvt);
29
30private:
31 virtual void PositionFired(sal_Int64 nRecord);
32
33 DECL_DLLPRIVATE_LINK(KeyInputHdl, const KeyEvent&, bool);
34
35 DECL_DLLPRIVATE_LINK(ActivatedHdl, weld::Entry&, bool);
36 // for invalidating our content when losing the focus
37 DECL_DLLPRIVATE_LINK(FocusOutHdl, weld::Widget&, void);
38
39 void FirePosition(bool bForce);
40};
41
43{
44public:
46 virtual void dispose() override;
47 virtual ~RecordItemWindow() override;
48
49protected:
50 virtual bool DoKeyInput(const KeyEvent& rEvt) override;
51};
52
53/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
std::unique_ptr< weld::Image > m_xWidget
DECL_DLLPRIVATE_LINK(FocusOutHdl, weld::Widget &, void)
DECL_DLLPRIVATE_LINK(KeyInputHdl, const KeyEvent &, bool)
void set_help_id(const OUString &rHelpId)
std::unique_ptr< weld::Entry > m_xWidget
DECL_DLLPRIVATE_LINK(ActivatedHdl, weld::Entry &, bool)
void set_text(const OUString &rText)
void set_font(const vcl::Font &rFont)
void dispose()
#define SVT_DLLPUBLIC
Definition: svtdllapi.h:27