[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]  


Package Gtk.Progress_Bar

The progress bar provides a convenient way of displaying a state of completion for typically lengthy tasks.

Widget Hierarchy

GObject                       (see section Package Glib.Object)
Gtk_Object                    (see section Package Gtk.Object)
   \___ Gtk_Widget            (see section Package Gtk.Widget)
      \___ Gtk_Progress       (see section Package Gtk.Progress)
         \___ Gtk_Progress_Bar (see section Package Gtk.Progress_Bar)

Types

type Gtk_Progress_Bar_Orientation is 
    (Progress_Left_To_Right,
     Progress_Right_To_Left, 
     Progress_Bottom_To_Top, 
     Progress_Top_To_Bottom); 




Subprograms

procedure Gtk_New              
  (Progress_Bar       : out    Gtk_Progress_Bar);

Create a new progress bar.


function Get_Type              return Gtk.Gtk_Type;

Return the internal value associated with a Gtk_Progress_Bar.


procedure Pulse                
  (Progress_Bar       : access Gtk_Progress_Bar_Record);

Indicate that some progress is made, but you don't know how much.
Causes the progress bar to enter "activity mode," where a block bounces back and forth. Each call to Pulse causes the block to move by a little bit (the amount of movement per pulse is determined by Set_Pulse_Step).


procedure Set_Text             
  (Progress_Bar       : access Gtk_Progress_Bar_Record;
   Text               :        UTF8_String);

Causes the given Text to appear superimposed on the progress bar.
Text: a UTF-8 string.


procedure Set_Fraction         
  (Progress_Bar       : access Gtk_Progress_Bar_Record;
   Fraction           :        Gdouble);

Cause the progress bar to "fill in" the given fraction of the bar.
The fraction should be between 0.0 and 1.0, inclusive.


procedure Set_Pulse_Step       
  (Progress_Bar       : access Gtk_Progress_Bar_Record;
   Step               :        Gdouble);

Set the fraction of total progress bar length to move the
bouncing block for each call to Pulse.


procedure Set_Orientation      
  (Progress_Bar       : access Gtk_Progress_Bar_Record;
   Orientation        :        Gtk_Progress_Bar_Orientation);

Cause the progress bar to switch to a different orientation
(left-to-right, right-to-left, top-to-bottom, or bottom-to-top).


function Get_Text              
  (Progress_Bar       : access Gtk_Progress_Bar_Record)
   return UTF8_String;

Retrieve the text displayed superimposed on the progress bar.


function Get_Fraction          
  (Progress_Bar       : access Gtk_Progress_Bar_Record)
   return Gdouble;

Return the current fraction of the task that's been completed.


function Get_Pulse_Step        
  (Progress_Bar       : access Gtk_Progress_Bar_Record)
   return Gdouble;

Return the pulse step set with Set_Pulse_Step.


function Get_Orientation       
  (Progress_Bar       : access Gtk_Progress_Bar_Record)
   return Gtk_Progress_Bar_Orientation;

Return the current progress bar orientation.



[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]