MyGUI 3.4.3
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 {
28 friend class GenericFactory<ResourceImageSet>;
29
31
32 public:
33 ImageIndexInfo getIndexInfo(std::string_view _group, std::string_view _index) const;
34 ImageIndexInfo getIndexInfo(size_t _group, std::string_view _index) const;
35 ImageIndexInfo getIndexInfo(std::string_view _group, size_t _index) const;
36 ImageIndexInfo getIndexInfo(size_t _group, size_t _index) const;
37 ImageIndexInfo getIndexInfo(const IntSize& _group, size_t _index) const;
38 ImageIndexInfo getIndexInfo(const IntSize& _group, std::string_view _index) const;
39
42
43 void AddGroupImage(const GroupImage& _group);
44
45 private:
46 void deserialization(xml::ElementPtr _node, Version _version) override;
47
48 size_t getGroupIndex(std::string_view _name) const;
49 size_t getGroupIndex(const IntSize& _size) const;
50 size_t getImageIndex(const GroupImage& _group, std::string_view _name) const;
51
52 private:
53 VectorGroupImage mGroups;
54 };
55
56} // namespace MyGUI
57
58#endif // MYGUI_RESOURCE_IMAGE_SET_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
IResource(IResource const &)=delete
ImageIndexInfo getIndexInfo(std::string_view _group, std::string_view _index) const
EnumeratorGroupImage getEnumerator() const
void AddGroupImage(const GroupImage &_group)
Element * ElementPtr
ResourceImageSet * ResourceImageSetPtr
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
Enumerator< VectorGroupImage > EnumeratorGroupImage
std::vector< GroupImage > VectorGroupImage