[Kst] on plots and windows

George Staikos staikos at kde.org
Sun Apr 11 00:22:36 CEST 2004

   What is desired for the behaviour of plots and windows?

1) Should plots be allowed to be added to multiple windows?

if yes:

2) Should the coordinates and size (aspect - relative to the parent) be forced 
to match in each window?  This gets confusing IMHO.

3) What happens if the user zooms or scrolls in one window, should it match 
the other?

I think, personally, #2 and #3 indicate that #1 should not be taken lightly.  
It could make it very confusing to work with Kst.  Now to circumvent the can 
of worms that #2 opens up, it is possible to have what I am calling a "plot 
representation", which is an internal representation of the plot which 
contains the actual plot but not the view of the plot.  So, for instance, we 
have Kst2DPlot and Kst2DPlotRep.  If you add plot "abc" to main window 1, it 
would create a new Kst2DPlot which has a pointer to the Kst2DPlotRep "abc".  
Likewise it would happen with main window 2.  Those Kst2DPlot would contain a 
double buffer of the plot and ask the plot rep to draw into it if necessary, 
thus preserving position and scaling but sharing zoom, scroll, and other 

An unfortunate consequence of #3 is that if all instances of a plot match 
(within the same window and across windows), then we have to propagate an 
update to each view object associated with the rep when there is an 
interactive change.

Therefore these decisions are not to be taken lightly, but I think they should 
be driven by user demand.  They're not something one would hope to change 
after this is implemented, so we should make a final decision now.  The view 
architecture is almost ready to replace the current view so it's time to 
start porting KstPlot.

George Staikos
KDE Developer			http://www.kde.org/
Staikos Computing Services Inc.	http://www.staikos.net/

More information about the Kst mailing list