TaitankNode

Struct TaitankNode 

Source
pub struct TaitankNode {
Show 13 fields pub style: TaitankStyle, pub layout_result: TaitankLayout, pub context: Option<*mut ()>, pub children: Vec<TaitankNodeRef>, pub parent: Option<WeakTaitankNodeRef>, pub measure: Option<TaitankMeasureFunction>, pub is_frozen: bool, pub is_dirty: bool, pub has_new_layout: bool, pub dirtied_function: Option<TaitankDirtiedFunction>, pub layout_cache: TaitankLayoutCache, pub in_initial_state: bool, pub config: Option<TaitankConfigRef>,
}

Fields§

§style: TaitankStyle§layout_result: TaitankLayout§context: Option<*mut ()>§children: Vec<TaitankNodeRef>§parent: Option<WeakTaitankNodeRef>§measure: Option<TaitankMeasureFunction>§is_frozen: bool§is_dirty: bool§has_new_layout: bool§dirtied_function: Option<TaitankDirtiedFunction>§layout_cache: TaitankLayoutCache§in_initial_state: bool§config: Option<TaitankConfigRef>

Implementations§

Source§

impl TaitankNode

Source

pub fn new() -> TaitankNodeRef

Source

pub fn new_with_config(config: TaitankConfigRef) -> TaitankNodeRef

Source

pub fn init_layout_result(&mut self)

Source

pub fn reset(&mut self) -> bool

Source

pub fn print_node(&self, indent: u32)

Source

pub fn set_parent(&mut self, parent: Option<WeakTaitankNodeRef>)

Source

pub fn get_parent(&self) -> Option<TaitankNodeRef>

Source

pub fn add_child(&mut self, child: TaitankNodeRef)

Source

pub fn insert_child(&mut self, child: TaitankNodeRef, index: usize) -> bool

Source

pub fn get_child(&self, index: usize) -> Option<TaitankNodeRef>

Source

pub fn remove_child(&mut self, child: &TaitankNodeRef) -> bool

Source

pub fn child_count(&self) -> usize

Source

pub fn set_display_type(&mut self, display_type: DisplayType)

Source

pub fn set_has_new_layout(&mut self, has_new_layout: bool)

Source

pub fn get_has_new_layout(&self) -> bool

Source

pub fn mark_as_dirty(&mut self)

Source

pub fn set_dirty(&mut self, dirty: bool)

Source

pub fn set_dirtied_function( &mut self, dirtied_function: Option<TaitankDirtiedFunction>, )

Source

pub fn set_context(&mut self, context: Option<*mut ()>)

Source

pub fn get_context(&self) -> Option<*mut ()>

Source

pub fn get_start_border(&self, axis: FlexDirection) -> f32

Source

pub fn get_end_border(&self, axis: FlexDirection) -> f32

Source

pub fn get_start_padding_and_border(&self, axis: FlexDirection) -> f32

Source

pub fn get_end_padding_and_border(&self, axis: FlexDirection) -> f32

Source

pub fn get_padding_and_border(&self, axis: FlexDirection) -> f32

Source

pub fn get_margin(&self, axis: FlexDirection) -> f32

Source

pub fn get_start_margin(&self, axis: FlexDirection) -> f32

Source

pub fn get_end_margin(&self, axis: FlexDirection) -> f32

Source

pub fn is_auto_start_margin(&self, axis: FlexDirection) -> bool

Source

pub fn is_auto_end_margin(&self, axis: FlexDirection) -> bool

Source

pub fn set_layout_start_margin(&mut self, axis: FlexDirection, value: f32)

Source

pub fn set_layout_end_margin(&mut self, axis: FlexDirection, value: f32)

Source

pub fn get_layout_margin(&self, axis: FlexDirection) -> f32

Source

pub fn get_layout_start_margin(&self, axis: FlexDirection) -> f32

Source

pub fn get_layout_end_margin(&self, axis: FlexDirection) -> f32

Source

pub fn resolve_relative_position( &self, axis: FlexDirection, for_axis_start: bool, ) -> f32

Source

pub fn set_layout_start_position( &mut self, axis: FlexDirection, value: f32, add_relative_position: bool, )

Source

pub fn set_layout_end_position( &mut self, axis: FlexDirection, value: f32, add_relative_position: bool, )

Source

pub fn get_layout_start_position(&self, axis: FlexDirection) -> f32

Source

pub fn get_layout_end_position(&self, axis: FlexDirection) -> f32

Source

pub fn resolve_main_axis(&self) -> FlexDirection

Source

pub fn resolve_cross_axis(&self) -> FlexDirection

Source

pub fn get_node_align(&self, item: &TaitankNodeRef) -> FlexAlign

Source

pub fn get_bound_axis(&self, axis: FlexDirection, value: f32) -> f32

Source

pub fn set_config(&mut self, config: Option<TaitankConfigRef>)

Source

pub fn get_config(&self) -> Option<TaitankConfigRef>

Source

pub fn get_main_axis_dimension(&self) -> f32

Source

pub fn get_layout_dimension(&self, axis: FlexDirection) -> f32

Source

pub fn is_layout_dimension_defined(&self, axis: FlexDirection) -> bool

Source

pub fn set_layout_dimension(&mut self, axis: FlexDirection, value: f32)

Source

pub fn set_layout_direction(&mut self, direction: TaitankDirection)

Source

pub fn get_layout_direction(&self) -> TaitankDirection

Source

pub fn reset_layout_recursive(&mut self, is_display_none: bool)

Source

pub fn resolve_direction( &self, parent_direction: TaitankDirection, ) -> TaitankDirection

Source

pub fn resolve_style_values(&mut self)

Source

pub fn cache_layout_or_measure_result( &mut self, available_size: TaitankSize, measure_mode: TaitankSizeMode, layout_action: FlexLayoutAction, )

Source

pub fn layout_single_node( &mut self, available_width: f32, width_measure_mode: MeasureMode, available_height: f32, height_measure_mode: MeasureMode, layout_action: FlexLayoutAction, layout_context: Option<*mut ()>, )

Source

pub fn layout( &mut self, parent_width: f32, parent_height: f32, config: TaitankConfigRef, parent_direction: TaitankDirection, layout_context: Option<*mut ()>, )

Source

pub fn layout_impl( &mut self, parent_width: f32, parent_height: f32, parent_direction: TaitankDirection, layout_action: FlexLayoutAction, layout_context: Option<*mut ()>, )

Source

pub fn calculate_items_flex_basis( &mut self, available_size: TaitankSize, layout_context: Option<*mut ()>, )

Source

pub fn collect_flex_lines( &mut self, flex_lines: &mut Vec<FlexLine>, available_size: TaitankSize, ) -> bool

Source

pub fn determine_items_main_axis_size( &mut self, flex_lines: &mut [FlexLine], layout_action: FlexLayoutAction, )

Source

pub fn determine_cross_axis_size( &mut self, flex_lines: &mut [FlexLine], available_size: TaitankSize, layout_action: FlexLayoutAction, layout_context: Option<*mut ()>, ) -> f32

Source

pub fn main_axis_alignment(&mut self, flex_lines: &mut [FlexLine])

Source

pub fn cross_axis_alignment(&mut self, flex_lines: &mut [FlexLine])

Source

pub fn layout_fixed_items( &mut self, _measure_mode: TaitankSizeMode, layout_context: Option<*mut ()>, )

Source

pub fn calculate_fixed_item_position( &mut self, item: &TaitankNodeRef, axis: FlexDirection, )

Source

pub fn convert_layout_result( &mut self, abs_left: f32, abs_top: f32, scale_factor: f32, )

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.