MyGUI: MyGUI_ResourceImageSet.h Source File

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"
16#include "MyGUI_ResourceManager.h"
17#include "MyGUI_GenericFactory.h"
18#include "MyGUI_ResourceImageSetData.h"
19
20namespace MyGUI
21{
22
23 class ResourceImageSet;
24 using ResourceImageSetPtr = ResourceImageSet*;
25
26 class MYGUI_EXPORT ResourceImageSet : public IResource
27 {
28 friend class GenericFactory<ResourceImageSet>;
29
30 MYGUI_RTTI_DERIVED(ResourceImageSet)
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
41 EnumeratorGroupImage getEnumerator() const;
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_
MyGUI_Enumerator.h
MyGUI_GenericFactory.h
MyGUI_IResource.h
MyGUI_ImageInfo.h
MyGUI_Macros.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
MyGUI_ResourceImageSetData.h
MyGUI_ResourceManager.h
MyGUI_XmlDocument.h
MyGUI::GenericFactory
Definition MyGUI_GenericFactory.h:20
MyGUI::IResource::IResource
IResource(IResource const &)=delete
MyGUI::ResourceImageSet
Definition MyGUI_ResourceImageSet.h:27
MyGUI::ResourceImageSet::getIndexInfo
ImageIndexInfo getIndexInfo(std::string_view _group, std::string_view _index) const
Definition MyGUI_ResourceImageSet.cpp:64
MyGUI::ResourceImageSet::getEnumerator
EnumeratorGroupImage getEnumerator() const
Definition MyGUI_ResourceImageSet.cpp:186
MyGUI::ResourceImageSet::AddGroupImage
void AddGroupImage(const GroupImage &_group)
Definition MyGUI_ResourceImageSet.cpp:191
MyGUI::Version
Definition MyGUI_Version.h:18
MyGUI::xml::ElementPtr
Element * ElementPtr
Definition MyGUI_XmlDocument.h:112
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::ResourceImageSetPtr
ResourceImageSet * ResourceImageSetPtr
Definition MyGUI_ResourceImageSet.h:24
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::EnumeratorGroupImage
Enumerator< VectorGroupImage > EnumeratorGroupImage
Definition MyGUI_ResourceImageSetData.h:31
MyGUI::VectorGroupImage
std::vector< GroupImage > VectorGroupImage
Definition MyGUI_ResourceImageSetData.h:30
MyGUI::GroupImage
Definition MyGUI_ResourceImageSetData.h:24
MyGUI::ImageIndexInfo
Definition MyGUI_ImageInfo.h:25