API Documentation
ImageDisplay.h
1 // ImageDisplay.h
3 //
5 
6 namespace nkWinUi
7 {
12  {
13  STRETCH = 0,
14  KEEP_RATIO
15  } ;
16 
20  class ImageDisplay : public Component
21  {
22  public :
23 
24  // Constructor, destructor
32  ImageDisplay (System* system) noexcept ;
36  virtual ~ImageDisplay () ;
37 
38  // Getters
42  Image* getImage () const ;
47 
48  // Setters
54  virtual void setImage (Image* value) ;
60  virtual void setDisplayMethod (IMAGE_DISPLAY_METHOD value) ;
61 
62  // Import / Export
63  virtual void exportIntrospection (nkExport::Node* rootNode) override ;
64  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
65 
66  public :
67 
68  // Statics
76  static nkMemory::UniquePtr<ImageDisplay> create (System* system = nullptr) ;
77  } ;
78 }
nkWinUi::Image
Abstracts an image to be used within the component.
Definition: Image.h:12
nkWinUi::IMAGE_DISPLAY_METHOD
IMAGE_DISPLAY_METHOD
The available image display methods.
Definition: ImageDisplay.h:12
nkWinUi::ImageDisplay::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkWinUi::ImageDisplay::getDisplayMethod
IMAGE_DISPLAY_METHOD getDisplayMethod() const
nkWinUi::ImageDisplay::create
static nkMemory::UniquePtr< ImageDisplay > create(System *system=nullptr)
nkWinUi::ImageDisplay::setImage
virtual void setImage(Image *value)
nkWinUi::Component
Base class for any graphical component.
Definition: Component.h:12
nkWinUi::System
The main system of the component.
Definition: System.h:18
nkWinUi::ImageDisplay::ImageDisplay
ImageDisplay(System *system) noexcept
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkWinUi::ImageDisplay::exportIntrospection
virtual void exportIntrospection(nkExport::Node *rootNode) override
nkMemory::UniquePtr
Smart pointer owning the object instance it encapsulates.
Definition: UniquePtr.h:17
nkWinUi::IMAGE_DISPLAY_METHOD::STRETCH
@ STRETCH
Will stretch to image to fit the component's size.
nkWinUi::ImageDisplay::~ImageDisplay
virtual ~ImageDisplay()
nkWinUi::ImageDisplay::getImage
Image * getImage() const
nkWinUi::ImageDisplay
Allows to display an image in the Ui.
Definition: ImageDisplay.h:21
nkWinUi::IMAGE_DISPLAY_METHOD::KEEP_RATIO
@ KEEP_RATIO
Will keep the image's ratio and dimensions to display within the component.
nkWinUi::ImageDisplay::setDisplayMethod
virtual void setDisplayMethod(IMAGE_DISPLAY_METHOD value)
nkWinUi
Encompasses all API of component NilkinsWinUi.
Definition: Clipboard.h:7