pub struct TilemapDock { /* private fields */ }Implementations§
Source§impl TilemapDock
impl TilemapDock
Sourcepub fn set_tilemap(
&mut self,
tilemap: &Tilemap,
ui: &mut TheUI,
ctx: &mut TheContext,
)
pub fn set_tilemap( &mut self, tilemap: &Tilemap, ui: &mut TheUI, ctx: &mut TheContext, )
Set the current tilemap
Sourcepub fn set_tilemap_preview(&mut self, rgba_tile: TheRGBATile, _ui: &mut TheUI)
pub fn set_tilemap_preview(&mut self, rgba_tile: TheRGBATile, _ui: &mut TheUI)
Set the selection preview
Sourcepub fn compute_preview(&mut self, project: &mut Project, ui: &mut TheUI)
pub fn compute_preview(&mut self, project: &mut Project, ui: &mut TheUI)
Compute the selection preview
Trait Implementations§
Source§impl Dock for TilemapDock
impl Dock for TilemapDock
Source§fn draw_minimap(
&self,
buffer: &mut TheRGBABuffer,
_project: &Project,
ctx: &mut TheContext,
server_ctx: &ServerContext,
) -> bool
fn draw_minimap( &self, buffer: &mut TheRGBABuffer, _project: &Project, ctx: &mut TheContext, server_ctx: &ServerContext, ) -> bool
Draw the tile preview
fn new() -> Selfwhere
Self: Sized,
fn setup(&mut self, _ctx: &mut TheContext) -> TheCanvas
fn activate( &mut self, ui: &mut TheUI, ctx: &mut TheContext, project: &Project, server_ctx: &mut ServerContext, )
fn supports_actions(&self) -> bool
fn default_state(&self) -> DockDefaultState
fn handle_event( &mut self, event: &TheEvent, ui: &mut TheUI, ctx: &mut TheContext, project: &mut Project, _server_ctx: &mut ServerContext, ) -> bool
Source§fn supports_minimap_animation(&self) -> bool
fn supports_minimap_animation(&self) -> bool
Returns true if this dock animates minimap content (requires soft updates each tick).
fn minimized(&mut self, ui: &mut TheUI, ctx: &mut TheContext)
fn maximized_state(&self) -> DockMaximizedState
Source§fn import(
&mut self,
content: String,
ui: &mut TheUI,
ctx: &mut TheContext,
project: &mut Project,
server_ctx: &mut ServerContext,
)
fn import( &mut self, content: String, ui: &mut TheUI, ctx: &mut TheContext, project: &mut Project, server_ctx: &mut ServerContext, )
Dock supports an import operation from JSON.
Source§fn supports_undo(&self) -> bool
fn supports_undo(&self) -> bool
Returns true if this dock supports internal undo / redo.
Source§fn has_changes(&self) -> bool
fn has_changes(&self) -> bool
Returns true if this dock has unsaved changes in its undo stack.
Source§fn mark_saved(&mut self)
fn mark_saved(&mut self)
Mark dock-local undo state as saved.
Source§fn set_undo_state_to_ui(&self, ctx: &mut TheContext)
fn set_undo_state_to_ui(&self, ctx: &mut TheContext)
If the dock supports undo, set its current state to the UI.
Source§fn undo(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
project: &mut Project,
server_ctx: &mut ServerContext,
)
fn undo( &mut self, ui: &mut TheUI, ctx: &mut TheContext, project: &mut Project, server_ctx: &mut ServerContext, )
Undo an action in the current dock
Source§fn redo(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
project: &mut Project,
server_ctx: &mut ServerContext,
)
fn redo( &mut self, ui: &mut TheUI, ctx: &mut TheContext, project: &mut Project, server_ctx: &mut ServerContext, )
Redo an action in the current dock
Source§fn editor_tools(&self) -> Option<Vec<Box<dyn EditorTool>>>
fn editor_tools(&self) -> Option<Vec<Box<dyn EditorTool>>>
Returns the custom editor tools for this dock.
If None, no custom tools are available.
Source§fn apply_debug_data(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
project: &Project,
server_ctx: &ServerContext,
debug: &DebugModule,
)
fn apply_debug_data( &mut self, ui: &mut TheUI, ctx: &mut TheContext, project: &Project, server_ctx: &ServerContext, debug: &DebugModule, )
Apply a live debug overlay to the visible dock, if supported.
Auto Trait Implementations§
impl Freeze for TilemapDock
impl RefUnwindSafe for TilemapDock
impl Send for TilemapDock
impl Sync for TilemapDock
impl Unpin for TilemapDock
impl UnsafeUnpin for TilemapDock
impl UnwindSafe for TilemapDock
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
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.