AndrejMitrovic / dtk

(Work In Progress) dtk is a D wrapper of the Tcl/Tk graphics library.
Boost Software License 1.0
2 stars 0 forks source link

Rework registering / unregistering event handling #10

Open AndrejMitrovic opened 4 years ago

AndrejMitrovic commented 4 years ago

Currently we use operator overloads via:

label.onMouseEvent ~=
    (scope MouseEvent event)
    {
        if (event.action == MouseAction.press)
            button.toggle();
    };

This is cute, but it's not really obvious if we're appending to an array or a list or what is going on behind the scenes. From the user's POV, there's some questions:

Some other issues: