www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - gtkd , addondraw is deprecated

reply Alain De Vos <devosalain ymail.com> writes:
What is the advised function to use instead of 
gtk.Widget.Widget.addOnDraw ?
```
this()
		{ addOnDraw(&drawCallback);}
```
May 21 2021
parent Mike Wey <mike-wey example.com> writes:
On 21-05-2021 12:35, Alain De Vos wrote:
 What is the advised function to use instead of 
 gtk.Widget.Widget.addOnDraw ?
 ```
 this()
          { addOnDraw(&drawCallback);}
 ```
Change the `Context` passed to the drawCallback to a `Scoped!Context` only the non scoped overload is deprecated. ``` bool drawCallback(Scoped!Context cr, Widget widget) ``` -- Mike Wey
May 21 2021