pub struct UiCanvasEditor {Show 23 fields
pub canvas: UiCanvas,
pub selected_widgets: Vec<u64>,
pub tool: UiEditorTool,
pub active_panel: UiEditorPanel,
pub zoom: f32,
pub pan: Vec2,
pub show_grid: bool,
pub grid_size: f32,
pub snap_to_grid: bool,
pub show_ruler: bool,
pub show_guides: bool,
pub guides: Vec<(bool, f32)>,
pub theme_names: Vec<String>,
pub active_theme: usize,
pub themes: Vec<UiTheme>,
pub history: Vec<Vec<Widget>>,
pub history_pos: usize,
pub search_query: String,
pub preview_responsive: bool,
pub preview_width: f32,
pub preview_height: f32,
pub show_layout_debug: bool,
pub animate_transitions: bool,
}Fields§
§canvas: UiCanvas§selected_widgets: Vec<u64>§tool: UiEditorTool§active_panel: UiEditorPanel§zoom: f32§pan: Vec2§show_grid: bool§grid_size: f32§snap_to_grid: bool§show_ruler: bool§show_guides: bool§guides: Vec<(bool, f32)>§theme_names: Vec<String>§active_theme: usize§themes: Vec<UiTheme>§history: Vec<Vec<Widget>>§history_pos: usize§search_query: String§preview_responsive: bool§preview_width: f32§preview_height: f32§show_layout_debug: bool§animate_transitions: boolImplementations§
Source§impl UiCanvasEditor
impl UiCanvasEditor
pub fn new() -> Self
pub fn select(&mut self, id: u64)
pub fn add_to_selection(&mut self, id: u64)
pub fn deselect_all(&mut self)
pub fn selected_widget(&self) -> Option<&Widget>
pub fn snapshot(&mut self)
pub fn undo(&mut self)
pub fn redo(&mut self)
pub fn current_theme(&self) -> &UiTheme
pub fn screen_to_canvas(&self, screen: Vec2) -> Vec2
pub fn canvas_to_screen(&self, canvas: Vec2) -> Vec2
pub fn hit_test_canvas(&self, screen: Vec2) -> Option<u64>
pub fn search_widgets(&self, query: &str) -> Vec<&Widget>
pub fn duplicate_selected(&mut self)
Trait Implementations§
Source§impl Clone for UiCanvasEditor
impl Clone for UiCanvasEditor
Auto Trait Implementations§
impl Freeze for UiCanvasEditor
impl RefUnwindSafe for UiCanvasEditor
impl Send for UiCanvasEditor
impl Sync for UiCanvasEditor
impl Unpin for UiCanvasEditor
impl UnsafeUnpin for UiCanvasEditor
impl UnwindSafe for UiCanvasEditor
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
Mutably borrows from an owned value. Read more
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.