Data Structures | Macros | Typedefs | Functions
gntslider.h File Reference
GNT (GLib Ncurses Toolkit)

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)
GntWidget * | gnt_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

## ◆ 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.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_slider_get_gtype()

G_BEGIN_DECLS GType gnt_slider_get_gtype | ( | void |  | ) |

Returns
  The GType for GntSlider

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_slider_get_value()

int gnt_slider_get_value | ( | GntSlider * | slider | ) |

Get the current value for the slider.

Parameters

  slider | The slider

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ 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.0.0 (gnt), 2.1.0 (pidgin)

## ◆ 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.0.0 (gnt), 2.1.0 (pidgin)

## ◆ 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_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.0.0 (gnt), 2.1.0 (pidgin)

## ◆ 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_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.0.0 (gnt), 2.1.0 (pidgin)

## ◆ 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.0.0 (gnt), 2.1.0 (pidgin)