MyGUI: MyGUI_ResourceImageSet.h Source File

MyGUI 3.2.2

MyGUI_ResourceImageSet.h
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #ifndef MYGUI_RESOURCE_IMAGE_SET_H_
8 #define MYGUI_RESOURCE_IMAGE_SET_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Macros.h"
12 #include "MyGUI_XmlDocument.h"
13 #include "MyGUI_IResource.h"
14 #include "MyGUI_ImageInfo.h"
15 #include "MyGUI_Enumerator.h"
16 #include "MyGUI_ResourceManager.h"
17 #include "MyGUI_GenericFactory.h"
18 #include "MyGUI_ResourceImageSetData.h"
19
20 namespace MyGUI
21 {
22
23 class ResourceImageSet;
24 typedef ResourceImageSet* ResourceImageSetPtr;
25
26 class MYGUI_EXPORT ResourceImageSet :
27 public IResource
28 {
29 friend class GenericFactory<ResourceImageSet>;
30
31 MYGUI_RTTI_DERIVED( ResourceImageSet )
32
33 public:
34 ImageIndexInfo getIndexInfo(const std::string& _group, const std::string& _index);
35 ImageIndexInfo getIndexInfo(size_t _group, const std::string& _index);
36 ImageIndexInfo getIndexInfo(const std::string& _group, size_t _index);
37 ImageIndexInfo getIndexInfo(size_t _group, size_t _index);
38 ImageIndexInfo getIndexInfo(const IntSize& _group, size_t _index);
39 ImageIndexInfo getIndexInfo(const IntSize& _group, const std::string& _index);
40
42 EnumeratorGroupImage getEnumerator() const;
43
44 void AddGroupImage(const GroupImage& _group);
45
46 private:
47 ResourceImageSet();
48 virtual ~ResourceImageSet();
49
50 virtual void deserialization(xml::ElementPtr _node, Version _version);
51
52 size_t getGroupIndex(const std::string& _name);
53 size_t getGroupIndex(const IntSize& _size);
54 size_t getImageIndex(GroupImage& _group, const std::string& _name);
55 const IntSize& getGroupSize(size_t _index);
56 const IntSize& getGroupSize(const std::string& _group);
57
58 private:
59 VectorGroupImage mGroups;
60
61 static std::vector<IntPoint> mFramesEmpty;
62 };
63
64 } // namespace MyGUI
65
66 #endif // MYGUI_RESOURCE_IMAGE_SET_H_
MyGUI_IResource.h
MyGUI::VectorGroupImage
std::vector< GroupImage > VectorGroupImage
Definition: MyGUI_ResourceImageSetData.h:35
MyGUI_XmlDocument.h
MyGUI::ResourceImageSet
Definition: MyGUI_ResourceImageSet.h:26
MyGUI_ResourceManager.h
MyGUI_Enumerator.h
MyGUI_GenericFactory.h
MyGUI::xml::Element
Definition: MyGUI_XmlDocument.h:158
MyGUI::ResourceImageSetPtr
ResourceImageSet * ResourceImageSetPtr
Definition: MyGUI_ResourceImageSet.h:23
MyGUI::Version
Definition: MyGUI_Version.h:17
MyGUI_Prerequest.h
MyGUI::ImageIndexInfo
Definition: MyGUI_ImageInfo.h:30
MyGUI::GroupImage
Definition: MyGUI_ResourceImageSetData.h:28
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:65
MyGUI::Enumerator
Definition: MyGUI_Enumerator.h:48
MyGUI::types::TSize< int >
MyGUI_ResourceImageSetData.h
MyGUI_ImageInfo.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::GenericFactory
Definition: MyGUI_GenericFactory.h:18
MyGUI::IResource
Definition: MyGUI_IResource.h:23
MyGUI_Macros.h
MyGUI
Definition: MyGUI_ActionController.h:14