Struct split_controller::SplitController
source · pub struct SplitController {
pub value: f64,
pub min_value: f64,
pub border: f64,
pub orientation: SplitOrientation,
/* private fields */
}
Expand description
Stores information about an UI split.
Fields§
§value: f64
The value of split.
min_value: f64
The minimum value of split.
border: f64
The border width.
orientation: SplitOrientation
The orientation of split.
Implementations§
source§impl SplitController
impl SplitController
sourcepub fn new(
value: f64,
min_value: f64,
border: f64,
orientation: SplitOrientation
) -> SplitController
pub fn new(
value: f64,
min_value: f64,
border: f64,
orientation: SplitOrientation
) -> SplitController
Creates a new SplitController
.
sourcepub fn is_dragging(&self) -> bool
pub fn is_dragging(&self) -> bool
Gets whether the split is currently being dragged by the user.
sourcepub fn event<E: GenericEvent>(
&mut self,
layout: SplitLayout,
max_value: f64,
rect: [f64; 4],
transform: Matrix2x3<f64>,
e: &E
)
pub fn event<E: GenericEvent>(
&mut self,
layout: SplitLayout,
max_value: f64,
rect: [f64; 4],
transform: Matrix2x3<f64>,
e: &E
)
Handles event.
sourcepub fn state(&self) -> SplitState
pub fn state(&self) -> SplitState
Gets the current state of split.