XviewerScrollView: Xviewer Reference Manual

## XviewerScrollView XviewerScrollView |

## Functions

GtkWidget * | xviewer_scroll_view_new ()
void | xviewer_scroll_view_set_image ()
void | xviewer_scroll_view_set_scroll_wheel_zoom ()
void | xviewer_scroll_view_set_zoom_upscale ()
void | xviewer_scroll_view_set_zoom_multiplier ()
void | xviewer_scroll_view_set_antialiasing_in ()
void | xviewer_scroll_view_set_antialiasing_out ()
void | xviewer_scroll_view_set_transparency ()
gboolean | xviewer_scroll_view_scrollbars_visible ()
void | xviewer_scroll_view_set_popup ()
void | xviewer_scroll_view_zoom_in ()
void | xviewer_scroll_view_zoom_out ()
void | xviewer_scroll_view_set_zoom ()
double | xviewer_scroll_view_get_zoom ()
gboolean | xviewer_scroll_view_get_zoom_is_min ()
gboolean | xviewer_scroll_view_get_zoom_is_max ()
XviewerZoomMode | xviewer_scroll_view_get_zoom_mode ()
void | xviewer_scroll_view_set_zoom_mode ()
void | xviewer_scroll_view_show_cursor ()
void | xviewer_scroll_view_hide_cursor ()
void | xviewer_scroll_view_override_bg_color ()
void | xviewer_scroll_view_set_background_color ()
void | xviewer_scroll_view_set_transparency_color ()
void | xviewer_scroll_view_set_use_bg_color ()
gboolean | xviewer_scroll_view_event_is_over_image ()

## Types and Values

struct | XviewerScrollView
enum | XviewerTransparencyStyle
enum | XviewerZoomMode

## Description

## Functions

### xviewer_scroll_view_new ()

    GtkWidget *
    xviewer_scroll_view_new (void);

### xviewer_scroll_view_set_image ()

    void
    xviewer_scroll_view_set_image (XviewerScrollView *view,
                                   XviewerImage *image);

### xviewer_scroll_view_set_scroll_wheel_zoom ()

    void
    xviewer_scroll_view_set_scroll_wheel_zoom
                                   (XviewerScrollView *view,
                                    gboolean scroll_wheel_zoom);

### xviewer_scroll_view_set_zoom_upscale ()

    void
    xviewer_scroll_view_set_zoom_upscale (XviewerScrollView *view,
                                          gboolean upscale);

### xviewer_scroll_view_set_zoom_multiplier ()

    void
    xviewer_scroll_view_set_zoom_multiplier
                                   (XviewerScrollView *view,
                                    gdouble multiplier);

### xviewer_scroll_view_set_antialiasing_in ()

    void
    xviewer_scroll_view_set_antialiasing_in
                                   (XviewerScrollView *view,
                                    gboolean state);

### xviewer_scroll_view_set_antialiasing_out ()

    void
    xviewer_scroll_view_set_antialiasing_out
                                   (XviewerScrollView *view,
                                    gboolean state);

### xviewer_scroll_view_set_transparency ()

    void
    xviewer_scroll_view_set_transparency (XviewerScrollView *view,
                                          XviewerTransparencyStyle style);

### xviewer_scroll_view_scrollbars_visible ()

    gboolean
    xviewer_scroll_view_scrollbars_visible
                                   (XviewerScrollView *view);

### xviewer_scroll_view_set_popup ()

    void
    xviewer_scroll_view_set_popup (XviewerScrollView *view,
                                   GtkMenu *menu);

### xviewer_scroll_view_zoom_in ()

    void
    xviewer_scroll_view_zoom_in (XviewerScrollView *view,
                                 gboolean smooth);

### xviewer_scroll_view_zoom_out ()

    void
    xviewer_scroll_view_zoom_out (XviewerScrollView *view,
                                  gboolean smooth);

### xviewer_scroll_view_set_zoom ()

    void
    xviewer_scroll_view_set_zoom (XviewerScrollView *view,
                                  double zoom);

### xviewer_scroll_view_get_zoom ()

    double
    xviewer_scroll_view_get_zoom (XviewerScrollView *view);

### xviewer_scroll_view_get_zoom_is_min ()

    gboolean
    xviewer_scroll_view_get_zoom_is_min (XviewerScrollView *view);

### xviewer_scroll_view_get_zoom_is_max ()

    gboolean
    xviewer_scroll_view_get_zoom_is_max (XviewerScrollView *view);

### xviewer_scroll_view_get_zoom_mode ()

    XviewerZoomMode
    xviewer_scroll_view_get_zoom_mode (XviewerScrollView *view);

### xviewer_scroll_view_set_zoom_mode ()

    void
    xviewer_scroll_view_set_zoom_mode (XviewerScrollView *view,
                                       XviewerZoomMode mode);

### xviewer_scroll_view_show_cursor ()

    void
    xviewer_scroll_view_show_cursor (XviewerScrollView *view);

### xviewer_scroll_view_hide_cursor ()

    void
    xviewer_scroll_view_hide_cursor (XviewerScrollView *view);

### xviewer_scroll_view_override_bg_color ()

    void
    xviewer_scroll_view_override_bg_color (XviewerScrollView *view,
                                           const GdkRGBA *color);

### xviewer_scroll_view_set_background_color ()

    void
    xviewer_scroll_view_set_background_color
                                   (XviewerScrollView *view,
                                    const GdkRGBA *color);

### xviewer_scroll_view_set_transparency_color ()

    void
    xviewer_scroll_view_set_transparency_color
                                   (XviewerScrollView *view,
                                    GdkRGBA *color);

### xviewer_scroll_view_set_use_bg_color ()

    void
    xviewer_scroll_view_set_use_bg_color (XviewerScrollView *view,
                                          gboolean use);

### xviewer_scroll_view_event_is_over_image ()

    gboolean
    xviewer_scroll_view_event_is_over_image
                                   (XviewerScrollView *view,
                                    const GdkEvent *ev);

Tells if `ev` 's originates from inside the image area. `view` must be realized and have an image set for this to work.

It only works with GdkEvents that supply coordinate data, i.e. GdkEventButton.

#### Parameters

view | An XviewerScrollView that has an image loaded. |
ev | A GdkEvent which must have window-relative coordinates. |

#### Returns

`TRUE` if `ev` originates from over the image, `FALSE` otherwise.

## Types and Values

### struct XviewerScrollView

    struct XviewerScrollView {
    	GtkGrid  base_instance;

    	XviewerScrollViewPrivate *priv;
    };

### enum XviewerTransparencyStyle

Used to define how transparent image parts are drawn.

#### Members

XVIEWER_TRANSP_BACKGROUND | Use the background color of the current UI theme |
XVIEWER_TRANSP_CHECKED | Show transparent parts as a checkerboard pattern |
XVIEWER_TRANSP_COLOR | Show transparent parts in a user defined color (see “transparency-color” ) |

### enum XviewerZoomMode

Used to determine the zooming behaviour of an XviewerScrollView.

#### Members

XVIEWER_ZOOM_MODE_FREE | Use the currently set zoom factor to display the image (see `xviewer_scroll_view_set_zoom()`). |
XVIEWER_ZOOM_MODE_SHRINK_TO_FIT | If an image is to large for the window, zoom out until the image is fully visible. This will never zoom in on smaller images. |