Navigator Update -- Drag and Drop!

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Navigator Update -- Drag and Drop!

David Bovill via use-livecode
Drag and drop has always been just within a single Navigator window -- not
between Navigator windows, and not to/from open stacks. That changes (a
bit) today! You can now select any set of controls in a Navigator window
and drag them out of that window and onto any open stack. Detailed
documentation will come tomorrow, but there are notes below.

I'm very much looking for feedback on the visual and physical method of
dragging. I put some effort into making it as intuitive as possible, so let
me know what works for you and what doesn't. More is coming...

You can get Navigator here
<https://www.dropbox.com/s/bcqxxriwzzjcm45/navigator_5.zip?dl=0>.

This update also fixes the issue of Navigator's behavior stacks polluting
the project browser and Navigator. I'm sure glad I wrote the export/restore
code -- I've done it about a dozen times now.

regards,

Geoff


Notes:

When you drag out from a Navigator window, the drag image will represent
all the controls being dragged: their size and position relative to each
other (their rects).

This can be any selection of controls from a Navigator window, so controls
from different cards, different stacks, it doesn't matter.

Available stacks to drop on will be highlighted. Drag over a stack, and the
focus narrows to that stack, showing the top-level groups in that stack.
Drag over a group, and that group will be highlighted, and on and on.

You can drop on a stack, or into any group on that stack, just by dragging
into it. All the controls will be positioned in their same relative
position, wherever you dropped them.

Holding the control key stops the entry/exit from groups and stacks, so if
you want to add something to a group, but place it outside the group's
current boundaries, just drag over the group to highlight it, then hold the
control key and drag to wherever you want to place the controls. This also
means you can place controls outside a stack's window by highlighting the
stack, then holding the control key while you drag back outside the stack.

All controls are copied at present, even controls from the same card you're
dragging to.

Dragging a card onto a stack copies the whole card (from another stack, or
duplicating it within a given stack).

Dragging a stack onto another stack makes it a substack of that stack.
Dragging it onto itself makes it a mainstack.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Navigator Update -- Drag and Drop!

David Bovill via use-livecode
Sure like to know how you do that. I've tried but cannot get it to work. I'd like to make a smartObjects panel so I could store and clone common objects with scripts, properties and backscripts already intact, but I never was able to get the drag/drop functionality working.

Bob S


> On Feb 12, 2018, at 01:52 , Geoff Canyon via use-livecode <[hidden email]> wrote:
>
> Drag and drop has always been just within a single Navigator window -- not
> between Navigator windows, and not to/from open stacks. That changes (a
> bit) today! You can now select any set of controls in a Navigator window
> and drag them out of that window and onto any open stack. Detailed
> documentation will come tomorrow, but there are notes below.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Navigator Update -- Drag and Drop!

David Bovill via use-livecode
It took some effort :-)

I'm in an unusual position because the selection of objects in Navigator's
live display *really* messes with the traditional drag/drop messages and
the selection within the field I use for the list display. I tried very
hard to work around that many years back, but finally gave up, and used a
set of drag and drop code that just depended on mouseDown, mouseMove,
mouseUp, and mouseRelease. I think it was from Scott Rossi originally, but
I'm not sure.

The new code builds on that, and uses two stacks with their blendlevel set
to something like 80: one to represent the dragged objects, one to
highlight the targets.

Despite the mouse leaving the list and being over the drag stack, the
mouseMove messages still go to the list field. So I dispatch a message from
there to the drag stack, to keep things clean in the list field. There's a
lot of translation from local to screen coordinates. All of the code is
available in Navigator, or at the Navigator GitHub repository
<https://github.com/gcanyon/navigator>. It's not particularly clean at
present because I built it all wrong the first time, and then re-built it.
When I go back in I'll cut away the vestigial code. There is still a ton to
do:

1. Dragging from stacks into Navigator.
2. Dragging from Navigator into another Navigator.
3. Alignment to existing controls in stacks I drag into -- this is why I
started the project in the first place.

If you have any questions, let me know.

gc

On Mon, Feb 12, 2018 at 7:50 AM, Bob Sneidar via use-livecode <
[hidden email]> wrote:

> Sure like to know how you do that. I've tried but cannot get it to work.
> I'd like to make a smartObjects panel so I could store and clone common
> objects with scripts, properties and backscripts already intact, but I
> never was able to get the drag/drop functionality working.
>
> Bob S
>
>
> > On Feb 12, 2018, at 01:52 , Geoff Canyon via use-livecode <
> [hidden email]> wrote:
> >
> > Drag and drop has always been just within a single Navigator window --
> not
> > between Navigator windows, and not to/from open stacks. That changes (a
> > bit) today! You can now select any set of controls in a Navigator window
> > and drag them out of that window and onto any open stack. Detailed
> > documentation will come tomorrow, but there are notes below.
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode