ZRenderizableImpl

Implementation of the ZRenderizableMixin interface that handles renderer creation and management for components.

This class encapsulates the rendering logic and provides a clean separation of concerns, allowing components to delegate rendering responsibilities without code duplication.

Parameters

component

The base component that owns this renderable implementation.

rendererFactory

A factory function that creates renderer instances.

Type Parameters

R

The type of the renderer associated with this component.

Constructors

Link copied to clipboard
constructor(component: ZBaseComponent, rendererFactory: (ZRenderingContext) -> R)

Properties

Link copied to clipboard
open override val isRenderizable: Boolean = true

Indicates whether this component is renderizable.

Link copied to clipboard
open override val renderer: R

Provides access to the component's renderer.

Functions

Link copied to clipboard
open override fun createRenderer(ctx: ZRenderingContext): R

Creates a new renderer instance for this component.