WidgetPainter

Encapsulates the simpledisplay ScreenPainter for use on a Widget, with VisualTheme and invalidated area awareness.

Alias This

screenPainter

Forward to the screen painter for all other methods, see arsd.simpledisplay.ScreenPainter for more information

Members

Functions

drawThemeBackground
void drawThemeBackground()

First, draw the background. Then draw your content. Next, draw the border. And the focused indicator. And the is-selected box.

drawThemed
void drawThemed(Rectangle delegate(const Rectangle bounds) drawBody)

Draws the general pattern of a widget if you don't need anything particularly special and/or control the other details through your widget's style theme hints.

notifyCursorPosition
void notifyCursorPosition(int x, int y, int width, int height)

EXPERIMENTAL. subject to change.

setClipRectangle
Rectangle setClipRectangle(Rectangle rectangle)
Rectangle setClipRectangle(Point upperLeft, int width, int height)
Rectangle setClipRectangle(Point upperLeft, Size size)

Sets the clip rectangle to the given settings. It will automatically calculate the intersection of your widget's content boundaries and your requested clip rectangle.

themeBackground
Color themeBackground()
themeForeground
Color themeForeground()

Functions to access the visual theme and helpers to easily use it.

Properties

visualTheme
BaseVisualTheme visualTheme [@property getter]
BaseVisualTheme visualTheme [@property setter]

Functions to access the visual theme and helpers to easily use it.

Variables

invalidatedRectangles
Rectangle[] invalidatedRectangles;

This is the list of rectangles that actually need to be redrawn.

screenPainter
ScreenPainter screenPainter;

Meta