GimpZoomModel 3 LIBGIMPWIDGETS Library GimpZoomModel Synopsis GimpZoomModel; enum GimpZoomType; GimpZoomModel* gimp_zoom_model_new (void); void gimp_zoom_model_set_range (GimpZoomModel *model, gdouble min, gdouble max); void gimp_zoom_model_zoom (GimpZoomModel *model, GimpZoomType zoom_type, gdouble scale); gdouble gimp_zoom_model_get_factor (GimpZoomModel *model); void gimp_zoom_model_get_fraction (GimpZoomModel *model, gint *numerator, gint *denominator); GtkWidget* gimp_zoom_button_new (GimpZoomModel *model, GimpZoomType zoom_type, GtkIconSize icon_size); gdouble gimp_zoom_model_zoom_step (GimpZoomType zoom_type, gdouble scale); Object Hierarchy GObject +----GimpZoomModel Properties "fraction" gchar* : Read "maximum" gdouble : Read / Write "minimum" gdouble : Read / Write "percentage" gchar* : Read "value" gdouble : Read / Write Signals "zoomed" : Run Last Description Details GimpZoomModel GimpZoomModeltypedef struct _GimpZoomModel GimpZoomModel; enum GimpZoomType GimpZoomTypetypedef enum { GIMP_ZOOM_IN, /*< desc="Zoom in" >*/ GIMP_ZOOM_OUT, /*< desc="Zoom out" >*/ GIMP_ZOOM_IN_MORE, /*< skip >*/ GIMP_ZOOM_OUT_MORE, /*< skip >*/ GIMP_ZOOM_IN_MAX, /*< skip >*/ GIMP_ZOOM_OUT_MAX, /*< skip >*/ GIMP_ZOOM_TO /*< skip >*/ } GimpZoomType; gimp_zoom_model_new () gimp_zoom_model_newGimpZoomModel* gimp_zoom_model_new (void); Creates a new GimpZoomModel. Returns : a new GimpZoomModel. Since GIMP 2.4 gimp_zoom_model_set_range () gimp_zoom_model_set_rangevoid gimp_zoom_model_set_range (GimpZoomModel *model, gdouble min, gdouble max); Sets the allowed range of the model. Since GIMP 2.4 model : a GimpZoomModel min : new lower limit for zoom factor max : new upper limit for zoom factor gimp_zoom_model_zoom () gimp_zoom_model_zoomvoid gimp_zoom_model_zoom (GimpZoomModel *model, GimpZoomType zoom_type, gdouble scale); Since GIMP 2.4 model : a GimpZoomModel zoom_type : the GimpZoomType scale : ignored unless zoom_type == GIMP_ZOOM_TO gimp_zoom_model_get_factor () gimp_zoom_model_get_factorgdouble gimp_zoom_model_get_factor (GimpZoomModel *model); Retrieves the current zoom factor of model. model : a GimpZoomModel Returns : the current scale factor Since GIMP 2.4 gimp_zoom_model_get_fraction () gimp_zoom_model_get_fractionvoid gimp_zoom_model_get_fraction (GimpZoomModel *model, gint *numerator, gint *denominator); Retrieves the current zoom factor of model as a fraction. Since GIMP 2.4 model : a GimpZoomModel numerator : return location for numerator denominator : return location for denominator gimp_zoom_button_new () gimp_zoom_button_newGtkWidget* gimp_zoom_button_new (GimpZoomModel *model, GimpZoomType zoom_type, GtkIconSize icon_size); model : a GimpZoomModel zoom_type : icon_size : use 0 for a button with text labels Returns : a newly created GtkButton Since GIMP 2.4 gimp_zoom_model_zoom_step () gimp_zoom_model_zoom_stepgdouble gimp_zoom_model_zoom_step (GimpZoomType zoom_type, gdouble scale); Utility function to calculate a new scale factor. zoom_type : scale : ignored unless zoom_type == GIMP_ZOOM_TO Returns : the new scale factor Since GIMP 2.4 Property Details The <literal>"fraction"</literal> property GimpZoomModel:fraction "fraction" gchar* : Read Default value: "1:1" The <literal>"maximum"</literal> property GimpZoomModel:maximum "maximum" gdouble : Read / Write Allowed values: [0.00390625,256] Default value: 256 The <literal>"minimum"</literal> property GimpZoomModel:minimum "minimum" gdouble : Read / Write Allowed values: [0.00390625,256] Default value: 0.00390625 The <literal>"percentage"</literal> property GimpZoomModel:percentage "percentage" gchar* : Read Default value: "100%" The <literal>"value"</literal> property GimpZoomModel:value "value" gdouble : Read / Write Allowed values: [0.00390625,256] Default value: 1 Signal Details The <literal>"zoomed"</literal> signal GimpZoomModel::zoomedvoid user_function (GimpZoomModel *model, gdouble old_factor, gdouble new_factor, gpointer user_data) : Run Last Emitted when the zoom factor of the zoom model changes. model : the object that received the signal old_factor : the zoom factor before it changes new_factor : the zoom factor after it has changed. user_data : user data set when the signal handler was connected.