HildonControlbar

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

Synopsis




            HildonControlbar;
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);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkRange
                           +----GtkScale
                                 +----HildonControlbar

Implemented Interfaces

HildonControlbar implements GtkBuildable and AtkImplementorIface.

Properties


  "max"                  gint                  : Read / Write
  "min"                  gint                  : Read / Write
  "value"                gint                  : Read / Write

Style Properties


  "inner-border-width"   guint                 : Read

Signals


"end-reached"
            void        user_function      (HildonControlbar *hildoncontrolbar,
                                            gboolean          arg1,
                                            gpointer          user_data)             : Run first

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.

Example 4. HildonControlbar example

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


Details

HildonControlbar

typedef struct _HildonControlbar HildonControlbar;


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);

Set 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.

Property Details

The "max" property

  "max"                  gint                  : Read / Write

Controlbar maximum value.

Default value: 10


The "min" property

  "min"                  gint                  : Read / Write

Controlbar minimum value.

Default value: 0


The "value" property

  "value"                gint                  : Read / Write

Controlbar current value.

Default value: 0

Style Property Details

The "inner-border-width" style property

  "inner-border-width"   guint                 : Read

The border spacing between the controlbar border and controlbar blocks.

Allowed values: <= G_MAXINT

Default value: 2

Signal Details

The "end-reached" signal

void        user_function                  (HildonControlbar *hildoncontrolbar,
                                            gboolean          arg1,
                                            gpointer          user_data)             : Run first

hildoncontrolbar : the object which received the signal.
arg1 :
user_data : user data set when the signal handler was connected.