GIMP Widgets Library Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Style Properties |
GimpRuler; GtkWidget * gimp_ruler_new (GtkOrientation orientation
); void gimp_ruler_set_unit (GimpRuler *ruler
,GimpUnit unit
); GimpUnit gimp_ruler_get_unit (GimpRuler *ruler
); void gimp_ruler_set_position (GimpRuler *ruler
,gdouble position
); gdouble gimp_ruler_get_position (GimpRuler *ruler
); void gimp_ruler_set_range (GimpRuler *ruler
,gdouble lower
,gdouble upper
,gdouble max_size
); void gimp_ruler_get_range (GimpRuler *ruler
,gdouble *lower
,gdouble *upper
,gdouble *max_size
); void gimp_ruler_add_track_widget (GimpRuler *ruler
,GtkWidget *widget
); void gimp_ruler_remove_track_widget (GimpRuler *ruler
,GtkWidget *widget
);
"lower" gdouble : Read / Write "max-size" gdouble : Read / Write "orientation" GtkOrientation : Read / Write "position" gdouble : Read / Write "unit" GimpUnit : Read / Write "upper" gdouble : Read / Write
GtkWidget * gimp_ruler_new (GtkOrientation orientation
);
Creates a new ruler.
|
the ruler's orientation. |
Returns : |
a new GimpRuler widget. |
Since GIMP 2.8
void gimp_ruler_set_unit (GimpRuler *ruler
,GimpUnit unit
);
This sets the unit of the ruler.
Since GIMP 2.8
GimpUnit gimp_ruler_get_unit (GimpRuler *ruler
);
|
a GimpRuler |
Returns : |
the unit currently used in the ruler widget. |
Since GIMP 2.8
void gimp_ruler_set_position (GimpRuler *ruler
,gdouble position
);
This sets the position of the ruler.
|
a GimpRuler |
|
the position to set the ruler to |
Since GIMP 2.8
gdouble gimp_ruler_get_position (GimpRuler *ruler
);
|
a GimpRuler |
Returns : |
the current position of the ruler widget. |
Since GIMP 2.8
void gimp_ruler_set_range (GimpRuler *ruler
,gdouble lower
,gdouble upper
,gdouble max_size
);
This sets the range of the ruler.
|
a GimpRuler |
|
the lower limit of the ruler |
|
the upper limit of the ruler |
|
the maximum size of the ruler used when calculating the space to leave for the text |
Since GIMP 2.8
void gimp_ruler_get_range (GimpRuler *ruler
,gdouble *lower
,gdouble *upper
,gdouble *max_size
);
Retrieves values indicating the range and current position of a GimpRuler.
See gimp_ruler_set_range()
.
|
a GimpRuler |
|
location to store lower limit of the ruler, or NULL
|
|
location to store upper limit of the ruler, or NULL
|
|
location to store the maximum size of the ruler used when
calculating the space to leave for the text, or NULL . |
Since GIMP 2.8
void gimp_ruler_add_track_widget (GimpRuler *ruler
,GtkWidget *widget
);
Adds a "track widget" to the ruler. The ruler will connect to GtkWidget:motion-notify-event: on the track widget and update its position marker accordingly. The marker is correctly updated also for the track widget's children, regardless of whether they are ordinary children of off-screen children.
|
a GimpRuler |
|
the track widget to add |
Since GIMP 2.8
void gimp_ruler_remove_track_widget (GimpRuler *ruler
,GtkWidget *widget
);
Removes a previously added track widget from the ruler. See
gimp_ruler_add_track_widget()
.
|
a GimpRuler |
|
the track widget to remove |
Since GIMP 2.8
"max-size"
property "max-size" gdouble : Read / Write
Maximum size of the ruler.
Default value: 0
"orientation"
property "orientation" GtkOrientation : Read / Write
The orientation of the ruler.
Default value: GTK_ORIENTATION_HORIZONTAL
"position"
property "position" gdouble : Read / Write
Position of mark on the ruler.
Default value: 0
"unit"
property"unit" GimpUnit : Read / Write
Unit of ruler.
Allowed values: [0,65535]
Default value: 0