Graphite
Version 3
An experimental 3D geometry processing program
|
Keeps the correspondence between names and cached icons. More...
#include <OGF/skin_imgui/types/icon_repository.h>
Public Member Functions | |
IconRepository () | |
IconRepository constructor. | |
~IconRepository () | |
IconRepository destructor. | |
void | bind_icon (const std::string &icon_name, GLuint gl_texture) |
Attaches an icon to a given name. More... | |
ImTextureID | resolve_icon (const std::string &icon_name, bool mipmap=false) const |
Finds an icon by name. More... | |
Keeps the correspondence between names and cached icons.
Definition at line 59 of file icon_repository.h.
void OGF::IconRepository::bind_icon | ( | const std::string & | icon_name, |
GLuint | gl_texture | ||
) |
Attaches an icon to a given name.
If the specified name is already bound, then an error message is displayed.
[in] | icon_name | the name of the icon |
[in] | gl_texture | the OpenGL texture that corresponds to the icon. |
ImTextureID OGF::IconRepository::resolve_icon | ( | const std::string & | icon_name, |
bool | mipmap = false |
||
) | const |
Finds an icon by name.
The icon is searched in the already-bound icons and in the lib/icons/ subdirectories of the OGF_PATH. If it is not found, then it is replaced with the "on_icon" icon (a red cross).
[in] | icon_name | the name of the icon |
[in] | mipmap | if true, and if the icon was not already in the repository, create mipmaps. |