|
virtual | ~FileDialogIconLoader ()=default |
| Default virtual destructor.
|
|
virtual bool | update () |
| Called every frame to check if the background thread has finished.
|
|
virtual bool | supportsSystemIcons () const |
| Returns whether this icon loader does something or whether its functions are no-ops.
|
|
virtual bool | hasGenericIcons () const |
| Returns whether generic icons (one folder and one file icon) are available.
|
|
virtual Texture | getGenericFileIcon (const Filesystem::FileInfo &file) |
| Returns the generic file/folder icon, which is used until the file-specific icons are finished loading.
|
|
virtual void | requestFileIcons (const std::vector< Filesystem::FileInfo > &files) |
| Starts a thread to load the icons for all given files.
|
|
virtual std::vector< Texture > | retrieveFileIcons () |
| Access the file icons that where loaded in the thread that was started in requestFileIcons()
|
|
|
| FileDialogIconLoader ()=default |
| Protected constructor, the createInstance() function should be used to construct the icon loader.
|
|
◆ createInstance()
Returns the shared instance to the loader (and creates it if it didn't exist yet).
- Returns
- Shared icon loader instance
The caller of this function should call incrementReferenceCount() directly after the first call to this function and call decrementReferenceCount() when it no longer needs the icon loader. The caller can call this function multiple times inbetween the incrementReferenceCount and decrementReferenceCount calls.
◆ getGenericFileIcon()
Returns the generic file/folder icon, which is used until the file-specific icons are finished loading.
- Parameters
-
file | Information about the file, used to check if a folder or file icon needs to be returned |
- Returns
- File or folder icon
◆ hasGenericIcons()
virtual bool tgui::FileDialogIconLoader::hasGenericIcons |
( |
| ) |
const |
|
virtual |
Returns whether generic icons (one folder and one file icon) are available.
Returns true when a folder and file icon can be returned
Generic icons can be shows while waiting for the per-file icons to finish loading
◆ requestFileIcons()
virtual void tgui::FileDialogIconLoader::requestFileIcons |
( |
const std::vector< Filesystem::FileInfo > & |
files | ) |
|
|
virtual |
Starts a thread to load the icons for all given files.
- Parameters
-
files | List of files for which icons should be loaded |
If the thread was still running then it will be cancelled. Once the thread finished, the update() function will return true and retrieveFileIcons() should be called.
◆ retrieveFileIcons()
virtual std::vector< Texture > tgui::FileDialogIconLoader::retrieveFileIcons |
( |
| ) |
|
|
virtual |
Access the file icons that where loaded in the thread that was started in requestFileIcons()
- Returns
- Loaded icons for all files passed to requestFileIcons
◆ supportsSystemIcons()
virtual bool tgui::FileDialogIconLoader::supportsSystemIcons |
( |
| ) |
const |
|
virtual |
Returns whether this icon loader does something or whether its functions are no-ops.
- Returns
- True if the platform supports loading icons
◆ update()
virtual bool tgui::FileDialogIconLoader::update |
( |
| ) |
|
|
virtual |
Called every frame to check if the background thread has finished.
- Returns
- Whether icons are available and retrieveFileIcons can be called
The documentation for this class was generated from the following file: