# TreeDataGridColumnHeadersPresenter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/struct-treedatagridcolumnheaderspresenter/

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

```rust
struct TreeDataGridColumnHeadersPresenter
```

Presents the column headers of a `TreeDataGrid`, realizing only the
headers of the columns in the viewport.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L30)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`element_factory_property`](#function-element_factory_property)
- [`items_property`](#function-items_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`presenter_base`](#function-presenter_base)
- [`element_factory`](#function-element_factory)
- [`set_element_factory`](#function-set_element_factory)
- [`items`](#function-items)
- [`set_items`](#function-set_items)
- [`realized_elements`](#function-realized_elements)
- [`is_layout_in_progress`](#function-is_layout_in_progress)
- [`bring_into_view`](#function-bring_into_view)
- [`get_realized_elements`](#function-get_realized_elements)
- [`try_get_element`](#function-try_get_element)
- [`child_index_changed`](#function-child_index_changed)
- [`get_child_index`](#function-get_child_index)
- [`try_get_total_count`](#function-try_get_total_count)

<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/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L42)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L42)

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

### element_factory_property

```rust
fn element_factory_property() -> &'static DirectProperty<TreeDataGridColumnHeadersPresenter, Option<Rc<TreeDataGridElementFactory>>>
```

Defines the `ElementFactory` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L46)

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

### items_property

```rust
fn items_property() -> &'static DirectProperty<TreeDataGridColumnHeadersPresenter, Option<Rc<dyn IColumns>>>
```

Defines the `Items` property: the columns.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L46)

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

### construct

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

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L275)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L288)

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

### presenter_base

```rust
fn presenter_base(self: &Self) -> &TreeDataGridPresenterBase
```

The state of the presenter base.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L293)

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

### element_factory

```rust
fn element_factory(self: &Self) -> Option<Rc<TreeDataGridElementFactory>>
```

The factory of the column headers.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L298)

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

### set_element_factory

```rust
fn set_element_factory(self: &Self, value: Option<Rc<TreeDataGridElementFactory>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L302)

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

### items

```rust
fn items(self: &Self) -> Option<Rc<dyn IColumns>>
```

The columns whose headers the presenter shows.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L307)

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

### set_items

```rust
fn set_items(self: &Self, value: Option<Rc<dyn IColumns>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L311)

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

### realized_elements

```rust
fn realized_elements(self: &Self) -> Vec<Option<Ref<Control>>>
```

The realized column headers, with an empty slot for each column of the realized range that
has no header yet (`RealizedElements`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L332)

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

### is_layout_in_progress

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

Whether the presenter is in its measure or arrange pass.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L337)

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

### bring_into_view

```rust
fn bring_into_view(self: &Self, index: i32, rect: Option<Rect>) -> Option<Ref<Control>>
```

Brings the header of the column at `index` into view (`BringIntoView`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L342)

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

### get_realized_elements

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

The realized column headers (`GetRealizedElements`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L347)

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

### try_get_element

```rust
fn try_get_element(self: &Self, index: i32) -> Option<Ref<Control>>
```

The realized header of the column at `index`, if any (`TryGetElement`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L352)

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

### child_index_changed

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

Occurs when the index of a realized header changes (`ChildIndexChanged`). Disposing the
returned handle unsubscribes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L358)

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

### get_child_index

```rust
fn get_child_index(self: &Self, child: &StyledElement) -> i32
```

The index of a column header (`IChildIndexProvider.GetChildIndex`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L369)

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

### try_get_total_count

```rust
fn try_get_total_count(self: &Self) -> Option<i32>
```

The number of columns (`IChildIndexProvider.TryGetTotalCount`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_column_headers_presenter.rs#L377)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TreeDataGridColumnHeadersPresenter>`](/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/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`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/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`IFinalMeasureSelector`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-ifinalmeasureselector/)
- [`TreeDataGridPresenterHooks`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-treedatagridpresenterhooks/)

## Availability

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