🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #503

Unidraw help !

#503
From: Edward Povazan
Date: Tue, 18 Aug 1992 12:58
55 lines
2698 bytes
HELP from anyone would be geatly appreciated!


I am responsible for the user interface part of an honours project.

This project is to make a graphical query system whereby the user graphically 
represents their query by drawing a query graph.  This query graph consists of 
nodes connected by edges.  Each node has a label and each edge is labelled with 
a regular expression.


                        /----\     (abc)*     /----\
                        | X  |----------------| Y  |   
                        \----/                \----/

I have decided to use Unidraw to implement the user interface.  My problem is 
that I am not too experienced with this level of C++, never having actually 
reused code but rather having starting my own class definitions from scratch.  

Initially I would just like to create a "node" and "edge" object.  As I see it 
my "node" would consist of a circle of fixed size, a connecting pin in the 
centre and a label in the centre.  My edge would consist of a line, connecting 
pins at each end and text centered at the mid-point of the line.  

My problem is that I don't understand exactly how to compose these primitives 
into my "node" graphical object.  Am I on the right track?

Informally for the "node" constructor :  
   pin = new PinGraphic at x, y
   circ = create a circle at x, y radius r
   label = create a new label at x, y

   picture = new Picture(picture)
   picture -> append(circ, pin, label)
   SetGraphic(picture)

Would this create a "node" object whose graphical representation could be 
displayed in a viewer? If so, does a new "move" command have to be written for 
it or would the standard Unidraw command handle this.  I assume that an "edit" 
tool would have to be specifically made to edit the text in the node and on 
the edge.  

Does any of this make sense or am I completely on the wrong track?

Also does anyone know of any new documentation/anything that could be ftp'd as
the online manual and a dissertation on the Unidraw architecture is all I have.


Thanks

Teddy Povazan
Computer Science Department                 
University of Cape Town
epovazan@sun-4.cs.uct.ac.za
Technical Details
Message-ID: <epovazan.714142709@sun-4>
Path: arc1-ca.pugleaf.net!sparky!uunet!psgrain!ee.und.ac.za!ucthpx!casper.cs.uct.ac.za!sun-4!epovazan

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!psgrain!ee.und.ac.za!ucthpx!casper.cs.uct.ac.za!sun-4!epovazan
From: epovazan@sun-4.cs.uct.ac.za (Edward Povazan)
Subject: Unidraw help !
Message-ID: <epovazan.714142709@sun-4>
Summary: Help in making composite graphic objects with Unidraw
Keywords: Unidraw, Interviews 
Sender: news@casper.cs.uct.ac.za (news)
Organization: Computer Science Department, University of Cape Town
Date: Tue, 18 Aug 1992 12:58:29 GMT
Lines: 55