# ICommandBarElement

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/command_bar/trait-icommandbarelement/

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

```rust
trait ICommandBarElement
```

Interface implemented by all command bar elements.

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

## Members

- [`is_compact`](#function-is_compact)
- [`set_is_compact`](#function-set_is_compact)
- [`is_in_overflow`](#function-is_in_overflow)
- [`set_is_in_overflow`](#function-set_is_in_overflow)
- [`as_object`](#function-as_object)

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

### is_compact

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

Gets whether the element is in compact mode (icon only, no label).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/command_bar/i_command_bar_element.rs#L13)

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

### set_is_compact

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

Sets whether the element is in compact mode (icon only, no label).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/command_bar/i_command_bar_element.rs#L16)

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

### is_in_overflow

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

Gets whether the element is currently displayed inside the overflow
popup.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/command_bar/i_command_bar_element.rs#L20)

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

### set_is_in_overflow

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

Sets whether the element is currently displayed inside the overflow
popup. Set automatically by the command bar when moving items
between primary and overflow.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/command_bar/i_command_bar_element.rs#L25)

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

### as_object

```rust
fn as_object(self: &Self) -> Option<&FerroObject>
```

The object behind the handle, when the interface is implemented by a
class: what the type tests of the command bar look at, and the
identity of the element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/command_bar/i_command_bar_element.rs#L30)

## Availability

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