pub struct ShaderEditorState {Show 18 fields
pub active_program_id: Option<u32>,
pub active_stage: ShaderStage,
pub cursor_line: u32,
pub cursor_col: u32,
pub scroll_top: u32,
pub selection: Option<(u32, u32, u32, u32)>,
pub font_size: f32,
pub show_line_numbers: bool,
pub show_minimap: bool,
pub syntax_highlight: bool,
pub auto_complete: bool,
pub bracket_matching: bool,
pub indent_guides: bool,
pub word_wrap: bool,
pub theme: String,
pub undo_stack: VecDeque<String>,
pub redo_stack: Vec<String>,
pub modified: bool,
}Fields§
§active_program_id: Option<u32>§active_stage: ShaderStage§cursor_line: u32§cursor_col: u32§scroll_top: u32§selection: Option<(u32, u32, u32, u32)>§font_size: f32§show_line_numbers: bool§show_minimap: bool§syntax_highlight: bool§auto_complete: bool§bracket_matching: bool§indent_guides: bool§word_wrap: bool§theme: String§undo_stack: VecDeque<String>§redo_stack: Vec<String>§modified: boolImplementations§
Source§impl ShaderEditorState
impl ShaderEditorState
pub fn new() -> Self
pub fn set_active(&mut self, id: u32, stage: ShaderStage)
pub fn move_cursor(&mut self, line: u32, col: u32)
pub fn push_undo(&mut self, desc: impl Into<String>)
pub fn can_undo(&self) -> bool
pub fn can_redo(&self) -> bool
pub fn undo(&mut self) -> Option<String>
pub fn redo(&mut self) -> Option<String>
pub fn mark_saved(&mut self)
pub fn increase_font(&mut self)
pub fn decrease_font(&mut self)
Trait Implementations§
Source§impl Clone for ShaderEditorState
impl Clone for ShaderEditorState
Source§impl Debug for ShaderEditorState
impl Debug for ShaderEditorState
Auto Trait Implementations§
impl Freeze for ShaderEditorState
impl RefUnwindSafe for ShaderEditorState
impl Send for ShaderEditorState
impl Sync for ShaderEditorState
impl Unpin for ShaderEditorState
impl UnsafeUnpin for ShaderEditorState
impl UnwindSafe for ShaderEditorState
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.