Crazy Eddies GUI System: CEGUI::ImagesetManager Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# CEGUI::ImagesetManager Class Reference

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

List of all members.

## Public Types
typedef ConstBaseIterator< ImagesetRegistry > | ImagesetIterator
## Public Member Functions
| ImagesetManager (void)
| Constructor for ImagesetManager objects.
| ~ImagesetManager (void)
| Destructor for ImagesetManager objects.
Imageset * | createImageset (const String &name, Texture *texture)
| Create a Imageset object with the given name and Texture.
Imageset * | createImageset (const String &filename, const String &resourceGroup="")
| Create an Imageset object from the specified file.
Imageset * | createImagesetFromImageFile (const String &name, const String &filename, const 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 (const String &name)
| Destroys the Imageset with the specified name.
void | destroyImageset (Imageset *imageset)
| Destroys the given Imageset object.
void | destroyAllImagesets (void)
| Destroys all Imageset objects registered in the system.
Imageset * | getImageset (const String &name) const
| Returns a pointer to the Imageset object with the specified name.
bool | isImagesetPresent (const String &name) const
| Check for the existence of a named Imageset.
void | notifyScreenResolution (const Size &size)
| Notify the ImagesetManager of the current (usually new) display resolution.
void | writeImagesetToStream (const String &imageset, OutStream &out_stream) const
| Writes a full XML imageset for the specified Imageset to the given OutStream.
ImagesetIterator | getIterator (void) const
| Return a ImagesetManager::ImagesetIterator object to iterate over the available Imageset objects.
## Static Public Member Functions
static ImagesetManager & | getSingleton (void)
| Return singleton ImagesetManager object.
static ImagesetManager * | getSingletonPtr (void)
| Return pointer to singleton ImagesetManager object.

## 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::createImageset | ( | const String & | filename,
|  | const String & | resourceGroup = `""`
| ) |

  | Create an Imageset object from the specified file. Parameters:
  | filename | String object holding the name of the Imageset definition file which should be used to create the Imageset
  | resourceGroup | Resource 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:
  | AlreadyExistsException | Thrown if an Imageset named name is already present in the system.
  | FileIOException | Thrown if something goes wrong while processing the file filename.

Imageset * CEGUI::ImagesetManager::createImageset | ( | const 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:
  | name | String object containing the unique name for the Imageset being created.
  | texture | Texture object to be associated with the Imageset
  Returns: Pointer to the newly created Imageset object Exceptions:
  | AlreadyExistsException | Thrown if an Imageset named name is already present in the system.

Imageset * CEGUI::ImagesetManager::createImagesetFromImageFile | ( | const String & | name,
|  | const String & | filename,
|  | const 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:
  | 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.
  Returns: Pointer to the newly created Imageset object Exceptions:
  | 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::destroyAllImagesets | ( | void |  | ) |

| Destroys all Imageset objects registered in the system. Returns: Nothing

void CEGUI::ImagesetManager::destroyImageset | ( | Imageset * | imageset | ) |

  | Destroys the given Imageset object. Parameters:
  | imageset | Pointer to the Imageset to be destroyed. If no such Imageset exists, nothing happens.
Returns: Nothing.

void CEGUI::ImagesetManager::destroyImageset | ( | const String & | name | ) |

  | Destroys the Imageset with the specified name. Parameters:
  | name | String object containing the name of the Imageset to be destroyed. If no such Imageset exists, nothing happens.
Returns: Nothing.

Imageset * CEGUI::ImagesetManager::getImageset | ( | const String & | name | ) | const

  | Returns a pointer to the Imageset object with the specified name. Parameters:
  | name | String object containing the name of the Imageset to return a pointer to
  Returns: Pointer to the requested Imageset object Exceptions:
  | UnknownObjectException | Thrown if no Imageset named name is present in within the system

ImagesetManager & CEGUI::ImagesetManager::getSingleton | ( | void |  | ) | `[static]`

| Return singleton ImagesetManager object. Returns: Singleton ImagesetManager object

ImagesetManager * CEGUI::ImagesetManager::getSingletonPtr | ( | void |  | ) | `[static]`

| Return pointer to singleton ImagesetManager object. Returns: Pointer to singleton ImagesetManager object

bool CEGUI::ImagesetManager::isImagesetPresent | ( | const String & | name | ) | const`[inline]`

  | Check for the existence of a named Imageset. Parameters:
  | name | String 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 CEGUI::ImagesetManager::notifyScreenResolution | ( | const Size & | size | ) |

  | Notify the ImagesetManager of the current (usually new) display resolution. Parameters:
  | size | Size object describing the display resolution
Returns: Nothing

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:
  | imageset | String holding the name of the Imageset to be written to the stream.
  | out_stream | OutStream (std::ostream based) object where data is to be sent.
Returns: Nothing.