diff options
Diffstat (limited to 'xbmc/dialogs/GUIDialogOK.h')
-rw-r--r-- | xbmc/dialogs/GUIDialogOK.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/xbmc/dialogs/GUIDialogOK.h b/xbmc/dialogs/GUIDialogOK.h new file mode 100644 index 0000000..94678e3 --- /dev/null +++ b/xbmc/dialogs/GUIDialogOK.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include "GUIDialogBoxBase.h" +#include "messaging/helpers/DialogOKHelper.h" + +class CGUIMessage; +class CVariant; + +using namespace KODI::MESSAGING; + +class CGUIDialogOK : + public CGUIDialogBoxBase +{ +public: + CGUIDialogOK(void); + ~CGUIDialogOK(void) override; + bool OnMessage(CGUIMessage& message) override; + static bool ShowAndGetInput(const CVariant& heading, const CVariant& text); + static bool ShowAndGetInput(const CVariant& heading, + const CVariant& line0, + const CVariant& line1, + const CVariant& line2); + /*! + \brief Open a OK dialog and wait for input + + \param[in] options a struct of type DialogOKMessage containing + the options to set for this dialog. + + \sa KODI::MESSAGING::HELPERS::DialogOKMessage + */ + bool ShowAndGetInput(const HELPERS::DialogOKMessage& options); +protected: + void OnInitWindow() override; + int GetDefaultLabelID(int controlId) const override; +}; |