Skip to main content

ObjectTreeAction

Enum ObjectTreeAction 

Source
#[non_exhaustive]
pub enum ObjectTreeAction {
Show 34 variants None, Select(usize), AddToSelection(usize), RangeSelect(usize), ClearSelection, SelectAll, ToggleVisibility(usize), ShowAll, HideAll, HideSelected, ToggleLock(usize), LockAll, UnlockAll, Delete(usize), DeleteSelected, Duplicate(usize), DuplicateSelected, OpenProperties(usize), Rename(usize, String), ChangeColor(usize, Color32), BringToFront(usize), SendToBack(usize), MoveUp(usize), MoveDown(usize), MoveToPane(usize, PaneId), CreateFolder(Vec<String>, String), MoveToFolder(Vec<usize>, Vec<String>), SetFolderVisible(Vec<String>, bool), SetFolderLocked(Vec<String>, bool), ZoomTo(usize), OpenIndicatorSettings(usize), RemoveIndicator(usize), RemoveAllDrawings, RemoveAllIndicators,
}
Expand description

Actions that can be performed on objects in the tree

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

None

No action

§

Select(usize)

Select a single object (clears other selections)

§

AddToSelection(usize)

Add to selection (Ctrl+click)

§

RangeSelect(usize)

Range select (Shift+click)

§

ClearSelection

Clear all selections

§

SelectAll

Select all objects

§

ToggleVisibility(usize)

Toggle visibility of an object

§

ShowAll

Show all objects

§

HideAll

Hide all objects

§

HideSelected

Hide selected objects

§

ToggleLock(usize)

Toggle lock state of an object

§

LockAll

Lock all drawings

§

UnlockAll

Unlock all drawings

§

Delete(usize)

Delete an object

§

DeleteSelected

Delete all selected objects

§

Duplicate(usize)

Duplicate an object

§

DuplicateSelected

Duplicate all selected objects

§

OpenProperties(usize)

Open properties dialog for object

§

Rename(usize, String)

Rename an object (id, new_name)

§

ChangeColor(usize, Color32)

Change object color

§

BringToFront(usize)

Bring object to front

§

SendToBack(usize)

Send object to back

§

MoveUp(usize)

Move object up one level

§

MoveDown(usize)

Move object down one level

§

MoveToPane(usize, PaneId)

Move a drawing to a pane

§

CreateFolder(Vec<String>, String)

Create a named folder under a parent path and move selected drawings into it.

§

MoveToFolder(Vec<usize>, Vec<String>)

Move drawing ids into an existing folder, or an empty path for the root.

§

SetFolderVisible(Vec<String>, bool)

Set visibility of every drawing in a folder and its descendants.

§

SetFolderLocked(Vec<String>, bool)

Set locking of every drawing in a folder and its descendants.

§

ZoomTo(usize)

Zoom to object on chart (focus view)

§

OpenIndicatorSettings(usize)

Open indicator settings dialog

§

RemoveIndicator(usize)

Remove indicator

§

RemoveAllDrawings

Remove all drawings

§

RemoveAllIndicators

Remove all indicators

Implementations§

Source§

impl ObjectTreeAction

Source

pub fn is_none(&self) -> bool

Check if this is a no-op action

Source

pub fn is_selection_action(&self) -> bool

Check if this action modifies selection

Source

pub fn is_modification_action(&self) -> bool

Check if this action modifies objects

Source

pub fn requires_confirmation(&self) -> bool

Check if this action requires confirmation

Source

pub fn description(&self) -> String

Get a human-readable description of the action

Trait Implementations§

Source§

impl Clone for ObjectTreeAction

Source§

fn clone(&self) -> ObjectTreeAction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObjectTreeAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ObjectTreeAction

Source§

fn default() -> ObjectTreeAction

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ObjectTreeAction

Source§

fn eq(&self, other: &ObjectTreeAction) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ObjectTreeAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> MaybeSend for T
where T: Send + Sync + ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.