On 2007-05-18 22:35-0400 Hazen Babcock wrote:

>
> On May 17, 2007, at 2:12 AM, Alan W. Irwin wrote:
>> Since display device drivers potentially have interactive considerations 
>> to
>> take into account (how to move from one page to the next, full cursor
>> capability [see below], and other GUI considerations) and output device
>> drivers do not, I suggest you split the proposed cairo-based set of 
>> devices
>> into two separate drivers (one for display devices and one for file output
>> devices) with two separate files for the source.
>
> True, but these differences occur mostly in the initialization, escape and 
> cleanup parts. Since most of the plot drawing routines would be common to all 
> the devices in this family I think it would be clearer if all the code was in 
> one file.

OK.

>> If you do decide to implement interactive features for xwinttf, I hope
>> you would give priority to the full cursor capability described above as
>> well as the ability to move from one random page to another. In my book 
>> such
>> capabilities are of fundamental importance for interactive use.
>
> This feature sounds pretty straightforward to add. Would we pass back the key 
> pressed in the keysym element of the PLGraphicsIn structure?  How about the 
> Encoding, i.e. ASCII? utf8? ucs4?

What choices does Cairo provide?  The reason I ask, is I know some details
about character input from the keyboard under X, but there are some gaps in
that knowledge as well.

Here is what I do know.  The keysym (and corresponding button element for
the mouse) are, as far as I can tell, a representation of the character (or
mouse button) that was pressed which is only one level above bare metal.
For X, the modmap programme translates from bare metal = keycodes (or
physical buttons for the mouse) to keysyms (or logical buttons for the
mouse).  The system controls that translation by default, but the user can
override (at least in Linux) by their own personal .Xmodmap file.

What I don't understand, though, is how the keysym is translated into a
character encoding.  But I suspect if Cairo is high-level enough,
it will handle all these details and simply provide a choice of various
encodings (or only one choice).

If UCS-4 is available from Cairo, that would be great since that is what we
use internally for the character strings that are plotted.  Furthermore, the
proposed plcursor routine should translate that UCS-4 to UTF-8 for output of
the key that was struck to also be consistent with the way that UTF-8 is
consistently used for all the input character strings for PLplot (before
they are translated immediately to our internal UCS-4 representation).

Of course, if we do use UCS-4 internally to represent the character struck,
then we will need to extend PLGraphicsIn to store the UCS-4 representation.
I understand if you append a new element (UCS-4 in this case) to
PLGraphicsIn, that does not constitute a backwards-incompatible change to
the API.

Note, much of my above response to the questions you have brought up is
contingent on the assumption that Cairo provides UCS-4.  If not, then we
will have to rethink.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to