MyGUI
3.2.0
|
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_H__ 00023 #define __MYGUI_I_LAYER_H__ 00024 00025 #include "MyGUI_Prerequest.h" 00026 #include "MyGUI_Types.h" 00027 #include "MyGUI_IRenderTarget.h" 00028 #include "MyGUI_ILayerNode.h" 00029 #include "MyGUI_ISerializable.h" 00030 00031 namespace MyGUI 00032 { 00033 00034 class ILayerItem; 00035 00036 class MYGUI_EXPORT ILayer : 00037 public ISerializable 00038 { 00039 MYGUI_RTTI_DERIVED( ILayer ) 00040 00041 public: 00042 ILayer() { } 00043 virtual ~ILayer() { } 00044 00045 // имя леера 00046 const std::string& getName() const 00047 { 00048 return mName; 00049 } 00050 00051 // создаем дочерний нод 00052 virtual ILayerNode* createChildItemNode() = 0; 00053 // удаляем дочерний нод 00054 virtual void destroyChildItemNode(ILayerNode* _node) = 0; 00055 00056 // поднимаем дочерний нод 00057 virtual void upChildItemNode(ILayerNode* _node) = 0; 00058 00059 // список детей 00060 virtual EnumeratorILayerNode getEnumerator() const = 0; 00061 00062 // возвращает виджет по позиции 00063 virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0; 00064 00065 // возвращает позицию в координатах леера 00066 virtual IntPoint getPosition(int _left, int _top) const = 0; 00067 00068 // возвращает размер леера 00069 virtual const IntSize& getSize() const = 0; 00070 00071 // рисует леер 00072 virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0; 00073 00074 virtual void resizeView(const IntSize& _viewSize) = 0; 00075 00076 protected: 00077 std::string mName; 00078 }; 00079 00080 } // namespace MyGUI 00081 00082 #endif // __MYGUI_I_LAYER_H__