GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
gui_framework::utility::ImagesHolder Class Referencefinal

Images loader. More...

#include <ImagesHolder.h>

Inheritance diagram for gui_framework::utility::ImagesHolder:
gui_framework::utility::BaseLoadableHolder gui_framework::interfaces::IIterable< std::filesystem::path, iterators::loadable_forward_iterator, iterators::loadable_const_forward_iterator > gui_framework::interfaces::ISerializable

Public Member Functions

 ImagesHolder (uint16_t imagesWidth, uint16_t imagesHeight, size_t count=standard_sizes::defaultImagesCount)
 
HBITMAP getImage (const std::filesystem::path &pathToImage) const
 
HBITMAP getImage (uint16_t imageIndex) const
 
uint16_t addImage (const std::filesystem::path &pathToImage) override
 
 ~ImagesHolder ()=default
 
- Public Member Functions inherited from gui_framework::utility::BaseLoadableHolder
 BaseLoadableHolder (uint16_t imagesWidth, uint16_t imagesHeight, size_t count=standard_sizes::defaultImagesCount)
 
virtual void removeImage (const std::filesystem::path &pathToImage) final
 
virtual void removeImage (uint16_t imageIndex) final
 
virtual bool contains (const std::filesystem::path &pathToImage) const final
 
virtual uint16_t getImagesWidth () const final
 
virtual uint16_t getImagesHeight () const final
 
virtual uint16_t getImageIndex (const std::filesystem::path &pathToImage) const final
 
virtual imageType getImageType (const std::filesystem::path &pathToImage) const final
 
virtual imageType getImageType (uint16_t imageIndex) const final
 
virtual HIMAGELIST getImageList () const final
 
virtual uint16_t operator[] (const std::filesystem::path &pathToImage) const final
 
virtual std::filesystem::path operator[] (uint16_t index) const final
 
virtual iterators::loadable_forward_iterator begin () noexcept final override
 Can't be modified.
 
virtual iterators::loadable_const_forward_iterator cbegin () const noexcept final override
 
virtual iterators::loadable_forward_iterator end () noexcept final override
 
virtual iterators::loadable_const_forward_iterator cend () const noexcept final override
 
virtual std::pair< std::string, json::utility::jsonObject::variantType > & loadBaseLoadableHolderStructure (json::utility::jsonObject &current) const final
 
virtual ~BaseLoadableHolder ()
 
- Public Member Functions inherited from gui_framework::interfaces::IIterable< std::filesystem::path, iterators::loadable_forward_iterator, iterators::loadable_const_forward_iterator >
 IIterable ()=default
 
virtual ~IIterable ()=default
 
- Public Member Functions inherited from gui_framework::interfaces::ISerializable
 ISerializable ()=default
 
virtual ~ISerializable ()=default
 

Additional Inherited Members

- Public Types inherited from gui_framework::utility::BaseLoadableHolder
enum class  imageType : uint32_t { bitmap , icon , cursor }
 
- Static Public Member Functions inherited from gui_framework::interfaces::ISerializable
static uint32_t getCodepage ()
 
- Protected Member Functions inherited from gui_framework::utility::BaseLoadableHolder
virtual uint16_t insertImage (const std::filesystem::path &pathToImage, imageType type) final
 
- Protected Attributes inherited from gui_framework::utility::BaseLoadableHolder
HIMAGELIST imageList
 
std::unordered_map< std::wstring, imageDataimages
 
uint16_t imagesWidth
 
uint16_t imagesHeight
 

Detailed Description

Images loader.

Definition at line 10 of file ImagesHolder.h.

Constructor & Destructor Documentation

◆ ImagesHolder()

gui_framework::utility::ImagesHolder::ImagesHolder ( uint16_t imagesWidth,
uint16_t imagesHeight,
size_t count = standard_sizes::defaultImagesCount )

Definition at line 9 of file ImagesHolder.cpp.

◆ ~ImagesHolder()

gui_framework::utility::ImagesHolder::~ImagesHolder ( )
default

Member Function Documentation

◆ addImage()

uint16_t gui_framework::utility::ImagesHolder::addImage ( const std::filesystem::path & pathToImage)
overridevirtual
Parameters
pathToImage
Returns
Index of newly added image

Implements gui_framework::utility::BaseLoadableHolder.

Definition at line 45 of file ImagesHolder.cpp.

◆ getImage() [1/2]

HBITMAP gui_framework::utility::ImagesHolder::getImage ( const std::filesystem::path & pathToImage) const
Parameters
pathToIcon
Returns
Exceptions
std::out_of_range

◆ getImage() [2/2]

HBITMAP gui_framework::utility::ImagesHolder::getImage ( uint16_t imageIndex) const
Parameters
iconIndex
Returns
Exceptions
std::out_of_range

Definition at line 25 of file ImagesHolder.cpp.


The documentation for this class was generated from the following files: