ui::ClassicCaption¶
Header: winui/ui/themes/ClassicPalette.hpp.
A classic scheme's title bars and window borders: what a window under Frame::Themed draws its caption and frame with. Windows 98 added the gradient pair; a scheme without one has both ends of each caption the same color.
Example:
// A header strip in Windows 2000's active caption colors: white on navy `#0A246A`, the
// left end of a gradient whose right end is `#A6CAF0`.
const ui::ClassicPalette scheme = ui::ClassicPalette::windows_standard_2000();
const ui::ClassicCaption& caption = *scheme.caption;
window.set_content(ui::Border{
.background = caption.active,
.padding = ui::Symmetric{.horizontal = 8.0f, .vertical = 4.0f},
.content = ui::Text{.text = "Display Properties", .foreground = caption.text},
});
| Field | Type | Default | |
|---|---|---|---|
active |
Color |
The active window's caption, at its left end. | |
gradient_active |
Color |
The active caption's right end. | |
inactive |
Color |
An inactive window's caption, at its left end. | |
gradient_inactive |
Color |
The inactive caption's right end. | |
text |
Color |
The active window's title text. | |
inactive_text |
Color |
An inactive window's title text. | |
active_border |
Color |
The active window's sizing frame. | |
inactive_border |
Color |
An inactive window's sizing frame. | |
button_cell |
float |
18.0f |
The scheme's caption button cell, in pixels at 96 DPI: 18 in Windows Standard, 20 in High Contrast Black. The caption is a pixel taller than this, and a caption button is 2 pixels narrower and 4 shorter. |