API Documentation
Image.h
1 // Image.h
3 //
5 
6 namespace nkWinUi
7 {
11  class Image
12  {
13  public :
14 
15  // Constructor, destructor
19  Image () noexcept ;
23  virtual ~Image () ;
24 
25  // Getters
29  virtual unsigned int getWidth () const = 0 ;
33  virtual unsigned int getHeight () const = 0 ;
37  nkMemory::StringView getName () const ;
41  bool getHidden () const ;
42 
43  // Setters
50  void setName (nkMemory::StringView value) ;
57  void setHidden (bool value) ;
64  void setFromImage (const nkImages::ImageView& image) ;
71  void setFromImageCopy (const nkImages::ImageView& image) ;
79 
80  // Loading
86  virtual bool load () = 0 ;
90  virtual void unload () = 0 ;
96  bool reload () ;
97 
98  public :
99 
100  // Statics
108  static nkMemory::UniquePtr<Image> create (System* system = nullptr) ;
109  } ;
110 }
nkWinUi::Image::getName
nkMemory::StringView getName() const
nkWinUi::Image::setFromImageCopy
void setFromImageCopy(const nkImages::ImageView &image)
nkWinUi::Image
Abstracts an image to be used within the component.
Definition: Image.h:12
nkWinUi::Image::setFromImageForward
void setFromImageForward(nkImages::Image &&image)
nkWinUi::Image::load
virtual bool load()=0
nkWinUi::Image::setFromImage
void setFromImage(const nkImages::ImageView &image)
nkWinUi::System
The main system of the component.
Definition: System.h:18
nkImages
Encompasses all API of component NilkinsImages.
Definition: BmpEncoder.h:7
nkWinUi::Image::getWidth
virtual unsigned int getWidth() const =0
nkWinUi::Image::getHidden
bool getHidden() const
nkWinUi::Image::setHidden
void setHidden(bool value)
nkWinUi::Image::create
static nkMemory::UniquePtr< Image > create(System *system=nullptr)
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7
nkWinUi::Image::reload
bool reload()
nkWinUi::Image::unload
virtual void unload()=0
nkWinUi::Image::setName
void setName(nkMemory::StringView value)
nkWinUi::Image::getHeight
virtual unsigned int getHeight() const =0
nkWinUi::Image::Image
Image() noexcept
nkMemory
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7