LibreOffice Module sw (master) 1
DropDownFormFieldDialog.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#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_DROPDOWNFORMFIELDDIALOG_HXX
11#define INCLUDED_SW_SOURCE_UIBASE_INC_DROPDOWNFORMFIELDDIALOG_HXX
12
13#include <vcl/weld.hxx>
14
15namespace sw::mark
16{
17class IFieldmark;
18}
19
21namespace sw
22{
24{
25private:
26 mark::IFieldmark* m_pDropDownField;
28
29 std::unique_ptr<weld::Entry> m_xListItemEntry;
30 std::unique_ptr<weld::Button> m_xListAddButton;
31
32 std::unique_ptr<weld::TreeView> m_xListItemsTreeView;
33
34 std::unique_ptr<weld::Button> m_xListRemoveButton;
35 std::unique_ptr<weld::Button> m_xListUpButton;
36 std::unique_ptr<weld::Button> m_xListDownButton;
37
38 DECL_LINK(ListChangedHdl, weld::TreeView&, void);
39 DECL_LINK(KeyPressedHdl, const KeyEvent&, bool);
40 DECL_LINK(EntryChangedHdl, weld::Entry&, void);
41 DECL_LINK(ButtonPushedHdl, weld::Button&, void);
42
43 void InitControls();
44 void AppendItemToList();
45 void UpdateButtons();
46 void Apply();
47
48public:
49 DropDownFormFieldDialog(weld::Widget* pParent, mark::IFieldmark* pDropDownField);
50 virtual ~DropDownFormFieldDialog() override;
51
52 virtual short run() override
53 {
54 short nRet = GenericDialogController::run();
55 if (nRet == RET_OK)
56 Apply();
57 return nRet;
58 }
59};
60
61} // namespace sw
62
63#endif
64
65/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
DECL_LINK(ListChangedHdl, weld::TreeView &, void)
std::unique_ptr< weld::Button > m_xListDownButton
std::unique_ptr< weld::TreeView > m_xListItemsTreeView
std::unique_ptr< weld::Button > m_xListUpButton
DECL_LINK(EntryChangedHdl, weld::Entry &, void)
std::unique_ptr< weld::Button > m_xListRemoveButton
DropDownFormFieldDialog(weld::Widget *pParent, mark::IFieldmark *pDropDownField)
std::unique_ptr< weld::Entry > m_xListItemEntry
DECL_LINK(ButtonPushedHdl, weld::Button &, void)
DECL_LINK(KeyPressedHdl, const KeyEvent &, bool)
std::unique_ptr< weld::Button > m_xListAddButton
Dialog to specify the properties of date form field.
RET_OK