MyGUI 3.0.1
|
00001 00007 /* 00008 This file is part of MyGUI. 00009 00010 MyGUI is free software: you can redistribute it and/or modify 00011 it under the terms of the GNU Lesser General Public License as published by 00012 the Free Software Foundation, either version 3 of the License, or 00013 (at your option) any later version. 00014 00015 MyGUI is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public License 00021 along with MyGUI. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 #ifndef __MYGUI_I_LAYER_NODE_H__ 00024 #define __MYGUI_I_LAYER_NODE_H__ 00025 00026 #include "MyGUI_Prerequest.h" 00027 #include "MyGUI_Enumerator.h" 00028 #include "MyGUI_IObject.h" 00029 #include "MyGUI_IRenderTarget.h" 00030 00031 namespace MyGUI 00032 { 00033 00034 class ILayer; 00035 class ILayerItem; 00036 class ILayerNode; 00037 00038 class RenderItem; 00039 class ISubWidget; 00040 00041 typedef std::vector<ILayerNode*> VectorILayerNode; 00042 typedef Enumerator<VectorILayerNode> EnumeratorILayerNode; 00043 00044 class MYGUI_EXPORT ILayerNode : public IObject 00045 { 00046 MYGUI_RTTI_DERIVED( ILayerNode ) 00047 00048 public: 00049 virtual ~ILayerNode() { } 00050 00051 // леер, которому мы принадлежим 00052 virtual ILayer* getLayer() = 0; 00053 00054 // возвращает отца или nullptr 00055 virtual ILayerNode* getParent() = 0; 00056 00057 // создаем дочерний нод 00058 virtual ILayerNode* createChildItemNode() = 0; 00059 // удаляем дочерний нод 00060 virtual void destroyChildItemNode(ILayerNode* _node) = 0; 00061 00062 // поднимаем дочерний нод 00063 virtual void upChildItemNode(ILayerNode* _node) = 0; 00064 00065 // список детей 00066 virtual EnumeratorILayerNode getEnumerator() = 0; 00067 00068 00069 // добавляем айтем к ноду 00070 virtual void attachLayerItem(ILayerItem* _item) = 0; 00071 // удаляем айтем из нода 00072 virtual void detachLayerItem(ILayerItem* _root) = 0; 00073 00074 // добавляет саб айтем и возвращает рендер айтем 00075 virtual RenderItem* addToRenderItem(ITexture* _texture, ISubWidget* _item) = 0; 00076 // необходимо обновление нода 00077 virtual void outOfDate(RenderItem* _item) = 0; 00078 00079 // возвращает виджет по позиции 00080 virtual ILayerItem* getLayerItemByPoint(int _left, int _top) = 0; 00081 00082 // рисует леер 00083 virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0; 00084 00085 virtual void dumpStatisticToLog(size_t _level) { } 00086 00087 }; 00088 00089 } // namespace MyGUI 00090 00091 #endif // __MYGUI_I_LAYER_NODE_H__