# InkToolbarPenButton

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

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

```rust
struct InkToolbarPenButton
```

Base pen tool. Palettes are observable handles owned independently by each pen.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`create_ink_drawing_attributes`](#function-create_ink_drawing_attributes)
- [`palette_property`](#function-palette_property)
- [`min_stroke_width_property`](#function-min_stroke_width_property)
- [`max_stroke_width_property`](#function-max_stroke_width_property)
- [`selected_brush_property`](#function-selected_brush_property)
- [`selected_brush_index_property`](#function-selected_brush_index_property)
- [`selected_stroke_width_property`](#function-selected_stroke_width_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`palette`](#function-palette)
- [`set_palette`](#function-set_palette)
- [`min_stroke_width`](#function-min_stroke_width)
- [`set_min_stroke_width`](#function-set_min_stroke_width)
- [`max_stroke_width`](#function-max_stroke_width)
- [`set_max_stroke_width`](#function-set_max_stroke_width)
- [`selected_brush`](#function-selected_brush)
- [`selected_brush_index`](#function-selected_brush_index)
- [`set_selected_brush_index`](#function-set_selected_brush_index)
- [`selected_stroke_width`](#function-selected_stroke_width)
- [`set_selected_stroke_width`](#function-set_selected_stroke_width)
- [`determine_stroke_width`](#function-determine_stroke_width)
- [`selected_color`](#function-selected_color)

<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.Inking/ink_toolbar_buttons.rs#L154)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L154)

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

### create_ink_drawing_attributes

```rust
fn create_ink_drawing_attributes(self: &Self) -> Result<InkDrawingAttributes, InkError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L154)

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

### palette_property

```rust
fn palette_property() -> &'static StyledProperty<FerroList<Rc<dyn IBrush>>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L214)

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

### min_stroke_width_property

```rust
fn min_stroke_width_property() -> &'static StyledProperty<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L214)

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

### max_stroke_width_property

```rust
fn max_stroke_width_property() -> &'static StyledProperty<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L214)

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

### selected_brush_property

```rust
fn selected_brush_property() -> &'static DirectProperty<InkToolbarPenButton, Option<Rc<dyn IBrush>>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L214)

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

### selected_brush_index_property

```rust
fn selected_brush_index_property() -> &'static StyledProperty<i32>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L214)

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

### selected_stroke_width_property

```rust
fn selected_stroke_width_property() -> &'static StyledProperty<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L214)

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

### construct

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L229)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L240)

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

### palette

```rust
fn palette(self: &Self) -> ferroui_base::collections::FerroList<std::rc::Rc<dyn IBrush>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L243)

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

### set_palette

```rust
fn set_palette(self: &Self, value: ferroui_base::collections::FerroList<std::rc::Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L246)

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

### min_stroke_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L249)

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

### set_min_stroke_width

```rust
fn set_min_stroke_width(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L252)

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

### max_stroke_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L255)

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

### set_max_stroke_width

```rust
fn set_max_stroke_width(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L258)

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

### selected_brush

```rust
fn selected_brush(self: &Self) -> Option<Rc<dyn IBrush>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L261)

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

### selected_brush_index

```rust
fn selected_brush_index(self: &Self) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L264)

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

### set_selected_brush_index

```rust
fn set_selected_brush_index(self: &Self, value: i32)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L267)

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

### selected_stroke_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L270)

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

### set_selected_stroke_width

```rust
fn set_selected_stroke_width(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L273)

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

### determine_stroke_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L276)

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

### selected_color

```rust
fn selected_color(self: &Self) -> Result<Color, InkError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Inking/ink_toolbar_buttons.rs#L282)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`InkToolbarPenButtonImplExt`](/docs/0.5.0/api/ferroui-controls-inking/trait-inktoolbarpenbuttonimplext/)
- `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`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ToggleButtonImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-togglebuttonimplext/)
- [`ContentControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`ButtonImplExt`](/docs/0.5.0/api/ferroui-controls/trait-buttonimplext/)
- `IUnknownImpl`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<InkToolbarPenButton>`](/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/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`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/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`ContentControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimpl/)
- [`ButtonImpl`](/docs/0.5.0/api/ferroui-controls/trait-buttonimpl/)
- [`ToggleButtonImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-togglebuttonimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`InkToolbarPenButtonImpl`](/docs/0.5.0/api/ferroui-controls-inking/trait-inktoolbarpenbuttonimpl/)

## Availability

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