Jazz2::UI::Windows namespace

Toolkit of windows, panels and controls, compiled only if WITH_UI_WINDOWS.

It's used by the level editor, WITH_UI_WINDOWS is defined whenever WITH_EDITOR is.

Classes

class Button
Button with a text, an icon or both.
class CheckBox
Check box with a text.
class ColorPicker
Picks a color by its saturation and value in a square, its hue in a bar next to it, and optionally alpha.
class ColorSwatch
Shows a color, a translucent one over a checkerboard.
struct Context
What the interface is measured with.
class DetachedWindow
Window of the system an element of the interface is shown in, outside of the main window.
class Dialog
Window shown over the interface with a title, content and buttons.
class DockFrame
Panel that is docked at an edge of the screen or floats over everything else.
class DragBar
Row that moves what it belongs to when dragged, such as the title of a window.
class Dropdown
Shows a value and opens a menu to choose another one.
class Element
Element of the interface.
class FileDialog
Picks a file to open or to save to.
struct FileInfo
What a file dialog shows about the selected file next to the list, see FileDialog::InfoFunc.
struct FileKind
How a file is shown in the list of a file dialog, see FileDialog::KindFunc.
struct FileRoot
Place where files are looked for.
struct FileSpecialEntry
Row at the top of the list of a file dialog that stands for a value instead of a file, see FileDialog::SetSpecialEntries().
class Form
Rows of a label and what it's about, with the labels in a column as wide as the longest of them.
class FormRow
Row of a Form.
struct IconArt
How an icon is drawn, vector art or pixel art.
class IconId
Icon of the interface, a StockIcon or one of an application.
class Icons
Icons of the interface, those every interface has and those an application registers.
template<class T>
struct IsIconEnum
Tells whether an enum of an application holds icons, so it converts to IconId.
template<>
struct IsIconEnum<Editor::EditorIcon>
class Label
Text.
class MenuBar
Menu bar at the top of the window.
class MenuBarItem
Item of the menu bar, opens its menu.
struct MenuEntry
Item of a menu.
class MenuRow
Row of a menu.
struct MessageDialog
Shows a message with a choice of buttons.
class NumberBox
Number that can be dragged or typed.
class OnScreenKeyboard
Keyboard on the screen, for a gamepad or a touch screen where the system has none.
struct OverlayOptions
How an element shown over the interface behaves.
class Painter
Draws the interface.
class PaletteGrid
The 256 entries of a palette in a grid of 16 × 16, to pick one of them, or a range of them.
class Panel
A stack with a background.
struct PointerEvent
A pointer — the mouse, a finger or a virtual cursor — over the interface.
class PopupMenu
Menu shown over the interface.
class RadialMenu
Menu of items in a ring around a point, as the weapon wheel of the game.
class ReadableFont
Readable font of the interface, drawn from an outline font at the size text has.
struct ResizeEdges
Edges a window is resized by, for the windows that can be.
class ScrollView
Shows a part of its content and lets the rest be scrolled to.
class Separator
Line between parts of a panel.
class Skin
Texture the interface is drawn with.
class Splitter
Edge of a panel that is dragged to resize it.
class Stack
Places its children in a row or a column.
class Surface
Shows the interface and passes input to it.
class TextBox
Single line of text that can be edited.
struct Theme
Colors and sizes of the interface.
struct Thickness
Space around the content of an element, in units.
class VectorArt
Vector art described as text, drawn into pixels at any size.
class VirtualList
List of rows of the same height that draws only the rows that are seen.
class WrappedLabel
Text on as many lines as it needs in the width it gets.

Enums

