Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUI::ImagesetManager Class Reference

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

#include <CEGUIImagesetManager.h>

Inheritance diagram for CEGUI::ImagesetManager:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::ImagesetManager:

Collaboration graph
[legend]
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.
ImagesetcreateImageset (const String &name, Texture *texture)
 Create a Imageset object with the given name and Texture.
ImagesetcreateImageset (const String &filename, const String &resourceGroup="")
 Create an Imageset object from the specified file.
ImagesetcreateImagesetFromImageFile (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.
ImagesetgetImageset (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.
 Singleton (void)

Static Public Member Functions

static ImagesetManagergetSingleton (void)
 Return singleton ImagesetManager object.
static ImagesetManagergetSingletonPtr (void)
 Return pointer to singleton ImagesetManager object.

Static Protected Attributes

static ImagesetManagerms_Singleton = NULL

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.

Definition at line 54 of file CEGUIImagesetManager.h.


Member Typedef Documentation

typedef ConstBaseIterator<ImagesetRegistry> CEGUI::ImagesetManager::ImagesetIterator
 

Definition at line 256 of file CEGUIImagesetManager.h.


Constructor & Destructor Documentation

CEGUI::ImagesetManager::ImagesetManager void   ) 
 

Constructor for ImagesetManager objects.

Definition at line 44 of file CEGUIImagesetManager.cpp.

References CEGUI::Logger::getSingleton(), and CEGUI::Logger::logEvent().

CEGUI::ImagesetManager::~ImagesetManager void   ) 
 

Destructor for ImagesetManager objects.

Definition at line 53 of file CEGUIImagesetManager.cpp.

References destroyAllImagesets(), CEGUI::Logger::getSingleton(), and CEGUI::Logger::logEvent().


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.

Definition at line 86 of file CEGUIImagesetManager.cpp.

References CEGUI::Imageset::getName(), CEGUI::Logger::getSingleton(), isImagesetPresent(), and CEGUI::Logger::logEvent().

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.

Definition at line 67 of file CEGUIImagesetManager.cpp.

References CEGUI::Logger::getSingleton(), isImagesetPresent(), and CEGUI::Logger::logEvent().

Referenced by CEGUI::Font_xmlHandler::elementStart(), and CEGUI::Scheme::loadResources().

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.

Definition at line 110 of file CEGUIImagesetManager.cpp.

References CEGUI::Logger::getSingleton(), isImagesetPresent(), and CEGUI::Logger::logEvent().

Referenced by CEGUI::Scheme::loadResources().

void CEGUI::ImagesetManager::destroyAllImagesets void   ) 
 

Destroys all Imageset objects registered in the system.

Returns:
Nothing

Definition at line 162 of file CEGUIImagesetManager.cpp.

References destroyImageset().

Referenced by ~ImagesetManager().

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.

Definition at line 149 of file CEGUIImagesetManager.cpp.

References destroyImageset(), and CEGUI::Imageset::getName().

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.

Definition at line 129 of file CEGUIImagesetManager.cpp.

References CEGUI::Logger::getSingleton(), CEGUI::Informative, and CEGUI::Logger::logEvent().

Referenced by destroyAllImagesets(), destroyImageset(), CEGUI::Scheme::loadResources(), and CEGUI::Scheme::unloadResources().

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

Definition at line 173 of file CEGUIImagesetManager.cpp.

Referenced by CEGUI::ImageDim::getValue_impl(), CEGUI::FrameWindow::setEWSizingCursorImage(), CEGUI::ImageryComponent::setImage(), CEGUI::FrameComponent::setImage(), CEGUI::Window::setMouseCursor(), CEGUI::FrameWindow::setNESWSizingCursorImage(), CEGUI::FrameWindow::setNSSizingCursorImage(), CEGUI::FrameWindow::setNWSESizingCursorImage(), CEGUI::PropertyHelper::stringToImage(), and writeImagesetToStream().

ImagesetManager::ImagesetIterator CEGUI::ImagesetManager::getIterator void   )  const
 

Return a ImagesetManager::ImagesetIterator object to iterate over the available Imageset objects.

Definition at line 219 of file CEGUIImagesetManager.cpp.

ImagesetManager & CEGUI::ImagesetManager::getSingleton void   )  [static]
 

Return singleton ImagesetManager object.

Returns:
Singleton ImagesetManager object

Reimplemented from CEGUI::Singleton< ImagesetManager >.

Definition at line 203 of file CEGUIImagesetManager.cpp.

Referenced by CEGUI::Font_xmlHandler::elementStart(), CEGUI::ImageDim::getValue_impl(), CEGUI::Scheme::loadResources(), CEGUI::Scheme::resourcesLoaded(), CEGUI::Static::setBackgroundImage(), CEGUI::System::setDefaultMouseCursor(), CEGUI::DragContainer::setDragCursorImage(), CEGUI::FrameWindow::setEWSizingCursorImage(), CEGUI::StaticImage::setImage(), CEGUI::MouseCursor::setImage(), CEGUI::ImageryComponent::setImage(), CEGUI::FrameComponent::setImage(), CEGUI::Window::setMouseCursor(), CEGUI::FrameWindow::setNESWSizingCursorImage(), CEGUI::FrameWindow::setNSSizingCursorImage(), CEGUI::FrameWindow::setNWSESizingCursorImage(), CEGUI::ListboxItem::setSelectionBrushImage(), CEGUI::PropertyHelper::stringToImage(), and CEGUI::Scheme::unloadResources().

ImagesetManager * CEGUI::ImagesetManager::getSingletonPtr void   )  [static]
 

Return pointer to singleton ImagesetManager object.

Returns:
Pointer to singleton ImagesetManager object

Reimplemented from CEGUI::Singleton< ImagesetManager >.

Definition at line 209 of file CEGUIImagesetManager.cpp.

Referenced by CEGUI::System::~System().

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.

Definition at line 213 of file CEGUIImagesetManager.h.

Referenced by createImageset(), createImagesetFromImageFile(), CEGUI::Scheme::loadResources(), and CEGUI::Scheme::resourcesLoaded().

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

Definition at line 190 of file CEGUIImagesetManager.cpp.

CEGUI::Singleton< ImagesetManager >::Singleton void   )  [inline, inherited]
 

Definition at line 58 of file CEGUISingleton.h.

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.

Definition at line 225 of file CEGUIImagesetManager.cpp.

References getImageset(), and CEGUI::Imageset::writeXMLToStream().


Member Data Documentation

ImagesetManager * CEGUI::Singleton< ImagesetManager >::ms_Singleton = NULL [static, protected, inherited]
 

Definition at line 38 of file CEGUIImagesetManager.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Sep 7 10:06:21 2005 for Crazy Eddies GUI System by  doxygen 1.4.3