🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1447

IsA() and ClassId() methods for manipulators?

#1447
From: kam hung soh
Date: Fri, 07 Jun 1991 06:32
26 lines
1650 bytes
I'm working on a graph editor based on Idraw (and using the Unidraw
toolkit).  In my editor, the type of manipulator created depends on the
object that the mouse pointer started from.  For example:

1. If I hold down and release the mouse button on nothing, a node is
created.

2. If I hold down and drag from a node to another node, an edge is
created between the two nodes

3. If I hold down and drag from nothing, a bounding box is made and
objects can be grouped together.

The tool that creates these manipulators can store state information so
that it knows how to interpret the manipulator, but this is a little
kludgy to me.  It seems much cleaner if the tool could ask the
manipulator what class it is (using IsA() and ClassId()) and decide
what to do.  At the moment, because manipulators are not derived from
the Persistent class, they do not have these virtual functions.

Your opinions?

Regards,

Soh, Kam Hung      email: h.soh@trl.oz.au     tel: +61 3 541 6403 
Telecom Research Laboratories, POB 249 Clayton, Victoria 3168, Australia 
Technical Details
Message-ID: <1991Jun7.063229.15674@trl.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!munnari.oz.au!bruce!trlluna!titan!andromeda!soh

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!munnari.oz.au!bruce!trlluna!titan!andromeda!soh
From: soh@andromeda.trl.OZ.AU (kam hung soh)
Newsgroups: comp.windows.interviews
Subject: IsA() and ClassId() methods for manipulators?
Summary: Should they have 'em?
Keywords: IsA, ClassId
Message-ID: <1991Jun7.063229.15674@trl.oz.au>
Date: 7 Jun 91 06:32:29 GMT
Article-I.D.: trl.1991Jun7.063229.15674
Sender: news@trl.oz.au (USENET News System)
Distribution: comp
Organization: Telecom Research Labs, Melbourne, Australia
Lines: 26