synopsis#include <gtk/gtk.h> gtkprogress; void gtk_progress_set_show_text (gtkprogress *progress, gboolean show_text); void gtk_progress_set_text_alignment (gtkprogress *progress, gfloat x_align, gfloat y_align); void gtk_progress_set_format_string (gtkprogress *progress, const gchar *format); void gtk_progress_set_adjustment (gtkprogress *progress, gtkadjustment *adjustment); void gtk_progress_set_percentage (gtkprogress *progress, gdouble percentage); void gtk_progress_set_value (gtkprogress *progress, gdouble value); gdouble gtk_progress_get_value (gtkprogress *progress); void gtk_progress_set_activity_mode (gtkprogress *progress, gboolean activity_mode); gchar* gtk_progress_get_current_text (gtkprogress *progress); gchar* gtk_progress_get_text_from_value (gtkprogress *progress, gdouble value); gdouble gtk_progress_get_current_percentage (gtkprogress *progress); gdouble gtk_progress_get_percentage_from_value (gtkprogress *progress, gdouble value); void gtk_progress_configure (gtkprogress *progress, gdouble value, gdouble min, gdouble max); object hierarchygobject +----ginitiallyunowned +----gtkobject +----gtkwidget +----gtkprogress +----gtkprogressbar properties"activity-mode" gboolean : read / write "show-text" gboolean : read / write "text-xalign" gfloat : read / write "text-yalign" gfloat : read / write descriptiona gtkprogress is the abstract base class used to derive a gtkprogressbar which provides a visual representation of the progress of a long running operation. detailsgtkprogresstypedef struct _gtkprogress gtkprogress; the gtkprogress-struct struct contains private data only. and should be accessed using the functions below. gtk_progress_set_show_text ()void gtk_progress_set_show_text (gtkprogress *progress, gboolean show_text); warninggtk_progress_set_show_text is deprecated and should not be used in newly-written code. controls whether progress text is shown.
gtk_progress_set_text_alignment ()void gtk_progress_set_text_alignment (gtkprogress *progress, gfloat x_align, gfloat y_align); warninggtk_progress_set_text_alignment is deprecated and should not be used in newly-written code. controls the alignment of the text within the progress bar area.
gtk_progress_set_format_string ()void gtk_progress_set_format_string (gtkprogress *progress, const gchar *format); warninggtk_progress_set_format_string is deprecated and should not be used in newly-written code. sets a format string used to display text indicating the current progress. the string can contain the following substitution characters:
gtk_progress_set_adjustment ()void gtk_progress_set_adjustment (gtkprogress *progress, gtkadjustment *adjustment); warninggtk_progress_set_adjustment is deprecated and should not be used in newly-written code. associates a gtkadjustment with the gtkprogress. a gtkadjustment is used to represent the upper and lower bounds and the step interval of the underlying value for which progress is shown.
gtk_progress_set_percentage ()void gtk_progress_set_percentage (gtkprogress *progress, gdouble percentage); warninggtk_progress_set_percentage is deprecated and should not be used in newly-written code. sets the current percentage completion for the gtkprogress.
gtk_progress_set_value ()void gtk_progress_set_value (gtkprogress *progress, gdouble value); warninggtk_progress_set_value is deprecated and should not be used in newly-written code. sets the value within the gtkprogress to an absolute value. the value must be within the valid range of values for the underlying gtkadjustment.
gtk_progress_get_value ()gdouble gtk_progress_get_value (gtkprogress *progress); warninggtk_progress_get_value is deprecated and should not be used in newly-written code. returns the current progress complete value.
gtk_progress_set_activity_mode ()void gtk_progress_set_activity_mode (gtkprogress *progress, gboolean activity_mode); warninggtk_progress_set_activity_mode is deprecated and should not be used in newly-written code. a gtkprogress can be in one of two different modes: percentage mode (the default) and activity mode. in activity mode, the progress is simply indicated as activity rather than as a percentage complete.
gtk_progress_get_current_text ()gchar* gtk_progress_get_current_text (gtkprogress *progress); warninggtk_progress_get_current_text is deprecated and should not be used in newly-written code. returns the current text associated with the gtkprogress. this text is the based on the underlying format string after any substitutions are made.
gtk_progress_get_text_from_value ()gchar* gtk_progress_get_text_from_value (gtkprogress *progress, gdouble value); warninggtk_progress_get_text_from_value is deprecated and should not be used in newly-written code. returns the text indicating the progress based on the supplied value. the current value for the gtkprogress remains unchanged.
gtk_progress_get_current_percentage ()gdouble gtk_progress_get_current_percentage (gtkprogress *progress); warninggtk_progress_get_current_percentage is deprecated and should not be used in newly-written code. returns the current progress as a percentage.
gtk_progress_get_percentage_from_value ()gdouble gtk_progress_get_percentage_from_value (gtkprogress *progress, gdouble value); warninggtk_progress_get_percentage_from_value is deprecated and should not be used in newly-written code. returns the progress as a percentage calculated from the supplied absolute progress value.
gtk_progress_configure ()void gtk_progress_configure (gtkprogress *progress, gdouble value, gdouble min, gdouble max); warninggtk_progress_configure is deprecated and should not be used in newly-written code. allows the configuration of the minimum, maximum, and current values for the gtkprogress.
property detailsthe "activity-mode" property"activity-mode" gboolean : read / write if true the gtkprogress is in activity mode, meaning that it signals something is happening, but not how much of the activity is finished. this is used when you're doing something that you don't know how long it will take. default value: false the "show-text" property"show-text" gboolean : read / write whether the progress is shown as text. default value: false the "text-xalign" property"text-xalign" gfloat : read / write a number between 0.0 and 1.0 specifying the horizontal alignment of the text in the progress widget. allowed values: [0,1] default value: 0.5 the "text-yalign" property"text-yalign" gfloat : read / write a number between 0.0 and 1.0 specifying the vertical alignment of the text in the progress widget. allowed values: [0,1] default value: 0.5 |