OGRE: OgreOverlayContainer.h Source File - OGRE Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# OgreOverlayContainer.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2006 Torus Knot Software Ltd
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023
    00024 You may alternatively use this source under the terms of a specific version of
    00025 the OGRE Unrestricted License provided you have obtained such a license from
    00026 Torus Knot Software Ltd.
    00027 -----------------------------------------------------------------------------
    00028 */
    00029
    00030 #ifndef __OverlayContainer_H__
    00031 #define __OverlayContainer_H__
    00032
    00033 #include "OgrePrerequisites.h"
    00034 #include "OgreOverlayElement.h"
    00035 #include "OgreIteratorWrappers.h"
    00036
    00037
    00038 namespace Ogre {
    00039
    00040
    00051     class _OgreExport OverlayContainer : public OverlayElement
    00052     {
    00053     public:
    00054         typedef std::map<String, OverlayElement*> ChildMap;
    00055         typedef MapIterator<ChildMap> ChildIterator;
    00056         typedef std::map<String, OverlayContainer*> ChildContainerMap;
    00057         typedef MapIterator<ChildContainerMap> ChildContainerIterator;
    00058     protected:
    00059         // Map of all children
    00060         ChildMap mChildren;
    00061         // Map of container children (subset of mChildren)
    00062         ChildContainerMap mChildContainers;
    00063
    00064         bool mChildrenProcessEvents;
    00065
    00066     public:
    00068         OverlayContainer(const String& name);
    00069         virtual ~OverlayContainer();
    00070
    00072         virtual void addChild(OverlayElement* elem);
    00074         virtual void addChildImpl(OverlayElement* elem);
    00076         virtual void addChildImpl(OverlayContainer* cont);
    00078         virtual void removeChild(const String& name);
    00080         virtual OverlayElement* getChild(const String& name);
    00081
    00083         void initialise(void);
    00084
    00085         void _addChild(OverlayElement* elem);
    00086         void _removeChild(OverlayElement* elem) { _removeChild(elem->getName()); }
    00087         void _removeChild(const String& name);
    00088
    00090         virtual ChildIterator getChildIterator(void);
    00091
    00096         virtual ChildContainerIterator getChildContainerIterator(void);
    00097
    00099         virtual void _positionsOutOfDate(void);
    00100
    00102         virtual void _update(void);
    00103
    00105         virtual void _notifyZOrder(ushort newZOrder);
    00106
    00108         virtual void _notifyViewport();
    00109
    00111         virtual void _notifyWorldTransforms(const Matrix4& xform);
    00112
    00114         virtual void _notifyParent(OverlayContainer* parent, Overlay* overlay);
    00115
    00117         virtual void _updateRenderQueue(RenderQueue* queue);
    00118
    00120         inline bool isContainer() const
    00121         { return true; }
    00122
    00124         virtual inline bool isChildrenProcessEvents() const
    00125         { return true; }
    00126
    00128         virtual inline void setChildrenProcessEvents(bool val)
    00129         { mChildrenProcessEvents = val; }
    00130
    00132         virtual OverlayElement* findElementAt(Real x, Real y);      // relative to parent
    00133
    00134         void copyFromTemplate(OverlayElement* templateOverlay);
    00135         virtual OverlayElement* clone(const String& instanceName);
    00136
    00137     };
    00138
    00139
    00140
    00141 }
    00142
    00143
    00144 #endif
    00145

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Thu Mar 6 09:46:26 2008