HildonControlbar

HildonControlbar — A widget that allows increasing or decreasing a value within a pre-defined range

Synopsis




GtkWidget*  hildon_controlbar_new           (void);
void        hildon_controlbar_set_value     (HildonControlbar *self,
                                             gint value);
gint        hildon_controlbar_get_value     (HildonControlbar *self);
gint        hildon_controlbar_get_max       (HildonControlbar *self);
gint        hildon_controlbar_get_min       (HildonControlbar *self);
void        hildon_controlbar_set_max       (HildonControlbar *self,
                                             gint max);
void        hildon_controlbar_set_min       (HildonControlbar *self,
                                             gint min);
void        hildon_controlbar_set_range     (HildonControlbar *self,
                                             gint min,
                                             gint max);

Description

HildonControlbar is a horizontally positioned range widget that is visually divided into blocks and supports setting a minimum and maximum value for the range.

Here is an example that creates a control bar and initializes it.

GtkWidget *cbar = hildon_controlbar_new();
hildon_controlbar_set_max( HILDON_CONTROLBAR(cbar), 12 );
hildon_controlbar_set_value( HILDON_CONTROLBAR(cbar), 6 );

Details

hildon_controlbar_new ()

GtkWidget*  hildon_controlbar_new           (void);

Creates a new HildonControlbar widget.

Returns : a GtkWidget pointer of newly created control bar widget

hildon_controlbar_set_value ()

void        hildon_controlbar_set_value     (HildonControlbar *self,
                                             gint value);

Change the current value of the control bar to the specified value.

self : pointer to HildonControlbar
value : value in range of >= 0 && < G_MAX_INT

hildon_controlbar_get_value ()

gint        hildon_controlbar_get_value     (HildonControlbar *self);

self : pointer to HildonControlbar
Returns : current value as gint

hildon_controlbar_get_max ()

gint        hildon_controlbar_get_max       (HildonControlbar *self);

self : a pointer to HildonControlbar
Returns : maximum value of control bar

hildon_controlbar_get_min ()

gint        hildon_controlbar_get_min       (HildonControlbar *self);

self : a pointer to HildonControlbar
Returns : minimum value of controlbar

hildon_controlbar_set_max ()

void        hildon_controlbar_set_max       (HildonControlbar *self,
                                             gint max);

Set the control bar's maximum to the given value.

If the new maximum is smaller than current value, the value will be adjusted so that it equals the new maximum.

self : pointer to HildonControlbar
max : maximum value to set. The value needs to be greater than 0.

hildon_controlbar_set_min ()

void        hildon_controlbar_set_min       (HildonControlbar *self,
                                             gint min);

Set the control bar's minimum to the given value.

If the new minimum is smaller than current value, the value will be adjusted so that it equals the new minimum.

self : pointer to HildonControlbar
min : minimum value to set. The value needs to be greater than or equal to 0.

hildon_controlbar_set_range ()

void        hildon_controlbar_set_range     (HildonControlbar *self,
                                             gint min,
                                             gint max);

Set the controlbars range to the given value

If the new maximum is smaller than current value, the value will be adjusted so that it equals the new maximum.

If the new minimum is smaller than current value, the value will be adjusted so that it equals the new minimum.

self : pointer to HildonControlbar
min : Minimum value to set. The value needs to be greater than or equal to 0.
max : maximum value to set. The value needs to be greater than 0.