Skip to main content

StylePainter

Struct StylePainter 

Source
pub struct StylePainter;
Expand description

The painter a DockArea uses unless given another: every part painted from the Style, as before painters existed.

Trait Implementations§

Source§

impl Clone for StylePainter

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StylePainter

Source§

impl Debug for StylePainter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StylePainter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DockPainter for StylePainter

Source§

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<'_>)

A tab bar’s background, painted before its tabs. Read more
Source§

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<'_>)

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<'_>)

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<'_>)

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<'_>)

A separator between two nodes.
Source§

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<'_>)

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<'_>)

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<'_>)

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.
Source§

fn drop_button(&self, painter: &Painter, button: &DropButtonPaint<'_>)

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<'_>)

Where a dragged tab would land if released now, or why it may not (TabViewer::drop_allowed). Read more
Source§

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<'_>)

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<'_>, )

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<'_>)

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<'_>)

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<'_>)

The line between two groups of a ToolRow: across the row, in the middle of its room.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.