Instead of having to supply the predicates for event filtering at the
time of layout, the new Filter type allows widgets to filter at the time
of calling Source.Events. There is then only the need for a single input
op type, in package event.
Filters most importantly allow the use of one tag for several event types,
and we can define that a widget w has &w as its primary tag, by convention.
This allows the replacement of per-widget Focus methods with direct uses
of FocusCmd{&w}, and the later addition of Source.Focused(&w) queries.
Note that the TestCursor test needed restructuring to avoid its use of
InputOps.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This change gets rid of the event.Queue interface by replacing it with
input.Source values. Source provides the interface to Router necessary
to implement interface widgets.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
We're about to replace the interface Queue with a concrete input.Source.
This change renames the field accordingly.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This patch adds internal Drag and Drop support to app.Windows.
The new package io/transfer adds the ability to
define draggable and droppable targets, which
are leveraged by the new widget.Draggable type.
The API is generic and could handle future use
cases, such as external Drag and Drop.
Updates gio#153
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>