|
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
Kodi's dialog class More...
Modules | |
| DialogProgress | |
| Kodi's progress dialog class (Duh!) | |
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]) 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]) 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]) 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:
| String XBMCAddon::xbmcgui::Dialog::colorpicker | ( | ... | ) |
Function: xbmcgui.Dialog().colorpicker(heading[, colorfile, colorlist, selectedcolor]) | heading | string - dialog heading. |
| selectedcolor | [opt] string - hex value of the preselected color. |
| colorfile | [opt] string - xml file containing color definitions. XML content style: <colors>
<color name="white">ffffffff</color>
<color name="grey">7fffffff</color>
<color name="green">ff00ff7f</color>
</colors>
|
| colorlist | [opt] xbmcgui.ListItems - where label defines the color name and label2 is set to the hex value. |
Example:
| int XBMCAddon::xbmcgui::Dialog::contextmenu | ( | ... | ) |
Function: xbmcgui.Dialog().contextmenu(list) | list | string list - list of items. |
Example:
| bool XBMCAddon::xbmcgui::Dialog::info | ( | ... | ) |
Function: xbmcgui.Dialog().info(listitem) 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]) | 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]) | 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]) | 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, bHiddenInput]) 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 (will be ignored for type 4). | ||||||||||||||||||
| defaultt | [opt] string - default value. | ||||||||||||||||||
| bHiddenInput | [opt] bool - mask input (available for type 0). |
New option added ShowAndVerifyNewPassword.
Added new option bHiddenInput.
Example:
| bool XBMCAddon::xbmcgui::Dialog::ok | ( | ... | ) |
Function: xbmcgui.Dialog().ok(heading, message) 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. |
| message | string or unicode - message text. |
Renamed option line1 to message.
Removed option line2.
Removed option line3.
Example:
| int XBMCAddon::xbmcgui::Dialog::select | ( | ... | ) |
Function: xbmcgui.Dialog().select(heading, list[, autoclose, preselect, useDetails]) 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) 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, message, [nolabel, yeslabel, autoclose]) The Yes / No dialog can be used to inform the user about questions and get the answer.
| heading | string or unicode - dialog heading. | ||||||||
| message | string or unicode - message 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) | ||||||||
| defaultbutton | [opt] integer - specifies the default focused button. (default=DLG_YESNO_NO_BTN)
|
Renamed option line1 to message.
Removed option line2.
Removed option line3.
Example:
| int XBMCAddon::xbmcgui::Dialog::yesnocustom | ( | ... | ) |
Function: xbmcgui.Dialog().yesnocustom(heading, message, customlabel, [nolabel, yeslabel, autoclose]) The YesNoCustom dialog can be used to inform the user about questions and get the answer. The dialog provides a third button appart from yes and no. Button labels are fully customizable.
| heading | string or unicode - dialog heading. | ||||||||
| message | string or unicode - message text. | ||||||||
| customlabel | string or unicode - label to put on the custom button. | ||||||||
| 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) | ||||||||
| defaultbutton | [opt] integer - specifies the default focused button. (default=DLG_YESNO_NO_BTN)
|
Example: