|  |  |  | GtkDatabox Reference Manual |  | 
|---|---|---|---|---|
| GtkDataboxRulerGtkDataboxRuler — An improved version of the GtkRuler. | 
#include <gtkdatabox_ruler.h> #define GTK_DATABOX_RULER_MAX_MAX_LENGTH GtkDataboxRulerPrivate; GtkDataboxRuler; GtkWidget* gtk_databox_ruler_new (GtkOrientation orientation); void gtk_databox_ruler_set_range (GtkDataboxRuler *ruler, gdouble lower, gdouble upper, gdouble position); void gtk_databox_ruler_set_max_length (GtkDataboxRuler *ruler, guint max_length); void gtk_databox_ruler_set_scale_type (GtkDataboxRuler *ruler, guint scale_type); void gtk_databox_ruler_get_range (GtkDataboxRuler *ruler, gdouble *lower, gdouble *upper, gdouble *position); guint gtk_databox_ruler_get_max_length (GtkDataboxRuler *ruler); GtkDataboxScaleType gtk_databox_ruler_get_scale_type (GtkDataboxRuler *ruler); void gtk_databox_ruler_set_orientation (GtkDataboxRuler *ruler, GtkOrientation orientation); GtkOrientation gtk_databox_ruler_get_orientation (GtkDataboxRuler *ruler);
"lower" gdouble : Read / Write "max-length" guint : Read / Write "orientation" guint : Read / Write / Construct Only "position" gdouble : Read / Write "upper" gdouble : Read / Write
GtkDataboxRuler is a widget for the GTK+ library similar to GtkRuler.
It is improved in several ways:
It supports linear and logarithmic scales.
In the vertical orientation, the labels are rotated 90° (instead of being written as a vertical column of horizontal characters). This increases readability.
It works for very small and very large value ranges.
#define GTK_DATABOX_RULER_MAX_MAX_LENGTH 63
The maximum upper limit of label length in characters
typedef struct _GtkDataboxRulerPrivate GtkDataboxRulerPrivate;
A private data structure used by the GtkDataboxRuler. It shields all internal things from developers who are just using the object.
typedef struct _GtkDataboxRuler GtkDataboxRuler;
An improved version (see above) of GtkRuler which supports linear and logarithmic scales.
GtkWidget* gtk_databox_ruler_new (GtkOrientation orientation);
Creates a new GtkDataboxRuler widget with the given orientation (horizontal or vertical).
| 
 | orientation of the ruler | 
| Returns : | A new GtkDataboxRuler | 
void gtk_databox_ruler_set_range (GtkDataboxRuler *ruler, gdouble lower, gdouble upper, gdouble position);
Sets values indicating the range and current position of a GtkDataboxRuler.
See gtk_databox_ruler_get_range().
| 
 | a GtkDataboxRuler | 
| 
 | lower limit of the ruler | 
| 
 | upper limit of the ruler | 
| 
 | current position of the mark on the ruler | 
void gtk_databox_ruler_set_max_length (GtkDataboxRuler *ruler, guint max_length);
This function sets the maximum number of digits to be used for each tick
label of the ruler.
The max_length cannot be smaller than 2 and not bigger than
GTK_DATABOX_RULER_MAX_MAX_LENGTH.
| 
 | A GtkDataboxRuler widget | 
| 
 | Maximum length (digits) of tick labels | 
void gtk_databox_ruler_set_scale_type (GtkDataboxRuler *ruler, guint scale_type);
This function sets the scale type of the ruler.
| 
 | A GtkDataboxRuler widget | 
| 
 | The new scale type for ruler(linear or logarithmic) | 
void gtk_databox_ruler_get_range (GtkDataboxRuler *ruler, gdouble *lower, gdouble *upper, gdouble *position);
Retrieves values indicating the range and current position of a GtkDataboxRuler.
See gtk_databox_ruler_set_range().
| 
 | a GtkDataboxRuler | 
| 
 | location to store lower limit of the ruler, or NULL | 
| 
 | location to store upper limit of the ruler, or NULL | 
| 
 | location to store the current position of the mark on the ruler, or NULL | 
guint gtk_databox_ruler_get_max_length (GtkDataboxRuler *ruler);
This function returns the maximum number of digits to be used for each tick
label of the ruler.
| 
 | A GtkDataboxRuler widget | 
| Returns : | The maximum length of the tick labels. | 
GtkDataboxScaleType gtk_databox_ruler_get_scale_type (GtkDataboxRuler *ruler);
This function returns the scale type of the ruler (linear or logarithmic).
| 
 | A GtkDataboxRuler widget | 
| Returns : | The scale type (linear or logarithmic) | 
void gtk_databox_ruler_set_orientation (GtkDataboxRuler *ruler, GtkOrientation orientation);
Sets the orientation of the ruler (horizontal or vertical).
| 
 | a GtkDataboxRuler | 
| 
 | new orientation of the ruler | 
GtkOrientation gtk_databox_ruler_get_orientation (GtkDataboxRuler *ruler);
Gets the orientation of the ruler (horizontal or vertical).
| 
 | a GtkDataboxRuler | 
| Returns : | Orientation of the ruler. | 
"max-length" property"max-length" guint : Read / Write
Maximum length of the labels (in digits).
Allowed values: [2,63]
Default value: 6
"orientation" property"orientation" guint : Read / Write / Construct Only
Orientation of the ruler: horizontal or vertical.
Allowed values: <= 1
Default value: 0
"position" property"position" gdouble : Read / Write
Position of mark on the ruler.
Default value: 0