Re: [Gnoga-list] Position of last Drop

2015-04-22 Thread Rabbi David Botton
I've created a ticket #6 on the Sourceforge project for adding Position of
Last Drop

On Thu, Apr 9, 2015 at 4:16 PM Rabbi David Botton  wrote:

> Gnoga does support dropover the On_Drop uses it. However at the time I
> probably didn't think the exact x,y was that important when dropping
> elements on top of each other and assumed that capturing the last
> On_Mouse_Up would have been sufficient.
>
> I'll add an event for this and work on what Pascal sent for key strokes
> after my holiday, this weekend.
>
> David Botton
>
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Position of last Drop

2015-04-09 Thread Rabbi David Botton
Gnoga does support dropover the On_Drop uses it. However at the time I
probably didn't think the exact x,y was that important when dropping
elements on top of each other and assumed that capturing the last
On_Mouse_Up would have been sufficient.

I'll add an event for this and work on what Pascal sent for key strokes
after my holiday, this weekend.

David Botton
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Position of last Drop

2015-04-09 Thread Gautier de Montmollin
Thanks. Actually tutorial #07 defines all these callbacks and they work 
fine.
What I am missing is the X,Y position at the moment of the drop.
Do you know how to obtain it ?
It would enable my application to move boxes for designing diagrams.
Cheers
Gautier

> I (slowly) make my self acquainted with drag/drop via a
> tic/tac/toe game.
> 3x3 squares where I can drop X:es or O:s where the
> square is free. (Not done yet)
>
> But I find it useful to set up these callbacks
>
>-- set source
> procedure Start_Drag
> procedure End_Drag
>
>
>-- set target
> procedure Enter_Drag
>-- clear target
> procedure Leave_Drag
>
>-- execute on target
> procedure Drop (Object: in out Gnoga.Gui.Base.Base_Type'Class;
> Drag_Text : in String ) ;
>
>
> and see in what order they are fired,
> and save info in the app-specific data structure - my_app


--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Position of last Drop

2015-04-09 Thread Björn Lundin
On 2015-04-09 15:03, Gautier de Montmollin wrote:
> Hello,
> I'm new to GNOGA so perdon my beginner questions...
> I'd like to register the mouse position of last drop operation.
> The idea is to be able to move objects.
> 

I (slowly) make my self acquainted with drag/drop via a
tic/tac/toe game.
3x3 squares where I can drop X:es or O:s where the
square is free. (Not done yet)

But I find it useful to set up these callbacks

  -- set source
   procedure Start_Drag
   procedure End_Drag


  -- set target
   procedure Enter_Drag
  -- clear target
   procedure Leave_Drag

  -- execute on target
   procedure Drop (Object: in out Gnoga.Gui.Base.Base_Type'Class;
   Drag_Text : in String ) ;


and see in what order they are fired,
and save info in the app-specific data structure - my_app


--
Björn

--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] Position of last Drop

2015-04-09 Thread Gautier de Montmollin
Followup - after some googling, there seems to be a few ways that might work on 
most browsers:
Use the "dragover" event (GNOGA appears not to support it yet)
Use event.clientX upon drop (is there a way to obtain that information in GNOGA 
?)
Cheers
Gautier
___
http://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_operations#drophttp://stackoverflow.com/questions/13435690/html5-drag-and-drop-mouse-position-in-firefoxhttp://stackoverflow.com/questions/2438320/html5-dragover-drop-how-get-current-x-y-coordinates
--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] Position of last Drop

2015-04-09 Thread Gautier de Montmollin
Hello,I'm new to GNOGA so perdon my beginner questions...I'd like to register 
the mouse position of last drop operation.The idea is to be able to move 
objects.
Starting from tutorial 7, I have so far managed to have a drop "anywhere" by 
changing   App.Target.On_Drop_Handler (Drop'Unrestricted_Access);into  
App.My_View.On_Drop_Handler (Drop'Unrestricted_Access);
Now getting the X,Y from the mouse is trickier.So far I've tried to set up 
mouse handlers to memorize the mouse pointer position before the drop but none 
does seem to work properly.
   procedure Start_Drag (Object : in out Gnoga.Gui.Base.Base_Type'Class)   is   
   App : App_Access := App_Access (Object.Connection_Data);   begin  
App.Source.Opacity (0.4);  --App.Source.On_Mouse_Up_Handler 
(Mouse_Move'Unrestricted_Access);  --App.Source.On_Mouse_Move_Handler 
(Mouse_Move'Unrestricted_Access);  --App.My_View.On_Mouse_Up_Handler 
(Mouse_Move'Unrestricted_Access);  App.My_View.On_Mouse_Move_Handler 
(Mouse_Move'Unrestricted_Access);   end Start_Drag;
The not-commented version kind of works but gives very unreliable mouse 
positions.It seems that the drag-and-drop operation is masking the 
On_Mouse_Move_Handler (it works well *after* the drop).
Probably there is a proper way and hopefully I'll get answer like "but why 
don't you simply do that and that ?" :-)
TIAGautier

  --
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list