#include <resource_manager.hpp>
Inheritance diagram for CResourceManager:


Provides access to application-specific resources such images and icons. Resources are stored as files in repository which is a directory in file system. Resources are identified by local paths inside repository or aliases. Aliases are symbolic names of resources making programming GUI independent from the actual filenames.
Definition at line 146 of file resource_manager.hpp.
Public Types | |
| typedef CFLTKImageHandle::TImage | TImage |
Public Member Functions | |
| CResourceManager (const string &dir_list) | |
| Specifies ";" - separated list of directorries where resources are located. | |
| void | RegisterAlias (const string &alias, const string &local_path) |
| register symbolic name (alias) for a resource identified by "local_path" | |
| CFLTKImageHandle | GetImage (const string &alias) |
Static Public Member Functions | |
| static CRef< CResourceManager > | GetInstance () |
| returns the defaul application Resource Manager. | |
| static void | CreateInstance (const string &dir_list) |
| explicitly creates the singleton with the dir_list. | |
Protected Types | |
| typedef list< string > | TDirList |
| typedef map< string, string > | TAliasToPathMap |
| typedef map< string, CFLTKImageHandle > | TAliasToImageMap |
Protected Attributes | |
| TDirList | m_DirList |
| TAliasToPathMap | m_AliasToPath |
| TAliasToImageMap | m_AliasToImage |
Static Protected Attributes | |
| static CRef< CResourceManager > | sm_Instance |
| CResourceManager. | |
|
|
Definition at line 176 of file resource_manager.hpp. |
|
|
Definition at line 175 of file resource_manager.hpp. |
|
|
Definition at line 174 of file resource_manager.hpp. |
|
|
Definition at line 149 of file resource_manager.hpp. |
|
|
Specifies ";" - separated list of directorries where resources are located. When CResourceManager is loading a resource it concatenates local path corresponding to a resource with directories from this list and tries to resolve the resultant path. If path exists - resource is loaded using this path Definition at line 136 of file resource_manager.cpp. References ITERATE, kListDelim, m_DirList, CSystemPath::ResolvePath(), NStr::Split(), and NStr::TruncateSpaces(). Referenced by CreateInstance(). |
|
|
explicitly creates the singleton with the dir_list. This function is supposed to be called during application initialization. Definition at line 127 of file resource_manager.cpp. References CResourceManager(), CRef< C, Locker >::Reset(), and sm_Instance. Referenced by GetInstance(), CSnpDemoApp::Init(), CGBenchApp::Run(), SUBMENU(), and CWGLDemoApp::x_Create(). |
|
|
Definition at line 162 of file resource_manager.cpp. References map_checker< Container >::end(), error(), map_checker< Container >::find(), m_AliasToImage, and m_AliasToPath. Referenced by CMenu::x_SetItems(). |
|
|
||||||||||||
|
register symbolic name (alias) for a resource identified by "local_path"
Definition at line 155 of file resource_manager.cpp. References m_AliasToPath. Referenced by CGBenchWorkspaceWindow::x_RegisterIcons(). |
|
|
Definition at line 180 of file resource_manager.hpp. Referenced by GetImage(). |
|
|
Definition at line 179 of file resource_manager.hpp. Referenced by GetImage(), and RegisterAlias(). |
|
|
Definition at line 178 of file resource_manager.hpp. Referenced by CResourceManager(). |
|
|
Definition at line 182 of file resource_manager.hpp. Referenced by CreateInstance(), and GetInstance(). |
1.4.6
Modified on Mon Nov 09 15:48:06 2009 by modify_doxy.py rev. 173732