Skip to main content

Type Alias: GtkDrawingAreaProps

GtkDrawingAreaProps = WidgetProps & object

Defined in: generated/jsx.ts:3305

Props for the GtkDrawingArea widget.

Type Declaration

NameTypeDescriptionDefined in
contentHeight?numberThe content height.generated/jsx.ts:3307
contentWidth?numberThe content width.generated/jsx.ts:3309
onDraw?(self, cr, width, height) => void | nullCalled to draw the contents of the drawing area. Param The drawing area widget Param The Cairo context to draw with Param The actual width of the drawing area Param The actual height of the drawing areagenerated/jsx.ts:3325
onNotify?(self, propName) => void | nullCalled when any property on this widget changes. Param The widget that emitted the notification Param The name of the property that changed (in kebab-case)generated/jsx.ts:3338
onResize()?(self, width, height) => void | nullEmitted once when the widget is realized, and then each time the widget is changed while realized. This is useful in order to keep state up to date with the widget size, like for instance a backing surface.generated/jsx.ts:3317
ref?Ref<Gtk.DrawingArea>-generated/jsx.ts:3339