# IInputElement

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/trait-iinputelement/

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

```rust
trait IInputElement
```

Defines input-related functionality for a control.

The only implementor is `InputElement`: object references to input
elements are `Ref<InputElement>`. The trait documents the contract; the
routed event members of the contract (`add_handler`, `remove_handler`,
`raise_event`) are inherited by every input element from `Interactive`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L10)

## Members

- [`focusable`](#function-focusable)
- [`is_enabled`](#function-is_enabled)
- [`cursor`](#function-cursor)
- [`is_effectively_enabled`](#function-is_effectively_enabled)
- [`is_effectively_visible`](#function-is_effectively_visible)
- [`is_keyboard_focus_within`](#function-is_keyboard_focus_within)
- [`is_focused`](#function-is_focused)
- [`is_hit_test_visible`](#function-is_hit_test_visible)
- [`is_pointer_over`](#function-is_pointer_over)
- [`focus`](#function-focus)

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

### focusable

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

Whether the control can receive keyboard focus.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L12)

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

### is_enabled

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

Whether the control is enabled for user interaction.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L15)

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

### cursor

```rust
fn cursor(self: &Self) -> Option<Rc<Cursor>>
```

The associated mouse cursor.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L18)

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

### is_effectively_enabled

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

Whether this control and all its parents are enabled.

`is_enabled` is used to toggle the enabled state for individual
controls. This property takes into account the enabled state of this
control and its parent controls.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L25)

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

### is_effectively_visible

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

Whether this control and all its parents are visible.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L28)

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

### is_keyboard_focus_within

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

Whether keyboard focus is anywhere within the element or its visual
tree child elements.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L32)

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

### is_focused

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

Whether the control is focused.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L35)

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

### is_hit_test_visible

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

Whether the control is considered for hit testing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L38)

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

### is_pointer_over

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

Whether the pointer is currently over the control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L41)

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

### focus

```rust
fn focus(self: &Self, method: NavigationMethod, key_modifiers: KeyModifiers) -> bool
```

Focuses the control. Returns whether the control was focused.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_input_element.rs#L44)

## Trait implementations

- [`IInputElement`](/docs/0.5.0/api/ferroui-base/input/trait-iinputelement/)

## Availability

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