XDGKit v0.1.0-1
XDG Utilities for C++
|
Utility for finding icons. More...
#include <XDGIconThemeManager.h>
Public Member Functions | |
XDGKit & | kit () const noexcept |
Handle to the parent kit. | |
const std::vector< std::filesystem::path > & | searchDirs () const noexcept |
Retrieves the directories to search for icon themes, in order of precedence. | |
const std::map< std::string, std::shared_ptr< XDGIconTheme > > & | themes () const noexcept |
Retrieves all discovered icon themes. | |
const XDGIcon * | findIcon (const std::string &icon, int32_t size, int32_t scale=1, uint32_t extensions=XDGIcon::PNG|XDGIcon::SVG, const std::vector< std::string > &themes={ "" }, uint32_t contexts=XDGIconDirectory::AnyContext) const noexcept |
Searches for an icon within the specified themes. | |
Utility for finding icons.
|
inlinenoexcept |
Handle to the parent kit.
|
inlinenoexcept |
Retrieves the directories to search for icon themes, in order of precedence.
The default search directories in order are:
|
inlinenoexcept |
Retrieves all discovered icon themes.
|
noexcept |
Searches for an icon within the specified themes.
This function attempts to locate an icon that matches the provided criteria (name, size, scale, and extensions) within the given list of themes.
icon | The name of the icon to search for. |
size | The desired nominal size of the icon. |
scale | The scale factor of the icon. Defaults to 1. |
extensions | Flags indicating the acceptable image file extensions. |
themes | A list of theme names to search, in the specified order. An empty string ("") serves as a placeholder to search in all themes available. |
contexts | Flags to limit the search to the given XDGIconDirectory::Context (s). |
nullptr
if no match is found.