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