class

Egui::WindowFrame::WindowsXp

Inherits Egui::WindowFrame < Reference < Object

========================================================================== Windows XP — the classic Luna theme (~2002): blue gradient titlebar with glossy rounded caption buttons (red close), the app icon slot, and a 2pt blue frame around the client area — the only style that reserves border space (#reserve_border).

Constants

BORDER_W = 2.0
BTN = 25.0
BTN_BOTTOM = Color32.new(33, 82, 204, 255)
BTN_DOWN_BOT = Color32.new(18, 52, 158, 255)
BTN_DOWN_TOP = Color32.new(52, 104, 196, 255)
BTN_GAP = 2.0
BTN_HOT_BOT = Color32.new(58, 110, 228, 255)
BTN_HOT_TOP = Color32.new(130, 185, 255, 255)
BTN_INSET = 4.0
BTN_RING = Color32.new(23, 51, 143, 255)
BTN_TOP = Color32.new(94, 158, 245, 255)

Glossy caption buttons: blue min/max, red close — gradient stops plus a darker ring and hover/press variants.

CAP_DEEP = Color32.new(50, 101, 254, 255)
CAP_LIGHT = Color32.new(0, 104, 254, 255)

Luna blue titlebar, measured off a genuine XP screenshot (the Security Center SP2 shot on Wikipedia, lossless PNG): a bright band over the top quarter, and a body that LIGHTENS toward the bottom (not the other way round) before the inner hairline.

CAP_MID = Color32.new(2, 53, 206, 255)
CAPTION_H = 42.0
CLOSE_BOTTOM = Color32.new(202, 44, 10, 255)
CLOSE_DOWN_BOT = Color32.new(150, 26, 6, 255)
CLOSE_DOWN_TOP = Color32.new(190, 60, 24, 255)
CLOSE_HOT_BOT = Color32.new(222, 66, 24, 255)
CLOSE_HOT_TOP = Color32.new(255, 160, 120, 255)
CLOSE_RING = Color32.new(127, 29, 6, 255)
CLOSE_TOP = Color32.new(245, 130, 92, 255)
FG = Color32.new(255, 255, 255, 255)
FRAME = Color32.new(47, 90, 201, 255)

The frame: the real Luna border is a beveled deep blue (#0342C6 with #688EDD highlight rows) — solid average ≈ #2F5AC9, with a near-black-blue outer line and a light bevel at the client edge.

FRAME_INNER = Color32.new(104, 142, 221, 255)
FRAME_OUTER = Color32.new(0, 32, 164, 255)
ICON_GAP = 4.0
ICON_PAD = 6.0
ICON_SIZE = 16.0
TITLE_PAD = 8.0
TITLE_PT = 16.0
TITLE_SHADOW = Color32.new(0, 40, 130, 255)

Instance methods

btn_down
Source
btn_fill
Source
btn_hot
Source
btn_ring
Source
cap_deep
Source
cap_light

Palette hooks: the Luna colors above, routed through instance methods so the Silver variant (WindowsXpSilver) can recolor the whole chrome without duplicating the painting code. The button methods return the gradient/hover/press tuples #paint_buttons hands to #glossy_button.

Source
cap_mid
Source
caption_height
Source
close_down
Source
close_fill
Source
close_glyph

The close glyph color — white over the red in Luna; the Silver close fill is dark enough to keep a white glyph too.

Source
close_hot
Source
close_ring
Source
content_area(bar : Rect) : Rect | Nil

Caption content (the #caption hook) claims everything left of the caption buttons — and, with an icon installed, only after the icon slot.

Source
frame_color
Source
frame_inner
Source
frame_outer
Source
paint_border(screen : Rect) : Nil

The thick blue Luna frame (space reserved by #reserve_border): the rim strips filled solid blue, a navy outline around the window and a light hairline where the frame meets the client area.

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

The thick blue frame: side/bottom panels bite the rim so app content lays out INSIDE the frame — a real XP client area, not content overdrawn by the border.

Source
title_shadow
Source