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