GntSlider

GntSlider — A widget for selecting from a range of values

Functions

Types and Values

Description

Functions

GNT_SLIDER_FLAGS()

#define GNT_SLIDER_FLAGS(obj)                (GNT_SLIDER(obj)->priv.flags)

GNT_SLIDER_FLAGS has been deprecated since version 2.14.0 and should not be used in newly-written code.

This is an internal implementation detail.


GNT_SLIDER_SET_FLAGS()

#define GNT_SLIDER_SET_FLAGS(obj, flags)     (GNT_SLIDER_FLAGS(obj) |= flags)

GNT_SLIDER_SET_FLAGS has been deprecated since version 2.14.0 and should not be used in newly-written code.

This is an internal implementation detail.


GNT_SLIDER_UNSET_FLAGS()

#define GNT_SLIDER_UNSET_FLAGS(obj, flags)   (GNT_SLIDER_FLAGS(obj) &= ~(flags))

GNT_SLIDER_UNSET_FLAGS has been deprecated since version 2.14.0 and should not be used in newly-written code.

This is an internal implementation detail.


gnt_slider_get_gtype ()

GType
gnt_slider_get_gtype (void);

Returns

The GType for GntSlider

Since: 2.1.0


gnt_hslider_new()

#define gnt_hslider_new(max, min) gnt_slider_new(FALSE, max, min)

gnt_vslider_new()

#define gnt_vslider_new(max, min) gnt_slider_new(TRUE, max, min)

gnt_slider_new ()

GntWidget *
gnt_slider_new (gboolean orient,
                int max,
                int min);

Create a new slider.

Parameters

orient

A vertical slider is created if TRUE, otherwise the slider is horizontal.

 

max

The maximum value for the slider

 

min

The minimum value for the slider

 

Returns

The newly created slider

Since: 2.1.0


gnt_slider_get_vertical ()

gboolean
gnt_slider_get_vertical (GntSlider *slider);

Get whether the slider is vertical or not.

Parameters

slider

The slider

 

Returns

Whether the slider is vertical.

Since: 2.14.0


gnt_slider_set_range ()

void
gnt_slider_set_range (GntSlider *slider,
                      int max,
                      int min);

Set the range of the slider.

Parameters

slider

The slider

 

max

The maximum value

 

min

The minimum value

 

Since: 2.1.0


gnt_slider_get_range ()

void
gnt_slider_get_range (GntSlider *slider,
                      int *max,
                      int *min);

Get the range of the slider.

Parameters

slider

The slider

 

max

The maximum value.

[out]

min

The minimum value.

[out]

Since: 2.14.0


gnt_slider_set_step ()

void
gnt_slider_set_step (GntSlider *slider,
                     int step);

Sets the amount of change at each step.

Parameters

slider

The slider

 

step

The amount for each step

 

Since: 2.1.0


gnt_slider_get_step ()

int
gnt_slider_get_step (GntSlider *slider);

Gets the amount of change at each step.

Parameters

slider

The slider

 

Returns

The amount for each step

Since: 2.14.0


gnt_slider_set_small_step ()

void
gnt_slider_set_small_step (GntSlider *slider,
                           int step);

Sets the amount of change a small step.

Parameters

slider

The slider

 

step

The amount for a small step (for the slider)

 

Since: 2.2.0


gnt_slider_get_small_step ()

int
gnt_slider_get_small_step (GntSlider *slider);

Gets the amount of change for a small step.

Parameters

slider

The slider

 

Returns

The amount for a small step (of the slider)

Since: 2.14.0


gnt_slider_set_large_step ()

void
gnt_slider_set_large_step (GntSlider *slider,
                           int step);

Sets the amount of change a large step.

Parameters

slider

The slider

 

step

The amount for a large step (for the slider)

 

Since: 2.2.0


gnt_slider_get_large_step ()

int
gnt_slider_get_large_step (GntSlider *slider);

Gets the amount of change for a large step.

Parameters

slider

The slider

 

Returns

The amount for a large step (of the slider)

Since: 2.14.0


gnt_slider_advance_step ()

int
gnt_slider_advance_step (GntSlider *slider,
                         int steps);

Advance the slider forward or backward.

Parameters

slider

The slider

 

steps

The number of amounts to change, positive to change forward, negative to change backward

 

Returns

The value of the slider after the change

Since: 2.1.0


gnt_slider_set_value ()

void
gnt_slider_set_value (GntSlider *slider,
                      int value);

Set the current value for the slider.

Parameters

slider

The slider

 

value

The current value

 

Since: 2.1.0


gnt_slider_get_value ()

int
gnt_slider_get_value (GntSlider *slider);

Get the current value for the slider.

Parameters

slider

The slider

 

Since: 2.1.0


gnt_slider_reflect_label ()

void
gnt_slider_reflect_label (GntSlider *slider,
                          GntLabel *label);

Update a label with the value of the slider whenever the value changes.

Parameters

slider

The slider

 

label

The label to update

 

Since: 2.1.0

Types and Values

struct GntSlider

struct GntSlider {
	GntWidget parent;

	gboolean GNTSEAL(vertical);

	int GNTSEAL(max);        /* maximum value */
	int GNTSEAL(min);        /* minimum value */
	int GNTSEAL(step);       /* amount to change at each step */
	int GNTSEAL(current);    /* current value */
	int GNTSEAL(smallstep);
	int GNTSEAL(largestep);
};

Access to any fields is deprecated. See inline comments for replacements.

Since: 2.1.0


GntSliderPriv

typedef struct _GntSliderPriv GntSliderPriv;

GntSliderPriv has been deprecated since version 2.14.0 and should not be used in newly-written code.

This is an internal implementation detail.