Public Member Functions
GUI::ImagesetManager Class Reference

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

List of all members.

Public Member Functions

Imageset createImageset (string name, Texture texture)
 Create a Imageset object with the given name and Texture.
Imageset createImageset (string filename, string resourceGroup="")
 Create an Imageset object from the specified file.
Imageset createImagesetFromImageFile (string name, string filename, string resourceGroup="")
 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 destroyImageset (string name)
 Destroys the Imageset with the specified name.
void destroyImageset (Imageset imageset)
 Destroys the given Imageset object.
void destroyAllImagesets ()
 Destroys all Imageset objects registered in the system.
Imageset getImageset (string name)
 Returns a pointer to the Imageset object with the specified name.
bool isImagesetPresent (string name)
 Check for the existence of a named Imageset.
void notifyScreenResolution (Size size)
 Notify the ImagesetManager of the current (usually new) display resolution.

Qualified Iterators

Imageset Imageset
 Can be used 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 GUI::ImagesetManager::createImageset ( string  name,
Texture  texture 
)

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
Returns:
Pointer to the newly created Imageset object
Exceptions:
AlreadyExistsExceptionThrown if an Imageset named name is already present in the system.
Imageset GUI::ImagesetManager::createImageset ( string  filename,
string  resourceGroup = "" 
)

Create an Imageset object from the specified file.

Parameters:
filenameString object holding the name of the Imageset definition file which should be used to create the Imageset
resourceGroupResource group identifier to be passed to the resource manager. NB: This affects the imageset xml file only, the texture loaded may have its own group specified in the XML file.
Returns:
Pointer 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 processing the file filename.
Imageset GUI::ImagesetManager::createImagesetFromImageFile ( string  name,
string  filename,
string  resourceGroup = "" 
)

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.
Returns:
Pointer 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 GUI::ImagesetManager::destroyImageset ( string  name)

Destroys the Imageset with the specified name.

Parameters:
nameString object containing the name of the Imageset to be destroyed. If no such Imageset exists, nothing happens.
Returns:
Nothing.
void GUI::ImagesetManager::destroyImageset ( Imageset  imageset)

Destroys the given Imageset object.

Parameters:
imagesetPointer to the Imageset to be destroyed. If no such Imageset exists, nothing happens.
Returns:
Nothing.
void GUI::ImagesetManager::destroyAllImagesets ( )

Destroys all Imageset objects registered in the system.

Returns:
Nothing
Imageset GUI::ImagesetManager::getImageset ( string  name)

Returns a pointer to the Imageset object with the specified name.

Parameters:
nameString object containing the name of the Imageset to return a pointer to
Returns:
Pointer to the requested Imageset object
Exceptions:
UnknownObjectExceptionThrown if no Imageset named name is present in within the system
bool GUI::ImagesetManager::isImagesetPresent ( string  name)

Check for the existence of a named Imageset.

Parameters:
nameString object containing the name of the Imageset to look for
Returns:
true if an Imageset named name is presently loaded in the system, else false.
void GUI::ImagesetManager::notifyScreenResolution ( Size  size)

Notify the ImagesetManager of the current (usually new) display resolution.

Parameters:
sizeSize object describing the display resolution
Returns:
Nothing

Member Data Documentation

Imageset GUI::ImagesetManager::Imageset

Can be used to iterate over the available Imageset objects.

for each Imageset i in GUI.ImagesetManager {
trace(i.getName());
}