libgaminggear
|
Horizontal scale with connected spinbutton and clamping. More...
Data Structures | |
struct | _GaminggearHScaleClass |
struct | _GaminggearHScale |
Macros | |
#define | GAMINGGEAR_HSCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GAMINGGEAR_HSCALE_TYPE, GaminggearHScaleClass)) |
#define | IS_GAMINGGEAR_HSCALE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GAMINGGEAR_HSCALE_TYPE)) |
#define | GAMINGGEAR_HSCALE_TYPE (gaminggear_hscale_get_type()) |
#define | GAMINGGEAR_HSCALE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GAMINGGEAR_HSCALE_TYPE, GaminggearHScale)) |
#define | IS_GAMINGGEAR_HSCALE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GAMINGGEAR_HSCALE_TYPE)) |
Typedefs | |
typedef struct _GaminggearHScaleClass | GaminggearHScaleClass |
typedef struct _GaminggearHScale | GaminggearHScale |
typedef struct _GaminggearHScalePrivate | GaminggearHScalePrivate |
Functions | |
GType | gaminggear_hscale_get_type (void) |
GtkWidget * | gaminggear_hscale_new_with_range (gdouble min, gdouble max, gdouble step) |
Creates new hscale. More... | |
gdouble | gaminggear_hscale_get_value (GaminggearHScale *hscale) |
Gets the current value of the scale. More... | |
void | gaminggear_hscale_set_value (GaminggearHScale *hscale, gdouble value) |
Sets current value of scale. More... | |
void | gaminggear_hscale_add_mark (GaminggearHScale *hscale, gdouble value, GtkPositionType position, gchar const *markup) |
Adds a tick mark to the scale. More... | |
void | gaminggear_hscale_clear_marks (GaminggearHScale *hscale) |
Removes all marks from the scale. More... | |
guint | gaminggear_hscale_get_digits (GaminggearHScale *hscale) |
Gets number of decimal places displayed in the spinbutton. More... | |
void | gaminggear_hscale_set_digits (GaminggearHScale *hscale, guint digits) |
Sets number of decimal places displayed in the spinbutton. More... | |
void | gaminggear_hscale_set_range (GaminggearHScale *hscale, gdouble min, gdouble max) |
Sets range of scale. More... | |
void | gaminggear_hscale_set_increment (GaminggearHScale *hscale, gdouble step) |
Sets increment size. More... | |
void | gaminggear_hscale_set_draw_spin (GaminggearHScale *hscale, gboolean draw_spin) |
Sets wether to draw the spinbutton. More... | |
Horizontal scale with connected spinbutton and clamping.
Properties
Signals
#define GAMINGGEAR_HSCALE | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST((obj), GAMINGGEAR_HSCALE_TYPE, GaminggearHScale)) |
#define GAMINGGEAR_HSCALE_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_CAST((klass), GAMINGGEAR_HSCALE_TYPE, GaminggearHScaleClass)) |
#define GAMINGGEAR_HSCALE_TYPE (gaminggear_hscale_get_type()) |
#define IS_GAMINGGEAR_HSCALE | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_TYPE((obj), GAMINGGEAR_HSCALE_TYPE)) |
#define IS_GAMINGGEAR_HSCALE_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_TYPE((klass), GAMINGGEAR_HSCALE_TYPE)) |
typedef struct _GaminggearHScale GaminggearHScale |
typedef struct _GaminggearHScaleClass GaminggearHScaleClass |
typedef struct _GaminggearHScalePrivate GaminggearHScalePrivate |
void gaminggear_hscale_add_mark | ( | GaminggearHScale * | hscale, |
gdouble | value, | ||
GtkPositionType | position, | ||
gchar const * | markup | ||
) |
Adds a tick mark to the scale.
Marks can only be removed in whole by gaminggear_hscale_clear_marks().
hscale | A GaminggearHScale. |
value | Between limits of hscale. |
position | Where to draw the mark. GTK_POS_TOP or GTK_POS_BOTTOM . |
markup | Text for the mark or NULL . |
void gaminggear_hscale_clear_marks | ( | GaminggearHScale * | hscale | ) |
Removes all marks from the scale.
Removes all marks that have been added by gaminggear_hscale_add_mark().
hscale | A GaminggearHScale. |
guint gaminggear_hscale_get_digits | ( | GaminggearHScale * | hscale | ) |
Gets number of decimal places displayed in the spinbutton.
hscale | A GaminggearHScale. |
digits | Actual digits. |
GType gaminggear_hscale_get_type | ( | void | ) |
gdouble gaminggear_hscale_get_value | ( | GaminggearHScale * | hscale | ) |
Gets the current value of the scale.
hscale | A GaminggearHScale. |
value | Actual value. |
GtkWidget* gaminggear_hscale_new_with_range | ( | gdouble | min, |
gdouble | max, | ||
gdouble | step | ||
) |
Creates new hscale.
min | Minimum value. |
max | Maximum value. |
step | Step increment. |
widget | A new GaminggearHScale. |
void gaminggear_hscale_set_digits | ( | GaminggearHScale * | hscale, |
guint | digits | ||
) |
Sets number of decimal places displayed in the spinbutton.
hscale | A GaminggearHScale. |
digits | Number of decimal places. |
void gaminggear_hscale_set_draw_spin | ( | GaminggearHScale * | hscale, |
gboolean | draw_spin | ||
) |
Sets wether to draw the spinbutton.
hscale | A GaminggearHScale. |
draw_spin | TRUE or FALSE . |
void gaminggear_hscale_set_increment | ( | GaminggearHScale * | hscale, |
gdouble | step | ||
) |
Sets increment size.
GaminggearHScale clamps its value to this increment. This means value is always: value = min + x * step
hscale | A GaminggearHScale. |
step | Step increment. |
void gaminggear_hscale_set_range | ( | GaminggearHScale * | hscale, |
gdouble | min, | ||
gdouble | max | ||
) |
Sets range of scale.
hscale | A GaminggearHScale. |
min | Minimum value. |
max | Maximum value. |
void gaminggear_hscale_set_value | ( | GaminggearHScale * | hscale, |
gdouble | value | ||
) |
Sets current value of scale.
The scale emits "value-changed" signal after changing the value.
hscale | A GaminggearHScale. |
value | The new value. |