Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
YesNo.h
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#pragma once
10
11#include "../../AddonBase.h"
12#include "../../c-api/gui/dialogs/yes_no.h"
13
14#ifdef __cplusplus
15
16namespace kodi
17{
18namespace gui
19{
20namespace dialogs
21{
22
23//==============================================================================
39namespace YesNo
40{
41//==============================================================================
74inline bool ATTR_DLL_LOCAL ShowAndGetInput(const std::string& heading,
75 const std::string& text,
76 bool& canceled,
77 const std::string& noLabel = "",
78 const std::string& yesLabel = "")
79{
80 using namespace ::kodi::addon;
81 return CPrivateBase::m_interface->toKodi->kodi_gui->dialogYesNo->show_and_get_input_single_text(
82 CPrivateBase::m_interface->toKodi->kodiBase, heading.c_str(), text.c_str(), &canceled,
83 noLabel.c_str(), yesLabel.c_str());
84}
85//------------------------------------------------------------------------------
86
87//==============================================================================
117inline bool ATTR_DLL_LOCAL ShowAndGetInput(const std::string& heading,
118 const std::string& line0,
119 const std::string& line1,
120 const std::string& line2,
121 const std::string& noLabel = "",
122 const std::string& yesLabel = "")
123{
124 using namespace ::kodi::addon;
125 return CPrivateBase::m_interface->toKodi->kodi_gui->dialogYesNo->show_and_get_input_line_text(
126 CPrivateBase::m_interface->toKodi->kodiBase, heading.c_str(), line0.c_str(), line1.c_str(),
127 line2.c_str(), noLabel.c_str(), yesLabel.c_str());
128}
129//------------------------------------------------------------------------------
130
131//==============================================================================
166inline bool ATTR_DLL_LOCAL ShowAndGetInput(const std::string& heading,
167 const std::string& line0,
168 const std::string& line1,
169 const std::string& line2,
170 bool& canceled,
171 const std::string& noLabel = "",
172 const std::string& yesLabel = "")
173{
174 using namespace ::kodi::addon;
175 return CPrivateBase::m_interface->toKodi->kodi_gui->dialogYesNo
176 ->show_and_get_input_line_button_text(
177 CPrivateBase::m_interface->toKodi->kodiBase, heading.c_str(), line0.c_str(),
178 line1.c_str(), line2.c_str(), &canceled, noLabel.c_str(), yesLabel.c_str());
179}
180//------------------------------------------------------------------------------
181}; // namespace YesNo
183
184} /* namespace dialogs */
185} /* namespace gui */
186} /* namespace kodi */
187
188#endif /* __cplusplus */
bool ATTR_DLL_LOCAL ShowAndGetInput(const std::string &heading, const std::string &text, bool &canceled, const std::string &noLabel="", const std::string &yesLabel="")
Use dialog to get numeric new password with one text string shown everywhere and cancel return field.
Definition YesNo.h:74