1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #include "inputdlg.hxx"
12 #include <sfx2/sfxresid.hxx>
13 #include <vcl/button.hxx>
14 #include <vcl/edit.hxx>
15 #include <vcl/fixed.hxx>
17 InputDialog::InputDialog(const OUString
&rLabelText
, vcl::Window
*pParent
)
18 : ModalDialog(pParent
, "InputDialog", "sfx/ui/inputdialog.ui")
20 get(m_pEntry
, "entry");
21 get(m_pLabel
, "label");
23 get(m_pCancel
, "cancel");
24 m_pLabel
->SetText(rLabelText
);
25 m_pOK
->SetClickHdl(LINK(this,InputDialog
,ClickHdl
));
26 m_pCancel
->SetClickHdl(LINK(this,InputDialog
,ClickHdl
));
29 InputDialog::~InputDialog()
34 void InputDialog::dispose()
40 ModalDialog::dispose();
43 OUString
InputDialog::getEntryText() const
45 return m_pEntry
->GetText();
48 IMPL_LINK(InputDialog
,ClickHdl
,PushButton
*, pButton
)
50 EndDialog(pButton
== m_pOK
? RET_OK
: RET_CANCEL
);
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */