# ProgressBar

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-progressbar/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct ProgressBar
```

A control used to indicate the progress of an operation.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L263)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`TEMPLATE_PARTS`](#assoc_const-template_parts)
- [`PSEUDO_CLASSES`](#assoc_const-pseudo_classes)
- [`is_indeterminate_property`](#function-is_indeterminate_property)
- [`show_progress_text_property`](#function-show_progress_text_property)
- [`progress_text_format_property`](#function-progress_text_format_property)
- [`orientation_property`](#function-orientation_property)
- [`percentage_property`](#function-percentage_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`percentage`](#function-percentage)
- [`template_settings`](#function-template_settings)
- [`is_indeterminate`](#function-is_indeterminate)
- [`set_is_indeterminate`](#function-set_is_indeterminate)
- [`show_progress_text`](#function-show_progress_text)
- [`set_show_progress_text`](#function-set_show_progress_text)
- [`progress_text_format`](#function-progress_text_format)
- [`set_progress_text_format`](#function-set_progress_text_format)
- [`orientation`](#function-orientation)
- [`set_orientation`](#function-set_orientation)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L271)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<ProgressBar>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L271)

<a id="assoc_const-template_parts"></a>

### TEMPLATE_PARTS

```rust
const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
```

The named parts expected in the control template.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L360)

<a id="assoc_const-pseudo_classes"></a>

### PSEUDO_CLASSES

```rust
const PSEUDO_CLASSES: PseudoClassesAttribute
```

The pseudoclasses set by the class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L364)

<a id="function-is_indeterminate_property"></a>

### is_indeterminate_property

```rust
fn is_indeterminate_property() -> &'static StyledProperty<bool>
```

Defines the `IsIndeterminate` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L368)

<a id="function-show_progress_text_property"></a>

### show_progress_text_property

```rust
fn show_progress_text_property() -> &'static StyledProperty<bool>
```

Defines the `ShowProgressText` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L368)

<a id="function-progress_text_format_property"></a>

### progress_text_format_property

```rust
fn progress_text_format_property() -> &'static StyledProperty<String>
```

Defines the `ProgressTextFormat` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L368)

<a id="function-orientation_property"></a>

### orientation_property

```rust
fn orientation_property() -> &'static StyledProperty<Orientation>
```

Defines the `Orientation` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L368)

<a id="function-percentage_property"></a>

### percentage_property

```rust
fn percentage_property() -> &'static DirectProperty<ProgressBar, f64>
```

Defines the `Percentage` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L368)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L413)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L423)

<a id="function-percentage"></a>

### percentage

```rust
fn percentage(self: &Self) -> f64
```

The overall percentage complete of the progress.

This read-only property is automatically calculated using the current
`Value` and the effective range (`Maximum` - `Minimum`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L431)

<a id="function-template_settings"></a>

### template_settings

```rust
fn template_settings(self: &Self) -> Ref<ProgressBarTemplateSettings>
```

The template settings of the progress bar.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L440)

<a id="function-is_indeterminate"></a>

### is_indeterminate

```rust
fn is_indeterminate(self: &Self) -> bool
```

Whether the progress bar shows the actual value or a generic,
continuous progress indicator (indeterminate state).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L446)

<a id="function-set_is_indeterminate"></a>

### set_is_indeterminate

```rust
fn set_is_indeterminate(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L450)

<a id="function-show_progress_text"></a>

### show_progress_text

```rust
fn show_progress_text(self: &Self) -> bool
```

Whether progress text will be shown.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L455)

<a id="function-set_show_progress_text"></a>

### set_show_progress_text

```rust
fn set_show_progress_text(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L459)

<a id="function-progress_text_format"></a>

### progress_text_format

```rust
fn progress_text_format(self: &Self) -> String
```

The format string applied to the internally calculated progress text
before it is shown.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L465)

<a id="function-set_progress_text_format"></a>

### set_progress_text_format

```rust
fn set_progress_text_format(self: &Self, value: impl Into<String>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L469)

<a id="function-orientation"></a>

### orientation

```rust
fn orientation(self: &Self) -> Orientation
```

The orientation of the progress bar.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L474)

<a id="function-set_orientation"></a>

### set_orientation

```rust
fn set_orientation(self: &Self, value: Orientation)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/progress_bar.rs#L478)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<ProgressBar>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
