From: Alan W. I. <ir...@be...> - 2002-02-28 03:58:07
|
On Wed, 27 Feb 2002, Maurice LeBrun wrote: > I don't really think the return code should be overloaded with window number. > To me it's better/clearer to put it in a separate PLGraphicsIn struct entry. That's okay if you are talking about plTranslateCursor, but I hope you ignore that completely for now since it is a separate issue. c_plcalc_world does not use PLGraphicsIn data since it is common API where the various front ends typically demand simple variable or array argument lists. Its purpose is to convert relative device coordinates to world coordinates with no assumptions about what the front ends will use that data for. Is there any reason in the c_plcalc_world case not to return -1 for the subpage number when there is no valid subpage? BTW, I have just rebuilt the documentation so you can see the description of the c_plcalc_world API at http://plplot.sourceforge.net/resources/docbook-manual/plplotdoc-html-0.4.3/plcalc_world.html. > > As for Geoff's comment, plots that go beyond the simple single-plot / > subwindow model are indeed a problem. Although right now we do not number the > windows created, we do "register" them with the plP_swin call at the end of > plwind(). I added this ages ago with the hopes of supporting per-window > operations from plrender for apps that handle their own windowing. Anyway, > we could add the window defn at that point to a per-page list of windows, > which is searched through for input events. Then return a window index in the > PLGraphicsIn struct. Would need an API call to return the current window > list too. I understand the first part, but I don't see the problem since each subpage (or window or subwindow, grrr) is registered as you say. But I am not sure what you mean by "per-page list of windows". Is that a list of sub-pages for the current page? If so, isn't that exactly what your registering already does so that to get data for each subpage you simply walk through the list? For example, c_plcalc_windows does this by the following fragment of code: for (i = lastwin; i >= firstwin; i--) { w = &plsc->plwin[i % PL_MAXWINDOWS]; One concern I still have with c_plcalc_world is whether it gives good results for multiple viewports per (sub-)page. Geoffrey, I hope you will test that directly since you brought up this case originally (;-)) and you apparently had several examples of this you were concerned about. Also, to move to a related topic, can anybody explain the cursor freeze I encountered when outside a viewport? I assume it is an x01c.c problem or else a problem in the xwin, tk, and ntk drivers. This thread has been confused today because the e-mail delivery for plplot_devel has been extraordinarily erratic (one of my key messages about the cursor freeze, etc. got held up for many hours while later messages sailed through). Thus, I am going to send extra copies of this directly to the principal contributors (Maurice, Geoffrey, and Joao) to make sure they get it in a timely manner. Alan |