[ruby-gnome2-doc-cvs] [Hiki] update - Gtk::ProgressBar

Back to archive index

ruby-****@lists***** ruby-****@lists*****
2003年 4月 28日 (月) 15:11:14 JST


-------------------------
REMOTE_ADDR = 61.204.181.66
REMOTE_HOST = 
-------------------------

-------------------------
= class Gtk::ProgressBar
The Gtk::ProgressBar is typically used to display the progress of a long running operation. It provides a visual clue that processing is underway. The Gtk::ProgressBar 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::ProgressBar 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::ProgressBar#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::ProgressBar 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::ProgressBar#pulse perodically to update the progress bar.

There is quite a bit of flexibility provided to control the appearance of the Gtk::ProgressBar. Methods 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.

== super class
* ((<Gtk::Progress>))

== class methods
--- Gtk::ProgressBar.new
    Creates a new Gtk::ProgressBar.
    * Returns: a Gtk::ProgressBar.  

== public instance methods
--- fraction
    Returns the current fraction of the task that's been completed.
    * Returns: a fraction from 0.0 to 1.0 
--- fraction=(fraction)
    Causes the progress bar to "fill in" the given fraction of the bar. The fraction should be between 0.0 and 1.0, inclusive.
    * fraction: fraction of the task that's been completed 
    * returns: fraction
--- set_fraction(fraction)
    Same as fraction=.
    * fraction: fraction of the task that's been completed 
    * returns: self

--- orientation
    Retrieves the current progress bar orientation.
    * Returns: orientation of the progress bar 
--- orientation=(orientation)
    Causes the progress bar to switch to a different orientation (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
    * orientation: orientation of the progress bar(((<GtkProgressBarOrientation|Gtk::ProgressBar#GtkProgressBarOrientation>)))
    * Returns: orientation
--- set_orientation(orientation)
    Same as orientation=.
    * orientation: orientation of the progress bar(((<GtkProgressBarOrientation|Gtk::ProgressBar#GtkProgressBarOrientation>)))
    * Returns: orientation

--- pulse
    Indicates 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 Gtk::ProgressBar#pulse() causes the block to move by a little bit (the amount of movement per pulse is determined by Gtk::ProgressBar#pulse_step=).
    * Returns: self

--- pulse_step
    Retrieves the pulse step set with Gtk::ProgressBar#pulse_step=.
    * Returns: a fraction from 0.0 to 1.0 

--- pulse_step=(fraction)
    Sets the fraction of total progress bar length to move the bouncing block for each call to Gtk::ProgressBar#pulse.
    * fraction : fraction between 0.0 and 1.0 
    * Returns: fraction
--- set_pulse_step(fraction)
    Same as pulse_step=.
    * fraction : fraction between 0.0 and 1.0 
    * Returns: self

--- text
    Returns the current text to appear superimosed on the progress bar.
    * Returns: text
--- text=(text)
    Causes the given text to appear superimposed on the progress bar.
    * text : a UTF-8 string 
    * Returns: text
--- set_text(text)
    Same as text=.
    * text : a UTF-8 string 
    * Returns: self

== constants
=== GtkProgressBarOrientation
--- LEFT_TO_RIGHT
    A horizontal progress bar growing from left to right. 
--- RIGHT_TO_LEFT
    A horizontal progress bar growing from right to left. 
--- BOTTOM_TO_TOP
    A vertical progress bar growing from bottom to top. 
--- TOP_TO_BOTTOM
    A vertical progress bar growing from top to bottom. 


((<Masao>))




ruby-gnome2-cvs メーリングリストの案内
Back to archive index