Gtk-- Reference: Gtk::Progress

Class Index | Cross Index | Namespace Index

# Class Gtk::Progress

The base class for `Gtk::ProgressBar`.
Contained in: Gtk
Derived from: Gtk::Widget
Derived by: Gtk::ProgressBar

#include <gtk--/progress.h>

### public function member index:
``signal` `void`` | `act_mode_enter` | `()`;
``void`` | `configure` | `(`gfloat` `value`, `gfloat` `min`, `gfloat` `max`)`;
``Adjustment`*` | `get_adjustment` | `() `const``;
``gfloat`` | `get_current_percentage` | `() `const``;
``string`` | `get_current_text` | `() `const``;
``gfloat`` | `get_percentage_from_value` | `(`gfloat` `value`) `const``;
``string`` | `get_text_from_value` | `(`gfloat` `value`) `const``;
``gfloat`` | `get_value` | `() `const``;
``GtkProgress`*` | `gtkobj` | `()`;
``const` `GtkProgress`*` | `gtkobj` | `() `const``;
``static` `bool`` | `isA` | `(`Object`* `object`)`;
``signal` `void`` | `paint` | `()`;
``void`` | `set_activity_mode` | `(`bool` `activity_mode`)`;
``void`` | `set_adjustment` | `(`Adjustment`& `adjustment`)`;
``void`` | `set_adjustment` | `(`Adjustment`* `adjustment`=0)`;
``void`` | `set_format_string` | `(`const` `string`& `format`)`;
``void`` | `set_percentage` | `(`gfloat` `percentage`)`;
``void`` | `set_show_text` | `(`bool` `show_text`)`;
``void`` | `set_text_alignment` | `(`gfloat` `x_align`, `gfloat` `y_align`)`;
``void`` | `set_value` | `(`gfloat` `value`)`;
``signal` `void`` | `update` | `()`;
``virtual`` | `~Progress` | `()`;
### protected function member index:
``virtual` `void`` | `act_mode_enter_impl` | `()`;
``virtual` `void`` | `paint_impl` | `()`;
``virtual` `void`` | `update_impl` | `()`;

## Description:

A `Gtk::Progress` is the abstract base class used to derive a `Gtk::ProgressBar` which provides a visual representation of the progress of a long running operation.

## Function Member Descriptions:

Gtk::Progress::configure - Allows the configuration of the minimum, maximum, and current values for the `Gtk::Progress`.

``void`` `configure``(`gfloat` `value`, `gfloat` `min`, `gfloat` `max`)`;

> value: The current progress value.

> min: The minimum progress value.

> max: The maximum progress value.

Gtk::Progress::get_current_percentage - Returns the current progress as a percentage.

``gfloat`` `get_current_percentage``() `const``;

> Returns: A number between 0.0 and 1.0 indicating the percentage complete.

Gtk::Progress::get_current_text - Returns the current text associated with the `Gtk::Progress`.

``string`` `get_current_text``() `const``;

> This text is the based on the underlying format string after any substitutions are made.

> Returns: The text indicating the current progress.

Gtk::Progress::get_percentage_from_value - Returns the progress as a percentage calculated from the supplied absolute progress value.

``gfloat`` `get_percentage_from_value``(`gfloat` `value`) `const``;

> value: An absolute progress value.

> Returns: a number between 0.0 and 1.0 indicating the percentage complete represented by value.

Gtk::Progress::get_text_from_value - Returns the text indicating the progress based on the supplied value.

``string`` `get_text_from_value``(`gfloat` `value`) `const``;

> The current value for the `Gtk::Progress` remains unchanged.

> value: An absolute progress value to use when formatting the progress text.

> Returns: A string indicating the progress.

Gtk::Progress::get_value - Returns the current progress complete value.

``gfloat`` `get_value``() `const``;

> Returns: The current progress complete value.

Gtk::Progress::gtkobj - Returns the underlaying gtk+ object.

``GtkProgress`*` `gtkobj``()`;
Gtk::Progress::isA - Returns true if object is this type.

``static` `bool`` `isA``(`Object`* `object`)`;
Gtk::Progress::set_activity_mode - A `Gtk::Progress` can be in one of two different modes: percentage

``void`` `set_activity_mode``(`bool` `activity_mode`)`;

> mode (the default) and activity mode. In activity mode, the progress is simply indicated as activity rather than as a percentage complete.

> activity_mode: A boolean, TRUE for activity mode.

Gtk::Progress::set_adjustment - Associates a `Gtk::Adjustment` with the `Gtk::Progress`.

``void`` `set_adjustment``(`Adjustment`& `adjustment`)`;

> A `Gtk::Adjustment` is used to represent the upper and lower bounds and the step interval of the underlying value for which progress is shown.

> adjustment: The `Gtk::Adjustment` to be associated with the `Gtk::Progress`.

Gtk::Progress::set_format_string - Sets a format string used to display text indicating the current progress.

``void`` `set_format_string``(`const` `string`& `format`)`;

> format: A string used to display progress text. The string can contain the following substitution characters:

> %v - the current progress value.

> %l - the lower bound for the progress value.

> %u - the upper bound for the progress value.

> %p - the current progress percentage.

Gtk::Progress::set_percentage - Sets the current percentage completion for the `Gtk::Progress`.

``void`` `set_percentage``(`gfloat` `percentage`)`;

> percentage: The percentage complete which must be between 0.0 and 1.0.

Gtk::Progress::set_show_text - Controls whether progress text is shown.

``void`` `set_show_text``(`bool` `show_text`)`;

> show_text: A boolean indicating whether the progress text is shown.

Gtk::Progress::set_text_alignment - Controls the alignment of the text within the progress bar area.

``void`` `set_text_alignment``(`gfloat` `x_align`, `gfloat` `y_align`)`;

> x_align: A number between 0.0 and 1.0 indicating the horizontal alignment of the progress text within the `Gtk::Progress`.

> y_align: A number between 0.0 and 1.0 indicating the vertical alignment of the progress text within the `Gtk::Progress`.

Gtk::Progress::set_value - Sets the value within the `Gtk::Progress` to an absolute value.

``void`` `set_value``(`gfloat` `value`)`;

> The value must be within the valid range of values for the underlying `Gtk::Adjustment`.

> value: The value indicating the current completed amount.