# ComponentLibrary

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

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

```rust
struct ComponentLibrary
```



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

## Members

- [`new`](#function-new)
- [`control`](#function-control)
- [`list`](#function-list)
- [`on_select`](#function-on_select)
- [`on_activate`](#function-on_activate)
- [`on_begin_drag`](#function-on_begin_drag)
- [`on_create`](#function-on_create)
- [`cancel_pending_drag`](#function-cancel_pending_drag)
- [`set_query`](#function-set_query)
- [`set_filter`](#function-set_filter)
- [`visible_items`](#function-visible_items)
- [`selected_item`](#function-selected_item)
- [`select`](#function-select)
- [`replace_items`](#function-replace_items)

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

### new

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



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

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

### control

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



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

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

### list

```rust
fn list(self: &Self) -> Ref<ListBox>
```



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

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

### on_select

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



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

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

### on_activate

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



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

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

### on_begin_drag

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



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

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

### on_create

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



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

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

### cancel_pending_drag

```rust
fn cancel_pending_drag(self: &Self)
```

Retire an in-progress pointer gesture when the host changes document,
revision, scope or editing permissions without replacing the catalog.

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

<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/component_browser.rs#L282)

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

### set_filter

```rust
fn set_filter(self: &Self, filter: ComponentLibraryFilter)
```



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

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

### visible_items

```rust
fn visible_items(self: &Self) -> Vec<ComponentLibraryItem>
```



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

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

### selected_item

```rust
fn selected_item(self: &Self) -> Option<ComponentLibraryItem>
```



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

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

### select

```rust
fn select(self: &Self, id: &str) -> bool
```



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

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

### replace_items

```rust
fn replace_items(self: &Self, items: Vec<ComponentLibraryItem>)
```



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

## 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/).
