pub struct LogView<Msg> { /* private fields */ }Expand description
A view of a LogBuffer that follows new lines as they arrive.
While the view is at the bottom it follows the tail; scrolling up (wheel, keys, scrollbar)
stops following and a faint note at the bottom counts the lines below; reaching the bottom
again, End or a click on the note resumes. Each line shows its faint timestamp, its level as
a word in the level’s status colour and the message. LogView::min_level hides less
important lines and LogView::search keeps only lines containing the query, with the
matches highlighted; a lowercase query ignores case. Only the lines on screen are drawn and
filtering is incremental, so large buffers stay fast.
Keys while focused: ↑/↓ or k/j move a line cursor (shift extends a selection), PgUp/PgDn
page, Home jumps to the oldest line, End follows the tail again, Esc clears the cursor, c
copies the selected lines or the cursor line. A click places the cursor, shift-click or
dragging extends the selection.
A right click on the selected lines (elsewhere it first places the cursor on that line), or
Shift+F10 and the menu key, opens a menu with Copy and Raw copy. Copy writes each line as
time level message with single spaces, like c; Raw copy keeps the columns lined up as
they are shown.
Style keys: list-item (hover, selected, focus) for the rows like
List; log-time; log-level.<level> for trace, debug, info, warn,
error; log-match for search matches; log-more for the lines-below note; list-header
for the empty text; scrollbar. Framework strings: quvyta.log.below,
quvyta.log.no-match.
Implementations§
Trait Implementations§
Source§impl<Msg: 'static> Widget<Msg> for LogView<Msg>
impl<Msg: 'static> Widget<Msg> for LogView<Msg>
Source§fn measure(&self, _cx: &mut MeasureCx<'_>, available: Size) -> Size
fn measure(&self, _cx: &mut MeasureCx<'_>, available: Size) -> Size
available.Source§fn paint_overlay(&self, cx: &mut PaintCx<'_>, anchor: Rect)
fn paint_overlay(&self, cx: &mut PaintCx<'_>, anchor: Rect)
PaintCx::request_overlay. anchor is the area the widget was painted in.Source§fn event(&self, cx: &mut EventCx<'_, Msg>, event: &Event) -> bool
fn event(&self, cx: &mut EventCx<'_, Msg>, event: &Event) -> bool
true when the event was used; unused key and scroll events
bubble to the parent widget.Source§fn children_mut(&mut self) -> &mut [Node<Msg>]
fn children_mut(&mut self) -> &mut [Node<Msg>]
Auto Trait Implementations§
impl<Msg> !RefUnwindSafe for LogView<Msg>
impl<Msg> !Send for LogView<Msg>
impl<Msg> !Sync for LogView<Msg>
impl<Msg> !UnwindSafe for LogView<Msg>
impl<Msg> Freeze for LogView<Msg>
impl<Msg> Unpin for LogView<Msg>
impl<Msg> UnsafeUnpin for LogView<Msg>
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> 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