ajstarks / giocanvas

Canvas API built with Gio
Other
141 stars 14 forks source link

How to add a canvas to an existing gioui app #6

Closed mjbedford closed 3 years ago

mjbedford commented 4 years ago

Sorry I'm rather new to gioui so apologises if this is a stupib question, but how do I utilise the lib with an existing gioui app?

My app builds in what looks like a fairly standard way, I create a set of widgets , buttons, labels etc... and add them to a list and layout etc. These then get applied to the Frame in the FrameEvent

How do I add a canvas to an app, the play example show how to create a canvas in response to the FrameEvent with the canvas returning a context

ajstarks commented 3 years ago

See: https://github.com/jonegil/gui-with-gio/tree/main/giocanvas/code