To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 8680
8679  |  8681
Subject: 
Re: dragNdrop (Was: Ldglite must be faster)
Newsgroups: 
lugnet.cad
Date: 
Tue, 10 Sep 2002 18:02:53 GMT
Viewed: 
1270 times
  
In lugnet.cad, Erik Olson writes:
Happy day... inspired, I learned how to implement window drag & drop in
BrickDraw3D, and made part list and part viewer windows send each other a
string (part id). Still no dragging into a model, but, it's a start.

For the curious, I made LDragAndDrop another base class of PartView, read
the Drag Manager api, and found how all those apis get called by LDragTask,
filled in virtual methods and used that...

Are you still keeping the SourceForge CVS archive up to date?  I'm
curious what the dragNDrop code looks like on MacOS.  I suppose it's
different for OSX though.

I'd like to know what the 'protocol' is so I can meet expectations. Such as
dragging any line from any text editor - what responses are reasonable?

I take a bunch of different drop/paste 'protocols' on the Windows version
and convert them into one string of lines separated by newline chars.
If I can't identify a peeron paste or a type 1 LDRAW line, I just look
for the first '.' and assmume it's in the middle of the part filename.

For strings dragged in:
1. Part number
2. Color name with Part number
3. Color number, part number
3. Auczilla: "6 red 2x4 hooziwhatsits"
4. Peeron format (yeah, just implement it)
5. Whole line of LDRAW with matrices and location - honor location?

I'm inclined to think that a part dragged from one model to another model
window should bring rotation ,but not bring location information with it,
and be placed where the mouse is (unless SHIFT key held, for instance.)

My philosophy is to to get the part number and if possible the color,
(need a converter for peeron color names) then go all or nothing on the
rest of the LDRAW line if you can find it.  That way you can drag/paste
in a full assembly.

I also feel that if I'm not editing then the file gets pulled in as
the model, perhaps building an MPD model if multiple files are pasted.

In editing mode, each line should come in as a type 1 LDRAW line unless
I'm loading/saving the file, or editing a comment line.  Then the
user can use an editing command to convert each line to whatever with
either the inliner or some sort of MPDifier (which I guess I'll have to
create).  Maybe that's what Eduardo was looking for when he asked for
MPD support...

Don



Message has 1 Reply:
  Re: dragNdrop (Was: Ldglite must be faster)
 
(...) No, it's not up to date because I don't have broadband without firewall. Here's all I had to write. Mac Drag Manager calls are the ones with :: global scope. A lot of magic is hidden in the base class constructor (LDragAndDrop) and more magic (...) (22 years ago, 10-Sep-02, to lugnet.cad)

Message is in Reply To:
  Re: dragNdrop (Was: Ldglite must be faster)
 
Happy day... inspired, I learned how to implement window drag & drop in BrickDraw3D, and made part list and part viewer windows send each other a string (part id). Still no dragging into a model, but, it's a start. For the curious, I made (...) (22 years ago, 10-Sep-02, to lugnet.cad)

39 Messages in This Thread:















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR