~eliasnaur/gio

Mailing list for the Gio project for discussion and patches.

Send your message to ~eliasnaur/gio@lists.sr.ht; no account is required and you can post without being subscribed.

1

Drag x+y

Details
Message ID
<20190808120947.GA36762@larrymbp14.local>
DKIM signature
missing
Download raw message
Is there a gesture to drag the mouse and get back both an x and y
offset?  I see the Scroll gesture but it appears to be x or y but not
both.  Can you use both at once?

-- L
Details
Message ID
<CAMAFT9Wid5r5QyPcPUgzQSOoj0uyjy3dQfAtbAWuvxsQv6wtrg@mail.gmail.com>
In-Reply-To
<20190808120947.GA36762@larrymbp14.local> (view parent)
DKIM signature
pass
Download raw message
On Thu, Aug 8, 2019 at 2:09 PM Larry Clapp <larry@theclapp.org> wrote:
>
> Is there a gesture to drag the mouse and get back both an x and y
> offset?  I see the Scroll gesture but it appears to be x or y but not
> both.  Can you use both at once?
>

You can use both at once, but then only one will activate, the other will be
cancelled (type pointer.Cancel). That setup is useful for a layout.List with
"dismissable" child elements; you want to know whether the user drags in
the horizontal direction (dismiss) or in the vertical (scroll list),
but never both.

The any direction drag gesture is easier to implement, but isn't available in
the standard library. You listen for pointer press and then report any moves
relative to the press origin until release (or cancel).

 - elias