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