#include <OgreOverlayManager.h>
Inheritance diagram for Ogre::OverlayManager:
Public Types | |
typedef std::map< ResourceHandle, Resource * > | ResourceHandleMap |
typedef MapIterator< ResourceHandleMap > | ResourceMapIterator |
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 Resource * | create (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. | |
PositionTarget * | getPositionTargetAt (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) |
GuiContainer * | getCursorGui () |
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 Resource * | getByName (const String &name) |
Retrieves a pointer to a resource by name, or null if the resource does not exist. | |
virtual Resource * | getByHandle (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. | |
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. | |
OverlayManager * | getSingletonPtr (void) |
Protected Types | |
typedef std::list< MouseMotionListener * > | MouseMotionListenerList |
typedef HashMap< String, ArchiveEx *, _StringHash > | FileMap |
typedef HashMap< String, Resource *, _StringHash > | 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 |
Overlay * | mCursorLevelOverlay |
bool | mCursorGuiInitialised |
GuiContainer * | mCursorGuiRegistered |
MouseMotionListener * | mCursorListener |
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 |
Definition at line 44 of file OgreOverlayManager.h.
|
Definition at line 195 of file OgreResourceManager.h. |
|
Definition at line 47 of file OgreOverlayManager.h. |
|
Definition at line 203 of file OgreResourceManager.h. |
|
Definition at line 196 of file OgreResourceManager.h. |
|
Definition at line 224 of file OgreResourceManager.h. |
|
Definition at line 49 of file OgreOverlayManager.cpp. References mCursorGuiRegistered, and mCursorLevelOverlay. |
|
Definition at line 58 of file OgreOverlayManager.cpp. |
|
Internal method, used for locating common resource data in the file system / archives.
Definition at line 294 of file OgreResourceManager.cpp. References Except, Ogre::ResourceManager::mCommonArchiveFiles, and Ogre::ResourceManager::mCommonVFS. |
|
Internal method, used for locating resource data in the file system / archives.
Definition at line 212 of file OgreResourceManager.cpp. References Except, Ogre::ResourceManager::mArchiveFiles, Ogre::ResourceManager::mCommonArchiveFiles, Ogre::ResourceManager::mCommonVFS, and Ogre::ResourceManager::mVFS. |
|
Returns a collection of files with the given extension in the common resource paths.
Definition at line 255 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mCommonVFS, and Ogre::StringVector. |
|
Returns a collection of files with the given extension in all resource paths, common and specific to this resource type.
Definition at line 274 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mVFS, and Ogre::StringVector. |
|
Internal method for queueing the visible overlays for rendering.
Definition at line 244 of file OgreOverlayManager.cpp. References Ogre::Overlay::_findVisibleObjects(), Ogre::Viewport::getActualHeight(), Ogre::Viewport::getActualWidth(), mLastViewportHeight, mLastViewportWidth, Ogre::ResourceManager::mResources, and mViewportDimensionsChanged. |
|
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::HighLevelGpuProgramManager::createProgram(), and Ogre::ResourceManager::load(). |
|
Adds an archive to the search path for this type of resource.
Definition at line 188 of file OgreResourceManager.cpp. References Ogre::ArchiveEx::getAllNamesLike(), Ogre::ResourceManager::mArchiveFiles, Ogre::ResourceManager::mVFS, and Ogre::StringVector. Referenced by Ogre::ResourceManager::addSearchPath(). |
|
Adds an archive to the search path for all resources.
Definition at line 200 of file OgreResourceManager.cpp. References Ogre::ArchiveEx::getAllNamesLike(), Ogre::ResourceManager::mCommonArchiveFiles, Ogre::ResourceManager::mCommonVFS, and Ogre::StringVector. Referenced by Ogre::ResourceManager::addCommonSearchPath(). |
|
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(), and Ogre::convertPath(). |
|
Definition at line 633 of file OgreOverlayManager.cpp. References mMouseMotionListenerList. Referenced by Ogre::CursorGuiElement::show(). |
|
Adds a relative path to search for resources of this type.
Definition at line 176 of file OgreResourceManager.cpp. References Ogre::ResourceManager::addArchiveEx(), and Ogre::convertPath(). |
|
Checks memory usage and pages out if required.
Definition at line 170 of file OgreResourceManager.cpp. Referenced by Ogre::ResourceManager::setMemoryBudget(). |
|
Create implementation required by ResourceManager.
Implements Ogre::ResourceManager. Definition at line 237 of file OgreOverlayManager.cpp. References Ogre::ResourceManager::load(). Referenced by createCursorOverlay(), and parseOverlayFile(). |
|
create the high cursor level overlay and add the registered Cursor GUI implementation to it
Definition at line 653 of file OgreOverlayManager.cpp. References Ogre::Overlay::add2D(), create(), mCursorGuiRegistered, mCursorLevelOverlay, Ogre::Overlay::setZOrder(), Ogre::GuiElement::show(), and Ogre::Overlay::show(). |
|
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. |
|
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. 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(). |
|
returns the registered cursor GUI
Definition at line 622 of file OgreOverlayManager.cpp. References Ogre::GuiElement::initialise(), mCursorGuiInitialised, and mCursorGuiRegistered. |
|
Definition at line 125 of file OgreOverlayManager.h. References Ogre::EventDispatcher::getMouseX(), and Ogre::Real. Referenced by Ogre::CursorGuiElement::show(). |
|
Definition at line 126 of file OgreOverlayManager.h. References Ogre::EventDispatcher::getMouseY(), and Ogre::Real. Referenced by Ogre::CursorGuiElement::show(). |
|
Allocates the next handle.
Definition at line 165 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mNextHandle, and Ogre::ResourceHandle. Referenced by Ogre::ResourceManager::add(). |
|
This returns a PositionTarget at position x,y.
Implements Ogre::TargetManager. Definition at line 541 of file OgreOverlayManager.cpp. References Ogre::Overlay::findElementAt(), Ogre::Overlay::getZOrder(), Ogre::Overlay::isVisible(), Ogre::ResourceManager::mResources, and Ogre::Real. |
|
Returns an iterator over all resources in this manager.
Definition at line 226 of file OgreResourceManager.h. |
|
Override standard Singleton retrieval. 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 270 of file OgreOverlayManager.cpp. |
|
Definition at line 71 of file OgreSingleton.h. |
|
Gets the height of the destination viewport in pixels.
Definition at line 528 of file OgreOverlayManager.cpp. References mLastViewportHeight. |
|
Gets the width of the destination viewport in pixels.
Definition at line 533 of file OgreOverlayManager.cpp. References mLastViewportWidth. |
|
Method for determining if the viewport has changed dimensions.
Definition at line 523 of file OgreOverlayManager.cpp. References mViewportDimensionsChanged. |
|
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(). |
|
Definition at line 185 of file OgreOverlayManager.cpp. References Ogre::ResourceManager::mCommonVFS, mLoadedOverlays, Ogre::ResourceManager::mVFS, and parseOverlayFile(). Referenced by parseOverlayFile(). |
|
Parses all overlay files in resource folders & archives.
Definition at line 158 of file OgreOverlayManager.cpp. References Ogre::ResourceManager::mCommonVFS, Ogre::ResourceManager::mVFS, parseOverlayFile(), and Ogre::StringVector. Referenced by Ogre::Root::oneTimePostWindowInit(). |
|
Definition at line 395 of file OgreOverlayManager.cpp. References Ogre::Overlay::getName(), Ogre::Overlay::setZOrder(), and Ogre::String::split(). Referenced by parseOverlayFile(). |
|
Definition at line 326 of file OgreOverlayManager.cpp. References Ogre::GuiElement::getName(), Ogre::GuiElement::getTypeName(), parseNewElement(), skipToNextCloseBrace(), skipToNextOpenBrace(), Ogre::String::split(), and Ogre::uint. Referenced by parseNewElement(), and parseOverlayFile(). |
|
Definition at line 414 of file OgreOverlayManager.cpp. References Ogre::Overlay::getName(), Ogre::GuiElement::getName(), Ogre::StringInterface::setParameter(), and Ogre::String::split(). Referenced by parseNewElement(). |
|
Definition at line 275 of file OgreOverlayManager.cpp. References Ogre::Overlay::add2D(), Ogre::GuiContainer::addChild(), Ogre::DataChunk::getLine(), Ogre::DataChunk::isEOF(), parseChildren(), and parseElementAttrib(). Referenced by parseChildren(). |
|
Definition at line 451 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(), Ogre::Node::rotate(), Ogre::String::split(), Ogre::ST_GENERIC, Ogre::StringVector, and Ogre::Node::translate(). Referenced by parseOverlayFile(). |
|
Definition at line 225 of file OgreOverlayManager.cpp. References Ogre::ArchiveEx::fileRead(), mLoadedOverlays, and parseOverlayFile(). |
|
Parses an overlay file passed as a chunk.
Definition at line 62 of file OgreOverlayManager.cpp. References create(), Ogre::DataChunk::getLine(), Ogre::Overlay::getName(), Ogre::DataChunk::isEOF(), loadAndParseOverlayFile(), parseAttrib(), parseChildren(), parseNewMesh(), skipToNextCloseBrace(), skipToNextOpenBrace(), Ogre::String::split(), and Ogre::uint. Referenced by loadAndParseOverlayFile(), parseAllSources(), and parseOverlayFile(). |
|
Implements Ogre::EventTarget. Definition at line 567 of file OgreOverlayManager.cpp. References Ogre::EventDispatcher::dispatchEvent(), Ogre::InputEvent::getID(), mEventDispatcher, and mMouseMotionListenerList. |
|
Definition at line 639 of file OgreOverlayManager.cpp. References mMouseMotionListenerList. Referenced by Ogre::CursorGuiElement::hide(). |
|
register the cursor GUI implementation with the manager
Definition at line 602 of file OgreOverlayManager.cpp. References Ogre::GuiElement::hide(), mCursorGuiInitialised, mCursorGuiRegistered, and Ogre::GuiElement::show(). |
|
register the default cursor GUI implementation with the manager
Definition at line 591 of file OgreOverlayManager.cpp. References mCursorGuiInitialised, and mCursorGuiRegistered. |
|
Definition at line 127 of file OgreOverlayManager.h. References Ogre::EventDispatcher::setDragDrop(). |
|
Set a limit on the amount of memory this resource handler may use.
Definition at line 97 of file OgreResourceManager.cpp. References Ogre::ResourceManager::checkUsage(), and Ogre::ResourceManager::mMemoryBudget. |
|
Definition at line 431 of file OgreOverlayManager.cpp. References Ogre::DataChunk::getLine(), and Ogre::DataChunk::isEOF(). Referenced by parseChildren(), and parseOverlayFile(). |
|
Definition at line 441 of file OgreOverlayManager.cpp. References Ogre::DataChunk::getLine(), and Ogre::DataChunk::isEOF(). Referenced by parseChildren(), and parseOverlayFile(). |
|
Unloads a Resource from the managed resources list, calling it's unload() method.
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(). |
|
Unloads all Resources from memory.
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(). |
|
Definition at line 200 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::_findResourceData(), and Ogre::ResourceManager::addArchiveEx(). |
|
Definition at line 37 of file OgreResourceManager.cpp. Referenced by Ogre::ResourceManager::_findCommonResourceData(), Ogre::ResourceManager::_findResourceData(), and Ogre::ResourceManager::addCommonArchiveEx(). |
|
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(), loadAndParseOverlayFile(), Ogre::Quake3ShaderManager::parseAllSources(), parseAllSources(), Ogre::MaterialManager::parseAllSources(), and Ogre::FontManager::parseAllSources(). |
|
Definition at line 50 of file OgreOverlayManager.h. Referenced by getCursorGui(), setCursorGui(), and setDefaultCursorGui(). |
|
Definition at line 51 of file OgreOverlayManager.h. Referenced by createCursorOverlay(), getCursorGui(), OverlayManager(), setCursorGui(), and setDefaultCursorGui(). |
|
Definition at line 49 of file OgreOverlayManager.h. Referenced by createCursorOverlay(), and OverlayManager(). |
|
Definition at line 52 of file OgreOverlayManager.h. |
|
Definition at line 48 of file OgreOverlayManager.h. Referenced by processEvent(). |
|
Definition at line 63 of file OgreOverlayManager.h. Referenced by _queueOverlaysForRendering(), and getViewportHeight(). |
|
Definition at line 63 of file OgreOverlayManager.h. Referenced by _queueOverlaysForRendering(), and getViewportWidth(). |
|
Definition at line 66 of file OgreOverlayManager.h. Referenced by loadAndParseOverlayFile(), and parseOverlayFile(). |
|
Definition at line 210 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::ResourceManager(), and Ogre::ResourceManager::setMemoryBudget(). |
|
Definition at line 211 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::ResourceManager(), and Ogre::ResourceManager::unload(). |
|
Definition at line 53 of file OgreOverlayManager.h. Referenced by addMouseMotionListener(), processEvent(), and removeMouseMotionListener(). |
|
Definition at line 208 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::getNextHandle(), and Ogre::ResourceManager::ResourceManager(). |
|
|
Definition at line 205 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::add(), Ogre::ResourceManager::getByHandle(), Ogre::ResourceManager::unload(), and Ogre::ResourceManager::unloadAndDestroyAll(). |
|
Definition at line 47 of file OgreOverlayManager.cpp. |
|
Collection of searchable ArchiveEx classes (virtual file system) for this resource type.
Definition at line 221 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(). |
|
Definition at line 64 of file OgreOverlayManager.h. Referenced by _queueOverlaysForRendering(), and hasViewportChanged(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:18:51 2004