1 2@c %start of fragment 3 4@deftp Class <gtk-progress-bar> 5Derives from @code{<gtk-progress>}. 6 7This class defines the following slots: 8 9@table @code 10@item fraction 11The fraction of total work that has been completed 12 13@item pulse-step 14The fraction of total progress to move the bouncing block when pulsed 15 16@item orientation 17Orientation and growth direction of the progress bar 18 19@item text 20Text to be displayed in the progress bar 21 22@item ellipsize 23The preferred place to ellipsize the string, if the progress bar does not have 24enough room to display the entire string, if at all. 25 26@item adjustment 27The GtkAdjustment connected to the progress bar (Deprecated) 28 29@item bar-style 30Specifies the visual style of the bar in percentage mode (Deprecated) 31 32@item activity-step 33The increment used for each iteration in activity mode (Deprecated) 34 35@item activity-blocks 36The number of blocks which can fit in the progress bar area in activity mode 37(Deprecated) 38 39@item discrete-blocks 40The number of discrete blocks in a progress bar (when shown in the discrete 41style) 42 43@end table 44 45@end deftp 46 47@deffn Function gtk-progress-bar-new @result{}@tie{} (ret@tie{}@code{<gtk-widget>}) 48Creates a new @code{<gtk-progress-bar>}. 49 50@table @var 51@item ret 52a @code{<gtk-progress-bar>}. 53 54@end table 55 56@end deffn 57 58@deffn Function gtk-progress-bar-pulse (self@tie{}@code{<gtk-progress-bar>}) 59@deffnx Method pulse 60Indicates that some progress is made, but you don't know how much. Causes the 61progress bar to enter "activity mode," where a block bounces back and forth. 62Each call to @code{gtk-progress-bar-pulse} causes the block to move by a little 63bit (the amount of movement per pulse is determined by 64@code{gtk-progress-bar-set-pulse-step}). 65 66@table @var 67@item pbar 68a @code{<gtk-progress-bar>} 69 70@end table 71 72@end deffn 73 74@deffn Function gtk-progress-bar-set-text (self@tie{}@code{<gtk-progress-bar>}) (text@tie{}@code{mchars}) 75@deffnx Method set-text 76Causes the given @var{text} to appear superimposed on the progress bar. 77 78@table @var 79@item pbar 80a @code{<gtk-progress-bar>} 81 82@item text 83a UTF-8 string, or @samp{@code{#f}} 84 85@end table 86 87@end deffn 88 89@deffn Function gtk-progress-bar-set-fraction (self@tie{}@code{<gtk-progress-bar>}) (fraction@tie{}@code{double}) 90@deffnx Method set-fraction 91Causes the progress bar to "fill in" the given fraction of the bar. The fraction 92should be between 0.0 and 1.0, inclusive. 93 94@table @var 95@item pbar 96a @code{<gtk-progress-bar>} 97 98@item fraction 99fraction of the task that's been completed 100 101@end table 102 103@end deffn 104 105@deffn Function gtk-progress-bar-set-pulse-step (self@tie{}@code{<gtk-progress-bar>}) (fraction@tie{}@code{double}) 106@deffnx Method set-pulse-step 107Sets the fraction of total progress bar length to move the bouncing block for 108each call to @code{gtk-progress-bar-pulse}. 109 110@table @var 111@item pbar 112a @code{<gtk-progress-bar>} 113 114@item fraction 115fraction between 0.0 and 1.0 116 117@end table 118 119@end deffn 120 121@deffn Function gtk-progress-bar-set-orientation (self@tie{}@code{<gtk-progress-bar>}) (orientation@tie{}@code{<gtk-progress-bar-orientation>}) 122@deffnx Method set-orientation 123Causes the progress bar to switch to a different orientation (left-to-right, 124right-to-left, top-to-bottom, or bottom-to-top). 125 126@table @var 127@item pbar 128a @code{<gtk-progress-bar>} 129 130@item orientation 131orientation of the progress bar 132 133@end table 134 135@end deffn 136 137@deffn Function gtk-progress-bar-set-ellipsize (self@tie{}@code{<gtk-progress-bar>}) (mode@tie{}@code{<pango-ellipsize-mode>}) 138@deffnx Method set-ellipsize 139Sets the mode used to ellipsize (add an ellipsis: "...") the text if there is 140not enough space to render the entire string. 141 142@table @var 143@item pbar 144a @code{<gtk-progress-bar>} 145 146@item mode 147a @code{<pango-ellipsize-mode>} 148 149@end table 150 151Since 2.6 152 153@end deffn 154 155@deffn Function gtk-progress-bar-get-text (self@tie{}@code{<gtk-progress-bar>}) @result{}@tie{} (ret@tie{}@code{mchars}) 156@deffnx Method get-text 157Retrieves the text displayed superimposed on the progress bar, if any, otherwise 158@samp{@code{#f}}. The return value is a reference to the text, not a copy of it, 159so will become invalid if you change the text in the progress bar. 160 161@table @var 162@item pbar 163a @code{<gtk-progress-bar>} 164 165@item ret 166text, or @samp{@code{#f}}; this string is owned by the widget and should not be 167modified or freed. 168 169@end table 170 171@end deffn 172 173@deffn Function gtk-progress-bar-get-fraction (self@tie{}@code{<gtk-progress-bar>}) @result{}@tie{} (ret@tie{}@code{double}) 174@deffnx Method get-fraction 175Returns the current fraction of the task that's been completed. 176 177@table @var 178@item pbar 179a @code{<gtk-progress-bar>} 180 181@item ret 182a fraction from 0.0 to 1.0 183 184@end table 185 186@end deffn 187 188@deffn Function gtk-progress-bar-get-pulse-step (self@tie{}@code{<gtk-progress-bar>}) @result{}@tie{} (ret@tie{}@code{double}) 189@deffnx Method get-pulse-step 190Retrieves the pulse step set with @code{gtk-progress-bar-set-pulse-step} 191 192@table @var 193@item pbar 194a @code{<gtk-progress-bar>} 195 196@item ret 197a fraction from 0.0 to 1.0 198 199@end table 200 201@end deffn 202 203@deffn Function gtk-progress-bar-get-ellipsize (self@tie{}@code{<gtk-progress-bar>}) @result{}@tie{} (ret@tie{}@code{<pango-ellipsize-mode>}) 204@deffnx Method get-ellipsize 205Returns the ellipsizing position of the progressbar. See 206@code{gtk-progress-bar-set-ellipsize}. 207 208@table @var 209@item pbar 210a @code{<gtk-progress-bar>} 211 212@item ret 213@code{<pango-ellipsize-mode>} 214 215@end table 216 217Since 2.6 218 219@end deffn 220 221 222@c %end of fragment 223