Cross-platform C SDK logo

Cross-platform C SDK

ImageView

❮ Back
Next ❯
This page has been automatically translated using the Google Translate API services. We are working on improving texts. Thank you for your understanding and patience.

Functions

ImageView*imageview_create (void)
voidimageview_size (...)
voidimageview_scale (...)
voidimageview_image (...)
voidimageview_OnClick (...)
voidimageview_OnOverDraw (...)

ImageView are specialized views in visualizing images and GIF animations.

Screenshot of an ImageView control.
Figure 1: ImageView in a panel.

imageview_create ()

Create an image view control.

ImageView*
imageview_create(void);

Return

The image view.


imageview_size ()

Set the default control size.

void
imageview_size(ImageView *view,
               const S2Df size);
view

The view.

size

The size.


imageview_scale ()

Set the scaling to apply to the image.

void
imageview_scale(ImageView *view,
                const gui_scale_t scale);
view

The view.

scale

Scaling.


imageview_image ()

Set the image to be displayed in the control.

void
imageview_image(ImageView *view,
                const Image *image);
view

The view.

image

The image to show.


imageview_OnClick ()

Set a handle for the event click on the image.

void
imageview_OnClick(ImageView *view,
                  Listener *listener);
view

The view.

listener

Callback function to be called after clicking.


imageview_OnOverDraw ()

Allows you to draw an overlay on the image when the mouse is over it.

void
imageview_OnOverDraw(ImageView *view,
                     Listener *listener);
view

The view.

listener

Callback function that will be called when the mouse is over the image. Here we will include the additional drawing code.

❮ Back
Next ❯