# InkPresenter

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

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

```rust
struct InkPresenter
```

UI-thread ink coordinator. Services and input callbacks are stable, synchronous
FerroUI objects; geometry and persistence are portable Rust implementations.

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

## Members

- [`MAX_ACTIVE_POINTERS`](#assoc_const-max_active_pointers)
- [`new`](#function-new)
- [`input_device_types`](#function-input_device_types)
- [`set_input_device_types`](#function-set_input_device_types)
- [`is_input_enabled`](#function-is_input_enabled)
- [`set_is_input_enabled`](#function-set_is_input_enabled)
- [`update_default_drawing_attributes`](#function-update_default_drawing_attributes)
- [`copy_default_drawing_attributes`](#function-copy_default_drawing_attributes)
- [`set_predefined_configuration`](#function-set_predefined_configuration)
- [`high_contrast_adjustment`](#function-high_contrast_adjustment)
- [`set_high_contrast_adjustment`](#function-set_high_contrast_adjustment)
- [`stroke_container`](#function-stroke_container)
- [`input_processing_configuration`](#function-input_processing_configuration)
- [`input_configuration`](#function-input_configuration)
- [`stroke_input`](#function-stroke_input)
- [`unprocessed_input`](#function-unprocessed_input)
- [`ruler`](#function-ruler)
- [`protractor`](#function-protractor)
- [`ruler_visible`](#function-ruler_visible)
- [`protractor_visible`](#function-protractor_visible)
- [`set_ruler_visible`](#function-set_ruler_visible)
- [`set_protractor_visible`](#function-set_protractor_visible)
- [`changed`](#function-changed)
- [`strokes_collected`](#function-strokes_collected)
- [`strokes_erased`](#function-strokes_erased)
- [`activate_custom_drying`](#function-activate_custom_drying)
- [`is_custom_drying`](#function-is_custom_drying)
- [`has_active_pointer`](#function-has_active_pointer)
- [`cancel_pointer`](#function-cancel_pointer)
- [`cancel_all`](#function-cancel_all)
- [`process_pointer`](#function-process_pointer)
- [`visible_strokes`](#function-visible_strokes)

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

### MAX_ACTIVE_POINTERS

```rust
const MAX_ACTIVE_POINTERS: usize
```

Bounds synthetic multi-pointer input as well as native device input.

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

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

### new

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



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

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

### input_device_types

```rust
fn input_device_types(self: &Self) -> CoreInputDeviceTypes
```



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

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

### set_input_device_types

```rust
fn set_input_device_types(self: &Self, value: CoreInputDeviceTypes)
```



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

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

### is_input_enabled

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



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

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

### set_is_input_enabled

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



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

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

### update_default_drawing_attributes

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



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

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

### copy_default_drawing_attributes

```rust
fn copy_default_drawing_attributes(self: &Self) -> InkDrawingAttributes
```



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

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

### set_predefined_configuration

```rust
fn set_predefined_configuration(self: &Self, value: InkPresenterPredefinedConfiguration)
```



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

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

### high_contrast_adjustment

```rust
fn high_contrast_adjustment(self: &Self) -> InkHighContrastAdjustment
```



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

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

### set_high_contrast_adjustment

```rust
fn set_high_contrast_adjustment(self: &Self, value: InkHighContrastAdjustment)
```



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

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

### stroke_container

```rust
fn stroke_container(self: &Self) -> Rc<InkStrokeContainer>
```



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

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

### input_processing_configuration

```rust
fn input_processing_configuration(self: &Self) -> Rc<InkInputProcessingConfiguration>
```



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

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

### input_configuration

```rust
fn input_configuration(self: &Self) -> Rc<InkInputConfiguration>
```



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

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

### stroke_input

```rust
fn stroke_input(self: &Self) -> Rc<InkStrokeInput>
```



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

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

### unprocessed_input

```rust
fn unprocessed_input(self: &Self) -> Rc<InkUnprocessedInput>
```



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

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

### ruler

```rust
fn ruler(self: &Self) -> Rc<InkPresenterRuler>
```



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

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

### protractor

```rust
fn protractor(self: &Self) -> Rc<InkPresenterProtractor>
```



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

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

### ruler_visible

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



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

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

### protractor_visible

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



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

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

### set_ruler_visible

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



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

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

### set_protractor_visible

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



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

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

### changed

```rust
fn changed(self: &Self, handler: impl Fn() -> () + 'static) -> Rc<dyn IDisposable>
```



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

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

### strokes_collected

```rust
fn strokes_collected(self: &Self, handler: impl Fn(&InkStrokesCollectedEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```



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

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

### strokes_erased

```rust
fn strokes_erased(self: &Self, handler: impl Fn(&InkStrokesErasedEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```



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

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

### activate_custom_drying

```rust
fn activate_custom_drying(self: &Self) -> Result<Rc<InkSynchronizer>, InkError>
```



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

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

### is_custom_drying

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



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

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

### has_active_pointer

```rust
fn has_active_pointer(self: &Self, id: i32) -> bool
```



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

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

### cancel_pointer

```rust
fn cancel_pointer(self: &Self, id: i32)
```



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

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

### cancel_all

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



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

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

### process_pointer

```rust
fn process_pointer(self: &Self, phase: InkPointerPhase, e: &InkPointerEventArgs) -> Result<bool, InkError>
```

Feeds a validated point from any platform. Returns whether the presenter
consumed it; unprocessed listeners can also set `handled` synchronously.

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

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

### visible_strokes

```rust
fn visible_strokes(self: &Self) -> Vec<Rc<InkStroke>>
```

A snapshot for a renderer. Custom-dried strokes disappear only after EndDry.

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

## Trait implementations

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

## Availability

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