[comp.windows.x.motif] Subclassing XmList, HELP!

jfm@tss.com (Joe Martin) (06/19/91)

I am currently converting an application from a custom, in-house
widget set to Motif(1.1).  This will require me to greatly extend the
existing XmList capability.  My question is this:  Is it possible to
create a new widget class which is subclassed off of XmList such that
XmList is never instanced but is treated as a meta-class where all of
its existing methods are inherited by the new widget class?  Or, do I
have to do as it suggests in O'Reilly, Volume 4, which is basically
copying the existing widget to a new widget and extending it from there?
Any hints are greatly appreciated.

Joe

klee@wsl.dec.com (Ken Lee) (06/19/91)

In article <JFM.91Jun18140434@sparcamis.tss.com>, jfm@tss.com (Joe Martin) writes:
|> I am currently converting an application from a custom, in-house
|> widget set to Motif(1.1).  This will require me to greatly extend the
|> existing XmList capability.  My question is this:  Is it possible to
|> create a new widget class which is subclassed off of XmList such that
|> XmList is never instanced but is treated as a meta-class where all of
|> its existing methods are inherited by the new widget class?  Or, do I
|> have to do as it suggests in O'Reilly, Volume 4, which is basically
|> copying the existing widget to a new widget and extending it from there?

Though I haven't read it in detail, I don't think the O'Reilly book
would really say this.  You should be able to subclass the XmList
widget class and just change specific class methods, inheriting or
disabling the rest.  Note that you'll need access to the XmList source
code, as its class methods are not documented.

-- 
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee