[][src]Trait gtk::ProgressBarExt

pub trait ProgressBarExt: 'static {
    fn get_ellipsize(&self) -> EllipsizeMode;
fn get_fraction(&self) -> f64;
fn get_inverted(&self) -> bool;
fn get_pulse_step(&self) -> f64;
fn get_show_text(&self) -> bool;
fn get_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_property_ellipsize_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_fraction_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_inverted_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_pulse_step_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_show_text_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_text_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all ProgressBar methods.

Implementors

ProgressBar

Required methods

fn get_ellipsize(&self) -> EllipsizeMode

Returns the ellipsizing position of the progress bar. See ProgressBarExt::set_ellipsize.

Returns

pango::EllipsizeMode

fn get_fraction(&self) -> f64

Returns the current fraction of the task that’s been completed.

Returns

a fraction from 0.0 to 1.0

fn get_inverted(&self) -> bool

Gets the value set by ProgressBarExt::set_inverted.

Returns

true if the progress bar is inverted

fn get_pulse_step(&self) -> f64

Retrieves the pulse step set with ProgressBarExt::set_pulse_step.

Returns

a fraction from 0.0 to 1.0

fn get_show_text(&self) -> bool

Gets the value of the ProgressBar:show-text property. See ProgressBarExt::set_show_text.

Returns

true if text is shown in the progress bar

fn get_text(&self) -> Option<GString>

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.

fn pulse(&self)

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 ProgressBarExt::pulse causes the block to move by a little bit (the amount of movement per pulse is determined by ProgressBarExt::set_pulse_step).

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

a pango::EllipsizeMode

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)

Progress bars normally grow from top to bottom or left to right. Inverted progress bars grow in the opposite direction.

inverted

true to invert the progress bar

fn set_pulse_step(&self, fraction: f64)

Sets the fraction of total progress bar length to move the bouncing block for each call to ProgressBarExt::pulse.

fraction

fraction between 0.0 and 1.0

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 ProgressBar:text property or, if that is None, the 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 ProgressBar:show-text to true and ProgressBar:text to the empty string (not None).

show_text

whether to show text

fn set_text(&self, text: Option<&str>)

Causes the given text to appear next to the progress bar.

If text is None and ProgressBar:show-text is true, the current value of ProgressBar:fraction will be displayed as a percentage.

If text is non-None and 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 ProgressBar:show-text is true.

text

a UTF-8 string, or None

fn connect_property_ellipsize_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_fraction_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_inverted_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_pulse_step_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_show_text_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_text_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<ProgressBar>> ProgressBarExt for O[src]

Loading content...