🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #318

Exchange Graphic in a GraphicView derived class

#318
From: Erik Edlund
Date: Tue, 14 Apr 1992 10:25
27 lines
1511 bytes
I'm trying to create a derived class of GraphicComp and a Graphical View for
that class in Unidraw.

I want to be able to exchange the graphic object of my derived class of
GraphicView in runtime, so my view sometimes look like a rectangle,
sometimes like an ellipse, or any other graphic.
(i.e. change the visible part of my view in the viewer, without changing
view)

My questions are:

* Why has the member functions Interpret,CreateManipulator and
  InterpretManipulator in class RectView implementations that differentiates
  so much from EllipseView and GraphicView? Is it necessary? (As a test, I
  removed all 'special' stuff in RectView so it looked like the one in
  EllipseView and run it in "pued". It worked just fine, but did I lose
  anything by doing this?)

* If I have understand thing correct Creator needs an instance of a graphic as
  a prototype for a view.  What is this prototype used for?
* Will it result in any problems if I change graphic (say from an SF_Ellipse
  to a SF_Rect) in my view, in runtime?

Please help me with these questions.

     /
    /  Erik Edlund
Technical Details
Message-ID: <4051@emmerick.lulea.trab.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!gatech!bloom-beacon!eru.mt.luth.se!hagbard!loglule!eed

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!gatech!bloom-beacon!eru.mt.luth.se!hagbard!loglule!eed
From: eed@lulea.trab.se (Erik Edlund)
Newsgroups: comp.windows.interviews
Subject: Exchange Graphic in a GraphicView derived class
Message-ID: <4051@emmerick.lulea.trab.se>
Date: 14 Apr 92 10:25:08 GMT
Organization: Telia Research AB, Aurorum 6, 951 75 Lulea, Sweden
Lines: 27