8#include <mousetrap/image.hpp>
9#include <mousetrap/widget.hpp>
10#include <mousetrap/icon.hpp>
11#include <mousetrap/file_descriptor.hpp>
19 struct _ImageDisplayInternal;
20 using ImageDisplayInternal = _ImageDisplayInternal;
21 DEFINE_INTERNAL_MAPPING(ImageDisplay);
28 HAS_SIGNAL(ImageDisplay, realize),
29 HAS_SIGNAL(ImageDisplay, unrealize),
30 HAS_SIGNAL(ImageDisplay, destroy),
31 HAS_SIGNAL(ImageDisplay, hide),
32 HAS_SIGNAL(ImageDisplay, show),
33 HAS_SIGNAL(ImageDisplay, map),
34 HAS_SIGNAL(ImageDisplay, unmap)
98 detail::ImageDisplayInternal* _internal =
nullptr;
100 void update_size(uint64_t, uint64_t);
non-mutating file descriptor, may point to any file, directory, or no file at all....
Definition: file_descriptor.hpp:24
object representing an icon. Note that this does not hodl any image data, instead it points to a file...
Definition: icon.hpp:73
widget that display an iamge
Definition: image_display.hpp:35
bool create_from_file(const std::string &path)
load from image on disk
Definition: image_display.cpp:130
int get_scale() const
get_scale
Definition: image_display.cpp:203
void create_from_icon(const Icon &icon)
load from icon
Definition: image_display.cpp:160
NativeObject get_internal() const override
expose internal
Definition: image_display.cpp:65
void clear()
create from empty image
Definition: image_display.cpp:189
ImageDisplay()
default ctor, initialize as 0x0 image
Definition: image_display.cpp:76
Vector2ui get_size() const
get resolution of image buffer
Definition: image_display.cpp:125
void create_as_file_preview(const FileDescriptor &file)
create as preview of a file, if the file can be opened as an image, will display image,...
Definition: image_display.cpp:168
void set_scale(int scale)
set scale, will use linear interpolation. For other types of interpolation, scale a mousetrap::Image ...
Definition: image_display.cpp:195
void create_from_image(const Image &image)
load from image
Definition: image_display.cpp:153
~ImageDisplay()
destructor
Definition: image_display.cpp:60
a 2d buffer container RGBA pixels
Definition: image.hpp:36