package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Progress_Bar_Record, Gtk_Progress_Bar);
package Implements_Gtk_Orientable is new Glib.Types.Implements (Gtk.Orientable.Gtk_Orientable, Gtk_Progress_Bar_Record, Gtk_Progress_Bar);
type Gtk_Progress_Bar_Record is new Gtk_Widget_Record with null record;
type Gtk_Progress_Bar is access all Gtk_Progress_Bar_Record'Class;
Ellipsize_Property : constant Pango.Layout.Property_Pango_Ellipsize_Mode;
Fraction_Property : constant Glib.Properties.Property_Double;
Inverted_Property : constant Glib.Properties.Property_Boolean;
Pulse_Step_Property : constant Glib.Properties.Property_Double;
Show_Text_Property : constant Glib.Properties.Property_Boolean;
Text_Property : constant Glib.Properties.Property_String;
procedure Gtk_New
( | Progress_Bar | : out Gtk_Progress_Bar); |
procedure Initialize
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record'Class); |
function Gtk_Progress_Bar_New return Gtk_Progress_Bar;
function Get_Type return Glib.GType;
function Get_Ellipsize
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record) return Pango.Layout.Pango_Ellipsize_Mode; |
procedure Set_Ellipsize
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record; |
Mode | : Pango.Layout.Pango_Ellipsize_Mode); |
function Get_Fraction
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record) return Gdouble; |
procedure Set_Fraction
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record; |
Fraction | : Gdouble); |
function Get_Inverted
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record) return Boolean; |
procedure Set_Inverted
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record; |
Inverted | : Boolean); |
function Get_Pulse_Step
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record) return Gdouble; |
procedure Set_Pulse_Step
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record; |
Fraction | : Gdouble); |
function Get_Show_Text
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record) return Boolean; |
procedure Set_Show_Text
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record; |
Show_Text | : Boolean); |
function Get_Text
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record) return UTF8_String; |
procedure Set_Text
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record; |
Text | : UTF8_String := ""); |
procedure Pulse
( | Progress_Bar | : not null access Gtk_Progress_Bar_Record); |
function Get_Orientation
( | Self | : not null access Gtk_Progress_Bar_Record) return Gtk.Enums.Gtk_Orientation; |
procedure Set_Orientation
( | Self | : not null access Gtk_Progress_Bar_Record; |
Orientation | : Gtk.Enums.Gtk_Orientation); |
function "+"
( | Widget | : access Gtk_Progress_Bar_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Progress_Bar renames Implements_Gtk_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Progress_Bar_Record'Class) return Gtk.Orientable.Gtk_Orientable renames Implements_Gtk_Orientable.To_Interface; |
function "-"
( | Interf | : Gtk.Orientable.Gtk_Orientable) return Gtk_Progress_Bar renames Implements_Gtk_Orientable.To_Object; |
The Gtk.Progress_Bar.Gtk_Progress_Bar is typically used to display the progress of a long running operation. It provides a visual clue that processing is underway. The Gtk.Progress_Bar.Gtk_Progress_Bar can be used in two different modes: percentage mode and activity mode.
When an application can determine how much work needs to take place (e.g. read a fixed number of bytes from a file) and can monitor its progress, it can use the Gtk.Progress_Bar.Gtk_Progress_Bar in percentage mode and the user sees a growing bar indicating the percentage of the work that has been completed. In this mode, the application is required to call Gtk.Progress_Bar.Set_Fraction periodically to update the progress bar.
When an application has no accurate way of knowing the amount of work to do, it can use the Gtk.Progress_Bar.Gtk_Progress_Bar in activity mode, which shows activity by a block moving back and forth within the progress area. In this mode, the application is required to call Gtk.Progress_Bar.Pulse periodically to update the progress bar.
There is quite a bit of flexibility provided to control the appearance of the Gtk.Progress_Bar.Gtk_Progress_Bar. Functions are provided to control the orientation of the bar, optional text can be displayed along with the bar, and the step size used in activity mode can be set.