gtkd ,drawingarea, capture mouse pressed

Alain De Vos devosalain at ymail.com
Fri May 21 12:39:12 UTC 2021


I'll have a look at that website.
With this code I capture the mouse press event

```
this()
{
addEvents(GdkEventMask.BUTTON_PRESS_MASK);
addOnDraw(&drawCallback);
addOnButtonPress(&onButtonPress);
}

```

```
public bool onButtonPress(Event event, Widget widget)
{
writeln("Button pressed");
return false;
}
```

But I still need the coordinates of pointer.



More information about the Digitalmars-d-learn mailing list