gntprogressbar.h File Reference
GNT (GLib Ncurses Toolkit)
`#include "gnt.h"`
`#include "gntwidget.h"`

Go to the source code of this file.

## Data Structures

struct | _GntProgressBarClass

## Macros

#define | GNT_TYPE_PROGRESS_BAR (gnt_progress_bar_get_type ())
#define | GNT_PROGRESS_BAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBar))
#define | GNT_PROGRESS_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))
#define | GNT_IS_PROGRESS_BAR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNT_TYPE_PROGRESS_BAR))
#define | GNT_IS_PROGRESS_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNT_TYPE_PROGRESS_BAR))
#define | GNT_PROGRESS_BAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNT_TYPE_PROGRESS_BAR, GntProgressBarClass))

## Typedefs

typedef enum _GntProgressBarOrientation | GntProgressBarOrientation
typedef struct _GntProgressBar | GntProgressBar
typedef struct _GntProgressBarClass | GntProgressBarClass

## Enumerations

enum | _GntProgressBarOrientation { GNT_PROGRESS_LEFT_TO_RIGHT, GNT_PROGRESS_RIGHT_TO_LEFT, GNT_PROGRESS_BOTTOM_TO_TOP, GNT_PROGRESS_TOP_TO_BOTTOM }

## Functions

G_BEGIN_DECLS GType | gnt_progress_bar_get_type (void)
| Get the GType for GntProgressBar. More...
GntWidget * | gnt_progress_bar_new (void)
| Create a new GntProgressBar. More...
void | gnt_progress_bar_set_fraction (GntProgressBar *pbar, gdouble fraction)
| Set the progress for a progress bar. More...
void | gnt_progress_bar_set_orientation (GntProgressBar *pbar, GntProgressBarOrientation orientation)
| Set the orientation for a progress bar. More...
void | gnt_progress_bar_set_show_progress (GntProgressBar *pbar, gboolean show)
| Controls whether the progress value is shown. More...
gdouble | gnt_progress_bar_get_fraction (GntProgressBar *pbar)
| Get the progress that is displayed. More...
GntProgressBarOrientation | gnt_progress_bar_get_orientation (GntProgressBar *pbar)
| Get the orientation for the progress bar. More...
gboolean | gnt_progress_bar_get_show_progress (GntProgressBar *pbar)
| Get a boolean describing if the progress value is shown. More...

## Detailed Description

Progress Bar API

Definition in file gntprogressbar.h.

## Function Documentation

## gnt_progress_bar_get_fraction()

gdouble gnt_progress_bar_get_fraction | ( | GntProgressBar * | pbar | ) |

Get the progress that is displayed.

Parameters

  pbar | The GntProgressBar

Returns
  The progress displayed as a value between 0 and 1

## gnt_progress_bar_get_orientation()

GntProgressBarOrientation gnt_progress_bar_get_orientation | ( | GntProgressBar * | pbar | ) |

Get the orientation for the progress bar.

Parameters

  pbar | The GntProgressBar

Returns
  The current orientation of the progress bar

## gnt_progress_bar_get_show_progress()

gboolean gnt_progress_bar_get_show_progress | ( | GntProgressBar * | pbar | ) |

Get a boolean describing if the progress value is shown.

Parameters

  pbar | The GntProgressBar

Returns
  A boolean `true` if the progress value is shown, `false` otherwise.

## gnt_progress_bar_get_type()

G_BEGIN_DECLS GType gnt_progress_bar_get_type | ( | void |  | ) |

Get the GType for GntProgressBar.

Returns
  The GType for GntProrgressBar

## gnt_progress_bar_new()

GntWidget* gnt_progress_bar_new | ( | void |  | ) |

Create a new GntProgressBar.

Returns
  The new GntProgressBar

## gnt_progress_bar_set_fraction()

void gnt_progress_bar_set_fraction | ( | GntProgressBar * | pbar,
|  | gdouble | fraction
| ) |  |

Set the progress for a progress bar.

Parameters

  pbar | The GntProgressBar
  fraction | The value between 0 and 1 to display

## gnt_progress_bar_set_orientation()

void gnt_progress_bar_set_orientation | ( | GntProgressBar * | pbar,
|  | GntProgressBarOrientation | orientation
| ) |  |

Set the orientation for a progress bar.

Parameters

  pbar | The GntProgressBar
  orientation | The orientation to use

## gnt_progress_bar_set_show_progress()

void gnt_progress_bar_set_show_progress | ( | GntProgressBar * | pbar,
|  | gboolean | show
| ) |  |

Controls whether the progress value is shown.

Parameters

  pbar | The GntProgressBar
  show | A boolean indicating if the value is shown