pub struct TreeRowResponse<R> {
pub id: Id,
pub toggle: Option<Response>,
pub row: InnerResponse<R>,
pub open: bool,
pub toggled: bool,
/* private fields */
}Expand description
A shown tree row: its toggle, its row, and the rows below it.
Fields§
§id: IdThe row’s id: where its open state is kept (is_open).
toggle: Option<Response>The toggle’s response, a branch’s only.
row: InnerResponse<R>What the row returned, and the response of the whole row.
open: boolWhether it is open after the pass (a leaf never is).
toggled: boolWhether the user folded or opened it this pass.
Implementations§
Source§impl<R> TreeRowResponse<R>
impl<R> TreeRowResponse<R>
Sourcepub fn body<B>(
self,
ui: &mut Ui,
add: impl FnOnce(&mut Ui) -> B,
) -> Option<InnerResponse<B>>
pub fn body<B>( self, ui: &mut Ui, add: impl FnOnce(&mut Ui) -> B, ) -> Option<InnerResponse<B>>
Shows the rows below a branch, indented, when it is open (nothing for a leaf), and keeps its state.
Sourcepub fn keep(self, ctx: &Context)
pub fn keep(self, ctx: &Context)
Keeps a branch’s state without showing rows below it (the caller
draws them itself when TreeRowResponse::open).
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for TreeRowResponse<R>where
R: Freeze,
impl<R> !RefUnwindSafe for TreeRowResponse<R>
impl<R> Send for TreeRowResponse<R>where
R: Send,
impl<R> Sync for TreeRowResponse<R>where
R: Sync,
impl<R> Unpin for TreeRowResponse<R>where
R: Unpin,
impl<R> UnsafeUnpin for TreeRowResponse<R>where
R: UnsafeUnpin,
impl<R> !UnwindSafe for TreeRowResponse<R>
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> 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 more