pub struct ObjectTreeState {Show 18 fields
pub folders: BTreeSet<Vec<String>>,
pub collapsed_folders: BTreeSet<Vec<String>>,
pub creating_folder: Option<Vec<String>>,
pub visible_ids: Vec<usize>,
pub selected_ids: HashSet<usize>,
pub last_selected_id: Option<usize>,
pub selection_anchor: Option<usize>,
pub expanded_groups: HashSet<String>,
pub expanded_items: HashSet<usize>,
pub data_window_expanded: bool,
pub filter_text: String,
pub filter_type: Option<SourceType>,
pub dragging_id: Option<usize>,
pub drag_start_pos: Option<Pos2>,
pub drop_target: Option<usize>,
pub renaming_id: Option<usize>,
pub rename_text: String,
pub hovered_id: Option<usize>,
}Expand description
State for the Object Tree panel
Fields§
§folders: BTreeSet<Vec<String>>Known folder paths, including empty folders. Hosts may save and restore this set per chart; nonempty folders are also recovered from source rows on each frame.
collapsed_folders: BTreeSet<Vec<String>>Collapsed folder paths. Search temporarily expands matching descendants.
creating_folder: Option<Vec<String>>Parent of the folder being created by the name prompt.
visible_ids: Vec<usize>Drawing and source ids in the rendered order, used for range selection.
selected_ids: HashSet<usize>Currently selected item IDs
last_selected_id: Option<usize>Last selected ID (for shift-click range selection)
selection_anchor: Option<usize>Anchor ID for range selection
expanded_groups: HashSet<String>Expanded group headers
expanded_items: HashSet<usize>Expanded item IDs (showing properties)
data_window_expanded: boolData Window section expanded
filter_text: StringFilter text (search query)
filter_type: Option<SourceType>Filter by source type
dragging_id: Option<usize>Currently dragging item ID
drag_start_pos: Option<Pos2>Drag start position
drop_target: Option<usize>Drop target position (index)
renaming_id: Option<usize>Currently renaming item ID
rename_text: StringRename text buffer
hovered_id: Option<usize>Currently hovered item ID
Implementations§
Source§impl ObjectTreeState
impl ObjectTreeState
Sourcepub fn toggle_selection(&mut self, id: usize)
pub fn toggle_selection(&mut self, id: usize)
Add item to selection (toggle if already selected)
Sourcepub fn range_select(&mut self, id: usize, ordered_ids: &[usize])
pub fn range_select(&mut self, id: usize, ordered_ids: &[usize])
Range select from anchor to id (given a list of ordered IDs)
Sourcepub fn select_all(&mut self, all_ids: &[usize])
pub fn select_all(&mut self, all_ids: &[usize])
Select all items
Sourcepub fn clear_selection(&mut self)
pub fn clear_selection(&mut self)
Clear all selections
Sourcepub fn is_selected(&self, id: usize) -> bool
pub fn is_selected(&self, id: usize) -> bool
Check if item is selected
Sourcepub fn selection_count(&self) -> usize
pub fn selection_count(&self) -> usize
Get number of selected items
Sourcepub fn toggle_group(&mut self, group: &str)
pub fn toggle_group(&mut self, group: &str)
Toggle group expansion
Sourcepub fn is_group_expanded(&self, group: &str) -> bool
pub fn is_group_expanded(&self, group: &str) -> bool
Check if group is expanded
Sourcepub fn toggle_item(&mut self, id: usize)
pub fn toggle_item(&mut self, id: usize)
Toggle item expansion (properties)
Sourcepub fn is_item_expanded(&self, id: usize) -> bool
pub fn is_item_expanded(&self, id: usize) -> bool
Check if item is expanded
Sourcepub fn expand_all_groups(&mut self)
pub fn expand_all_groups(&mut self)
Expand all groups
Sourcepub fn collapse_all_groups(&mut self)
pub fn collapse_all_groups(&mut self)
Collapse all groups
Sourcepub fn set_filter(&mut self, text: impl Into<String>)
pub fn set_filter(&mut self, text: impl Into<String>)
Set filter text
Sourcepub fn clear_filter(&mut self)
pub fn clear_filter(&mut self)
Clear filter
Sourcepub fn has_filter(&self) -> bool
pub fn has_filter(&self) -> bool
Check if filter is active
Sourcepub fn start_rename(&mut self, id: usize, current_name: &str)
pub fn start_rename(&mut self, id: usize, current_name: &str)
Start renaming an item
Sourcepub fn cancel_rename(&mut self)
pub fn cancel_rename(&mut self)
Cancel rename
Sourcepub fn finish_rename(&mut self) -> Option<(usize, String)>
pub fn finish_rename(&mut self) -> Option<(usize, String)>
Finish rename and return new name if changed
Sourcepub fn start_drag(&mut self, id: usize, pos: Pos2)
pub fn start_drag(&mut self, id: usize, pos: Pos2)
Start dragging an item
Sourcepub fn set_drop_target(&mut self, target: Option<usize>)
pub fn set_drop_target(&mut self, target: Option<usize>)
Update drop target
Sourcepub fn is_dragging(&self) -> bool
pub fn is_dragging(&self) -> bool
Check if currently dragging
Sourcepub fn sync_selected_drawing(&mut self, selected_drawing: Option<usize>)
pub fn sync_selected_drawing(&mut self, selected_drawing: Option<usize>)
Sync selected drawing from an external selection.
If selected_drawing is Some, ensures it is the sole selection.
Trait Implementations§
Source§impl Clone for ObjectTreeState
impl Clone for ObjectTreeState
Source§fn clone(&self) -> ObjectTreeState
fn clone(&self) -> ObjectTreeState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObjectTreeState
impl Debug for ObjectTreeState
Source§impl Default for ObjectTreeState
impl Default for ObjectTreeState
Source§fn default() -> ObjectTreeState
fn default() -> ObjectTreeState
Auto Trait Implementations§
impl Freeze for ObjectTreeState
impl RefUnwindSafe for ObjectTreeState
impl Send for ObjectTreeState
impl Sync for ObjectTreeState
impl Unpin for ObjectTreeState
impl UnsafeUnpin for ObjectTreeState
impl UnwindSafe for ObjectTreeState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more