[comp.windows.x] X/DEC WINDOWS : HELP

bkrishna@enuxha.eas.asu.edu (Balachander Krishnaswamy) (07/01/90)

Hi Friends,
		I have just started working with DEC Windows
on a DEC workstation. I have some manuals provided by DEC
and for programming with DEC windows, I felt that the manuals
are not so informative.
I am facing these problems :

1. How to rotate text ? Is there any X routine available?
2. How to sense the mouse clicks nad get X Y coordinate 
points?

I also request you to suggest some good books on X Window
programming for the novice.

I greatly appreciate your help. Please send E-Mails to :

bkrishna@enuxha.eas.asu.edu

Thank you in advance....

mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (07/01/90)

> I have just started working with DEC Windows on a DEC workstation.  I
> have some manuals provided by DEC and for programming with DEC
> windows, I felt that the manuals are not so informative.

> I am facing these problems :

> 1. How to rotate text ?  Is there any X routine available?

The core X protocol does not support any sort of non-horizontal[%]
text.  (Various extensions, such as the Display PostScript present in
Sun's X11/NeWS, do.  If you're willing to commit yourself to such a
platform, you may be able to use one of them.  I don't know whether DEC
has such support available or not.)  It is possible to draw the text
into a pixmap, read it back into an image, rotate the image yourself,
and send it back to the server for display.  This will work but it's a
rather ugly kludge and will probably turn out to be excessively slow.
It is also very difficult to cleanly rotate a pixel-based image by
other than multiples of 90 degrees.

[%] It does not support 180-degree rotation; the reason for my phrasing
    it this way is that there *is* support for right-to-left languages
    like Arabic (though not vertical languages like Chinese).

> 2. How to sense the mouse clicks nad get X Y coordinate points?

Speaking at the protocol level, you want ButtonPress events (and
possibly ButtonRelease and/or MotionNotify events as well).  The Xlib
level provides much the same view of things; if you're using a toolkit
or widget set things get more complicated (and I can't help).

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

klee@wsl.dec.com (Ken Lee) (07/03/90)

In article <9007010722.AA06006@Larry.McRCIM.McGill.EDU>,
mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) writes:
|> The core X protocol does not support any sort of non-horizontal[%]
|> text.  (Various extensions, such as the Display PostScript present in
|> Sun's X11/NeWS, do.  If you're willing to commit yourself to such a
|> platform, you may be able to use one of them.  I don't know whether DEC
|> has such support available or not.)

DEC supports Display PostScript, licensed from Adobe.  You can use that
to rotate text.  I think IBM and NeXT also support Display PostScript.
Last I heard, Sun did not.  X11/NeWS uses some similar ideas, but is not
compatible.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee