pub struct StylePainter;Expand description
Trait Implementations§
Source§impl Clone for StylePainter
impl Clone for StylePainter
impl Copy for StylePainter
Source§impl Debug for StylePainter
impl Debug for StylePainter
Source§impl Default for StylePainter
impl Default for StylePainter
Source§impl DockPainter for StylePainter
impl DockPainter for StylePainter
Source§fn tab_width(&self, tab: &TabMeasure<'_>) -> f32
fn tab_width(&self, tab: &TabMeasure<'_>) -> f32
The width of a tab, padding and close button included. A tab bar filling its width
(
TabBarStyle::fill_tab_bar) can still make it
wider.Source§fn tab_bar(&self, painter: &Painter, bar: &TabBarPaint<'_>)
fn tab_bar(&self, painter: &Painter, bar: &TabBarPaint<'_>)
A tab bar’s background, painted before its tabs. Read more
Source§fn tab(&self, painter: &Painter, tab: &TabPaint<'_>)
fn tab(&self, painter: &Painter, tab: &TabPaint<'_>)
A tab, with its title and its close button if it has one. Read more
Source§fn tab_bar_tail(&self, painter: &Painter, tail: &TabBarTailPaint<'_>)
fn tab_bar_tail(&self, painter: &Painter, tail: &TabBarTailPaint<'_>)
The part of a tab bar right of its last tab, its buttons included, painted after the
tabs; and, when the bar starts with a collapse button, that button’s slot at its left
end, painted the same way. The default paints the line under the bar, which parts it
from the body, and so runs under every button: none when the leaf is folded.
Source§fn tab_bar_grip(&self, painter: &Painter, grip: &TabBarGripPaint<'_>)
fn tab_bar_grip(&self, painter: &Painter, grip: &TabBarGripPaint<'_>)
The grip at the end of a tab bar, which moves the whole tab group
(
GroupHandles::GRIP), painted after the bar’s tail. The
default paints two columns of three dots, on a background when the grip is hovered,
focused or dragged.Source§fn tab_body(&self, painter: &Painter, body: &TabBodyPaint<'_>)
fn tab_body(&self, painter: &Painter, body: &TabBodyPaint<'_>)
A leaf’s body border, painted over the body’s background and before its contents. Read more
Source§fn separator(&self, painter: &Painter, separator: &SeparatorPaint<'_>)
fn separator(&self, painter: &Painter, separator: &SeparatorPaint<'_>)
A separator between two nodes.
Source§fn drop_target(&self, painter: &Painter, target: &DropTargetPaint<'_>)
fn drop_target(&self, painter: &Painter, target: &DropTargetPaint<'_>)
While a tab is dragged, the node or surface under the pointer, painted first.
Source§fn window_outline(&self, painter: &Painter, outline: &WindowOutlinePaint<'_>)
fn window_outline(&self, painter: &Painter, outline: &WindowOutlinePaint<'_>)
While a tab is dragged out of another window where the system hides window positions
(Wayland), a dock of this window that could take it: no window can tell whether the
pointer is over it before the release, so each outlines its docks
(
DockSpace::dragging). The default strokes the dock’s
rect with OverlayStyle::zone_stroke, in the error
color where the drop would be refused.Source§fn dragged_group(&self, painter: &Painter, group: &DraggedGroupPaint<'_>)
fn dragged_group(&self, painter: &Painter, group: &DraggedGroupPaint<'_>)
While a whole tab group is dragged, its ghost under the pointer: its tab bar with the
tabs that fit, the active one
SELECTED, a “+N” for the others,
and a hint of its body below. It is painted on a layer above the drop overlay, in every
window of a DockSpace the pointer is over. The default paints a
translucent frame with a shadow, the bar and its tabs through
tab_bar and tab, and the body’s background, see-through
enough to show the drop overlay under it, unless the application paints the body
(body_painted).Source§fn dragged_tab(&self, painter: &Painter, tab: &DraggedGroupPaint<'_>)
fn dragged_tab(&self, painter: &Painter, tab: &DraggedGroupPaint<'_>)
While a single tab is dragged, its ghost under the pointer: a one-tab group’s, holding
just that tab (
count is 1), sized and placed as a group’s
ghost is. It is painted on a layer above the drop overlay, in every window of a
DockSpace the pointer is over. The default paints it as
dragged_group does, so that both ghosts look the same.One of the drop overlay’s buttons (
OverlayType::Widgets):
the middle one (no split) or a split’s.Source§fn drop_preview(&self, painter: &Painter, drop: &DropPaint<'_>)
fn drop_preview(&self, painter: &Painter, drop: &DropPaint<'_>)
Where a dragged tab would land if released now, or why it may not
(
TabViewer::drop_allowed). Read moreSource§fn restore_band(&self, painter: &Painter, band: &RestoreBandPaint<'_>)
fn restore_band(&self, painter: &Painter, band: &RestoreBandPaint<'_>)
A collapsed zone’s restore band, while a tab is dragged
(
Fold::Collapse): every band of the layout, the one
under the pointer hovered. A band restores a zone instead of splitting one, so it looks
unlike the drop zones: the default paints a dashed line of
OverlayStyle::selection_color along the band,
filled in when hovered. Where the zone would come back is the
drop_preview painted next.Source§fn section_band(&self, painter: &Painter, band: &SectionBandPaint<'_>)
fn section_band(&self, painter: &Painter, band: &SectionBandPaint<'_>)
The title band of a section in a
Sections stack: its
background, its disclosure mark, its title and its count. Painted from the band’s
egui::Style, as a section stack has no dock Style.Source§fn section_boundary(
&self,
painter: &Painter,
boundary: &SectionBoundaryPaint<'_>,
)
fn section_boundary( &self, painter: &Painter, boundary: &SectionBoundaryPaint<'_>, )
A boundary between two sections of a
Sections stack, which
resizes the open section above it. Painted after the bands, so that a focus ring shows
over them. The default paints nothing at rest: the bands’ own lines part the sections.Source§fn tool_item(&self, painter: &Painter, item: &ToolItemPaint<'_>)
fn tool_item(&self, painter: &Painter, item: &ToolItemPaint<'_>)
A tool of a
ToolRow (a button, a toggle, a menu), or a row
of its More menu (ToolItemPaint::in_menu): its background, icon (or a spinner while
busy), label and mark. The row lays it out: the painter paints at the places it is given.
Painted from the row’s egui::Style.Source§fn tool_more(&self, painter: &Painter, more: &ToolMorePaint<'_>)
fn tool_more(&self, painter: &Painter, more: &ToolMorePaint<'_>)
The More button at the end of a
ToolRow, shown when some
tools do not fit: it opens them as a menu. The default paints three dots, along the row.Source§fn tool_separator(&self, painter: &Painter, separator: &ToolSeparatorPaint<'_>)
fn tool_separator(&self, painter: &Painter, separator: &ToolSeparatorPaint<'_>)
The line between two groups of a
ToolRow: across the row,
in the middle of its room.Auto Trait Implementations§
impl Forget for StylePainter
impl Freeze for StylePainter
impl Move for StylePainter
impl RefUnwindSafe for StylePainter
impl Send for StylePainter
impl Sync for StylePainter
impl Unpin for StylePainter
impl UnsafeUnpin for StylePainter
impl UnwindSafe for StylePainter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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