MyGUI  3.2.1
MyGUI_SubWidgetBinding.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_SUB_WIDGET_BINDING_H__
00008 #define __MYGUI_SUB_WIDGET_BINDING_H__
00009 
00010 #include "MyGUI_Prerequest.h"
00011 #include "MyGUI_ISubWidget.h"
00012 
00013 namespace MyGUI
00014 {
00015 
00016     // вспомогательный класс для инициализации сабскинов
00017     class MYGUI_EXPORT SubWidgetBinding
00018     {
00019         // для доступа к внутренним членам
00020         friend class ResourceSkin;
00021 
00022     public:
00023         SubWidgetBinding();
00024         SubWidgetBinding(const IntCoord& _coord, Align _aligin, const std::string& _type);
00025 
00026         void create(const IntCoord& _coord, Align _aligin, const std::string& _type);
00027 
00028         void clear();
00029 
00030         void add(const std::string& _name, IStateInfo* _data, const std::string& _skin);
00031 
00032     private:
00033         IntCoord mOffset;
00034         Align mAlign;
00035         std::string mType;
00036         MapStateInfo mStates;
00037     };
00038 
00039 } // namespace MyGUI
00040 
00041 
00042 #endif // __MYGUI_SUB_WIDGET_BINDING_H__