xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Writing an oscilloscope screen with multiple moving signals


From: Jens Thoms Toerring
Subject: Re: [XForms] Writing an oscilloscope screen with multiple moving signals
Date: Fri, 27 Nov 2015 23:22:59 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Peter,

On Fri, Nov 27, 2015 at 01:41:35PM -0800, Peter Rowat wrote:
> I’m trying to get started on re-writing a system I had written in SunView
> back in the 1990s. The heart of it is a display of multiple signals moving
> across the screen, like an oscilloscope. In XForms, should I use a free
> object as in the “freedraw” demo, or should I start with the “XYplot” demo.
> I need to use a single “box” as the signal amplitudes and the signal
> positions need to be modifiable interactively, as the user sees how their
> system (typically a dynamical system) is functioning. The signals can
> overlap. I’ve been looking at several demos and it isn’t yet clear to me the
> appropriate way to proceed.

It's a bit difficult to make suggestion not knowing how complex
your stuff is going to be. So let me just point out an alternative:
using a canvas. There are pro's and con's, of course. A drawback
is t it's a bit harder since you'll do your drawing using Xlib
functions and gettings started can be a bit time consuming. The
advantage is that you have complete control over everything that
happens, what's drawn where, when and how. You can request to
get all the raw XEvents for the canvas, so you basically react in
whatever way you want to them without them getting pre-digested
before they arrive. I used that approach with my fsc2 program that
draws data received from from all kinds of devives used in experi-
ments, either as several curves or a color coded area for data de-
pending on two experimental parameters. I've assigned mouse  events
(with different buttons pressed down) for zooming, moving things
around, measuring distances etc. Took some time to get it to work
exactly as I wanted it to, but never looked bad - everything else
would've been too limited for my purposes. Basically, a canvas can
be seen as the nearest you can get to a plain X window whose con-
tent you completely manage yourself without intervention (but also
without moch help;-) from XForms.

                           Best regards, Jens
-- 
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]