comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: [OT] Best way to isolate a GUI? (The final concensous?)
Date: Sat, 22 Feb 2003 22:50:36 GMT
Date: 2003-02-22T22:50:36+00:00	[thread overview]
Message-ID: <09T5a.202544$tq4.5037@sccrnsc01> (raw)
In-Reply-To: b382nv$d8$1@slb9.atl.mindspring.net

  The "Windows message loop" is a message, rather than callback, oriented
system.  Each "window" (which doesn't have to be a visible screen window,
BTW) is a message queue.  You loop around getting messages and sending
them off to procedures/tasks/whatever to process them.  There are many
different possible messages, each with its own data format.  It does have
the timing latency disadvantages of a polling, rather than interrupt
driven, system, so some stuff (multimedia for instance) is callback
driven.  But most Windows processing involves tasks pulling messages out
of message queues.
  Claw has an internal message loop that turns messages into tagged type
dispatching calls, ie, callbacks.  The callbacks aren't random registered
procedure addresses, but are overrides of objects' primitive procedures.
The result is very much an object, rather than process, noun/adjective
rather than verb, structure.
  Thus instead of a task getting a "mouse moved" msg, which causes it to
call the Recalculate_Wireframe_Projection and then the Display_2D
procedures, say, you design an object (reusable, one hopes) called
Wireframe_Window which is a descendant of Basic_Window and override it's
When_Mousemove procedure with code to recalculate and display given the
new mouse position.  If the app wants to change the object displayed (as
opposed to the screen display) it changes (x,y,z) data, then Invalidates
the Wireframe_Window, thus causing a message to be placed in the message
queue, finally resulting in a call on Wireframe_Window's When_Draw
procedure.  That procedure knows nothing about where the data came from or
how the current mouse position got to where it is, but it does know how to
render the wireframe view of the data given the mouse position.  If you
later decide the 3D display should be red-blue stereo, the changes are
strictly internal to Wireframe_Window.  It's more of a delegated
authority, everyone on the team does his job, style rather than central
command and control.  You tend to think more in terms of goals than
actions, eg, "set a course due North" rather than "turn the wheel to the
port, then straighten it when the ship is traveling due North".  Not
"Do this then that" but "Make it so".



  reply	other threads:[~2003-02-22 22:50 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-16 10:19 [OT] Best way to isolate a GUI? Jano
2003-02-16 14:47 ` Ed Falis
2003-02-16 14:49 ` Victor Porton
2003-02-17 20:52   ` Jano
2003-02-16 16:36 ` Robert C. Leif
2003-02-17  8:44   ` Preben Randhol
2003-02-17 16:22     ` Robert C. Leif
2003-02-17 17:30     ` Jeffrey Carter
2003-02-17 17:54       ` Warren W. Gay VE3WWG
2003-02-17 19:06         ` Randy Brukardt
2003-02-18  3:15           ` Warren W. Gay VE3WWG
2003-02-18 16:14             ` Robert C. Leif
2003-02-18 18:10             ` Randy Brukardt
2003-02-18 21:12               ` Warren W. Gay VE3WWG
2003-02-18 23:20                 ` Randy Brukardt
2003-02-19 18:28                   ` Warren W. Gay VE3WWG
2003-02-20 19:39                     ` Randy Brukardt
2003-02-20 21:34                       ` Warren W. Gay VE3WWG
2003-02-20  7:50                   ` Dale Stanbrough
2003-02-19 12:49                 ` Marin David Condic
2003-02-19 18:35                   ` [OT] Best way to isolate a GUI? (The final concensous?) Warren W. Gay VE3WWG
2003-02-20 12:40                     ` Marin David Condic
2003-02-20 13:13                       ` Dmitry A. Kazakov
2003-02-20 22:01                       ` Warren W. Gay VE3WWG
2003-02-21  1:25                         ` tmoran
2003-02-21  2:08                         ` Marin David Condic
2003-02-21 17:27                           ` Jeffrey Carter
2003-02-22 14:10                             ` Marin David Condic
2003-02-21 18:02                           ` Warren W. Gay VE3WWG
2003-02-22 14:49                             ` Marin David Condic
2003-02-22 22:50                               ` tmoran [this message]
2003-02-23  5:18                               ` Robert C. Leif
2003-02-24 18:06                               ` Warren W. Gay VE3WWG
2003-02-25  1:20                                 ` Robert C. Leif
2003-02-25 17:57                                   ` Warren W. Gay VE3WWG
2003-02-25 12:41                                 ` Marin David Condic
2003-02-25 13:32                                   ` Ole-Hjalmar Kristensen
2003-02-25 17:33                                     ` [OT] Best way to isolate a GUI? (The final fronteer?) Warren W. Gay VE3WWG
2003-02-20  8:26                   ` [OT] Best way to isolate a GUI? tmoran
2003-02-20 12:51                     ` Marin David Condic
2003-02-20 18:47                       ` tmoran
2003-02-17 19:31         ` tmoran
2003-02-18  1:37         ` Jeffrey Carter
2003-02-18  3:39           ` Warren W. Gay VE3WWG
2003-02-18 23:36           ` Randy Brukardt
2003-02-18 13:29         ` Marin David Condic
2003-02-18 18:01           ` Warren W. Gay VE3WWG
2003-02-19 13:06             ` Marin David Condic
2003-02-16 17:25 ` achrist
2003-02-16 21:24 ` Bobby D. Bryant
2003-02-16 21:52 ` David Marceau
2003-02-17  0:57 ` Re; " tmoran
2003-02-17  7:25   ` Jano
2003-02-17 14:09     ` Bobby D. Bryant
2003-02-17 21:12       ` Jano
2003-02-18  7:24         ` Jean-Pierre Rosen
2003-02-18 13:08 ` Marin David Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox