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 AtkImplementorIface and GtkBuildable.

Properties

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

Style Properties

  "inner-border-width"       guint                 : Read

Signals

  "end-reached"                                    : 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.

Note

HildonControlbar has been deprecated since Hildon 2.2 See Migrating Control Bars section to know how to migrate this deprecated widget.

Example 17. 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;

Warning

HildonControlbar is deprecated and should not be used in newly-written code.


hildon_controlbar_new ()

GtkWidget*          hildon_controlbar_new               (void);

Warning

hildon_controlbar_new is deprecated and should not be used in newly-written code.

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

Warning

hildon_controlbar_set_value is deprecated and should not be used in newly-written code.

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

Warning

hildon_controlbar_get_value is deprecated and should not be used in newly-written code.

self : pointer to HildonControlbar
Returns : current value as gint

hildon_controlbar_get_max ()

gint                hildon_controlbar_get_max           (HildonControlbar *self);

Warning

hildon_controlbar_get_max is deprecated and should not be used in newly-written code.

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

hildon_controlbar_get_min ()

gint                hildon_controlbar_get_min           (HildonControlbar *self);

Warning

hildon_controlbar_get_min is deprecated and should not be used in newly-written code.

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

hildon_controlbar_set_max ()

void                hildon_controlbar_set_max           (HildonControlbar *self,
                                                         gint max);

Warning

hildon_controlbar_set_max is deprecated and should not be used in newly-written code.

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

Warning

hildon_controlbar_set_min is deprecated and should not be used in newly-written code.

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

Warning

hildon_controlbar_set_range is deprecated and should not be used in newly-written code.

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: 0

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.