Singleton utility for resolving resource paths.
More...
#include <ResourcePath.h>
|
| static wxString | Get (const wxString &relativePath) |
| | Get the full path to a resource file.
|
| static wxString | GetDir (const wxString &relativeDir) |
| | Get the full path to a resource directory.
|
| static wxString | GetResourcesDir () |
| | Get the base resources directory.
|
| static bool | Exists (const wxString &relativePath) |
| | Check if a resource exists.
|
| static void | Refresh () |
| | Force re-detection of resources directory.
|
Singleton utility for resolving resource paths.
Usage: wxString iconPath = ResourcePath::Get("icons/tree_nodes/action.png"); wxString configDir = ResourcePath::GetDir("config");
Definition at line 27 of file ResourcePath.h.
◆ ResourcePath()
| EmberForge::ResourcePath::ResourcePath |
( |
| ) |
|
|
privatedefault |
◆ Exists()
| bool EmberForge::ResourcePath::Exists |
( |
const wxString & | relativePath | ) |
|
|
static |
Check if a resource exists.
- Parameters
-
| relativePath | Path relative to the resources directory |
- Returns
- true if the resource file/directory exists
Definition at line 59 of file ResourcePath.cpp.
◆ FindResourcesDir()
| wxString EmberForge::ResourcePath::FindResourcesDir |
( |
| ) |
|
|
staticprivate |
◆ Get()
| wxString EmberForge::ResourcePath::Get |
( |
const wxString & | relativePath | ) |
|
|
static |
Get the full path to a resource file.
- Parameters
-
| relativePath | Path relative to the resources directory |
- Returns
- Full absolute path to the resource
Definition at line 17 of file ResourcePath.cpp.
◆ GetCachedDir()
| wxString & EmberForge::ResourcePath::GetCachedDir |
( |
| ) |
|
|
staticprivate |
◆ GetDir()
| wxString EmberForge::ResourcePath::GetDir |
( |
const wxString & | relativeDir | ) |
|
|
static |
Get the full path to a resource directory.
- Parameters
-
| relativeDir | Directory path relative to resources |
- Returns
- Full absolute path to the directory (with trailing separator)
Definition at line 33 of file ResourcePath.cpp.
◆ GetResourcesDir()
| wxString EmberForge::ResourcePath::GetResourcesDir |
( |
| ) |
|
|
static |
Get the base resources directory.
- Returns
- Full path to the resources directory
Definition at line 44 of file ResourcePath.cpp.
◆ Refresh()
| void EmberForge::ResourcePath::Refresh |
( |
| ) |
|
|
static |
Force re-detection of resources directory.
Useful if environment changes at runtime (rare)
Definition at line 64 of file ResourcePath.cpp.
◆ s_initialized
| bool EmberForge::ResourcePath::s_initialized = false |
|
staticprivate |
The documentation for this class was generated from the following files: