Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::OverlayManager Class Reference

Manages Overlay objects, parsing them from .overlay files and storing a lookup library of them. More...

#include <OgreOverlayManager.h>

Inheritance diagram for Ogre::OverlayManager:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::map< ResourceHandle,
Resource * > 
ResourceHandleMap
typedef MapIterator< ResourceHandleMapResourceMapIterator

Public Methods

 OverlayManager ()
virtual ~OverlayManager ()
void parseOverlayFile (DataChunk &chunk)
 Parses an overlay file passed as a chunk.

void parseAllSources (const String &extension=".overlay")
 Parses all overlay files in resource folders & archives.

void parseOverlayFile (ArchiveEx *pArchiveEx, const String &name)
void loadAndParseOverlayFile (const String &filename)
virtual Resourcecreate (const String &name)
 Create implementation required by ResourceManager.

void _queueOverlaysForRendering (Camera *cam, RenderQueue *pQueue, Viewport *vp)
 Internal method for queueing the visible overlays for rendering.

bool hasViewportChanged (void) const
 Method for determining if the viewport has changed dimensions.

int getViewportHeight (void) const
 Gets the height of the destination viewport in pixels.

int getViewportWidth (void) const
 Gets the width of the destination viewport in pixels.

Real getViewportAspectRatio (void) const
PositionTargetgetPositionTargetAt (Real x, Real y)
 This returns a PositionTarget at position x,y.

void processEvent (InputEvent *e)
void setDefaultCursorGui (GuiContainer *cursor, MouseMotionListener *)
 register the default cursor GUI implementation with the manager

void setCursorGui (GuiContainer *cursor)
 register the cursor GUI implementation with the manager

void addMouseMotionListener (MouseMotionListener *l)
void removeMouseMotionListener (MouseMotionListener *l)
Real getMouseX ()
Real getMouseY ()
void setDragDrop (bool dragDropOn)
GuiContainergetCursorGui ()
 returns the registered cursor GUI

void createCursorOverlay ()
 create the high cursor level overlay and add the registered Cursor GUI implementation to it

virtual void setMemoryBudget (size_t bytes)
 Set a limit on the amount of memory this resource handler may use.

virtual void load (Resource *res, int priority)
 Load a resource.

virtual void add (Resource *res)
 Add a resource to this manager; normally only done by subclasses.

virtual void unload (Resource *res)
 Unloads a Resource from the managed resources list, calling it's unload() method.

virtual void unloadAndDestroyAll (void)
 Unloads all Resources from memory.

virtual ResourcegetByName (const String &name)
 Retrieves a pointer to a resource by name, or null if the resource does not exist.

virtual ResourcegetByHandle (ResourceHandle handle)
 Retrieves a pointer to a resource by handle, or null if the resource does not exist.

void addSearchPath (const String &path)
 Adds a relative path to search for resources of this type.

void addArchiveEx (const String &strName, const String &strDriverName)
 Adds an archive to the search path for this type of resource.

bool _findResourceData (const String &filename, DataChunk &refChunk)
 Internal method, used for locating resource data in the file system / archives.

std::set< String_getAllNamesLike (const String &startPath, const String &extension)
 Returns a collection of files with the given extension in all resource paths, common and specific to this resource type.

ResourceMapIterator getResourceIterator (void)
 Returns an iterator over all resources in this manager.


Static Public Methods

OverlayManager & getSingleton (void)
 Override standard Singleton retrieval.

OverlayManager * getSingletonPtr (void)
 Override standard Singleton retrieval.

void addCommonSearchPath (const String &path)
 Adds a relative search path for resources of ALL types.

void addCommonArchiveEx (const String &strName, const String &strDriverName)
 Adds an archive to the search path for all resources.

std::set< String_getAllCommonNamesLike (const String &startPath, const String &extension)
 Returns a collection of files with the given extension in the common resource paths.

bool _findCommonResourceData (const String &filename, DataChunk &refChunk)
 Internal method, used for locating common resource data in the file system / archives.

void cleanupCommonArchive ()
 Cleans up the statics 'mCommonVFS' and 'mCommonArchiveFiles'.


Protected Types

typedef std::list< MouseMotionListener * > MouseMotionListenerList
typedef HashMap< String, ArchiveEx * > FileMap
typedef HashMap< String, Resource * > ResourceMap

Protected Methods

void parseNewElement (DataChunk &chunk, String &elemType, String &elemName, bool isContainer, Overlay *pOverlay, bool isTemplate, String templateName=String(""), GuiContainer *container=0)
void parseAttrib (const String &line, Overlay *pOverlay)
void parseElementAttrib (const String &line, Overlay *pOverlay, GuiElement *pElement)
void parseNewMesh (DataChunk &chunk, String &meshName, String &entityName, Overlay *pOverlay)
void skipToNextCloseBrace (DataChunk &chunk)
void skipToNextOpenBrace (DataChunk &chunk)
bool parseChildren (DataChunk &chunk, const String &line, Overlay *pOverlay, bool isTemplate, GuiContainer *parent=NULL)
ResourceHandle getNextHandle (void)
 Allocates the next handle.

void checkUsage (void)
 Checks memory usage and pages out if required.


Protected Attributes

EventDispatcher mEventDispatcher
OverlaymCursorLevelOverlay
bool mCursorGuiInitialised
GuiContainermCursorGuiRegistered
MouseMotionListenermCursorListener
MouseMotionListenerList mMouseMotionListenerList
int mLastViewportWidth
int mLastViewportHeight
bool mViewportDimensionsChanged
StringVector mLoadedOverlays
FileMap mArchiveFiles
ResourceHandleMap mResourcesByHandle
ResourceMap mResources
ResourceHandle mNextHandle
size_t mMemoryBudget
size_t mMemoryUsage
std::vector< ArchiveEx * > mVFS
 Collection of searchable ArchiveEx classes (virtual file system) for this resource type.


Static Protected Attributes

FileMap mCommonArchiveFiles
std::vector< ArchiveEx * > mCommonVFS
 Collection of searchable ArchiveEx classes (virtual file system) for all resource types.

OverlayManager * ms_Singleton = 0

Detailed Description

Manages Overlay objects, parsing them from .overlay files and storing a lookup library of them.

Definition at line 44 of file OgreOverlayManager.h.


Member Typedef Documentation

typedef HashMap< String, ArchiveEx * > Ogre::ResourceManager::FileMap [protected, inherited]
 

Definition at line 200 of file OgreResourceManager.h.

typedef std::list<MouseMotionListener*> Ogre::OverlayManager::MouseMotionListenerList [protected]
 

Definition at line 47 of file OgreOverlayManager.h.

typedef std::map<ResourceHandle, Resource*> Ogre::ResourceManager::ResourceHandleMap [inherited]
 

Definition at line 208 of file OgreResourceManager.h.

typedef HashMap< String, Resource* > Ogre::ResourceManager::ResourceMap [protected, inherited]
 

Definition at line 201 of file OgreResourceManager.h.

typedef MapIterator<ResourceHandleMap> Ogre::ResourceManager::ResourceMapIterator [inherited]
 

Definition at line 229 of file OgreResourceManager.h.


Constructor & Destructor Documentation

Ogre::OverlayManager::OverlayManager  
 

Definition at line 57 of file OgreOverlayManager.cpp.

References mCursorGuiRegistered, and mCursorLevelOverlay.

Ogre::OverlayManager::~OverlayManager   [virtual]
 

Definition at line 66 of file OgreOverlayManager.cpp.


Member Function Documentation

bool Ogre::ResourceManager::_findCommonResourceData const String   filename,
DataChunk   refChunk
[static, inherited]
 

Internal method, used for locating common resource data in the file system / archives.

Remarks:
This is a static version of _findResourceData specifically designed to only search in the common resource archives, and is therefore usable from non-ResourceManager subclasses.
Parameters:
filename  File to find
refChunk  Reference to a DataChunk object to fill with the data from the file
Returns:
On success, true is returned

On failiure, false is returned

Definition at line 294 of file OgreResourceManager.cpp.

References Except, Ogre::ResourceManager::mCommonArchiveFiles, Ogre::ResourceManager::mCommonVFS, and Ogre::String.

bool Ogre::ResourceManager::_findResourceData const String   filename,
DataChunk   refChunk
[inherited]
 

Internal method, used for locating resource data in the file system / archives.

Parameters:
filename  File to find
refChunk  Reference to a DataChunk object to fill with the data from the file
Returns:
On success, true is returned

On failiure, false is returnec

Definition at line 212 of file OgreResourceManager.cpp.

References Except, Ogre::ResourceManager::mArchiveFiles, Ogre::ResourceManager::mCommonArchiveFiles, Ogre::ResourceManager::mCommonVFS, Ogre::ResourceManager::mVFS, and Ogre::String.

std::set< String > Ogre::ResourceManager::_getAllCommonNamesLike const String   startPath,
const String   extension
[static, inherited]
 

Returns a collection of files with the given extension in the common resource paths.

Remarks:
This is a convenience method to allow non-subclasses to search for files in the common paths.
Parameters:
startPath  The path, relative to each common resource start, to search in (use "./" for the root)
extension  The extension of file to search for.
Returns:
A set of String filenames (it is a set because duplicates will be ignored)

Definition at line 255 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::mCommonVFS, Ogre::String, and Ogre::StringVector.

std::set< String > Ogre::ResourceManager::_getAllNamesLike const String   startPath,
const String   extension
[inherited]
 

Returns a collection of files with the given extension in all resource paths, common and specific to this resource type.

Parameters:
startPath  The path, relative to each common resource start, to search in (use "./" for the root)
extension  The extension of file to search for.
Returns:
A set of String filenames (it is a set because duplicates will be ignored)

Definition at line 274 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::mVFS, Ogre::String, and Ogre::StringVector.

void Ogre::OverlayManager::_queueOverlaysForRendering Camera   cam,
RenderQueue   pQueue,
Viewport   vp
 

Internal method for queueing the visible overlays for rendering.

Definition at line 252 of file OgreOverlayManager.cpp.

References Ogre::Overlay::_findVisibleObjects(), Ogre::Viewport::getActualHeight(), Ogre::Viewport::getActualWidth(), mLastViewportHeight, mLastViewportWidth, Ogre::ResourceManager::mResources, and mViewportDimensionsChanged.

void Ogre::ResourceManager::add Resource   res [virtual, inherited]
 

Add a resource to this manager; normally only done by subclasses.

Definition at line 75 of file OgreResourceManager.cpp.

References Except, Ogre::Resource::getName(), Ogre::ResourceManager::getNextHandle(), Ogre::Resource::mHandle, Ogre::ResourceManager::mResources, and Ogre::ResourceManager::mResourcesByHandle.

Referenced by Ogre::Quake3ShaderManager::create(), Ogre::MaterialManager::create(), Ogre::MeshManager::createManual(), Ogre::HighLevelGpuProgramManager::createProgram(), and Ogre::ResourceManager::load().

void Ogre::ResourceManager::addArchiveEx const String   strName,
const String   strDriverName
[inherited]
 

Adds an archive to the search path for this type of resource.

Remarks:
Ogre can load resources from archives. This method adds the named archive to the search path for the type of resource managed by the specific resource manager. Archives are not searched for themselves so a complete path must be specified here (or relative to the current path). Archives take precedence over files in the filesystem.

Definition at line 188 of file OgreResourceManager.cpp.

References Ogre::ArchiveEx::getAllNamesLike(), Ogre::ResourceManager::mArchiveFiles, Ogre::ResourceManager::mVFS, Ogre::String, and Ogre::StringVector.

Referenced by Ogre::ResourceManager::addSearchPath().

void Ogre::ResourceManager::addCommonArchiveEx const String   strName,
const String   strDriverName
[static, inherited]
 

Adds an archive to the search path for all resources.

Remarks:
As ResourceManager::addArchive, except this archive is used for all types of resources, not just the type managed by the resource manager in question.

Definition at line 200 of file OgreResourceManager.cpp.

References Ogre::ArchiveEx::getAllNamesLike(), Ogre::ResourceManager::mCommonArchiveFiles, Ogre::ResourceManager::mCommonVFS, Ogre::String, and Ogre::StringVector.

Referenced by Ogre::ResourceManager::addCommonSearchPath().

void Ogre::ResourceManager::addCommonSearchPath const String   path [static, inherited]
 

Adds a relative search path for resources of ALL types.

This method has the same effect as ResourceManager::addSearchPath, except that the path added applies to ALL resources, not just the one managed by the subclass in question.

Definition at line 182 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::addCommonArchiveEx(), Ogre::convertPath(), and Ogre::String.

void Ogre::OverlayManager::addMouseMotionListener MouseMotionListener   l
 

