MyGUI 3.4.1
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"
19
20namespace MyGUI
21{
22
23 class ResourceImageSet;
25
27 public IResource
28 {
29 friend class GenericFactory<ResourceImageSet>;
30
32
33 public:
34 ImageIndexInfo getIndexInfo(const std::string& _group, const std::string& _index) const;
35 ImageIndexInfo getIndexInfo(size_t _group, const std::string& _index) const;
36 ImageIndexInfo getIndexInfo(const std::string& _group, size_t _index) const;
37 ImageIndexInfo getIndexInfo(size_t _group, size_t _index) const;
38 ImageIndexInfo getIndexInfo(const IntSize& _group, size_t _index) const;
39 ImageIndexInfo getIndexInfo(const IntSize& _group, const std::string& _index) const;
40
42 EnumeratorGroupImage getEnumerator() const;
43
44 void AddGroupImage(const GroupImage& _group);
45
46 private:
47 void deserialization(xml::ElementPtr _node, Version _version) override;
48
49 size_t getGroupIndex(const std::string& _name) const;
50 size_t getGroupIndex(const IntSize& _size) const;
51 size_t getImageIndex(const GroupImage& _group, const std::string& _name) const;
52
53 private:
54 VectorGroupImage mGroups;
55
56 static std::vector<IntPoint> mFramesEmpty;
57 };
58
59} // namespace MyGUI
60
61#endif // MYGUI_RESOURCE_IMAGE_SET_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:48
ResourceImageSet * ResourceImageSetPtr
std::vector< GroupImage > VectorGroupImage