![]() |
Kodi Documentation
18.0
Kodi is an open source media player and entertainment hub.
|
Kodi's dialog class More...
Classes | |
class | XBMCAddon::xbmcgui::Dialog |
Kodi's dialog class
The graphical control element dialog box (also called dialogue box or just dialog) is a small window that communicates information to the user and prompts them for a response.
Alternative< String, std::vector< String > > XBMCAddon::xbmcgui::Dialog::browse | ( | ... | ) |
Function: xbmcgui.Dialog().browse(type, heading, shares[, mask, useThumbs, treatAsFolder, defaultt, enableMultiple])
Browser dialog
The function offer the possibility to select a file by the user of the add-on.
It allows all the options that are possible in Kodi itself and offers all support file types.
type | integer - the type of browse dialog.
| ||||||||||||||||||
heading | string or unicode - dialog heading. | ||||||||||||||||||
shares | string or unicode - from sources.xml
| ||||||||||||||||||
mask | [opt] string or unicode - '|' separated file mask. (i.e. '.jpg|.png') | ||||||||||||||||||
useThumbs | [opt] boolean - if True autoswitch to Thumb view if files exist. | ||||||||||||||||||
treatAsFolder | [opt] boolean - if True playlists and archives act as folders. | ||||||||||||||||||
defaultt | [opt] string - default path or file. | ||||||||||||||||||
enableMultiple | [opt] boolean - if True multiple file selection is enabled. |
Example:
std::vector< String > XBMCAddon::xbmcgui::Dialog::browseMultiple | ( | ... | ) |
Function: xbmcgui.Dialog().browseMultiple(type, heading, shares[, mask, useThumbs, treatAsFolder, defaultt])
Browser dialog
The function offer the possibility to select multiple files by the user of the add-on.
It allows all the options that are possible in Kodi itself and offers all support file types.
type | integer - the type of browse dialog.
| ||||||||||||||||||
heading | string or unicode - dialog heading. | ||||||||||||||||||
shares | string or unicode - from sources.xml
| ||||||||||||||||||
mask | [opt] string or unicode - '|' separated file mask. (i.e. '.jpg|.png') | ||||||||||||||||||
useThumbs | [opt] boolean - if True autoswitch to Thumb view if files exist (default=false). | ||||||||||||||||||
treatAsFolder | [opt] boolean - if True playlists and archives act as folders (default=false). | ||||||||||||||||||
defaultt | [opt] string - default path or file. |
Example:
String XBMCAddon::xbmcgui::Dialog::browseSingle | ( | ... | ) |
Function: xbmcgui.Dialog().browseSingle(type, heading, shares[, mask, useThumbs, treatAsFolder, defaultt])
Browse single dialog
The function offer the possibility to select a file by the user of the add-on.
It allows all the options that are possible in Kodi itself and offers all support file types.
type | integer - the type of browse dialog.
| ||||||||||||||||||
heading | string or unicode - dialog heading. | ||||||||||||||||||
shares | string or unicode - from sources.xml
| ||||||||||||||||||
mask | [opt] string or unicode - '|' separated file mask. (i.e. '.jpg|.png') | ||||||||||||||||||
useThumbs | [opt] boolean - if True autoswitch to Thumb view if files exist (default=false). | ||||||||||||||||||
treatAsFolder | [opt] boolean - if True playlists and archives act as folders (default=false). | ||||||||||||||||||
defaultt | [opt] string - default path or file. |
Example:
int XBMCAddon::xbmcgui::Dialog::contextmenu | ( | ... | ) |
Function: xbmcgui.Dialog().contextmenu(list)
Show a context menu.
list | string list - list of items. |
Example:
bool XBMCAddon::xbmcgui::Dialog::info | ( | ... | ) |
Function: xbmcgui.Dialog().info(listitem)
Info dialog
Show the corresponding info dialog for a given listitem
listitem | xbmcgui.ListItem - ListItem to show info for. |
Example:
String XBMCAddon::xbmcgui::Dialog::input | ( | ... | ) |
Function: xbmcgui.Dialog().input(heading[, defaultt, type, option, autoclose])
Show an Input dialog.
heading | string - dialog heading. | ||||||||||||||
defaultt | [opt] string - default value. (default=empty string) | ||||||||||||||
type | [opt] integer - the type of keyboard dialog. (default=xbmcgui.INPUT_ALPHANUM)
| ||||||||||||||
option | [opt] integer - option for the dialog. (see Options below)
| ||||||||||||||
autoclose | [opt] integer - milliseconds to autoclose dialog. (default=do not autoclose) |
Example:
std::unique_ptr< std::vector< int > > XBMCAddon::xbmcgui::Dialog::multiselect | ( | ... | ) |
Function: xbmcgui.Dialog().multiselect(heading, options[, autoclose, preselect, useDetails])
Show a multi-select dialog.
heading | string or unicode - dialog heading. |
options | list of strings / xbmcgui.ListItems - options to choose from. |
autoclose | [opt] integer - milliseconds to autoclose dialog. (default=do not autoclose) |
preselect | [opt] list of int - indexes of items to preselect in list (default: do not preselect any item) |
useDetails | [opt] bool - use detailed list instead of a compact list. (default=false) |
Added new option preselect.
Added new option useDetails.
Allow listitems for parameter options
Example:
void XBMCAddon::xbmcgui::Dialog::notification | ( | ... | ) |
Function: xbmcgui.Dialog().notification(heading, message[, icon, time, sound])
Show a Notification alert.
heading | string - dialog heading. |
message | string - dialog message. |
icon | [opt] string - icon to use. (default xbmcgui.NOTIFICATION_INFO) |
time | [opt] integer - time in milliseconds (default 5000) |
sound | [opt] bool - play notification sound (default True) |
Builtin Icons:
Example:
String XBMCAddon::xbmcgui::Dialog::numeric | ( | ... | ) |
Function: xbmcgui.Dialog().numeric(type, heading[, defaultt])
Numeric dialog
The function have to be permitted by the user for the representation of a numeric keyboard around an input.
type | integer - the type of numeric dialog.
| |||||||||||||||
heading | string or unicode - dialog heading. | |||||||||||||||
defaultt | [opt] string - default value. |
Example:
bool XBMCAddon::xbmcgui::Dialog::ok | ( | ... | ) |
Function: xbmcgui.Dialog().ok(heading, line1[, line2, line3])
OK dialog
The functions permit the call of a dialog of information, a confirmation of the user by press from OK required.
heading | string or unicode - dialog heading. |
line1 | string or unicode - line #1 multi-line text. |
line2 | [opt] string or unicode - line #2 text. |
line3 | [opt] string or unicode - line #3 text. |
Example:
int XBMCAddon::xbmcgui::Dialog::select | ( | ... | ) |
Function: xbmcgui.Dialog().select(heading, list[, autoclose, preselect, useDetails])
Select dialog
Show of a dialog to select of an entry as a key
heading | string or unicode - dialog heading. |
list | list of strings / xbmcgui.ListItems - list of items shown in dialog. |
autoclose | [opt] integer - milliseconds to autoclose dialog. (default=do not autoclose) |
preselect | [opt] integer - index of preselected item. (default=no preselected item) |
useDetails | [opt] bool - use detailed list instead of a compact list. (default=false) |
preselect option added.
Added new option useDetails.
Allow listitems for parameter list
Example:
void XBMCAddon::xbmcgui::Dialog::textviewer | ( | ... | ) |
Function: xbmcgui.Dialog().textviewer(heading, text, usemono)
TextViewer dialog
The text viewer dialog can be used to display descriptions, help texts or other larger texts.
heading | string or unicode - dialog heading. |
text | string or unicode - text. |
usemono | [opt] bool - use monospace font |
Example:
bool XBMCAddon::xbmcgui::Dialog::yesno | ( | ... | ) |
Function: xbmcgui.Dialog().yesno(heading, line1[, line2, line3, nolabel, yeslabel, autoclose])
Yes / no dialog
The Yes / No dialog can be used to inform the user about questions and get the answer.
heading | string or unicode - dialog heading. |
line1 | string or unicode - line #1 multi-line text. |
line2 | [opt] string or unicode - line #2 text. |
line3 | [opt] string or unicode - line #3 text. |
nolabel | [opt] label to put on the no button. |
yeslabel | [opt] label to put on the yes button. |
autoclose | [opt] integer - milliseconds to autoclose dialog. (default=do not autoclose) |
Example: