pub struct TextLog<'a> { /* private fields */ }Expand description
The text log widget.
Implementations§
Source§impl<'a> TextLog<'a>
impl<'a> TextLog<'a>
Sourcepub fn new(id: impl Into<String>, source: &'a dyn LogSource) -> Self
pub fn new(id: impl Into<String>, source: &'a dyn LogSource) -> Self
A text log named id (its table’s id in steps and signals),
showing source.
Sourcepub fn label(self, label: impl Into<String>) -> Self
pub fn label(self, label: impl Into<String>) -> Self
Its accessible name (default: “Text log”).
Sourcepub fn time_cursor(self, time: Option<f64>) -> Self
pub fn time_cursor(self, time: Option<f64>) -> Self
The time cursor, on the entries’ time axis; the application passes it every pass. The rows at the latest time not after it are highlighted.
Sourcepub fn timeline(self, state: &'a mut TimelineState) -> Self
pub fn timeline(self, state: &'a mut TimelineState) -> Self
Follows a timeline: its playhead is the time cursor, its scale writes the times, and a row picked moves the playhead.
Sourcepub fn time_scale(self, scale: TimeScale) -> Self
pub fn time_scale(self, scale: TimeScale) -> Self
Writes the times in a timeline’s scale (1:02.500, a timecode,
bars and beats); a bound timeline gives its own. Without one, a
time is a plain number.
Sourcepub fn keep(self, keep: &'a (dyn Fn(usize) -> bool + 'a)) -> Self
pub fn keep(self, keep: &'a (dyn Fn(usize) -> bool + 'a)) -> Self
The application’s own filter, beside the log’s: only the entries
for which keep(index) holds are shown. Call
TextLogState::refilter when its answers change.
Sourcepub fn highlight_entity(self, path: Option<&'a str>) -> Self
pub fn highlight_entity(self, path: Option<&'a str>) -> Self
Tints the entity cell of the rows logged on path (an entity
selected or hovered elsewhere).
Sourcepub fn height(self, height: f32) -> Self
pub fn height(self, height: f32) -> Self
Its height, the filters included (default: what is available).
Sourcepub fn toolbar(self, on: bool) -> Self
pub fn toolbar(self, on: bool) -> Self
Shows the level chips, the text filter and Follow above the table (default: on).
Sourcepub fn reveal_cursor(self, on: bool) -> Self
pub fn reveal_cursor(self, on: bool) -> Self
Brings the rows at the time cursor into view when the cursor moves elsewhere than from this log (default: on).
Sourcepub fn app(self, app: &'a AppHandle) -> Self
pub fn app(self, app: &'a AppHandle) -> Self
Runs its table’s moments as steps of this application.
pub fn show(self, ui: &mut Ui, state: &mut TextLogState) -> TextLogOutput
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TextLog<'a>
impl<'a> !RefUnwindSafe for TextLog<'a>
impl<'a> !Send for TextLog<'a>
impl<'a> !Sync for TextLog<'a>
impl<'a> Unpin for TextLog<'a>
impl<'a> UnsafeUnpin for TextLog<'a>
impl<'a> !UnwindSafe for TextLog<'a>
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
§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> 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 more