Definition at line 643 of file OgreOverlayManager.cpp.

References mMouseMotionListenerList.

Referenced by Ogre::CursorGuiElement::show().

void Ogre::ResourceManager::addSearchPath const String   path [inherited]
 

Adds a relative path to search for resources of this type.

Remarks:
This method adds the supplied path to the list of relative locations that that will be searched for a single type of resource only. Each subclass of ResourceManager will maintain it's own list of specific subpaths, which it will append to the current path as it searches for matching files.

Definition at line 176 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::addArchiveEx(), Ogre::convertPath(), and Ogre::String.

void Ogre::ResourceManager::checkUsage void    [protected, inherited]
 

Checks memory usage and pages out if required.

Definition at line 170 of file OgreResourceManager.cpp.

Referenced by Ogre::ResourceManager::setMemoryBudget().

void Ogre::ResourceManager::cleanupCommonArchive   [static, inherited]
 

Cleans up the statics 'mCommonVFS' and 'mCommonArchiveFiles'.

Required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. MaterialManager) initializes.

Definition at line 326 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::mCommonArchiveFiles, and Ogre::ResourceManager::mCommonVFS.

Resource * Ogre::OverlayManager::create const String   name [virtual]
 

Create implementation required by ResourceManager.

Implements Ogre::ResourceManager.

Definition at line 245 of file OgreOverlayManager.cpp.

References Ogre::ResourceManager::load(), and Ogre::String.

Referenced by createCursorOverlay(), and parseOverlayFile().

void Ogre::OverlayManager::createCursorOverlay  
 

create the high cursor level overlay and add the registered Cursor GUI implementation to it

Definition at line 663 of file OgreOverlayManager.cpp.

References Ogre::Overlay::add2D(), create(), mCursorGuiRegistered, mCursorLevelOverlay, Ogre::Overlay::setZOrder(), Ogre::GuiElement::show(), and Ogre::Overlay::show().

Resource * Ogre::ResourceManager::getByHandle ResourceHandle    handle [virtual, inherited]
 

Retrieves a pointer to a resource by handle, or null if the resource does not exist.

Definition at line 151 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::mResourcesByHandle, and Ogre::ResourceHandle.

Resource * Ogre::ResourceManager::getByName const String   name [virtual, inherited]
 

Retrieves a pointer to a resource by name, or null if the resource does not exist.

Definition at line 139 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::mResources, and Ogre::String.

Referenced by Ogre::MaterialManager::create(), Ogre::FontManager::create(), Ogre::MeshManager::createBezierPatch(), Ogre::MeshManager::createManual(), Ogre::SceneManager::createSkyboxPlane(), Ogre::SceneManager::createSkydomePlane(), Ogre::TextureManager::load(), Ogre::SkeletonManager::load(), Ogre::MeshManager::load(), Ogre::DynLibManager::load(), Ogre::ArchiveManager::load(), Ogre::SceneManager::setSkyBox(), and Ogre::TextureManager::unload().

GuiContainer * Ogre::OverlayManager::getCursorGui  
 

returns the registered cursor GUI

Definition at line 632 of file OgreOverlayManager.cpp.

References Ogre::GuiElement::initialise(), mCursorGuiInitialised, and mCursorGuiRegistered.

Real Ogre::OverlayManager::getMouseX  
 

Definition at line 113 of file OgreOverlayManager.h.

References Ogre::EventDispatcher::getMouseX(), and Ogre::Real.

Referenced by Ogre::CursorGuiElement::show().

Real Ogre::OverlayManager::getMouseY  
 

Definition at line 114 of file OgreOverlayManager.h.

References Ogre::EventDispatcher::getMouseY(), and Ogre::Real.

Referenced by Ogre::CursorGuiElement::show().

ResourceHandle Ogre::ResourceManager::getNextHandle void    [protected, inherited]
 

Allocates the next handle.

Definition at line 165 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::mNextHandle, and Ogre::ResourceHandle.

Referenced by Ogre::ResourceManager::add().

PositionTarget * Ogre::OverlayManager::getPositionTargetAt Real    x,
Real    y
[virtual]
 

This returns a PositionTarget at position x,y.

Implements Ogre::TargetManager.

Definition at line 551 of file OgreOverlayManager.cpp.

References Ogre::Overlay::findElementAt(), Ogre::Overlay::getZOrder(), Ogre::Overlay::isVisible(), Ogre::ResourceManager::mResources, and Ogre::Real.

