OgreOverlayContainer.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __OverlayContainer_H__
#define __OverlayContainer_H__
#include "OgreOverlayPrerequisites.h"
#include "OgreOverlayElement.h"
#include "OgreIteratorWrappers.h"
namespace Ogre {
class _OgreOverlayExport OverlayContainer : public OverlayElement
{
public:
typedef map<String, OverlayElement*>::type ChildMap;
typedef MapIterator<ChildMap> ChildIterator;
typedef map<String, OverlayContainer*>::type ChildContainerMap;
typedef MapIterator<ChildContainerMap> ChildContainerIterator;
protected:
ChildMap mChildren;
ChildContainerMap mChildContainers;
bool mChildrenProcessEvents;
public:
OverlayContainer(const String& name);
virtual ~OverlayContainer();
virtual void addChild(OverlayElement* elem);
virtual void addChildImpl(OverlayElement* elem);
virtual void addChildImpl(OverlayContainer* cont);
virtual void removeChild(const String& name);
virtual OverlayElement* getChild(const String& name);
void initialise(void);
void _addChild(OverlayElement* elem);
void _removeChild(OverlayElement* elem) { _removeChild(elem->getName()); }
void _removeChild(const String& name);
virtual ChildIterator getChildIterator(void);
virtual ChildContainerIterator getChildContainerIterator(void);
virtual void _positionsOutOfDate(void);
virtual void _update(void);
virtual ushort _notifyZOrder(ushort newZOrder);
virtual void _notifyViewport();
virtual void _notifyWorldTransforms(const Matrix4& xform);
virtual void _notifyParent(OverlayContainer* parent, Overlay* overlay);
virtual void _updateRenderQueue(RenderQueue* queue);
inline bool isContainer() const
{ return true; }
virtual inline bool isChildrenProcessEvents() const
{ return true; }
virtual inline void setChildrenProcessEvents(bool val)
{ mChildrenProcessEvents = val; }
virtual OverlayElement* findElementAt(Real x, Real y); // relative to parent
void copyFromTemplate(OverlayElement* templateOverlay);
virtual OverlayElement* clone(const String& instanceName);
};
}
#endif
Ogre::OverlayContainer::isContainer
bool isContainer() const
Overridden from OverlayElement.
Definition: OgreOverlayContainer.h:125
Ogre::OverlayContainer::mChildrenProcessEvents
bool mChildrenProcessEvents
Definition: OgreOverlayContainer.h:69
Ogre::OverlayElement::getName
const String & getName(void) const
Gets the name of this overlay.
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
_OgreOverlayExport
#define _OgreOverlayExport
Definition: OgreOverlayPrerequisites.h:58
OgreOverlayElement.h
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:78
Ogre::OverlayContainer::isChildrenProcessEvents
virtual bool isChildrenProcessEvents() const
Should this container pass events to their children.
Definition: OgreOverlayContainer.h:129
Ogre::OverlayContainer::mChildContainers
ChildContainerMap mChildContainers
Map of container children (subset of mChildren)
Definition: OgreOverlayContainer.h:67
Ogre::OverlayContainer::ChildContainerIterator
MapIterator< ChildContainerMap > ChildContainerIterator
Definition: OgreOverlayContainer.h:62
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::OverlayContainer::ChildMap
map< String, OverlayElement * >::type ChildMap
Definition: OgreOverlayContainer.h:59
OgreOverlayPrerequisites.h
Ogre::OverlayContainer::ChildContainerMap
map< String, OverlayContainer * >::type ChildContainerMap
Definition: OgreOverlayContainer.h:61
OgreIteratorWrappers.h
Ogre::OverlayContainer::setChildrenProcessEvents
virtual void setChildrenProcessEvents(bool val)
Should this container pass events to their children.
Definition: OgreOverlayContainer.h:133
Ogre::OverlayContainer::_removeChild
void _removeChild(OverlayElement *elem)
Definition: OgreOverlayContainer.h:91
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::OverlayContainer::ChildIterator
MapIterator< ChildMap > ChildIterator
Definition: OgreOverlayContainer.h:60
Ogre::OverlayElement
Abstract definition of a 2D element to be displayed in an Overlay.
Definition: OgreOverlayElement.h:108
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::OverlayContainer
A 2D element which contains other OverlayElement instances.
Definition: OgreOverlayContainer.h:56
Ogre::Overlay
Represents a layer which is rendered on top of the &#39;normal&#39; scene contents.
Definition: OgreOverlay.h:70
Ogre::OverlayContainer::mChildren
ChildMap mChildren
Map of all children.
Definition: OgreOverlayContainer.h:65

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.