use std::{ops::Range, rc::Rc}; use gpui::{ AnyElement, App, DragMoveEvent, ElementId, Entity, EntityId, FocusHandle, InteractiveElement, IntoElement, MouseButton, ParentElement, SharedString, StatefulInteractiveElement, Styled, Window, div, prelude::*, relative, }; use super::{ DropAt, Nav, OnKey, OnMove, OnPick, OnRow, OnToggle, TreeDrag, model::{Row, Shown, TreeNode, can_drop, check_state, find, place_at}, }; use crate::{ forms::{Editing, Input, check_mark}, lists::select::Pick, motion::{self, Spinner}, primitives::{Disclosure, DragGhost, Icon}, theme::{ActiveTheme, ControlSize, IconSize, Radius, TextSize}, typography::Ellipsis, }; /// What drawing rows needs, shared by every range the list asks for. pub(super) struct Rows { pub id: ElementId, pub owner: EntityId, pub nodes: Rc>, pub shown: Rc>, pub selected: Rc>, pub checked: Option>>, pub current: Option, pub nav: Entity