kodi
DialogHelper.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 "utils/Variant.h"
12 
13 #include <array>
14 #include <string>
15 
16 namespace KODI
17 {
18 namespace MESSAGING
19 {
20 namespace HELPERS
21 {
22 
23 enum class DialogResponse : int
24 {
25  CHOICE_CANCELLED,
26  CHOICE_YES,
27  CHOICE_NO,
28  CHOICE_CUSTOM,
29 };
30 
38 {
41  std::array<CVariant, 3> lines;
45  uint32_t autoclose{0};
46 };
47 
64 DialogResponse ShowYesNoDialogText(CVariant heading, CVariant text, CVariant noLabel = CVariant(),
65  CVariant yesLabel = CVariant(), uint32_t autoCloseTimeout = 0);
66 
85 DialogResponse ShowYesNoCustomDialog(CVariant heading, CVariant text, CVariant noLabel = CVariant(), CVariant yesLabel = CVariant(),
86  CVariant customLabel = CVariant(), uint32_t autoCloseTimeout = 0);
87 
106 DialogResponse ShowYesNoDialogLines(CVariant heading, CVariant line0, CVariant line1 = CVariant(),
107  CVariant line2 = CVariant(), CVariant noLabel = CVariant(),
108  CVariant yesLabel = CVariant(), uint32_t autoCloseTimeout = 0);
109 
110 }
111 }
112 }
Definition: Variant.h:31
std::array< CVariant, 3 > lines
Body text to be displayed, specified as three lines. This is mutually exclusive with the text above...
Definition: DialogHelper.h:41
CVariant heading
Heading to be displayed in the dialog box.
Definition: DialogHelper.h:39
Definition: AudioDecoder.h:18
Payload sent for message TMSG_GUI_DIALOG_YESNO.
Definition: DialogHelper.h:37
CVariant customLabel
Text to show on the 3rd custom button.
Definition: DialogHelper.h:44
CVariant noLabel
Text to show on the no button.
Definition: DialogHelper.h:43
CVariant text
Body text to be displayed, this is mutually exclusive with lines below.
Definition: DialogHelper.h:40
CVariant yesLabel
Text to show on the yes button.
Definition: DialogHelper.h:42