Crazy Eddies GUI System
0.7.2
|
Class providing a shared library of Imageset objects to the system. More...
Public Types | |
typedef ConstBaseIterator < ObjectRegistry > | ImagesetIterator |
ImagesetIterator type definition. | |
Public Member Functions | |
ImagesetManager () | |
Constructor for ImagesetManager objects. | |
~ImagesetManager () | |
Destructor for ImagesetManager objects. | |
Imageset & | create (const String &name, Texture &texture, XMLResourceExistsAction action=XREA_RETURN) |
Create a Imageset object with the given name and Texture. More... | |
Imageset & | createFromImageFile (const String &name, const String &filename, const String &resourceGroup="", XMLResourceExistsAction action=XREA_RETURN) |
Create an Imageset object from the specified image file. The Imageset will initially have a single image defined named "full_image" which is an image that represents the entire area of the loaded image. More... | |
void | notifyDisplaySizeChanged (const Size &size) |
Notify the ImagesetManager that the display size may have changed. More... | |
void | writeImagesetToStream (const String &imageset, OutStream &out_stream) const |
Writes a full XML imageset for the specified Imageset to the given OutStream. More... | |
ImagesetIterator | getIterator () const |
Return a ImagesetManager::ImagesetIterator object to iterate over the available Imageset objects. | |
Public Member Functions inherited from CEGUI::NamedXMLResourceManager< Imageset, Imageset_xmlHandler > | |
NamedXMLResourceManager (const String &resource_type) | |
Constructor. More... | |
virtual | ~NamedXMLResourceManager () |
Destructor. | |
Imageset & | create (const String &xml_filename, const String &resource_group="", XMLResourceExistsAction action=XREA_RETURN) |
Creates a new T object from an XML file and adds it to the collection. More... | |
void | destroy (const String &object_name) |
Destroy the object named object_name, or do nothing if such an object does not exist in the collection. More... | |
void | destroy (const Imageset &object) |
Destroy the object object, or do nothing if such an object does not exist in the collection. More... | |
void | destroyAll () |
Destroy all objects. | |
Imageset & | get (const String &object_name) const |
Return a reference to the object named object_name. More... | |
bool | isDefined (const String &object_name) const |
Return whether an object named object_name exists. | |
void | createAll (const String &pattern, const String &resource_group) |
Create a new T object from files with names matching pattern in resource_group. | |
Additional Inherited Members | |
Static Public Member Functions inherited from CEGUI::Singleton< ImagesetManager > | |
static ImagesetManager & | getSingleton (void) |
static ImagesetManager * | getSingletonPtr (void) |
Static Public Attributes inherited from CEGUI::ResourceEventSet | |
static const String | EventNamespace |
Namespace name for all resource managers. | |
static const String | EventResourceCreated |
static const String | EventResourceDestroyed |
static const String | EventResourceReplaced |
Protected Types inherited from CEGUI::NamedXMLResourceManager< Imageset, Imageset_xmlHandler > | |
typedef std::map< String, Imageset *, String::FastLessCompare > | ObjectRegistry |
type of collection used to store and manage objects | |
Protected Member Functions inherited from CEGUI::NamedXMLResourceManager< Imageset, Imageset_xmlHandler > | |
void | destroyObject (typename ObjectRegistry::iterator ob) |
implementation of object destruction. | |
Imageset & | doExistingObjectAction (const String object_name, Imageset *object, const XMLResourceExistsAction action) |
function to enforce XMLResourceExistsAction policy. | |
virtual void | doPostObjectAdditionAction (Imageset &object) |
Function called each time a new object is added to the collection. | |
Protected Attributes inherited from CEGUI::NamedXMLResourceManager< Imageset, Imageset_xmlHandler > | |
const String | d_resourceType |
String holding the text for the resource type managed. | |
ObjectRegistry | d_objects |
the collection of objects | |
Static Protected Attributes inherited from CEGUI::Singleton< ImagesetManager > | |
static ImagesetManager * | ms_Singleton |
Class providing a shared library of Imageset objects to the system.
The ImagesetManager is used to create, access, and destroy Imageset objects. The idea is that the ImagesetManager will function as a central repository for imagery used within the GUI system, and that such imagery can be accessed, via a unique name, by any interested party within the system.
Imageset& CEGUI::ImagesetManager::create | ( | const String & | name, |
Texture & | texture, | ||
XMLResourceExistsAction | action = XREA_RETURN |
||
) |
Create a Imageset object with the given name and Texture.
The created Imageset will be of limited use, and will require one or more images to be defined for the set.
name | String object containing the unique name for the Imageset being created. |
texture | Texture object to be associated with the Imageset |
action | One of the XMLResourceExistsAction enumerated values indicating what action should be taken when an Imageset with the specified name already exists. |
AlreadyExistsException | thrown if an Imageset named name is already present in the system. |
Imageset& CEGUI::ImagesetManager::createFromImageFile | ( | const String & | name, |
const String & | filename, | ||
const String & | resourceGroup = "" , |
||
XMLResourceExistsAction | action = XREA_RETURN |
||
) |
Create an Imageset object from the specified image file. The Imageset will initially have a single image defined named "full_image" which is an image that represents the entire area of the loaded image.
name | String object containing the unique name for the Imageset being created. |
filename | String object holding the name of the image file to be loaded. |
resourceGroup | Resource group identifier to be passed to the resource manager when loading the image file. |
action | One of the XMLResourceExistsAction enumerated values indicating what action should be taken when an Imageset with the specified name already exists. |
AlreadyExistsException | thrown if an Imageset named name is already present in the system. |
FileIOException | thrown if something goes wrong while reading the image file filename. |
void CEGUI::ImagesetManager::notifyDisplaySizeChanged | ( | const Size & | size | ) |
Notify the ImagesetManager that the display size may have changed.
size | Size object describing the display resolution |