# AssetToolbox

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer/struct-assettoolbox/

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

```rust
struct AssetToolbox
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L120)

## Members

- [`new`](#function-new)
- [`control`](#function-control)
- [`view_mode`](#function-view_mode)
- [`set_view_mode`](#function-set_view_mode)
- [`query`](#function-query)
- [`set_query`](#function-set_query)
- [`visible_asset_ids`](#function-visible_asset_ids)
- [`assets`](#function-assets)
- [`on_activate`](#function-on_activate)
- [`on_begin_drag`](#function-on_begin_drag)
- [`register`](#function-register)
- [`set_category`](#function-set_category)

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

### new

```rust
fn new(assets: Vec<DesignerAsset>) -> Rc<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L138)

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

### control

```rust
fn control(self: &Self) -> Ref<Control>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L257)

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

### view_mode

```rust
fn view_mode(self: &Self) -> AssetViewMode
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L260)

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

### set_view_mode

```rust
fn set_view_mode(self: &Rc<Self>, mode: AssetViewMode)
```

Switch presentation without changing the category, search or registered catalog.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L264)

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

### query

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L280)

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

### set_query

```rust
fn set_query(self: &Self, query: &str)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L283)

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

### visible_asset_ids

```rust
fn visible_asset_ids(self: &Self) -> Vec<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L286)

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

### assets

```rust
fn assets(self: &Self) -> Vec<DesignerAsset>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L289)

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

### on_activate

```rust
fn on_activate(self: &Self, callback: impl Fn(&DesignerAsset) -> () + 'static)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L292)

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

### on_begin_drag

```rust
fn on_begin_drag(self: &Self, callback: impl Fn(&DesignerAsset, &PointerPressedEventArgs) -> () + 'static)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L295)

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

### register

```rust
fn register(self: &Rc<Self>, asset: DesignerAsset) -> Result<(), String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L301)

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

### set_category

```rust
fn set_category(self: &Self, category: Option<&str>) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/asset_toolbox.rs#L316)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Same`

## Availability

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