Crazy Eddie's GUI System
0.8.4
|
Public Types | |
typedef std::pair< Image *, ImageFactory * > | ImagePair |
One entry in the image container. | |
typedef std::map< String, ImagePair, StringFastLessCompare CEGUI_MAP_ALLOC(String, Image *) | ImageMap ) |
container type used to hold the images. | |
typedef ConstMapIterator < ImageMap > | ImageIterator |
ConstBaseIterator type definition. | |
Public Member Functions | |
template<typename T > | |
void | addImageType (const String &name) |
Register an Image subclass with the system and associate it with the identifier name. | |
void | removeImageType (const String &name) |
Unregister the Image subclass that was registered under the identifier name. | |
bool | isImageTypeAvailable (const String &name) const |
Return whether an Image subclass has been registered using the identifier name. | |
Image & | create (const String &type, const String &name) |
Create an instance of Image subclass registered for identifier type using the name name. | |
Image & | create (const XMLAttributes &attributes) |
void | destroy (Image &image) |
void | destroy (const String &name) |
void | destroyAll () |
Image & | get (const String &name) const |
bool | isDefined (const String &name) const |
uint | getImageCount () const |
void | loadImageset (const String &filename, const String &resource_group="") |
void | loadImagesetFromString (const String &source) |
void | destroyImageCollection (const String &prefix, const bool delete_texture=true) |
void | addFromImageFile (const String &name, const String &filename, const String &resource_group="") |
void | notifyDisplaySizeChanged (const Sizef &size) |
Notify the ImageManager that the display size may have changed. | |
const String & | getSchemaName () const |
Retrieves the schema file name to use with resources handled by this handler. | |
const String & | getDefaultResourceGroup () const |
Retrieves the default resource group to be used when handling files. | |
ImageIterator | getIterator () const |
Return a ImageManager::ImageIterator object to iterate over the available Image objects. | |
Static Public Member Functions | |
static void | setImagesetDefaultResourceGroup (const String &resourceGroup) |
Sets the default resource group to be used when loading imageset data. | |
static const String & | getImagesetDefaultResourceGroup () |
Returns the default resource group currently set for Imagesets. |
void CEGUI::ImageManager::addImageType | ( | const String & | name | ) |
Register an Image subclass with the system and associate it with the identifier name.
This registers a subclass of the Image class, such that instances of that subclass can subsequently be created by using the identifier name.
T | The Image subclass to be instantiated when an Image is created using the type identifier name. |
name | String object describing the identifier that the Image subclass will be registered under. |
AlreadyExistsException | thrown if an Image subclass is already registered using name. |
References isImageTypeAvailable().
Image& CEGUI::ImageManager::create | ( | const String & | type, |
const String & | name | ||
) |
Create an instance of Image subclass registered for identifier type using the name name.
type | String object describing the identifier of the Image subclass that is to be created. |
name | String object describing the name that the newly created instance will be created with. This name must be unique within the system. |
UnknownObjectException | thrown if no Image subclass has been registered using identifier type. |
AlreadyExistsException | thrown if an Image instance named name already exists. |
static const String& CEGUI::ImageManager::getImagesetDefaultResourceGroup | ( | ) | [inline, static] |
Returns the default resource group currently set for Imagesets.
bool CEGUI::ImageManager::isImageTypeAvailable | ( | const String & | name | ) | const |
Return whether an Image subclass has been registered using the identifier name.
name | String object describing the identifier to test for. |
Referenced by addImageType().
void CEGUI::ImageManager::notifyDisplaySizeChanged | ( | const Sizef & | size | ) |
Notify the ImageManager that the display size may have changed.
size | Size object describing the display resolution |
void CEGUI::ImageManager::removeImageType | ( | const String & | name | ) |
Unregister the Image subclass that was registered under the identifier name.
name | String object describing the identifier of the Image subclass that is to be unregistered. If no such identifier is known within the system, no action is taken. |
static void CEGUI::ImageManager::setImagesetDefaultResourceGroup | ( | const String & | resourceGroup | ) | [inline, static] |
Sets the default resource group to be used when loading imageset data.
resourceGroup | String describing the default resource group identifier to be used. |