newLISP Fan Club

Forum => newLISP Graphics & Sound => Topic started by: newdep on September 13, 2007, 02:56:57 PM

Title: gs:reorder-tags
Post by: newdep on September 13, 2007, 02:56:57 PM
Hi Lutz,



Im just testing the gs:reorder-tags, but I dont see any change in visual behavior...

(i do use gs:update!)



Let me clear this up ;-)



Tags are stored in a FILO way this means that the last tag is always on

top of any other tag create befor..



All previously defined tags need to be inside the gs:reorder-tags befor

it will work or is any tag order oke?



Does gs:reorder-tags work after a mouse-event ?



PS: im pretty sure im doing someting wrong because the drag-demo is oke!





Norman.
Title:
Post by: newdep on September 13, 2007, 03:05:09 PM
> yes



> yes they all need to be inside



> Yes I made a mistake ;-) It works now..
Title:
Post by: newdep on September 13, 2007, 03:25:44 PM
updated ->



(load "//http://www.nodep.nl/downloads/newlisp/3angle.lsp")



shows reorder-tags, outline drawing, mouse events.
Title:
Post by: newdep on September 13, 2007, 04:18:49 PM
correction, gs:reorder-tags is not destructive on the internal tag oder of GS.



Seems i need to keep track myself on the current tag order when using reorder-tags after mouse events like pressed and released and dragged..



If there would be a command gs:get-tagorder then that would make

reordering tags a little easier...



Norman.
Title:
Post by: newdep on September 14, 2007, 02:54:07 AM
the reorder-tags Its not going to work in my example...



Im rebuilding the code.. basicly every graphic in gs needs to be a canvas itself,

and then the mouse-event handler can do individual action per canvas,

this is more flexible then using a list of tags as im doing now...Even better is

a global event handler per canvas that reports any event, mouse, keyboard..etc..

and then subselect the event per type (mouse, keys, ...etc..)



Its getting intresting now...because every canvas will have its own event-handler

and then Im statrting to walk the way of building "Objects" inside newlisp...



Norman.
Title:
Post by: cormullion on September 14, 2007, 04:34:36 AM
are you writing an alternative to autocad? ;-)
Title:
Post by: newdep on September 14, 2007, 05:54:32 AM
hehehe.. would be nice ;-) (mmm last time I worked with Autocat was version 9.0

back in 1989..that was nice... Drawing on a EGA/Hercules emulated screen in 3d,  ;-))



No actualy what I wanted, as above, is not possible.. I need to use 'tags,

but there is a slight different behvior with events and tags then as I expected

so im rewriting the code to get it working..

The trick is to keep it small and simple ;-)