Trait gtk::prelude::ProgressBarExt [−][src]
pub trait ProgressBarExt: 'static {}Show methods
fn ellipsize(&self) -> EllipsizeMode; fn fraction(&self) -> f64; fn is_inverted(&self) -> bool; fn pulse_step(&self) -> f64; fn shows_text(&self) -> bool; fn text(&self) -> Option<GString>; fn pulse(&self); fn set_ellipsize(&self, mode: EllipsizeMode); fn set_fraction(&self, fraction: f64); fn set_inverted(&self, inverted: bool); fn set_pulse_step(&self, fraction: f64); fn set_show_text(&self, show_text: bool); fn set_text(&self, text: Option<&str>); fn connect_ellipsize_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_fraction_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_inverted_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_pulse_step_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_show_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
Expand description
Required methods
fn ellipsize(&self) -> EllipsizeMode
fn ellipsize(&self) -> EllipsizeMode
Returns the ellipsizing position of the progress bar.
See set_ellipsize()
.
Returns
fn is_inverted(&self) -> bool
fn is_inverted(&self) -> bool
fn pulse_step(&self) -> f64
fn pulse_step(&self) -> f64
fn shows_text(&self) -> bool
fn shows_text(&self) -> bool
Gets the value of the property::ProgressBar::show-text
property.
See set_show_text()
.
Returns
true
if text is shown in the progress bar
Retrieves the text that is displayed with the progress bar,
if any, otherwise None
. 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.
Returns
text, or None
; this string is owned by the widget
and should not be modified or freed.
Indicates 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 pulse()
causes the block to move by a little bit (the amount of movement
per pulse is determined by set_pulse_step()
).
fn set_ellipsize(&self, mode: EllipsizeMode)
fn set_ellipsize(&self, mode: EllipsizeMode)
Sets the mode used to ellipsize (add an ellipsis: “…”) the text if there is not enough space to render the entire string.
mode
fn set_fraction(&self, fraction: f64)
fn set_fraction(&self, fraction: f64)
Causes the progress bar to “fill in” the given fraction of the bar. The fraction should be between 0.0 and 1.0, inclusive.
fraction
fraction of the task that’s been completed
fn set_inverted(&self, inverted: bool)
fn set_inverted(&self, inverted: bool)
fn set_pulse_step(&self, fraction: f64)
fn set_pulse_step(&self, fraction: f64)
fn set_show_text(&self, show_text: bool)
fn set_show_text(&self, show_text: bool)
Sets whether the progress bar will show text next to the bar.
The shown text is either the value of the property::ProgressBar::text
property or, if that is None
, the property::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::ProgressBar::show-text
to
true
and property::ProgressBar::text
to the empty string (not None
).
show_text
whether to show text
Causes the given text
to appear next to the progress bar.
If text
is None
and property::ProgressBar::show-text
is true
, the current
value of property::ProgressBar::fraction
will be displayed as a percentage.
If text
is non-None
and property::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::ProgressBar::show-text
is true
.
text
a UTF-8 string, or None
fn connect_ellipsize_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_fraction_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_inverted_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_pulse_step_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_show_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_text_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId