package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Progress_bar/index.html
Module Wrappers.Progress_bar
type t =
[ `progress_bar | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new ProgressBar
val set_text : t -> string option -> unitCauses the given @text to appear next to the progress bar.
If @text is %NULL and property@Gtk.ProgressBar:show-text is %TRUE, the current value of property@Gtk.ProgressBar:fraction will be displayed as a percentage.
If @text is non-%NULL and property@Gtk.ProgressBar:show-text is %TRUE, the text will be displayed. In this case, it will not display the progress percentage. If @text is the empty string, the progress bar will still be styled and sized suitably for containing text, as long as property@Gtk.ProgressBar:show-text is %TRUE.
val set_show_text : t -> bool -> unitSets whether the progress bar will show text next to the bar.
The shown text is either the value of the property@Gtk.ProgressBar:text property or, if that is %NULL, the property@Gtk.ProgressBar:fraction value, as a percentage.
To make a progress bar that is styled and sized suitably for containing text (even if the actual text is blank), set property@Gtk.ProgressBar:show-text to %TRUE and property@Gtk.ProgressBar:text to the empty string (not %NULL).
val set_pulse_step : t -> float -> unitSets the fraction of total progress bar length to move the bouncing block.
The bouncing block is moved when method@Gtk.ProgressBar.pulse is called.
val set_inverted : t -> bool -> unitSets whether the progress bar is inverted.
Progress bars normally grow from top to bottom or left to right. Inverted progress bars grow in the opposite direction.
val set_fraction : t -> float -> unitCauses the progress bar to “fill in” the given fraction of the bar.
The fraction should be between 0.0 and 1.0, inclusive.
val set_ellipsize : t -> Ocgtk_pango.Pango.ellipsizemode -> unitSets the mode used to ellipsize the text.
The text is ellipsized if there is not enough space to render the entire string.
val pulse : t -> unitIndicates that some progress has been 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 method@Gtk.ProgressBar.pulse causes the block to move by a little bit (the amount of movement per pulse is determined by method@Gtk.ProgressBar.set_pulse_step).
val get_text : t -> string optionRetrieves the text that is displayed with the progress bar.
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.
val get_show_text : t -> boolReturns whether the `GtkProgressBar` shows text.
See method@Gtk.ProgressBar.set_show_text.
val get_pulse_step : t -> floatRetrieves the pulse step.
See method@Gtk.ProgressBar.set_pulse_step.
val get_inverted : t -> boolReturns whether the progress bar is inverted.
val get_fraction : t -> floatReturns the current fraction of the task that’s been completed.
val get_ellipsize : t -> Ocgtk_pango.Pango.ellipsizemodeReturns the ellipsizing position of the progress bar.
See method@Gtk.ProgressBar.set_ellipsize.