VisualTheme

This is your entry point to create your own visual theme for custom widgets.

You will want to inherit from this with a final class, passing your own class as the CRTP argument, then define the necessary methods.

Compatibility note: future versions of minigui may add new methods here. You will likely need to implement them when updating.

abstract
class VisualTheme : BaseVisualTheme (
CRTP
) {}

Inherited Members

From BaseVisualTheme

doPaint
void doPaint(Widget widget, WidgetPainter painter)

Don't implement this, instead use VisualTheme and implement paint methods on specific subclasses you want to override.

getPropertyString
string getPropertyString(Widget widget, string propertyName)

Returns the property as a string, or null if it was not overridden in the style definition. The idea here is something like css, where the interpretation of the string varies for each property and may include things like measurement units.

windowBackgroundColor
Color windowBackgroundColor()

Default background color of the window. Widgets also use this to simulate transparency.

selectionForegroundColor
Color selectionForegroundColor()
selectionBackgroundColor
Color selectionBackgroundColor()

Colors used to indicate active selections in lists and text boxes, etc.

defaultFont
OperatingSystemFont defaultFont(int dpi)

If you return null it will use simpledisplay's default. Otherwise, you return what font you want and it will cache it internally.

Meta