ResourceMapIterator Ogre::ResourceManager::getResourceIterator void    [inherited]
 

Returns an iterator over all resources in this manager.

Definition at line 231 of file OgreResourceManager.h.

OverlayManager & Ogre::OverlayManager::getSingleton void    [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< OverlayManager >.

Definition at line 52 of file OgreOverlayManager.cpp.

References Ogre::Singleton< OverlayManager >::ms_Singleton.

OverlayManager * Ogre::OverlayManager::getSingletonPtr void    [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< OverlayManager >.

Definition at line 48 of file OgreOverlayManager.cpp.

References Ogre::Singleton< OverlayManager >::ms_Singleton.

Real Ogre::OverlayManager::getViewportAspectRatio void    const
 

Definition at line 543 of file OgreOverlayManager.cpp.

References mLastViewportHeight, mLastViewportWidth, and Ogre::Real.

int Ogre::OverlayManager::getViewportHeight void    const
 

Gets the height of the destination viewport in pixels.

Definition at line 533 of file OgreOverlayManager.cpp.

References mLastViewportHeight.

Referenced by Ogre::GuiElement::_notifyViewport(), Ogre::GuiElement::_update(), and Ogre::GuiElement::setMetricsMode().

int Ogre::OverlayManager::getViewportWidth void    const
 

Gets the width of the destination viewport in pixels.

Definition at line 538 of file OgreOverlayManager.cpp.

References mLastViewportWidth.

Referenced by Ogre::GuiElement::_notifyViewport(), Ogre::GuiElement::_update(), and Ogre::GuiElement::setMetricsMode().

bool Ogre::OverlayManager::hasViewportChanged void    const
 

Method for determining if the viewport has changed dimensions.

Remarks:
This is used by pixel-based GuiElements to work out if they need to reclaculate their sizes.

Definition at line 528 of file OgreOverlayManager.cpp.

References mViewportDimensionsChanged.

void Ogre::ResourceManager::load Resource   res,
int    priority
[virtual, inherited]
 

Load a resource.

Resources will be subclasses.

Reimplemented in Ogre::TextureManager.

Definition at line 67 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::add(), Ogre::Resource::load(), and Ogre::Resource::touch().

Referenced by create().

void Ogre::OverlayManager::loadAndParseOverlayFile const String   filename
 

Definition at line 193 of file OgreOverlayManager.cpp.

References Ogre::ResourceManager::mCommonVFS, mLoadedOverlays, Ogre::ResourceManager::mVFS, parseOverlayFile(), and Ogre::String.

Referenced by parseOverlayFile().

void Ogre::OverlayManager::parseAllSources const String   extension = ".overlay"
 

Parses all overlay files in resource folders & archives.

Definition at line 166 of file OgreOverlayManager.cpp.

References Ogre::ResourceManager::mCommonVFS, Ogre::ResourceManager::mVFS, parseOverlayFile(), Ogre::String, and Ogre::StringVector.

Referenced by Ogre::Root::oneTimePostWindowInit().

void Ogre::OverlayManager::parseAttrib const String   line,
Overlay   pOverlay
[protected]
 

Definition at line 398 of file OgreOverlayManager.cpp.

References Ogre::Overlay::getName(), Ogre::Overlay::setZOrder(), and Ogre::String.

Referenced by parseOverlayFile().

bool Ogre::OverlayManager::parseChildren DataChunk   chunk,
const String   line,
Overlay   pOverlay,
bool    isTemplate,
GuiContainer   parent = NULL
[protected]
 

Definition at line 329 of file OgreOverlayManager.cpp.

References Ogre::GuiElement::getName(), Ogre::GuiElement::getTypeName(), params, parseNewElement(), skipToNextCloseBrace(), skipToNextOpenBrace(), Ogre::String, and Ogre::uint.

Referenced by parseNewElement(), and parseOverlayFile().

void Ogre::OverlayManager::parseElementAttrib const String   line,
Overlay   pOverlay,
GuiElement   pElement
[protected]
 

Definition at line 418 of file OgreOverlayManager.cpp.

References Ogre::Overlay::getName(), Ogre::GuiElement::getName(), Ogre::StringInterface::setParameter(), and Ogre::String.

Referenced by parseNewElement().

void Ogre::OverlayManager::parseNewElement DataChunk   chunk,
String   elemType,
String   elemName,
bool    isContainer,
Overlay   pOverlay,
bool    isTemplate,
String    templateName = String(""),
GuiContainer   container = 0
[protected]
 

Definition at line 278 of file OgreOverlayManager.cpp.

References Ogre::Overlay::add2D(), Ogre::GuiContainer::addChild(), Ogre::DataChunk::getLine(), Ogre::DataChunk::isEOF(), parseChildren(), parseElementAttrib(), and Ogre::String.

Referenced by parseChildren().

void Ogre::OverlayManager::parseNewMesh DataChunk   chunk,
String   meshName,
String   entityName,
Overlay   pOverlay
[protected]
 

Definition at line 456 of file OgreOverlayManager.cpp.

References Ogre::Overlay::add3D(), Ogre::SceneNode::attachObject(), Ogre::SceneManager::createEntity(), Ogre::SceneManager::createSceneNode(), Ogre::DataChunk::getLine(), Ogre::Overlay::getName(), Ogre::DataChunk::isEOF(), params, Ogre::Node::rotate(), Ogre::ST_GENERIC, Ogre::String, Ogre::StringVector, and Ogre::Node::translate().

Referenced by parseOverlayFile().

void Ogre::OverlayManager::parseOverlayFile ArchiveEx   pArchiveEx,
const String   name
 

Definition at line 233 of file OgreOverlayManager.cpp.

References Ogre::ArchiveEx::fileRead(), mLoadedOverlays, parseOverlayFile(), and Ogre::String.

void Ogre::OverlayManager::parseOverlayFile DataChunk   chunk
 

Parses an overlay file passed as a chunk.

Definition at line 70 of file OgreOverlayManager.cpp.

References create(), Ogre::DataChunk::getLine(), Ogre::Overlay::getName(), Ogre::DataChunk::isEOF(), loadAndParseOverlayFile(), params, parseAttrib(), parseChildren(), parseNewMesh(), skipToNextCloseBrace(), skipToNextOpenBrace(), Ogre::String, and Ogre::uint.

Referenced by loadAndParseOverlayFile(), parseAllSources(), and parseOverlayFile().

void Ogre::OverlayManager::processEvent InputEvent   e [virtual]
 

Implements Ogre::EventTarget.

Definition at line 577 of file OgreOverlayManager.cpp.

References Ogre::EventDispatcher::dispatchEvent(), Ogre::InputEvent::getID(), mEventDispatcher, and mMouseMotionListenerList.

void Ogre::OverlayManager::removeMouseMotionListener MouseMotionListener   l
 

Definition at line 649 of file OgreOverlayManager.cpp.

References mMouseMotionListenerList.

Referenced by Ogre::CursorGuiElement::hide().

void Ogre::OverlayManager::setCursorGui GuiContainer   cursor
 

register the cursor GUI implementation with the manager

Definition at line 612 of file OgreOverlayManager.cpp.

References Ogre::GuiElement::hide(), mCursorGuiInitialised, mCursorGuiRegistered, and Ogre::GuiElement::show().

void Ogre::OverlayManager::setDefaultCursorGui GuiContainer   cursor,
MouseMotionListener  
 

register the default cursor GUI implementation with the manager

Definition at line 601 of file OgreOverlayManager.cpp.

References mCursorGuiInitialised, and mCursorGuiRegistered.

void Ogre::OverlayManager::setDragDrop bool    dragDropOn
 

Definition at line 115 of file OgreOverlayManager.h.

References Ogre::EventDispatcher::setDragDrop().

void Ogre::ResourceManager::setMemoryBudget size_t    bytes [virtual, inherited]
 

Set a limit on the amount of memory this resource handler may use.

Remarks:
If, when asked to load a new resource, the manager believes it will exceed this memory budget, it will temporarily unload a resource to make room for the new one. This unloading is not permanent and the Resource is not destroyed; it simply needs to be reloaded when next used.

Definition at line 97 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::checkUsage(), and Ogre::ResourceManager::mMemoryBudget.

void Ogre::OverlayManager::skipToNextCloseBrace DataChunk   chunk [protected]
 

Definition at line 436 of file OgreOverlayManager.cpp.

References Ogre::DataChunk::getLine(), Ogre::DataChunk::isEOF(), and Ogre::String.

Referenced by parseChildren(), and parseOverlayFile().

void Ogre::OverlayManager::skipToNextOpenBrace DataChunk   chunk [protected]
 

Definition at line 446 of file OgreOverlayManager.cpp.

References Ogre::DataChunk::getLine(), Ogre::DataChunk::isEOF(), and Ogre::String.

Referenced by parseChildren(), and parseOverlayFile().

void Ogre::ResourceManager::unload Resource   res [virtual, inherited]
 

Unloads a Resource from the managed resources list, calling it's unload() method.

Remarks:
This method removes a resource from the list maintained by this manager, and unloads it from memory. It does NOT destroy the resource itself, although the memory used by it will be largely freed up. This would allow you to reload the resource again if you wished.

Permanently destroying the resource is, as mentioned in ResourceManager::create, the library user's responsibility.

Definition at line 105 of file OgreResourceManager.cpp.

References Ogre::Resource::getHandle(), Ogre::Resource::getName(), Ogre::Resource::getSize(), Ogre::ResourceManager::mMemoryUsage, Ogre::ResourceManager::mResources, Ogre::ResourceManager::mResourcesByHandle, and Ogre::Resource::unload().

Referenced by Ogre::SceneManager::createSkyboxPlane(), and Ogre::SceneManager::createSkydomePlane().

void Ogre::ResourceManager::unloadAndDestroyAll void    [virtual, inherited]
 

Unloads all Resources from memory.

Remarks:
Note that unlike ResourceManager::unload, Resource objects are DESTROYED as well as unloaded. This is because you are unlikely to be managing the deletion of the objects individually in this case.

Reimplemented in Ogre::D3D9TextureManager, and Ogre::GLTextureManager.

Definition at line 122 of file OgreResourceManager.cpp.

References Ogre::ResourceManager::mResources, and Ogre::ResourceManager::mResourcesByHandle.

Referenced by Ogre::BspResourceManager::load(), Ogre::D3DTextureManager::~D3DTextureManager(), and Ogre::ResourceManager::~ResourceManager().


Member Data Documentation

FileMap Ogre::ResourceManager::mArchiveFiles [protected, inherited]
 

Definition at line 205 of file OgreResourceManager.h.

Referenced by Ogre::ResourceManager::_findResourceData(), and Ogre::ResourceManager::addArchiveEx().

ResourceManager::FileMap Ogre::ResourceManager::mCommonArchiveFiles [static, protected, inherited]
 

Definition at line 37 of file OgreResourceManager.cpp.

Referenced by Ogre::ResourceManager::_findCommonResourceData(), Ogre::ResourceManager::_findResourceData(), Ogre::ResourceManager::addCommonArchiveEx(), and Ogre::ResourceManager::cleanupCommonArchive().

std::vector< ArchiveEx * > Ogre::ResourceManager::mCommonVFS [static, protected, inherited]
 

Collection of searchable ArchiveEx classes (virtual file system) for all resource types.

Definition at line 36 of file OgreResourceManager.cpp.

Referenced by Ogre::ResourceManager::_findCommonResourceData(), Ogre::ResourceManager::_findResourceData(), Ogre::ResourceManager::_getAllCommonNamesLike(), Ogre::ResourceManager::addCommonArchiveEx(), Ogre::ResourceManager::cleanupCommonArchive(), loadAndParseOverlayFile(), Ogre::Quake3ShaderManager::parseAllSources(), parseAllSources(), Ogre::MaterialManager::parseAllSources(), and Ogre::FontManager::parseAllSources().

bool Ogre::OverlayManager::mCursorGuiInitialised [protected]
 

Definition at line 50 of file OgreOverlayManager.h.

Referenced by getCursorGui(), setCursorGui(), and setDefaultCursorGui().

GuiContainer* Ogre::OverlayManager::mCursorGuiRegistered [protected]
 

Definition at line 51 of file OgreOverlayManager.h.

Referenced by createCursorOverlay(), getCursorGui(), OverlayManager(), setCursorGui(), and setDefaultCursorGui().

Overlay* Ogre::OverlayManager::mCursorLevelOverlay [protected]
 

Definition at line 49 of file OgreOverlayManager.h.

Referenced by createCursorOverlay(), and OverlayManager().

MouseMotionListener* Ogre::OverlayManager::mCursorListener [protected]
 

Definition at line 52 of file OgreOverlayManager.h.

EventDispatcher Ogre::OverlayManager::mEventDispatcher [protected]
 

Definition at line 48 of file OgreOverlayManager.h.

Referenced by processEvent().

int Ogre::OverlayManager::mLastViewportHeight [protected]
 

Definition at line 63 of file OgreOverlayManager.h.

Referenced by _queueOverlaysForRendering(), getViewportAspectRatio(), and getViewportHeight().

int Ogre::OverlayManager::mLastViewportWidth [protected]
 

Definition at line 63 of file OgreOverlayManager.h.

Referenced by _queueOverlaysForRendering(), getViewportAspectRatio(), and getViewportWidth().

StringVector Ogre::OverlayManager::mLoadedOverlays [protected]
 

Definition at line 66 of file OgreOverlayManager.h.

Referenced by loadAndParseOverlayFile(), and parseOverlayFile().

size_t Ogre::ResourceManager::mMemoryBudget [protected, inherited]
 

Definition at line 215 of file OgreResourceManager.h.

Referenced by Ogre::ResourceManager::ResourceManager(), and Ogre::ResourceManager::setMemoryBudget().

size_t Ogre::ResourceManager::mMemoryUsage [protected, inherited]
 

Definition at line 216 of file OgreResourceManager.h.

Referenced by Ogre::ResourceManager::ResourceManager(), and Ogre::ResourceManager::unload().

MouseMotionListenerList Ogre::OverlayManager::mMouseMotionListenerList [protected]
 

Definition at line 53 of file OgreOverlayManager.h.

Referenced by addMouseMotionListener(), processEvent(), and removeMouseMotionListener().

ResourceHandle Ogre::ResourceManager::mNextHandle [protected, inherited]
 

Definition at line 213 of file OgreResourceManager.h.

Referenced by Ogre::ResourceManager::getNextHandle(), and Ogre::ResourceManager::ResourceManager().

ResourceMap Ogre::ResourceManager::mResources [protected, inherited]
 

Definition at line 211 of file OgreResourceManager.h.

Referenced by _queueOverlaysForRendering(), Ogre::ResourceManager::add(), Ogre::FontManager::create(), Ogre::MeshManager::createPrefabPlane(), Ogre::TextureManager::enable32BitTextures(), Ogre::ResourceManager::getByName(), getPositionTargetAt(), Ogre::TextureManager::loadImage(), Ogre::TextureManager::loadRawData(), Ogre::ResourceManager::unload(), Ogre::ResourceManager::unloadAndDestroyAll(), Ogre::GLTextureManager::unloadAndDestroyAll(), Ogre::D3D9TextureManager::unloadAndDestroyAll(), Ogre::ArchiveManager::~ArchiveManager(), and Ogre::DynLibManager::~DynLibManager().

ResourceHandleMap Ogre::ResourceManager::mResourcesByHandle [protected, inherited]
 

Definition at line 210 of file OgreResourceManager.h.

Referenced by Ogre::ResourceManager::add(), Ogre::ResourceManager::getByHandle(), Ogre::ResourceManager::unload(), and Ogre::ResourceManager::unloadAndDestroyAll().

OverlayManager * Ogre::Singleton< OverlayManager >::ms_Singleton = 0 [static, protected, inherited]
 

Definition at line 47 of file OgreOverlayManager.cpp.

Referenced by getSingleton(), and getSingletonPtr().

std::vector<ArchiveEx*> Ogre::ResourceManager::mVFS [protected, inherited]
 

Collection of searchable ArchiveEx classes (virtual file system) for this resource type.

Definition at line 226 of file OgreResourceManager.h.

Referenced by Ogre::ResourceManager::_findResourceData(), Ogre::ResourceManager::_getAllNamesLike(), Ogre::ResourceManager::addArchiveEx(), loadAndParseOverlayFile(), Ogre::Quake3ShaderManager::parseAllSources(), parseAllSources(), Ogre::MaterialManager::parseAllSources(), and Ogre::FontManager::parseAllSources().

bool Ogre::OverlayManager::mViewportDimensionsChanged [protected]
 

Definition at line 64 of file OgreOverlayManager.h.

Referenced by _queueOverlaysForRendering(), and hasViewportChanged().


The documentation for this class was generated from the following files:

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:19 2004