summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-07-23 16:59:43 +0200
committermanuel <manuel@mausz.at>2017-07-23 16:59:43 +0200
commit4c3251ec645c8b71820dab7e51e612e5919d4e75 (patch)
tree9533268a93e58fc2e16de1b8ee3fafe3784e5225 /xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h
parentf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (diff)
downloadkodi-pvr-build-4c3251ec645c8b71820dab7e51e612e5919d4e75.tar.gz
kodi-pvr-build-4c3251ec645c8b71820dab7e51e612e5919d4e75.tar.bz2
kodi-pvr-build-4c3251ec645c8b71820dab7e51e612e5919d4e75.zip
sync with upstream
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h
new file mode 100644
index 0000000..12799b7
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h
@@ -0,0 +1,107 @@
1#pragma once
2/*
3 * Copyright (C) 2005-2017 Team KODI
4 * http://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#include "../../AddonBase.h"
23#include "../definitions.h"
24
25namespace kodi
26{
27namespace gui
28{
29namespace dialogs
30{
31
32 //============================================================================
33 ///
34 /// \defgroup cpp_kodi_gui_dialogs_OK Dialog OK
35 /// \ingroup cpp_kodi_gui
36 /// @{
37 /// @brief \cpp_namespace{ kodi::gui::dialogs::OK }
38 /// **OK dialog**
39 ///
40 /// The functions listed below permit the call of a dialogue of information, a
41 /// confirmation of the user by press from OK required.
42 ///
43 /// It has the header \ref OK.h "#include <kodi/gui/dialogs/OK.h>"
44 /// be included to enjoy it.
45 ///
46 namespace OK
47 {
48 //==========================================================================
49 ///
50 /// \ingroup cpp_kodi_gui_dialogs_OK
51 /// @brief Use dialog to inform user with text and confirmation with OK with continued string.
52 ///
53 /// @param[in] heading Dialog heading.
54 /// @param[in] text Multi-line text.
55 ///
56 ///
57 ///-------------------------------------------------------------------------
58 ///
59 /// **Example:**
60 /// ~~~~~~~~~~~~~{.cpp}
61 /// #include <kodi/gui/dialogs/OK.h>
62 /// ...
63 /// kodi::gui::dialogs::OK::ShowAndGetInput("Test dialog", "Hello World!\nI'm a call from add-on\n :) :D");
64 /// ~~~~~~~~~~~~~
65 ///
66 inline void ShowAndGetInput(const std::string& heading, const std::string& text)
67 {
68 using namespace ::kodi::addon;
69 CAddonBase::m_interface->toKodi->kodi_gui->dialogOK->show_and_get_input_single_text(CAddonBase::m_interface->toKodi->kodiBase,
70 heading.c_str(), text.c_str());
71 }
72 //--------------------------------------------------------------------------
73
74 //==========================================================================
75 ///
76 /// \ingroup cpp_kodi_gui_dialogs_OK
77 /// @brief Use dialog to inform user with text and confirmation with OK with strings separated to the lines.
78 ///
79 /// @param[in] heading Dialog heading.
80 /// @param[in] line0 Line #1 text.
81 /// @param[in] line1 Line #2 text.
82 /// @param[in] line2 Line #3 text.
83 ///
84 ///
85 ///-------------------------------------------------------------------------
86 ///
87 /// **Example:**
88 /// ~~~~~~~~~~~~~{.cpp}
89 /// #include <kodi/gui/dialogs/OK.h>
90 /// ...
91 /// kodi::gui::dialogs::OK::ShowAndGetInput("Test dialog", "Hello World!", "I'm a call from add-on", " :) :D");
92 /// ~~~~~~~~~~~~~
93 ///
94 inline void ShowAndGetInput(const std::string& heading, const std::string& line0, const std::string& line1, const std::string& line2)
95 {
96 using namespace ::kodi::addon;
97 CAddonBase::m_interface->toKodi->kodi_gui->dialogOK->show_and_get_input_line_text(CAddonBase::m_interface->toKodi->kodiBase,
98 heading.c_str(), line0.c_str(), line1.c_str(),
99 line2.c_str());
100 }
101 //--------------------------------------------------------------------------
102 }
103 /// @}
104
105} /* namespace dialogs */
106} /* namespace gui */
107} /* namespace kodi */