1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/.
10 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_DROPDOWNFORMFIELDDIALOG_HXX
11 #define INCLUDED_SW_SOURCE_UIBASE_INC_DROPDOWNFORMFIELDDIALOG_HXX
13 #include <vcl/weld.hxx>
20 /// Dialog to specify the properties of drop-down form field
23 class DropDownFormFieldDialog final
: public weld::GenericDialogController
26 mark::IFieldmark
* m_pDropDownField
;
27 bool m_bListHasChanged
;
29 std::unique_ptr
<weld::Entry
> m_xListItemEntry
;
30 std::unique_ptr
<weld::Button
> m_xListAddButton
;
32 std::unique_ptr
<weld::TreeView
> m_xListItemsTreeView
;
34 std::unique_ptr
<weld::Button
> m_xListRemoveButton
;
35 std::unique_ptr
<weld::Button
> m_xListUpButton
;
36 std::unique_ptr
<weld::Button
> m_xListDownButton
;
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);
44 void AppendItemToList();
49 DropDownFormFieldDialog(weld::Widget
* pParent
, mark::IFieldmark
* pDropDownField
);
50 virtual ~DropDownFormFieldDialog() override
;
52 virtual short run() override
54 short nRet
= GenericDialogController::run();
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */