T.R | Title | User | Personal Name | Date | Lines |
---|
805.1 | | Z::TENNY | Dave Tenny - VAX LISP Development | Wed Oct 14 1987 16:25 | 17 |
| I can help with the first questions (somewhat).
The easy way to create windows is to just treat them
like ordinary files.
fp = fopen("CON:X/Y/WIDTH/HEIGHT/TITLE", "w") ;
You need some funny combination of append or other
read/write indicators to do both to a window created this way.
I don't remember what it is.
Second question:
I don't remember exactly, but I think you can get
mouse coordinates broadcast to you through IDCMP
fairly easily. You don't need any of the device driver stuff.
But I'm sure someone who has done this more recently
will give you a better answer.
Dave
|
805.2 | | WHYVAX::KRUGER | | Wed Oct 14 1987 18:04 | 7 |
| re .1
Thanks Dave! As for the second question, I'd like to add that I'd
like to be given the character grid coordinate, not the pixel coords.
if possible.
dov
|
805.3 | | Z::TENNY | Dave Tenny - VAX LISP Development | Thu Oct 15 1987 09:54 | 9 |
| If character "grid" coordinate == character "cell" coordinate,
I think you're out of luck unless you use the console.device.
Then you use send the console device the DEVICE STATUS REPORT
command sequence, to obtain row/column coordinates of the
cursor, but not the mouse. I don't believe there is any
built-in way to get character cell indexes for mouse position.
Dave
|
805.4 | mapping depends on font | SAUTER::SAUTER | John Sauter | Thu Oct 15 1987 10:07 | 4 |
| Keep in mind that the mapping of pixels to character cells
depends on the font you are using. If you change fonts in
the middle of a line the mapping is not trivial!
John Sauter
|
805.5 | Use Intuition Messages, minimal setup | CURE::WISNER | | Thu Oct 15 1987 13:58 | 22 |
| The mouse X and Y coords are in the Screen structure. The Workbench
screen has an assiciated screen structure. I don't know how to
get it right now.
X = Screen.MouseX;
Y = Screen.MouseY;
There better way to do this is to have your program wait() for a
MOUSEBUTTON message. The message structure will contain the mouse
coords at the time of the button press. I believe the coords are
in the pixel coords of the window, I'm not certain.
You can also get MOUSEMOVE messages everytime the mouse moves a
tick. Your program has to deal with a very high volume of messages.
If you stay with Intuition, messages or pretty easy to use. The
Amiga Intuition book has good examples. Look at the example program
at the end of chapter 2.
I don't know of any way to create a screen without first initializing
a NewWindow structure, easy enough, except to fopen a CON:
|