pub struct RowMoves {
pub onto_rows: bool,
pub between_rows: bool,
}Expand description
Where rows dragged within a list can be dropped (List::on_move): onto
a row (into a group, say), between rows (to reorder them), or both. A
drop on the list’s empty part is at its end, either way.
Fields§
§onto_rows: bool§between_rows: boolImplementations§
Source§impl RowMoves
impl RowMoves
pub fn onto_rows() -> RowMoves
pub fn between_rows() -> RowMoves
pub fn and_between_rows(self) -> RowMoves
pub fn and_onto_rows(self) -> RowMoves
Sourcepub fn target(
&self,
dragged: &[RowKey],
proposed: RowDrop<RowKey>,
) -> Option<RowDrop<RowKey>>
pub fn target( &self, dragged: &[RowKey], proposed: RowDrop<RowKey>, ) -> Option<RowDrop<RowKey>>
Where a drop the platform proposes lands, by what the list takes:
onto a row where only between rows is taken is before it, and
between rows where only onto them is taken is onto the row there.
Rows aren’t dropped onto one of themselves: None. Every backend
asks this while a drag is over its list, and shows what it answers.
Sourcepub fn tree_target(
&self,
dragged: &[RowKey],
over: Option<RowKey>,
proposed: RowDrop<RowKey>,
row: impl Fn(RowKey) -> Option<TreeRow>,
) -> Option<RowDrop<RowKey>>
pub fn tree_target( &self, dragged: &[RowKey], over: Option<RowKey>, proposed: RowDrop<RowKey>, row: impl Fn(RowKey) -> Option<TreeRow>, ) -> Option<RowDrop<RowKey>>
target in a Tree, whose rows nest (row gives a row’s place, as
TreeRows says): onto a row is into it, so only a row that opens
takes rows onto it, and before one is at its place among its
parent’s rows. Nothing lands while the pointer is over a dragged row
(over, the row under it), or anywhere inside one: the rows would
stay where they are, or a folder would go inside itself.
Sourcepub fn tree_proposal(
key: RowKey,
x: Option<f32>,
y: f32,
height: f32,
indent: TreeIndent,
next: Option<RowKey>,
row: impl Fn(RowKey) -> Option<TreeRow>,
) -> RowDrop<RowKey>
pub fn tree_proposal( key: RowKey, x: Option<f32>, y: f32, height: f32, indent: TreeIndent, next: Option<RowKey>, row: impl Fn(RowKey) -> Option<TreeRow>, ) -> RowDrop<RowKey>
What the pointer, x across the tree (from its rows’ left edge, if
known) and y of height down the row key, proposes in a Tree
(row gives a row’s place, as TreeRows says). Over a row that
opens, its top quarter is before it, its bottom quarter after it,
and the middle onto it; over a row that doesn’t, its top half is
before it and its bottom half after it.
After an open folder is before its first row. After another row,
the levels from the row’s own down to the next row’s (next) are
all places: at the next row’s level, before it; at a deeper one, the
end of the folder at that level (onto it, where a folder’s last rows
put rows). x picks the level, as outlines pick it: the level whose
content starts nearest it, by indent; without it, the row’s own.
Past the last top row, at the top level, the end. Backends that
propose by the pointer ask this, so every tree proposes alike, and
show an end-of-folder drop as a line under the row, at the level.