Data Structures | Macros | Typedefs | Functions
gntslider.h File Reference

Slider API. More...

#include "gntwidget.h"
#include "gnt.h"
#include "gntlabel.h"

Go to the source code of this file.

Data Structures

struct  _GntSlider
 
struct  _GntSliderClass
 

Macros

#define GNT_TYPE_SLIDER   (gnt_slider_get_gtype())
 
#define GNT_SLIDER(obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_SLIDER, GntSlider))
 
#define GNT_SLIDER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_SLIDER, GntSliderClass))
 
#define GNT_IS_SLIDER(obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_SLIDER))
 
#define GNT_IS_SLIDER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_SLIDER))
 
#define GNT_SLIDER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_SLIDER, GntSliderClass))
 
#define GNT_SLIDER_FLAGS(obj)    (GNT_SLIDER(obj)->priv.flags)
 
#define GNT_SLIDER_SET_FLAGS(obj, flags)    (GNT_SLIDER_FLAGS(obj) |= flags)
 
#define GNT_SLIDER_UNSET_FLAGS(obj, flags)    (GNT_SLIDER_FLAGS(obj) &= ~(flags))
 
#define gnt_hslider_new(max, min)   gnt_slider_new(FALSE, max, min)
 
#define gnt_vslider_new(max, min)   gnt_slider_new(TRUE, max, min)
 

Typedefs

typedef struct _GntSlider GntSlider
 
typedef struct _GntSliderPriv GntSliderPriv
 
typedef struct _GntSliderClass GntSliderClass
 

Functions

G_BEGIN_DECLS GType gnt_slider_get_gtype (void)
 
GntWidgetgnt_slider_new (gboolean orient, int max, int min)
 Create a new slider. More...
 
void gnt_slider_set_range (GntSlider *slider, int max, int min)
 Set the range of the slider. More...
 
void gnt_slider_set_step (GntSlider *slider, int step)
 Sets the amount of change at each step. More...
 
void gnt_slider_set_small_step (GntSlider *slider, int step)
 Sets the amount of change a small step. More...
 
void gnt_slider_set_large_step (GntSlider *slider, int step)
 Sets the amount of change a large step. More...
 
int gnt_slider_advance_step (GntSlider *slider, int steps)
 Advance the slider forward or backward. More...
 
void gnt_slider_set_value (GntSlider *slider, int value)
 Set the current value for the slider. More...
 
int gnt_slider_get_value (GntSlider *slider)
 Get the current value for the slider. More...
 
void gnt_slider_reflect_label (GntSlider *slider, GntLabel *label)
 Update a label with the value of the slider whenever the value changes. More...
 

Detailed Description

Slider API.

Definition in file gntslider.h.

Function Documentation

int gnt_slider_advance_step ( GntSlider slider,
int  steps 
)

Advance the slider forward or backward.

Parameters
sliderThe slider
stepsThe number of amounts to change, positive to change forward, negative to change backward
Returns
The value of the slider after the change
Since
2.0.0 (gnt), 2.1.0 (pidgin)
G_BEGIN_DECLS GType gnt_slider_get_gtype ( void  )
Returns
The GType for GntSlider
Since
2.0.0 (gnt), 2.1.0 (pidgin)
int gnt_slider_get_value ( GntSlider slider)

Get the current value for the slider.

Parameters
sliderThe slider
Since
2.0.0 (gnt), 2.1.0 (pidgin)
GntWidget* gnt_slider_new ( gboolean  orient,
int  max,
int  min 
)

Create a new slider.

Parameters
orientA vertical slider is created if TRUE, otherwise the slider is horizontal.
maxThe maximum value for the slider
minThe minimum value for the slider
Returns
The newly created slider
Since
2.0.0 (gnt), 2.1.0 (pidgin)
void gnt_slider_reflect_label ( GntSlider slider,
GntLabel label 
)

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

Parameters
sliderThe slider
labelThe label to update
Since
2.0.0 (gnt), 2.1.0 (pidgin)
void gnt_slider_set_large_step ( GntSlider slider,
int  step 
)

Sets the amount of change a large step.

Parameters
sliderThe slider
stepThe amount for a large step (for the slider)
Since
2.2.0
void gnt_slider_set_range ( GntSlider slider,
int  max,
int  min 
)

Set the range of the slider.

Parameters
sliderThe slider
maxThe maximum value
minThe minimum value
Since
2.0.0 (gnt), 2.1.0 (pidgin)
void gnt_slider_set_small_step ( GntSlider slider,
int  step 
)

Sets the amount of change a small step.

Parameters
sliderThe slider
stepThe amount for a small step (for the slider)
Since
2.2.0
void gnt_slider_set_step ( GntSlider slider,
int  step 
)

Sets the amount of change at each step.

Parameters
sliderThe slider
stepThe amount for each step
Since
2.0.0 (gnt), 2.1.0 (pidgin)
void gnt_slider_set_value ( GntSlider slider,
int  value 
)

Set the current value for the slider.

Parameters
sliderThe slider
valueThe current value
Since
2.0.0 (gnt), 2.1.0 (pidgin)