34
34
+----GtkProgressBar}}
35
35
\section{Interfaces}{GtkProgressBar implements
36
AtkImplementorIface and \verb{\link{GtkBuildable}}.}
37
\section{Detailed Description}{The \verb{\link{GtkProgressBar}} is typically used to display the progress of a long
36
AtkImplementorIface and \code{\link{GtkBuildable}}.}
37
\section{Detailed Description}{The \code{\link{GtkProgressBar}} is typically used to display the progress of a long
38
38
running operation. It provides a visual clue that processing
39
is underway. The \verb{\link{GtkProgressBar}} can be used in two different
39
is underway. The \code{\link{GtkProgressBar}} can be used in two different
40
40
modes: percentage mode and activity mode.
42
When an application can determine how much work needs to take place
42
When an application can determine how much work needs to take place
43
43
(e.g. read a fixed number of bytes from a file) and can monitor its
44
progress, it can use the \verb{\link{GtkProgressBar}} in percentage mode and the user
44
progress, it can use the \code{\link{GtkProgressBar}} in percentage mode and the user
45
45
sees a growing bar indicating the percentage of the work that has
46
46
been completed. In this mode, the application is required to call
47
47
\code{\link{gtkProgressBarSetFraction}} periodically to update the progress bar.
49
49
When an application has no accurate way of knowing the amount of work
50
to do, it can use the \verb{\link{GtkProgressBar}} in activity mode, which shows activity
50
to do, it can use the \code{\link{GtkProgressBar}} in activity mode, which shows activity
51
51
by a block moving back and forth within the progress area. In this mode,
52
52
the application is required to call \code{\link{gtkProgressBarPulse}} perodically
53
53
to update the progress bar.
55
55
There is quite a bit of flexibility provided to control the appearance
56
of the \verb{\link{GtkProgressBar}}. Functions are provided to control the
56
of the \code{\link{GtkProgressBar}}. Functions are provided to control the
57
57
orientation of the bar, optional text can be displayed along with
58
58
the bar, and the step size used in activity mode can be set.
59
\strong{PLEASE NOTE:} The \verb{\link{GtkProgressBar}}/\verb{\link{GtkProgress}} API in GTK 1.2 was bloated, needlessly complex
60
and hard to use properly. Therefore \verb{\link{GtkProgress}} has been deprecated
61
completely and the \verb{\link{GtkProgressBar}} API has been reduced to the following 10
62
functions: \code{\link{gtkProgressBarNew}}, \code{\link{gtkProgressBarPulse}},
63
\code{\link{gtkProgressBarSetText}}, \code{\link{gtkProgressBarSetFraction}},
64
\code{\link{gtkProgressBarSetPulseStep}}, \code{\link{gtkProgressBarSetOrientation}},
65
\code{\link{gtkProgressBarGetText}}, \code{\link{gtkProgressBarGetFraction}},
66
\code{\link{gtkProgressBarGetPulseStep}}, \code{\link{gtkProgressBarGetOrientation}}.
67
These have been grouped at the beginning of this section, followed by
59
\strong{PLEASE NOTE:} The \code{\link{GtkProgressBar}}/\code{\link{GtkProgress}} API in GTK 1.2 was bloated, needlessly complex
60
and hard to use properly. Therefore \code{\link{GtkProgress}} has been deprecated
61
completely and the \code{\link{GtkProgressBar}} API has been reduced to the following 10
62
functions: \code{\link{gtkProgressBarNew}}, \code{\link{gtkProgressBarPulse}},
63
\code{\link{gtkProgressBarSetText}}, \code{\link{gtkProgressBarSetFraction}},
64
\code{\link{gtkProgressBarSetPulseStep}}, \code{\link{gtkProgressBarSetOrientation}},
65
\code{\link{gtkProgressBarGetText}}, \code{\link{gtkProgressBarGetFraction}},
66
\code{\link{gtkProgressBarGetPulseStep}}, \code{\link{gtkProgressBarGetOrientation}}.
67
These have been grouped at the beginning of this section, followed by
68
68
a large chunk of deprecated 1.2 compatibility functions.}
69
69
\section{Structures}{\describe{\item{\verb{GtkProgressBar}}{
70
The \verb{\link{GtkProgressBar}} struct contains private data only,
70
The \code{\link{GtkProgressBar}} struct contains private data only,
71
71
and should be accessed using the functions below.
124
124
\item{\verb{ellipsize} [\code{\link{PangoEllipsizeMode}} : Read / Write]}{
126
The preferred place to ellipsize the string, if the progressbar does
126
The preferred place to ellipsize the string, if the progressbar does
127
127
not have enough room to display the entire string, specified as a
128
128
\verb{PangoEllisizeMode}.
130
130
Note that setting this property to a value other than
131
131
\code{PANGO_ELLIPSIZE_NONE} has the side-effect that the progressbar requests
132
132
only enough space to display the ellipsis "...". Another means to set a
133
progressbar's width is \code{\link{gtkWidgetSetSizeRequest}}.
135
Default value: PANGO_ELLIPSIZE_NONE Since 2.6
133
progressbar's width is \code{\link{gtkWidgetSetSizeRequest}}.
134
Default value: PANGO_ELLIPSIZE_NONE Since 2.6
138
137
\item{\verb{fraction} [numeric : Read / Write]}{
153
152
\item{\verb{text} [character : * : Read / Write]}{
155
Text to be displayed in the progress bar. Default value: "\%P \%\%"
154
Text to be displayed in the progress bar. Default value: NULL
159
158
\section{Style Properties}{\describe{
159
\item{\verb{min-horizontal-bar-height} [integer : Read / Write]}{
161
Minimum horizontal height of the progress bar.
162
Allowed values: >= 1 Default value: 20 Since 2.14
165
\item{\verb{min-horizontal-bar-width} [integer : Read / Write]}{
167
The minimum horizontal width of the progress bar.
168
Allowed values: >= 1 Default value: 150 Since 2.14
171
\item{\verb{min-vertical-bar-height} [integer : Read / Write]}{
173
The minimum vertical height of the progress bar.
174
Allowed values: >= 1 Default value: 80 Since 2.14
177
\item{\verb{min-vertical-bar-width} [integer : Read / Write]}{
179
The minimum vertical width of the progress bar.
180
Allowed values: >= 1 Default value: 22 Since 2.14
160
183
\item{\verb{xspacing} [integer : Read / Write]}{
162
185
Extra spacing applied to the width of a progress bar. Allowed values: >= 0 Default value: 7