\cpp_namespace{ kodi::gui::dialogs::FileBrowser } File browser dialog
More...
|
bool | kodi::gui::dialogs::FileBrowser::ShowAndGetDirectory (const std::string &shares, const std::string &heading, std::string &path, bool writeOnly=false) |
| Directory selection dialog. More...
|
|
bool | kodi::gui::dialogs::FileBrowser::ShowAndGetFile (const std::string &shares, const std::string &mask, const std::string &heading, std::string &path, bool useThumbs=false, bool useFileDirectories=false) |
| File selection dialog. More...
|
|
bool | kodi::gui::dialogs::FileBrowser::ShowAndGetFileFromDir (const std::string &directory, const std::string &mask, const std::string &heading, std::string &path, bool useThumbs=false, bool useFileDirectories=false, bool singleList=false) |
| File selection from a directory. More...
|
|
bool | kodi::gui::dialogs::FileBrowser::ShowAndGetFileList (const std::string &shares, const std::string &mask, const std::string &heading, std::vector< std::string > &fileList, bool useThumbs=false, bool useFileDirectories=false) |
| File selection dialog to get several in to a list. More...
|
|
bool | kodi::gui::dialogs::FileBrowser::ShowAndGetSource (std::string &path, bool allowNetworkShares, const std::string &additionalShare="", const std::string &type="") |
| Source selection dialog. More...
|
|
bool | kodi::gui::dialogs::FileBrowser::ShowAndGetImage (const std::string &shares, const std::string &heading, std::string &path) |
| Image selection dialog. More...
|
|
bool | kodi::gui::dialogs::FileBrowser::ShowAndGetImageList (const std::string &shares, const std::string &heading, std::vector< std::string > &file_list) |
| Image selection dialog to get several in to a list. More...
|
|
\cpp_namespace{ kodi::gui::dialogs::FileBrowser } File browser dialog
The functions listed below of the class "FileBrowser" offer the possibility to select to 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.
It has the header #include <kodi/gui/dialogs/FileBrowser.h> be included to enjoy it.
◆ ShowAndGetDirectory()
bool kodi::gui::dialogs::FileBrowser::ShowAndGetDirectory |
( |
const std::string & |
shares, |
|
|
const std::string & |
heading, |
|
|
std::string & |
path, |
|
|
bool |
writeOnly = false |
|
) |
| |
|
inline |
Directory selection dialog.
- Parameters
-
[in] | shares | With Shares becomes the available start folders be set. |
[in] | heading | Dialog header name |
[in,out] | path | As in the path to start and return value about selected directory |
[in] | writeOnly | If set only writeable folders are shown. |
- Returns
- False if selection becomes canceled.
Example:
◆ ShowAndGetFile()
bool kodi::gui::dialogs::FileBrowser::ShowAndGetFile |
( |
const std::string & |
shares, |
|
|
const std::string & |
mask, |
|
|
const std::string & |
heading, |
|
|
std::string & |
path, |
|
|
bool |
useThumbs = false , |
|
|
bool |
useFileDirectories = false |
|
) |
| |
|
inline |
File selection dialog.
- Parameters
-
[in] | shares | With Shares becomes the available start folders be set. |
[in] | mask | The mask to filter visible files, e.g. ".m3u|.pls|.b4s|.wpl". |
[in] | heading | Dialog header name |
[in,out] | path | As in the path to start and Return value about selected file |
[in] | useThumbs | If set show thumbs if possible on dialog. |
[in] | useFileDirectories | If set also packages (e.g. *.zip) are handled as directories. |
- Returns
- False if selection becomes canceled.
◆ ShowAndGetFileFromDir()
bool kodi::gui::dialogs::FileBrowser::ShowAndGetFileFromDir |
( |
const std::string & |
directory, |
|
|
const std::string & |
mask, |
|
|
const std::string & |
heading, |
|
|
std::string & |
path, |
|
|
bool |
useThumbs = false , |
|
|
bool |
useFileDirectories = false , |
|
|
bool |
singleList = false |
|
) |
| |
|
inline |
File selection from a directory.
- Parameters
-
[in] | directory | The directory name where the dialog start, possible are normal names and kodi's special names. |
[in] | mask | The mask to filter visible files, e.g. ".m3u|.pls|.b4s|.wpl". |
[in] | heading | Dialog header name |
[in,out] | path | As in the path to start and Return value about selected file |
[in] | useThumbs | If set show thumbs if possible on dialog. |
[in] | useFileDirectories | If set also packages (e.g. *.zip) are handled as directories. |
[in] | singleList | |
- Returns
- False if selection becomes canceled.
◆ ShowAndGetFileList()
bool kodi::gui::dialogs::FileBrowser::ShowAndGetFileList |
( |
const std::string & |
shares, |
|
|
const std::string & |
mask, |
|
|
const std::string & |
heading, |
|
|
std::vector< std::string > & |
fileList, |
|
|
bool |
useThumbs = false , |
|
|
bool |
useFileDirectories = false |
|
) |
| |
|
inline |
File selection dialog to get several in to a list.
- Parameters
-
[in] | shares | With Shares becomes the available start folders be set. |
[in] | mask | The mask to filter visible files, e.g. ".m3u|.pls|.b4s|.wpl". |
[in] | heading | Dialog header name |
[out] | fileList | Return value about selected files |
[in] | useThumbs | If set show thumbs if possible on dialog. |
[in] | useFileDirectories | If set also packages (e.g. *.zip) are handled as directories. |
- Returns
- False if selection becomes canceled.
◆ ShowAndGetImage()
bool kodi::gui::dialogs::FileBrowser::ShowAndGetImage |
( |
const std::string & |
shares, |
|
|
const std::string & |
heading, |
|
|
std::string & |
path |
|
) |
| |
|
inline |
Image selection dialog.
- Parameters
-
[in] | shares | With Shares becomes the available start folders be set. |
[in] | heading | Dialog header name |
[out] | path | Return value about selected image |
- Returns
- False if selection becomes canceled.
◆ ShowAndGetImageList()
bool kodi::gui::dialogs::FileBrowser::ShowAndGetImageList |
( |
const std::string & |
shares, |
|
|
const std::string & |
heading, |
|
|
std::vector< std::string > & |
file_list |
|
) |
| |
|
inline |
Image selection dialog to get several in to a list.
- Parameters
-
[in] | shares | With Shares becomes the available start folders be set. |
[in] | heading | Dialog header name |
[out] | file_list | Return value about selected images |
- Returns
- False if selection becomes canceled.
◆ ShowAndGetSource()
bool kodi::gui::dialogs::FileBrowser::ShowAndGetSource |
( |
std::string & |
path, |
|
|
bool |
allowNetworkShares, |
|
|
const std::string & |
additionalShare = "" , |
|
|
const std::string & |
type = "" |
|
) |
| |
|
inline |
Source selection dialog.
- Parameters
-
[in,out] | path | As in the path to start and Return value about selected source |
[in] | allowNetworkShares | Allow also access to network |
[in] | additionalShare | With additionalShare becomes the available start folders be set (optional). |
[in] | type | |
- Returns
- False if selection becomes canceled.