GtkProgressBar |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data Structures | |
| struct | _GtkProgress |
| GtkProgress stucture. More... | |
| struct | _GtkProgressClass |
| GtkProgress class stucture. More... | |
| struct | _GtkProgressBar |
| GtkProgressBar instance stucture. More... | |
| struct | _GtkProgressBarClass |
| GtkProgressBar instance Class structure. More... | |
Enumerations | |
| enum | GtkProgressBarStyle |
| GtkProgressBar mode. More... | |
| enum | GtkProgressBarOrientation |
| GtkProgressBar direction. More... | |
Functions | |
| GType | gtk_progress_bar_get_type (void) G_GNUC_CONST |
| This Fuction returns GType. | |
| GtkWidget * | gtk_progress_bar_new (void) |
| Creates a new GtkProgressBar. | |
| void | gtk_progress_bar_pulse (GtkProgressBar *pbar) |
| GtkProgress/GtkProgressBar had serious problems in GTK 1.2. | |
| void | gtk_progress_bar_set_text (GtkProgressBar *pbar, const gchar *text) |
| Causes the given text to appear superimposed on the progress bar. | |
| void | gtk_progress_bar_set_fraction (GtkProgressBar *pbar, gdouble fraction) |
| Causes the progress bar to "fill in" the given fraction of the bar. | |
| void | gtk_progress_bar_set_pulse_step (GtkProgressBar *pbar, gdouble fraction) |
| Sets the fraction of total progress bar length to move the bouncing block for each call to gtk_progress_bar_pulse(). | |
| void | gtk_progress_bar_set_orientation (GtkProgressBar *pbar, GtkProgressBarOrientation orientation) |
| Causes the progress bar to switch to a different orientation (left-to-right, right-to-left, top-to-bottom, or bottom-to-top). | |
| G_CONST_RETURN gchar * | gtk_progress_bar_get_text (GtkProgressBar *pbar) |
| Retrieves the text displayed superimposed on the progress bar, if any, otherwise NULL. | |
| gdouble | gtk_progress_bar_get_fraction (GtkProgressBar *pbar) |
| Returns the current fraction of the task that's been completed. | |
| gdouble | gtk_progress_bar_get_pulse_step (GtkProgressBar *pbar) |
| Retrieves the pulse step set with gtk_progress_bar_set_pulse_step(). | |
| GtkProgressBarOrientation | gtk_progress_bar_get_orientation (GtkProgressBar *pbar) |
| Retrieves the current progress bar orientation. | |
| void | gtk_progress_bar_set_ellipsize (GtkProgressBar *pbar, PangoEllipsizeMode mode) |
| Sets the mode used to ellipsize (add an ellipsis: "...") the text if there is not enough space to render the entire string. | |
| PangoEllipsizeMode | gtk_progress_bar_get_ellipsize (GtkProgressBar *pbar) |
| Returns the ellipsizing position of the progressbar. | |
GtkProgressBar direction.
| enum GtkProgressBarStyle |
GtkProgressBar mode.
| PangoEllipsizeMode gtk_progress_bar_get_ellipsize | ( | GtkProgressBar * | pbar | ) |
Returns the ellipsizing position of the progressbar.
See gtk_progress_bar_set_ellipsize().
| pbar | [in] a GtkProgressBar |
| gdouble gtk_progress_bar_get_fraction | ( | GtkProgressBar * | pbar | ) |
Returns the current fraction of the task that's been completed.
| pbar | [in] a GtkProgressBar |
| GtkProgressBarOrientation gtk_progress_bar_get_orientation | ( | GtkProgressBar * | pbar | ) |
Retrieves the current progress bar orientation.
| pbar | [in] a GtkProgressBar |
| gdouble gtk_progress_bar_get_pulse_step | ( | GtkProgressBar * | pbar | ) |
Retrieves the pulse step set with gtk_progress_bar_set_pulse_step().
| pbar | [in] a GtkProgressBar |
| G_CONST_RETURN gchar* gtk_progress_bar_get_text | ( | GtkProgressBar * | pbar | ) |
Retrieves the text displayed superimposed on the progress bar, if any, otherwise NULL.
The return value is a reference to the text, not a copy of it, so will become invalid if you change the text in the progress bar.
| pbar | [in] a GtkProgressBar |
| GType gtk_progress_bar_get_type | ( | void | ) |
This Fuction returns GType.
| GtkWidget* gtk_progress_bar_new | ( | void | ) |
Creates a new GtkProgressBar.
| void gtk_progress_bar_pulse | ( | GtkProgressBar * | pbar | ) |
GtkProgress/GtkProgressBar had serious problems in GTK 1.2.
This was a big wart on GTK and made people waste lots of time, both learning and using the interface.
So, I have added what I feel is the correct API, and marked all the rest deprecated. However, the changes are 100% backward-compatible and should break no existing code.
The following 9 functions are the new programming interface. 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_progress_bar_pulse() causes the block to move by a little bit (the amount of movement per pulse is determined by gtk_progress_bar_set_pulse_step()).
| pbar | [in] a GtkProgressBar |
| void gtk_progress_bar_set_ellipsize | ( | GtkProgressBar * | pbar, | |
| PangoEllipsizeMode | mode | |||
| ) |
Sets the mode used to ellipsize (add an ellipsis: "...") the text if there is not enough space to render the entire string.
| pbar | [in] a GtkProgressBar | |
| mode | [in] a PangoEllipsizeMode |
| void gtk_progress_bar_set_fraction | ( | GtkProgressBar * | pbar, | |
| gdouble | fraction | |||
| ) |
Causes the progress bar to "fill in" the given fraction of the bar.
| pbar | [in] a GtkProgressBar | |
| fraction | [in] fraction of the task that's been completed. fraction should be between 0.0 and 1.0, inclusive. |
| void gtk_progress_bar_set_orientation | ( | GtkProgressBar * | pbar, | |
| GtkProgressBarOrientation | orientation | |||
| ) |
Causes the progress bar to switch to a different orientation (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
| pbar | [in] a GtkProgressBar | |
| orientation | [in] orientation of the progress bar |
| void gtk_progress_bar_set_pulse_step | ( | GtkProgressBar * | pbar, | |
| gdouble | fraction | |||
| ) |
Sets the fraction of total progress bar length to move the bouncing block for each call to gtk_progress_bar_pulse().
| pbar | [in] a GtkProgressBar | |
| fraction | [in] fraction between 0.0 and 1.0 |
| void gtk_progress_bar_set_text | ( | GtkProgressBar * | pbar, | |
| const gchar * | text | |||
| ) |
Causes the given text to appear superimposed on the progress bar.
| pbar | [in] a GtkProgressBar | |
| text | [in] a UTF-8 string, or NULL |
1.5.4