27#ifndef _CEGUIImageManager_h_
28#define _CEGUIImageManager_h_
30#include "CEGUI/Singleton.h"
31#include "CEGUI/ChainedXMLHandler.h"
32#include "CEGUI/String.h"
33#include "CEGUI/Size.h"
34#include "CEGUI/ImageFactory.h"
35#include "CEGUI/Logger.h"
36#include "CEGUI/Exceptions.h"
37#include "CEGUI/IteratorBase.h"
42# pragma warning(disable : 4251)
78 void addImageType(
const String& name);
136 void destroy(
Image& image);
137 void destroy(
const String& name);
141 bool isDefined(
const String& name)
const;
143 uint getImageCount()
const;
145 void loadImageset(
const String& filename,
const String& resource_group =
"");
146 void loadImagesetFromString(
const String& source);
148 void destroyImageCollection(
const String& prefix,
149 const bool delete_texture =
true);
151 void addFromImageFile(
const String& name,
153 const String& resource_group =
"");
172 { d_imagesetDefaultResourceGroup = resourceGroup; }
183 {
return d_imagesetDefaultResourceGroup; }
210 void elementEndLocal(
const String& element);
217 void destroy(ImageMap::iterator& iter);
223 void validateImagesetFileVersion(
const XMLAttributes& attrs);
226 static String d_imagesetDefaultResourceGroup;
229 ImageFactoryRegistry d_factories;
240 "Image type already exists: " + name));
244 Logger::getSingleton().logEvent(
245 "[CEGUI::ImageManager] Registered Image type: " + name);
Definition: MemoryAllocatedObject.h:110
Exception class used when an attempt is made create a named object of a particular type when an objec...
Definition: Exceptions.h:484
Abstract XMLHandler based class.
Definition: ChainedXMLHandler.h:37
iterator class for maps
Definition: IteratorBase.h:197
Interface for factory objects that create instances of classes derived from the Image class.
Definition: ImageFactory.h:45
Definition: ImageManager.h:52
bool isImageTypeAvailable(const String &name) const
Return whether an Image subclass has been registered using the identifier name.
void notifyDisplaySizeChanged(const Sizef &size)
Notify the ImageManager that the display size may have changed.
ConstMapIterator< ImageMap > ImageIterator
ConstBaseIterator type definition.
Definition: ImageManager.h:198
std::map< String, ImagePair, StringFastLessCompare CEGUI_MAP_ALLOC(String, ImagePair)> ImageMap
container type used to hold the images.
Definition: ImageManager.h:195
Image & create(const String &type, const String &name)
Create an instance of Image subclass registered for identifier type using the name name.
static void setImagesetDefaultResourceGroup(const String &resourceGroup)
Sets the default resource group to be used when loading imageset data.
Definition: ImageManager.h:171
void removeImageType(const String &name)
Unregister the Image subclass that was registered under the identifier name.
const String & getSchemaName() const
Retrieves the schema file name to use with resources handled by this handler.
static const String & getImagesetDefaultResourceGroup()
Returns the default resource group currently set for Imagesets.
Definition: ImageManager.h:182
void addImageType(const String &name)
Register an Image subclass with the system and associate it with the identifier name.
Definition: ImageManager.h:236
const String & getDefaultResourceGroup() const
Retrieves the default resource group to be used when handling files.
std::pair< Image *, ImageFactory * > ImagePair
One entry in the image container.
Definition: ImageManager.h:190
ImageIterator getIterator() const
Return a ImageManager::ImageIterator object to iterate over the available Image objects.
Interface for Image.
Definition: Image.h:161
Definition: Singleton.h:56
String class used within the GUI system.
Definition: String.h:64
Templatised ImageFactory subclass used internally by the system.
Definition: ImageFactory.h:65
Class representing a block of attributes associated with an XML element.
Definition: XMLAttributes.h:48
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5580