Crazy Eddies GUI System 0.7.6
Public Types | Public Member Functions
CEGUI::ImagesetManager Class Reference

Class providing a shared library of Imageset objects to the system. More...

Inheritance diagram for CEGUI::ImagesetManager:
Collaboration diagram for CEGUI::ImagesetManager:

List of all members.

Public Types

typedef ConstBaseIterator
< ObjectRegistry
ImagesetIterator
 ImagesetIterator type definition.

Public Member Functions

 ImagesetManager ()
 Constructor for ImagesetManager objects.
 ~ImagesetManager ()
 Destructor for ImagesetManager objects.
Imagesetcreate (const String &name, Texture &texture, XMLResourceExistsAction action=XREA_RETURN)
 Create a Imageset object with the given name and Texture.
ImagesetcreateFromImageFile (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.
void notifyDisplaySizeChanged (const Size &size)
 Notify the ImagesetManager that the display size may have changed.
void writeImagesetToStream (const String &imageset, OutStream &out_stream) const
 Writes a full XML imageset for the specified Imageset to the given OutStream.
ImagesetIterator getIterator () const
 Return a ImagesetManager::ImagesetIterator object to iterate over the available Imageset objects.

Detailed Description

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.


Member Function Documentation

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.

Parameters:
nameString object containing the unique name for the Imageset being created.
textureTexture object to be associated with the Imageset
actionOne of the XMLResourceExistsAction enumerated values indicating what action should be taken when an Imageset with the specified name already exists.
Returns:
Reference to the newly created Imageset object
Exceptions:
AlreadyExistsExceptionthrown 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.

Parameters:
nameString object containing the unique name for the Imageset being created.
filenameString object holding the name of the image file to be loaded.
resourceGroupResource group identifier to be passed to the resource manager when loading the image file.
actionOne of the XMLResourceExistsAction enumerated values indicating what action should be taken when an Imageset with the specified name already exists.
Returns:
Reference to the newly created Imageset object
Exceptions:
AlreadyExistsExceptionthrown if an Imageset named name is already present in the system.
FileIOExceptionthrown 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.

Parameters:
sizeSize object describing the display resolution
void CEGUI::ImagesetManager::writeImagesetToStream ( const String imageset,
OutStream out_stream 
) const

Writes a full XML imageset for the specified Imageset to the given OutStream.

Parameters:
imagesetString holding the name of the Imageset to be written to the stream.
out_streamOutStream (std::ostream based) object where data is to be sent.
Returns:
Nothing.