# TreeDataGridColumnarPresenterBase

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

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

```rust
struct TreeDataGridColumnarPresenterBase
```

The state of the reference's `TreeDataGridColumnarPresenterBase<TItem>`.

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

## Members

- [`new`](#function-new)
- [`get_initial_constraint`](#function-get_initial_constraint)
- [`get_or_estimate_anchor_element_for_viewport`](#function-get_or_estimate_anchor_element_for_viewport)
- [`estimate_element_size_u`](#function-estimate_element_size_u)
- [`needs_measure_for_viewport_change`](#function-needs_measure_for_viewport_change)
- [`needs_final_measure_pass`](#function-needs_final_measure_pass)
- [`needs_final_measure`](#function-needs_final_measure)
- [`get_element_at`](#function-get_element_at)
- [`get_final_constraint`](#function-get_final_constraint)
- [`measure_column_element`](#function-measure_column_element)
- [`calculate_size_u`](#function-calculate_size_u)

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

### new

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



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

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

### get_initial_constraint

```rust
fn get_initial_constraint(columns: &dyn IColumns, index: i32, available_size: Size) -> Size
```

`GetInitialConstraint`: the actual width of the column when it is known and the column does
not need an unconstrained measure, otherwise its maximum width.

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

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

### get_or_estimate_anchor_element_for_viewport

```rust
fn get_or_estimate_anchor_element_for_viewport(self: &Self, base: &TreeDataGridPresenterBase, columns: Option<&dyn IColumns>, viewport_start: f64, viewport_end: f64, item_count: i32) -> (i32, f64)
```

`GetOrEstimateAnchorElementForViewport`.

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

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

### estimate_element_size_u

```rust
fn estimate_element_size_u(self: &Self, columns: Option<&dyn IColumns>) -> f64
```

`EstimateElementSizeU`: the average width of the measured columns.

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

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

### needs_measure_for_viewport_change

```rust
fn needs_measure_for_viewport_change(base: &TreeDataGridPresenterBase, orientation: Orientation, measure_viewport: Rect, viewport: Rect) -> bool
```

`NeedsMeasureForViewportChange`.

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

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

### needs_final_measure_pass

```rust
fn needs_final_measure_pass(columns: &dyn IColumns, first_index: i32, elements: &[Option<Ref<Control>>]) -> bool
```

`NeedsFinalMeasurePass`.

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

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

### needs_final_measure

```rust
fn needs_final_measure(columns: &dyn IColumns, element: &Control, index: i32) -> bool
```

`IFinalMeasureSelector.NeedsFinalMeasure`: whether the element was measured wider than its
column, or at another width than its auto-sized column.

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

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

### get_element_at

```rust
fn get_element_at(columns: &dyn IColumns, position: f64) -> (i32, f64)
```

`GetElementAt`.

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

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

### get_final_constraint

```rust
fn get_final_constraint(columns: &dyn IColumns, index: i32) -> Size
```

`GetFinalConstraint`: the actual width of the column, with an unconstrained height.

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

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

### measure_column_element

```rust
fn measure_column_element(columns: &dyn IColumns, index: i32, row_index: i32, element: &Control, available_size: Size) -> Size
```

`MeasureColumnElement`: measures the element of a column and reports the measure to the
columns, which give the size the element gets.

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

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

### calculate_size_u

```rust
fn calculate_size_u(columns: Option<&dyn IColumns>, available_size: Size) -> f64
```

`CalculateSizeU`: the estimated width of the columns.

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

## 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`
- `Default`

## Availability

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