summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h
new file mode 100644
index 0000000..09c81bd
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h
@@ -0,0 +1,115 @@
1#pragma once
2/*
3 * Copyright (C) 2015-2016 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 "definitions.h"
23#include "../AddonBase.h"
24
25namespace kodi
26{
27namespace gui
28{
29
30 //============================================================================
31 ///
32 /// \defgroup cpp_kodi_gui_DialogTextViewer Dialog Text Viewer
33 /// \ingroup cpp_kodi_gui
34 /// @{
35 /// @brief \cpp_namespace{ kodi::gui::DialogTextViewer }
36 /// **Text viewer dialog**
37 ///
38 /// The text viewer dialog can be used to display descriptions, help texts or
39 /// other larger texts.
40 ///
41 /// In order to achieve a line break is a <b>\\n</b> directly in the text or
42 /// in the <em>"./resources/language/resource.language.??_??/strings.po"</em>
43 /// to call with <b>std::string kodi::general::GetLocalizedString(...);</b>.
44 ///
45 /// It has the header \ref DialogTextViewer.h "#include <kodi/gui/DialogTextViewer.h>"
46 /// be included to enjoy it.
47 ///
48 namespace DialogTextViewer
49 {
50 //==========================================================================
51 ///
52 /// \ingroup cpp_kodi_gui_DialogTextViewer
53 /// @brief Show info text dialog
54 ///
55 /// @param[in] heading Small heading text
56 /// @param[in] text Showed text on dialog
57 ///
58 ///
59 ///-------------------------------------------------------------------------
60 ///
61 /// **Example:**
62 /// ~~~~~~~~~~~~~{.cpp}
63 /// #include <kodi/gui/DialogTextViewer.h>
64 ///
65 /// kodi::gui::DialogTextViewer::Show("The Wizard of Oz (1939 film)",
66 /// "The Wizard of Oz is a 1939 American musical comedy-drama fantasy film "
67 /// "produced by Metro-Goldwyn-Mayer, and the most well-known and commercially "
68 /// "successful adaptation based on the 1900 novel The Wonderful Wizard of Oz "
69 /// "by L. Frank Baum. The film stars Judy Garland as Dorothy Gale. The film"
70 /// "co-stars Terry the dog, billed as Toto; Ray Bolger, Jack Haley, Bert Lahr, "
71 /// "Frank Morgan, Billie Burke, Margaret Hamilton, with Charley Grapewin and "
72 /// "Clara Blandick, and the Singer Midgets as the Munchkins.\n"
73 /// "\n"
74 /// "Notable for its use of Technicolor, fantasy storytelling, musical score and "
75 /// "unusual characters, over the years it has become an icon of American popular "
76 /// "culture. It was nominated for six Academy Awards, including Best Picture but "
77 /// "lost to Gone with the Wind. It did win in two other categories including Best "
78 /// "Original Song for \"Over the Rainbow\". However, the film was a box office "
79 /// "disappointment on its initial release, earning only $3,017,000 on a $2,777,000 "
80 /// "budget, despite receiving largely positive reviews. It was MGM's most "
81 /// "expensive production at that time, and did not completely recoup the studio's "
82 /// "investment and turn a profit until theatrical re-releases starting in 1949.\n"
83 /// "\n"
84 /// "The 1956 broadcast television premiere of the film on CBS re-introduced the "
85 /// "film to the wider public and eventually made the presentation an annual "
86 /// "tradition, making it one of the most known films in cinema history. The "
87 /// "film was named the most-viewed motion picture on television syndication by "
88 /// "the Library of Congress who also included the film in its National Film "
89 /// "Registry in its inaugural year in 1989. Designation on the registry calls "
90 /// "for efforts to preserve it for being \"culturally, historically, and "
91 /// "aesthetically significant\". It is also one of the few films on UNESCO's "
92 /// "Memory of the World Register.\n"
93 /// "\n"
94 /// "The Wizard of Oz is often ranked on best-movie lists in critics' and public "
95 /// "polls. It is the source of many quotes referenced in modern popular culture. "
96 /// "It was directed primarily by Victor Fleming (who left production to take "
97 /// "over direction on the troubled Gone with the Wind production). Noel Langley, "
98 /// "Florence Ryerson and Edgar Allan Woolf received credit for the screenplay, "
99 /// "but there were uncredited contributions by others. The songs were written "
100 /// "by Edgar \"Yip\" Harburg (lyrics) and Harold Arlen (music). The incidental "
101 /// "music, based largely on the songs, was composed by Herbert Stothart, with "
102 /// "interspersed renderings from classical composers.\n");
103 /// ~~~~~~~~~~~~~
104 ///
105 inline void Show(const std::string& heading, const std::string& text)
106 {
107 using namespace ::kodi::addon;
108 CAddonBase::m_interface->toKodi->kodi_gui->dialogTextViewer->open(CAddonBase::m_interface->toKodi->kodiBase, heading.c_str(), text.c_str());
109 }
110 //--------------------------------------------------------------------------
111 };
112 /// @}
113
114} /* namespace gui */
115} /* namespace kodi */