pub struct Sidebar {
pub width: i32,
pub startup: bool,
/* private fields */
}Fields§
§width: i32§startup: boolImplementations§
Source§impl Sidebar
impl Sidebar
pub fn new() -> Self
pub fn init_ui( &mut self, ui: &mut TheUI, ctx: &mut TheContext, server_ctx: &mut ServerContext, )
pub fn handle_event( &mut self, event: &TheEvent, ui: &mut TheUI, ctx: &mut TheContext, project: &mut Project, server_ctx: &mut ServerContext, ) -> bool
Sourcepub fn load_from_project(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn load_from_project( &mut self, ui: &mut TheUI, ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply th given project to the UI
Sourcepub fn apply_screen(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
screen: Option<&Screen>,
)
pub fn apply_screen( &mut self, ui: &mut TheUI, ctx: &mut TheContext, screen: Option<&Screen>, )
Apply the given screen to the UI
Sourcepub fn apply_avatars(
&mut self,
ui: &mut TheUI,
_ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn apply_avatars( &mut self, ui: &mut TheUI, _ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply the avatars
Sourcepub fn apply_regions(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn apply_regions( &mut self, ui: &mut TheUI, ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply the current regions to the tree.
Sourcepub fn apply_characters(
&mut self,
ui: &mut TheUI,
_ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn apply_characters( &mut self, ui: &mut TheUI, _ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply the current characters to the tree.
Sourcepub fn apply_items(
&mut self,
ui: &mut TheUI,
_ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn apply_items( &mut self, ui: &mut TheUI, _ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply the current items to the tree.
Sourcepub fn apply_tilemaps(
&mut self,
ui: &mut TheUI,
_ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn apply_tilemaps( &mut self, ui: &mut TheUI, _ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply the current tilemaps to the tree.
Sourcepub fn apply_screens(
&mut self,
ui: &mut TheUI,
_ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn apply_screens( &mut self, ui: &mut TheUI, _ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply the current screens to the tree.
Sourcepub fn apply_assets(
&mut self,
ui: &mut TheUI,
_ctx: &mut TheContext,
server_ctx: &mut ServerContext,
project: &mut Project,
)
pub fn apply_assets( &mut self, ui: &mut TheUI, _ctx: &mut TheContext, server_ctx: &mut ServerContext, project: &mut Project, )
Apply the current assets to the tree.
Sourcepub fn apply_region(
&mut self,
_ui: &mut TheUI,
_ctx: &mut TheContext,
_region_id: Option<Uuid>,
_project: &mut Project,
)
pub fn apply_region( &mut self, _ui: &mut TheUI, _ctx: &mut TheContext, _region_id: Option<Uuid>, _project: &mut Project, )
Apply the given item to the UI
Sourcepub fn show_filtered_tiles(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
tilemap: Option<&Tilemap>,
)
pub fn show_filtered_tiles( &mut self, ui: &mut TheUI, ctx: &mut TheContext, tilemap: Option<&Tilemap>, )
Shows the filtered tiles of the given tilemap.
Sourcepub fn show_actions(
&mut self,
ui: &mut TheUI,
ctx: &mut TheContext,
project: &Project,
server_ctx: &mut ServerContext,
)
pub fn show_actions( &mut self, ui: &mut TheUI, ctx: &mut TheContext, project: &Project, server_ctx: &mut ServerContext, )
Shows the filtered actions for the current selection.
Sourcepub fn apply_asset(
&mut self,
_ui: &mut TheUI,
_ctx: &mut TheContext,
_asset: Option<&Asset>,
)
pub fn apply_asset( &mut self, _ui: &mut TheUI, _ctx: &mut TheContext, _asset: Option<&Asset>, )
Apply the given asset to the UI
Deselects the section buttons
Sourcepub fn get_selected_in_list_layout(
&self,
ui: &mut TheUI,
layout_name: &str,
) -> Option<TheId>
pub fn get_selected_in_list_layout( &self, ui: &mut TheUI, layout_name: &str, ) -> Option<TheId>
Returns the selected id in the given list layout
Sourcepub fn deselect_all(&self, layout_name: &str, ui: &mut TheUI)
pub fn deselect_all(&self, layout_name: &str, ui: &mut TheUI)
Deselects all items in the given list layout.
Sourcepub fn clear_debug_messages(&self, ui: &mut TheUI, ctx: &mut TheContext)
pub fn clear_debug_messages(&self, ui: &mut TheUI, ctx: &mut TheContext)
Clears the debug messages.
pub fn apply_action( &self, action: &Box<dyn Action>, map: &mut Map, ui: &mut TheUI, ctx: &mut TheContext, server_ctx: &mut ServerContext, param_update: bool, ) -> bool
Sourcepub fn update_tiles(
&mut self,
_ui: &mut TheUI,
ctx: &mut TheContext,
project: &mut Project,
)
pub fn update_tiles( &mut self, _ui: &mut TheUI, ctx: &mut TheContext, project: &mut Project, )
Tilemaps in the project have been updated, propagate the change to all relevant parties.
Auto Trait Implementations§
impl Freeze for Sidebar
impl RefUnwindSafe for Sidebar
impl Send for Sidebar
impl Sync for Sidebar
impl Unpin for Sidebar
impl UnsafeUnpin for Sidebar
impl UnwindSafe for Sidebar
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.