class

Egui::WindowFrame

Inherits Reference < Object

Constants

BORDER_DARK = Color32.new(58, 58, 58, 255)

The window outline — shared by every style except WindowsXp (which overrides this with its thick blue border): four pixel-aligned 1px solid bars, painted above every panel (z just under the popup layer) so the central panel's fill cannot cover them. The color follows the app theme (dark / light rim).

BORDER_LIGHT = Color32.new(190, 190, 190, 255)
EDGE = 6.0

Constructors

new(ctx : Context, title : String)
Source

Class methods

caption(height : Float64 | Nil = nil, &content : Context, Rect -> ) : Nil

Install caption content; the optional height replaces the style's caption height while the content is installed. WindowFrame.caption! removes it and restores the plain caption.

Source
caption!

Remove caption content (and the height override) — restores the plain caption with its title.

Source
caption_content?
Source
caption_height?
Source
icon=(icon : NamedTuple(rgba: Bytes, width: Int32, height: Int32) | Nil) : Nil
Source
icon?
Source
icon_texture(ctx : Context) : UInt64

The icon's texture id, registered lazily (once) on the context.

Source
maximized?
Source
resize_grips(ctx : Context, screen : Rect) : Nil

Grips along the window rim: hover/drag set the resize cursor, drag start hands the resize to the native loop (the compositor does the tracking, same rationale as the title-bar drag).

Source
show(ctx : Context, title : String, style : Style = Style::Windows) : Nil
Source
toggle_maximize
Source

Instance methods

border_color
Source
caption_height
Source
content_area(bar : Rect) : Rect | Nil

The caption region app content may claim (#caption hook): the whole bar by default; the Windows style overrides it to exclude the caption buttons.

Source
draw

Draw the frame for this frame. Call BEFORE the app's own panels — the caption is a top panel, so everything the app adds lands below it.

Source
paint_border(screen : Rect) : Nil
Source
paint_buttons(bar : Rect) : Nil

Interact + paint the caption buttons (Middle layer, z=50, so they win hit-tests over the drag strip at z=0).

Source
paint_caption(bar : Rect) : Nil

The caption background. Win11 has NO separator under the caption; macOS has one. Fills grow 1pt past the strip and ride z=1 (panels paint at z=0, the deferred central panel later) so no panel stroke can bleed through at the seam.

Source
paint_icon(bar : Rect) : Nil

The app icon at the caption's left edge (Windows idiom) — see .icon=. No-op by default; the Windows styles paint it.

Source
paint_title(bar : Rect) : Nil
Source
reserve_border(bar : Rect) : Nil

Reserve non-caption frame space (side/bottom borders) as panels so app content lays out INSIDE the frame. No-op by default; the WindowsXp style reserves its thick blue border here.

Source
title
Source

Nested types