MyGUI  3.2.1
MyGUI_SharedLayer.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_SHARED_LAYER_H__
00008 #define __MYGUI_SHARED_LAYER_H__
00009 
00010 #include "MyGUI_Prerequest.h"
00011 #include "MyGUI_Types.h"
00012 #include "MyGUI_ILayer.h"
00013 #include "MyGUI_SharedLayerNode.h"
00014 
00015 namespace MyGUI
00016 {
00017 
00018     class MYGUI_EXPORT SharedLayer :
00019         public ILayer
00020     {
00021         MYGUI_RTTI_DERIVED( SharedLayer )
00022 
00023     public:
00024         SharedLayer();
00025         virtual ~SharedLayer();
00026 
00027         virtual void deserialization(xml::ElementPtr _node, Version _version);
00028 
00029         // создаем дочерний нод
00030         virtual ILayerNode* createChildItemNode();
00031         // удаляем дочерний нод
00032         virtual void destroyChildItemNode(ILayerNode* _node);
00033 
00034         // поднимаем дочерний нод
00035         virtual void upChildItemNode(ILayerNode* _node);
00036 
00037         // список детей
00038         virtual EnumeratorILayerNode getEnumerator() const;
00039 
00040         virtual size_t getLayerNodeCount() const;
00041 
00042         virtual ILayerNode* getLayerNodeAt(size_t _index) const;
00043 
00044         // возвращает виджет по позиции
00045         virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const;
00046 
00047         virtual IntPoint getPosition(int _left, int _top) const;
00048 
00049         virtual const IntSize& getSize() const;
00050 
00051         // рисует леер
00052         virtual void renderToTarget(IRenderTarget* _target, bool _update);
00053 
00054         virtual void resizeView(const IntSize& _viewSize);
00055 
00056         bool isOutOfDate() const;
00057 
00058     protected:
00059         bool mIsPick;
00060         SharedLayerNode* mChildItem;
00061         bool mOutOfDate;
00062         IntSize mViewSize;
00063     };
00064 
00065 } // namespace MyGUI
00066 
00067 #endif // __MYGUI_SHARED_LAYER_H__