Re: moving to objects / IDL objects and object graphics [message #56144] |
Sat, 06 October 2007 16:48  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
markb77@gmail.com writes:
> But could this be integrated with IDL object graphics? For instance,
> would the IDLgrView know what to do if I were to Add my Movie object
> to it? And would the IDLgrWindow know how to draw it?
If your object is the type of thing IDLgrView knows
what to do with (I.e, models, graphics atoms, etc.),
then IDLgrView will know what to do with it. Specifically,
it will need a DRAW method to implement the graphics
rendering. (Models, of course, *have* a draw method, so
if your new object is subclassed from a IDLgrModel object,
and I'm sure it will be, then the DRAW method is already there.)
> that's my question of the moment. I'm going to keep reading on this
> object stuff, but I'm wondering about integration with object
> graphics...
Be sure you write the DRAW method if you are creating new
graphics objects, or add your graphics objects to a model
(I.e, subclass your object from an IDLgrModel), and you
are good to go. See something like HCOLORBAR__DEFINE for
an example:
http://www.dfanning.com/programs/hcolorbar__define.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|