🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1375

Re: updating glyphs without user-interaction

#1375
From: Mike Howard
Date: Sat, 19 Dec 1992 05:42
32 lines
1771 bytes
In article <1gt0m2INNi71@godard.dfki.uni-sb.de>, zenner@dfki.uni-sb.de
(Frank Zenner) writes: 
|> The problem is the following: 
|> I cannot force InterViews to update a glyph without an user 
|> interaction.

Try Dispatcher class to update your glyph.  There is a man page on it.
You can use a timer to generate the position update.  Look at the
morpher example (iv/src/examples/morpher/morpher.c) and check out
Morpher::execute(), where they use:

Dispatcher::instance()->startTimer(0,100000,_m_impl->_callback);

where _callback is:

new IOCallback(Morpher)(this, &Morpher::tick)

----------
As far as the problem with the update, I'm a novice, too, but I don't
see why you need a canvas as well as a glyph.  Seems to me you could
just declare a bullet glyph with a 400x400 requisition, and put it in
a patch.  Bullet::draw() has a Canvas and Allocation as parameters, so
it can draw itself on it's canvas.  A glyph's draw operation is called
implicitly when you call patch->redraw().  I create the Patch in
main(), giving it the glyph.  Then I pass the patch into storage in
the glyph using a glyph->patch( Patch* patch ) sort of access routine.
Then my glyph is always able to redraw itself.  Possibly your 2
canvases are complicating things.

I'll be interested to see your results

Mike Howard, Hughes Research Labs
Technical Details
Message-ID: <24529@hacgate.SCG.HAC.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!hacgate!bug.hrl!howard
References: <1gt0m2INNi71@godard.dfki.uni-sb.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!hacgate!bug.hrl!howard
From: howard@aic.hrl.hac.com (Mike Howard)
Newsgroups: comp.windows.interviews
Subject: Re: updating glyphs without user-interaction
Keywords: Dispatcher, Glyph
Message-ID: <24529@hacgate.SCG.HAC.COM>
Date: 19 Dec 92 05:42:24 GMT
References: <1gt0m2INNi71@godard.dfki.uni-sb.de>
Sender: news@hacgate.SCG.HAC.COM
Organization: Hughes Research Labs
Lines: 38