28#ifndef __OverlayManager_H__
29#define __OverlayManager_H__
211 return (mTemplates.find (strName) != mTemplates.end()) ;
#define _OgreOverlayExport
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
A viewpoint from which the scene will be rendered.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
A 2D element which contains other OverlayElement instances.
Defines the interface which all components wishing to supply OverlayElement subclasses must implement...
Abstract definition of a 2D element to be displayed in an Overlay.
Manages Overlay objects, parsing them from .overlay files and storing a lookup library of them.
void destroyOverlayElement(OverlayElement *pInstance, bool isTemplate=false)
Destroys a OverlayElement.
StringVector mScriptPatterns
void destroyOverlayElement(const String &instanceName, bool isTemplate=false)
Destroys a OverlayElement.
OverlayElement * cloneOverlayElementFromTemplate(const String &templateName, const String &instanceName)
int getViewportWidth(void) const
Gets the width of the destination viewport in pixels.
OverlayMapIterator getOverlayIterator(void)
const FactoryMap & getOverlayElementFactoryMap() const
Get const access to the list of registered OverlayElement factories.
LoadedScripts mLoadedScripts
void _queueOverlaysForRendering(Camera *cam, RenderQueue *pQueue, Viewport *vp)
Internal method for queueing the visible overlays for rendering.
void destroyAllOverlayElementsImpl(ElementMap &elementMap)
virtual ~OverlayManager()
OrientationMode mLastViewportOrientationMode
void destroyAllOverlayElements(bool isTemplate=false)
Destroys all the OverlayElement created so far.
void skipToNextOpenBrace(DataStreamPtr &chunk)
Real getLoadingOrder(void) const
Gets the relative loading order of scripts of this type.
void destroyOverlayElementImpl(OverlayElement *pInstance, ElementMap &elementMap)
Overlay * getByName(const String &name)
Retrieve an Overlay by name.
OverlayElement * createOverlayElementFromFactory(const String &typeName, const String &instanceName)
void destroy(const String &name)
Destroys an existing overlay by name.
map< String, Overlay * >::type OverlayMap
Overlay * create(const String &name)
Create a new Overlay.
map< String, OverlayElementFactory * >::type FactoryMap
static OverlayManager * getSingletonPtr(void)
Override standard Singleton retrieval.
bool hasViewportChanged(void) const
Method for determining if the viewport has changed dimensions.
ElementMap & getElementMap(bool isTemplate)
MapIterator< ElementMap > TemplateIterator
void addOverlayElementFactory(OverlayElementFactory *elemFactory)
Registers a new OverlayElementFactory with this manager.
set< String >::type LoadedScripts
void parseNewElement(DataStreamPtr &chunk, String &elemType, String &elemName, bool isContainer, Overlay *pOverlay, bool isTemplate, String templateName=String(""), OverlayContainer *container=0)
OverlayElement * getOverlayElementImpl(const String &name, ElementMap &elementMap)
void destroy(Overlay *overlay)
Destroys an existing overlay.
TemplateIterator getTemplateIterator()
Returns an iterator over all templates in this manager.
void parseAttrib(const String &line, Overlay *pOverlay)
static OverlayManager & getSingleton(void)
Override standard Singleton retrieval.
bool parseChildren(DataStreamPtr &chunk, const String &line, Overlay *pOverlay, bool isTemplate, OverlayContainer *parent=NULL)
MapIterator< OverlayMap > OverlayMapIterator
Real getViewportAspectRatio(void) const
OrientationMode getViewportOrientationMode(void) const
Gets the orientation mode of the destination viewport.
bool hasOverlayElement(const String &name, bool isTemplate=false)
Tests if an element exists.
bool isTemplate(String strName) const
OverlayElement * createOverlayElement(const String &typeName, const String &instanceName, bool isTemplate=false)
Creates a new OverlayElement of the type requested.
void parseScript(DataStreamPtr &stream, const String &groupName)
Parse a script file.
OverlayElement * getOverlayElement(const String &name, bool isTemplate=false)
Gets a reference to an existing element.
OverlayElement * createOverlayElementImpl(const String &typeName, const String &instanceName, ElementMap &elementMap)
OverlayElement * createOverlayElementFromTemplate(const String &templateName, const String &typeName, const String &instanceName, bool isTemplate=false)
void destroyOverlayElementImpl(const String &instanceName, ElementMap &elementMap)
int getViewportHeight(void) const
Gets the height of the destination viewport in pixels.
bool mViewportDimensionsChanged
void skipToNextCloseBrace(DataStreamPtr &chunk)
void destroyAll(void)
Destroys all existing overlays.
map< String, OverlayElement * >::type ElementMap
bool hasOverlayElementImpl(const String &name, ElementMap &elementMap)
const StringVector & getScriptPatterns(void) const
Gets the file patterns which should be used to find scripts for this class.
void parseElementAttrib(const String &line, Overlay *pOverlay, OverlayElement *pElement)
Represents a layer which is rendered on top of the 'normal' scene contents.
Class to manage the scene object rendering queue.
Abstract class defining the interface used by classes which wish to perform script loading to define ...
Template class for creating single-instance global classes.
An abstraction of a viewport, i.e.
vector< String >::type StringVector
OrientationMode
Specifies orientation mode.
float Real
Software floating point type.
std::map< K, V, P, A > type