Determining window types [message #33329] |
Thu, 19 December 2002 04:41  |
James Tappin
Messages: 54 Registered: December 1995
|
Member |
|
|
Is there any way of determining whether a graphics window is:
1) A draw widget
2) A pixmap or
3) A regular window?
While "device, window_state=wstat" is useful to prevent trying to do illegal
operations on on-existent windows, there are sufficient differences between
the 3 types of window it would be very useful to be able to distinguish
from within a program.
James
--
+------------------------+-------------------------------+-- -------+
| James Tappin | School of Physics & Astronomy | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+-- -------+
|
|
|
Re: Determining window types [message #33415 is a reply to message #33329] |
Thu, 19 December 2002 13:12  |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
James Tappin wrote:
>
> Is there any way of determining whether a graphics window is:
> 1) A draw widget
> 2) A pixmap or
> 3) A regular window?
>
> While "device, window_state=wstat" is useful to prevent trying to do illegal
> operations on on-existent windows, there are sufficient differences between
> the 3 types of window it would be very useful to be able to distinguish
> from within a program.
>
> James
1) Draw widget windows start from 32 by default. Or run a little
utility
that returns all currently managed widgets and their
particulars
in an array, eg : -
3 BASE test <No Uvalue defined> 0
4 DRAW 32 <No Uvalue defined> 3 TEST_EVENT 3
1a) Which is interesting - where are widget ids 1 and 2 for a simple
base and draw widget test??? The base, 3, has the parent 0!
Simple entering base=widget_base() returns base as 3 in a new
session.
2) Performing WSHOW on a pixmap generates an error that could be
trapped.
3) Regular windows start from 0 by default - should suffice unless
you've
got more than 32 windows open at once.
Not high tech, but may suffice.
Andrew
------------------------------------------------------------ -----------------
Andrew D. Cool
Electromagnetics & Propagation Group
Intelligence, Surveillance & Reconnaissance Division
Defence Science & Technology Organisation
PO Box 1500, Edinburgh
South Australia 5111
Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@no-spam.dsto.defence.gov.au
Please remove the no-spam from my email address to reply ;-)
------------------------------------------------------------ -----------------
|
|
|