GridSplitter
struct · ferroui-controls · v0.5.0
struct GridSplitter
Represents the control that redistributes space between columns or rows
of a Grid control.
Members
TYPEto_refget_parent_gridget_properties_value_sourceresize_direction_propertyresize_behavior_propertyshows_preview_propertykeyboard_increment_propertydrag_increment_propertypreview_content_propertyconstructnewresize_directionset_resize_directionresize_behaviorset_resize_behaviorshows_previewset_shows_previewkeyboard_incrementset_keyboard_incrementdrag_incrementset_drag_incrementpreview_contentset_preview_content
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<GridSplitter>
Returns a strong reference to this object.
get_parent_grid
fn get_parent_grid(self: &Self) -> Option<Ref<Grid>>
Retrieves the Grid that ultimately hosts this splitter in the
visual/logical tree.
A splitter can be placed directly inside a grid or indirectly inside an items control that uses a grid as its items panel. In the latter case the first logical parent is usually a content presenter (or the items control itself), so the method walks these intermediate containers to locate the underlying grid.
Returns the containing grid if one is found.
get_properties_value_source
fn get_properties_value_source(self: &Self) -> Ref<StyledElement>
Returns the element that carries the grid-attached properties
(Grid.Row, Grid.Column, etc.) relevant to this splitter.
When the splitter is generated as part of an items control template, the attached properties are set on the surrounding content presenter rather than on the splitter itself. This helper selects that presenter when appropriate so subsequent property look-ups read the correct values; otherwise it simply returns the splitter.
resize_direction_property
fn resize_direction_property() -> &'static StyledProperty<GridResizeDirection>
Defines the ResizeDirection property.
resize_behavior_property
fn resize_behavior_property() -> &'static StyledProperty<GridResizeBehavior>
Defines the ResizeBehavior property.
shows_preview_property
fn shows_preview_property() -> &'static StyledProperty<bool>
Defines the ShowsPreview property.
keyboard_increment_property
fn keyboard_increment_property() -> &'static StyledProperty<f64>
Defines the KeyboardIncrement property.
drag_increment_property
fn drag_increment_property() -> &'static StyledProperty<f64>
Defines the DragIncrement property.
preview_content_property
fn preview_content_property() -> &'static StyledProperty<Option<Rc<dyn ITemplateOf<Ref<Control>>>>>
Defines the PreviewContent property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
resize_direction
fn resize_direction(self: &Self) -> GridResizeDirection
Indicates whether the splitter resizes the columns, rows, or both.
set_resize_direction
fn set_resize_direction(self: &Self, value: GridResizeDirection)
resize_behavior
fn resize_behavior(self: &Self) -> GridResizeBehavior
Indicates which columns or rows the splitter resizes.
set_resize_behavior
fn set_resize_behavior(self: &Self, value: GridResizeBehavior)
shows_preview
fn shows_preview(self: &Self) -> bool
Indicates whether to preview the column resizing without updating layout.
set_shows_preview
fn set_shows_preview(self: &Self, value: bool)
keyboard_increment
fn keyboard_increment(self: &Self) -> f64
The distance to move the splitter when pressing the keyboard arrow keys.
set_keyboard_increment
fn set_keyboard_increment(self: &Self, value: f64)
drag_increment
fn drag_increment(self: &Self) -> f64
Restricts the splitter to move a multiple of the specified units.
set_drag_increment
fn set_drag_increment(self: &Self, value: f64)
preview_content
fn preview_content(self: &Self) -> Option<Rc<dyn ITemplateOf<Ref<Control>>>>
The content that will be shown when ShowsPreview is enabled and the
user starts a resize operation.
set_preview_content
fn set_preview_content(self: &Self, value: Option<Rc<dyn ITemplateOf<Ref<Control>>>>)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtThumbImplExtControlImplExtGridSplitterImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<GridSplitter>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplVisualImplLayoutableImplInteractiveImplControlImplTemplatedControlImplInputElementImplThumbImplGridSplitterImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.