MyGUI  3.2.1
MyGUI_ILayer.h
Go to the documentation of this file.
00001 /*
00002  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
00003  * Distributed under the MIT License
00004  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
00005  */
00006 
00007 #ifndef __MYGUI_I_LAYER_H__
00008 #define __MYGUI_I_LAYER_H__
00009 
00010 #include "MyGUI_Prerequest.h"
00011 #include "MyGUI_Types.h"
00012 #include "MyGUI_IRenderTarget.h"
00013 #include "MyGUI_ILayerNode.h"
00014 #include "MyGUI_ISerializable.h"
00015 
00016 namespace MyGUI
00017 {
00018 
00019     class ILayerItem;
00020 
00021     class MYGUI_EXPORT ILayer :
00022         public ISerializable
00023     {
00024         MYGUI_RTTI_DERIVED( ILayer )
00025 
00026     public:
00027         ILayer() { }
00028         virtual ~ILayer() { }
00029 
00030         // имя леера
00031         const std::string& getName() const
00032         {
00033             return mName;
00034         }
00035 
00036         // создаем дочерний нод
00037         virtual ILayerNode* createChildItemNode() = 0;
00038         // удаляем дочерний нод
00039         virtual void destroyChildItemNode(ILayerNode* _node) = 0;
00040 
00041         // поднимаем дочерний нод
00042         virtual void upChildItemNode(ILayerNode* _node) = 0;
00043 
00044         // список детей
00045         virtual EnumeratorILayerNode getEnumerator() const = 0;
00046 
00047         virtual size_t getLayerNodeCount() const = 0;
00048 
00049         virtual ILayerNode* getLayerNodeAt(size_t _index) const = 0;
00050 
00051         // возвращает виджет по позиции
00052         virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
00053 
00054         // возвращает позицию в координатах леера
00055         virtual IntPoint getPosition(int _left, int _top) const = 0;
00056 
00057         // возвращает размер леера
00058         virtual const IntSize& getSize() const = 0;
00059 
00060         // рисует леер
00061         virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
00062 
00063         virtual void resizeView(const IntSize& _viewSize) = 0;
00064 
00065     protected:
00066         std::string mName;
00067     };
00068 
00069 } // namespace MyGUI
00070 
00071 #endif // __MYGUI_I_LAYER_H__