enum class FileDialogMode : std::uint8_t { Open, Save }
What a file dialog is for.
enum class DockSide : std::uint8_t { Left, Right }
Edge of the screen a panel is docked at.
enum class Orientation : std::uint8_t { Horizontal, Vertical }
Orientation of a stack.
enum class PanelStyle : std::uint8_t { None, Panel, Floating, Header, Inset, Docked }
How a panel is drawn.
enum class StockIcon : std::uint16_t { None, Close, CloseSmall, Check, ChevronLeft, ChevronRight, ChevronDown, ArrowUp, ArrowDown, Up, Plus, Minus, Folder, File, Delete, Search, Info, Warning, Undock, Dock, CursorResizeHorizontal, CursorResizeVertical, CursorResizeNWSE, CursorResizeNESW, CursorMove, Count }
Icon every interface has, an application adds its own ones from IconId::FirstCustom, see Icons::Register().
enum class PaintLayer : std::uint8_t { Back, Fill, Content, Text, Overlay, OverlayText }
Layer of a slot, things of a later layer are drawn over those of an earlier one.
enum class CursorOverlay : std::uint8_t { None, ResizeHorizontal, ResizeVertical, ResizeDiagonalNWSE, ResizeDiagonalNESW, Move }
What is shown by the pointer, as the cursor of a window would show it, see Surface::SetCursorOverlay().
enum class BackdropKind : std::uint8_t { Panels, Overlays, UnderModal }
Part of the interface a blurred picture is drawn behind, see Surface::GetBackdrop.
enum class ThemeKind : std::int32_t { Default, HighContrast }
Theme of the interface.
enum class ButtonStyle : std::uint8_t { Normal, Flat, Accent }
How a button is drawn.

Functions

auto LerpColor(const Colorf& a, const Colorf& b, float t) -> Colorf
Returns a color between two others, 0 for the first and 1 for the second.

Enum documentation

enum class Jazz2::UI::Windows::FileDialogMode : std::uint8_t

What a file dialog is for.

Enumerators
Open

Opening an existing file

Save

Saving a file, a new name can be typed

enum class Jazz2::UI::Windows::DockSide : std::uint8_t

Edge of the screen a panel is docked at.

Enumerators
Left

Left edge

Right

Right edge

enum class Jazz2::UI::Windows::Orientation : std::uint8_t

Orientation of a stack.

enum class Jazz2::UI::Windows::PanelStyle : std::uint8_t

How a panel is drawn.

Enumerators
None

Not at all, only the children

Panel

As a panel with a border

Floating

As a panel with a border and a shadow

Header

As the header of a panel

Inset

As a sunken area, such as a list

Docked

As a panel with a border and square corners, docked at an edge of the screen

enum class Jazz2::UI::Windows::StockIcon : std::uint16_t

Icon every interface has, an application adds its own ones from IconId::FirstCustom, see Icons::Register().

Enumerators
None

Close

CloseSmall

A smaller and thinner Close, for a menu bar

Check

ChevronLeft

ChevronRight

ChevronDown

ArrowUp

ArrowDown

Up

A folder with an arrow up, the folder a folder is in

Plus

Minus

Folder

File

Delete

Search

Info

Warning

Undock

Lifts a panel out of where it's docked

Dock

Puts a lifted panel back

CursorResizeHorizontal

Shown by the pointer, see CursorOverlay

CursorResizeVertical

CursorResizeNWSE

CursorResizeNESW

CursorMove

Count

enum class Jazz2::UI::Windows::PaintLayer : std::uint8_t

Layer of a slot, things of a later layer are drawn over those of an earlier one.

Enumerators
Back

Shadows

Fill

Backgrounds of panels and controls

Content

Images, tiles and icons

Text

Text

Overlay

Highlights and outlines over the content

OverlayText

Text over the highlights

enum class Jazz2::UI::Windows::CursorOverlay : std::uint8_t

What is shown by the pointer, as the cursor of a window would show it, see Surface::SetCursorOverlay().

Enumerators
None

Nothing

ResizeHorizontal

Left and right, a vertical edge

ResizeVertical

Up and down, a horizontal edge

ResizeDiagonalNWSE

Top left and bottom right corners

ResizeDiagonalNESW

Top right and bottom left corners

Move

All four directions, something moved as a whole

enum class Jazz2::UI::Windows::BackdropKind : std::uint8_t

Part of the interface a blurred picture is drawn behind, see Surface::GetBackdrop.

Enumerators
Panels

The tree of the interface, over the level and what is shown over the level

Overlays

Windows, menus and messages, also over the panels

UnderModal

Windows under a modal window, drawn into the picture of the level with the panels then, see Surface::HasStackedModal()

enum class Jazz2::UI::Windows::ThemeKind : std::int32_t

Theme of the interface.

Enumerators
Default

The usual one

HighContrast

Opaque panels, bright borders and text

enum class Jazz2::UI::Windows::ButtonStyle : std::uint8_t

How a button is drawn.

Enumerators
Normal

With a background

Flat

With a background only when it's pointed at or checked

Accent

Highlighted, for the main action

Function documentation

Colorf Jazz2::UI::Windows::LerpColor(const Colorf& a, const Colorf& b, float t)

Returns a color between two others, 0 for the first and 1 for the second.