simpleTextButtonRenderer

inline fun <T : Button> simpleTextButtonRenderer(textMetrics: TextMetrics, crossinline render: CommonTextButtonBehavior<T>.(button: T, canvas: Canvas) -> Unit): Behavior<T>(source)

Creates a CommonTextButtonBehavior<Button> that uses render to draw a button's contents.

Return

a new CommonTextButtonBehavior

Parameters

textMetrics

used by the backing behavior

render

called when updating the button


inline fun <T : Button> simpleTextButtonRenderer(textMetrics: TextMetrics, focusManager: FocusManager?, crossinline render: CommonTextButtonBehavior<T>.(button: T, canvas: Canvas) -> Unit): Behavior<T>(source)

Creates a CommonTextButtonBehavior<Button> that uses render to draw a button's contents.

Return

a new CommonTextButtonBehavior

Parameters

textMetrics

used by the backing behavior

focusManager

used by the backing behavior

render

called when updating the button


inline fun <T : Button> simpleTextButtonRenderer(textMetrics: TextMetrics, focusManager: FocusManager? = null, insets: Insets = None, crossinline render: CommonTextButtonBehavior<T>.(button: T, canvas: Canvas) -> Unit): Behavior<T>(source)

Creates a CommonTextButtonBehavior<Button> that uses render to draw a button's contents.

Return

a new CommonTextButtonBehavior

Parameters

textMetrics

used by the backing behavior

focusManager

used by the backing behavior

insets

used by the backing behavior

render

called when updating the button


inline fun <T : Button> simpleTextButtonRenderer(textMetrics: TextMetrics, focusManager: FocusManager? = null, insets: Insets = None, crossinline contains: (T, Point) -> Boolean, crossinline render: CommonTextButtonBehavior<T>.(button: T, canvas: Canvas) -> Unit): Behavior<T>(source)

Creates a CommonTextButtonBehavior<Button> that uses render to draw a button's contents.

Return

a new CommonTextButtonBehavior

Parameters

textMetrics

used by the backing behavior

focusManager

used by the backing behavior

insets

used by the backing behavior

contains

determines whether a Point is within the button

render

called when updating the button