Struct re_blueprint_tree::BlueprintTree
source · pub struct BlueprintTree {
blueprint_tree_scroll_to_item: Option<Item>,
candidate_drop_parent_container_id: Option<ContainerId>,
next_candidate_drop_parent_container_id: Option<ContainerId>,
}
Expand description
Holds the state of the blueprint tree UI.
Fields§
§blueprint_tree_scroll_to_item: Option<Item>
The item that should be focused on in the blueprint tree.
Set at each frame by Self::tree_ui
. This is similar to
ViewerContext::focused_item
but account for how specifically the blueprint tree should
handle the focused item.
candidate_drop_parent_container_id: Option<ContainerId>
Current candidate parent container for the ongoing drop. Should be drawn with special highlight.
See Self::is_candidate_drop_parent_container
for details.
next_candidate_drop_parent_container_id: Option<ContainerId>
Candidate parent container to be drawn on next frame.
We double-buffer this value to deal with ordering constraints.
Implementations§
source§impl BlueprintTree
impl BlueprintTree
sourcepub fn show(
&mut self,
ctx: &ViewerContext<'_>,
blueprint: &ViewportBlueprint,
ui: &mut Ui
)
pub fn show( &mut self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &mut Ui )
Show the Blueprint section of the left panel based on the current ViewportBlueprint
sourcefn tree_ui(
&mut self,
ctx: &ViewerContext<'_>,
blueprint: &ViewportBlueprint,
ui: &mut Ui
)
fn tree_ui( &mut self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &mut Ui )
Show the blueprint panel tree view.
sourcefn scroll_to_me_if_needed(&self, ui: &Ui, item: &Item, response: &Response)
fn scroll_to_me_if_needed(&self, ui: &Ui, item: &Item, response: &Response)
Check if the provided item should be scrolled to.
sourcefn default_open_for_data_result(group: &DataResultNode) -> bool
fn default_open_for_data_result(group: &DataResultNode) -> bool
If a group or spaceview has a total of this number of elements, show its subtree by default?
fn contents_ui( &mut self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &mut Ui, contents: &Contents, parent_visible: bool )
sourcefn root_container_tree_ui(
&mut self,
ctx: &ViewerContext<'_>,
blueprint: &ViewportBlueprint,
ui: &mut Ui
)
fn root_container_tree_ui( &mut self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &mut Ui )
Display the root container.
The root container is different from other containers in that it cannot be removed or dragged, and it cannot be collapsed, so it’s drawn without a collapsing triangle.
fn container_tree_ui( &mut self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &mut Ui, container_id: &ContainerId, parent_visible: bool )
fn space_view_entry_ui( &mut self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &mut Ui, space_view_id: &SpaceViewId, container_visible: bool )
fn space_view_entity_hierarchy_ui( &self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &mut Ui, query_result: &DataQueryResult, node_or_path: &DataResultNodeOrPath<'_>, space_view: &SpaceViewBlueprint, space_view_visible: bool, projection_mode: bool )
Add a button to trigger the addition of a new space view or container.
fn handle_root_container_drag_and_drop_interaction( &mut self, blueprint: &ViewportBlueprint, ui: &Ui, contents: Contents, response: &Response )
fn handle_drag_and_drop_interaction( &mut self, ctx: &ViewerContext<'_>, blueprint: &ViewportBlueprint, ui: &Ui, contents: Contents, response: &Response, body_response: Option<&Response> )
fn handle_empty_space_drag_and_drop_interaction( &mut self, blueprint: &ViewportBlueprint, ui: &Ui, empty_space: Rect )
fn handle_drop_target( &mut self, blueprint: &ViewportBlueprint, ui: &Ui, dragged_item_id: Contents, drop_target: &DropTarget<Contents> )
sourcefn is_candidate_drop_parent_container(&self, container_id: &ContainerId) -> bool
fn is_candidate_drop_parent_container(&self, container_id: &ContainerId) -> bool
Is the provided container the current candidate parent container for the ongoing drag?
When a drag is in progress, the candidate parent container for the dragged item should be highlighted. Note that this can happen when hovering said container, its direct children, or even the item just after it.
Trait Implementations§
source§impl Default for BlueprintTree
impl Default for BlueprintTree
source§fn default() -> BlueprintTree
fn default() -> BlueprintTree
Auto Trait Implementations§
impl Freeze for BlueprintTree
impl RefUnwindSafe for BlueprintTree
impl Send for BlueprintTree
impl Sync for BlueprintTree
impl Unpin for BlueprintTree
impl UnwindSafe for BlueprintTree
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request