MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_ResourceImageSet.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_RESOURCE_IMAGE_SET_H__
23 #define __MYGUI_RESOURCE_IMAGE_SET_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Macros.h"
27 #include "MyGUI_XmlDocument.h"
28 #include "MyGUI_IResource.h"
29 #include "MyGUI_ImageInfo.h"
30 #include "MyGUI_Enumerator.h"
31 #include "MyGUI_ResourceManager.h"
32 #include "MyGUI_GenericFactory.h"
33 #include "MyGUI_ResourceImageSetData.h"
34
35 namespace MyGUI
36 {
37
38 class ResourceImageSet;
39 typedef ResourceImageSet* ResourceImageSetPtr;
40
41 class MYGUI_EXPORT ResourceImageSet :
42 public IResource
43 {
44 friend class GenericFactory<ResourceImageSet>;
45
46 MYGUI_RTTI_DERIVED( ResourceImageSet )
47
48 public:
49 ImageIndexInfo getIndexInfo(const std::string& _group, const std::string& _index);
50 ImageIndexInfo getIndexInfo(size_t _group, const std::string& _index);
51 ImageIndexInfo getIndexInfo(const std::string& _group, size_t _index);
52 ImageIndexInfo getIndexInfo(size_t _group, size_t _index);
53 ImageIndexInfo getIndexInfo(const IntSize& _group, size_t _index);
54 ImageIndexInfo getIndexInfo(const IntSize& _group, const std::string& _index);
55
57 EnumeratorGroupImage getEnumerator() const;
58
59 private:
60 ResourceImageSet();
61 virtual ~ResourceImageSet();
62
63 virtual void deserialization(xml::ElementPtr _node, Version _version);
64
65 size_t getGroupIndex(const std::string& _name);
66 size_t getGroupIndex(const IntSize& _size);
67 size_t getImageIndex(GroupImage& _group, const std::string& _name);
68 const IntSize& getGroupSize(size_t _index);
69 const IntSize& getGroupSize(const std::string& _group);
70
71 private:
72 VectorGroupImage mGroups;
73
74 static std::vector<IntPoint> mFramesEmpty;
75 };
76
77 } // namespace MyGUI
78
79 #endif // __MYGUI_RESOURCE_IMAGE_SET_H__
MyGUI::types::TPoint< int >
MyGUI_Enumerator.h
MyGUI_Prerequest.h
MyGUI::GroupImage
Definition: MyGUI_ResourceImageSetData.h:38
MyGUI::types::TSize< int >
MyGUI::xml::ElementPtr
Element * ElementPtr
Definition: MyGUI_XmlDocument.h:114
MyGUI_Macros.h
MyGUI_ImageInfo.h
MyGUI::ResourceImageSetPtr
ResourceImageSet * ResourceImageSetPtr
Definition: MyGUI_ResourceImageSet.h:38
MyGUI::ResourceImageSet
Definition: MyGUI_ResourceImageSet.h:41
MyGUI::Enumerator
Definition: MyGUI_Enumerator.h:63
MyGUI_XmlDocument.h
MyGUI::VectorGroupImage
std::vector< GroupImage > VectorGroupImage
Definition: MyGUI_ResourceImageSetData.h:45
MyGUI::ImageIndexInfo
Definition: MyGUI_ImageInfo.h:45
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:88
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::GenericFactory
Definition: MyGUI_GenericFactory.h:17
MyGUI_IResource.h
MyGUI::Version
Definition: MyGUI_Version.h:32
MyGUI_GenericFactory.h
MyGUI_ResourceManager.h
MyGUI::IResource
Definition: MyGUI_IResource.h:38
MyGUI_ResourceImageSetData.h