/usr/share/doc/grads/html/gradcomdqfile.html is in grads 2:2.0.2-8build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | <!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->
<html>
<head>
<title>GrADS Command: q pos</title>
</head>
<body bgcolor="e0f0ff" text="#000000">
<h2><b>q pos</b></h2>
<p>
After this command is issued, GrADS waits for user's mouse click, then
returns the coordinates of the mouse click plus additional
information. It is the returned information that makes '<code>q
pos</code>' such a powerful command especialy when used in conjunction
with the different 'classes' of widgets: buttons, rubber bands, and
dropmenus. Here is a template of the information that '<code>q
pos</code>' returns after a mouse click (note the difference in output
between the different widget classes):
<p> <code>Position = <i>xpos ypos mbtn class </i>                                  </code>
(somewhere in the graphics window) <br>
<code>Position = <i>xpos ypos mbtn class widget# btnstate</i>                  </code> (for buttons) <br>
<code>Position = <i>xpos ypos mbtn class widget# xpos2 ypos2</i>               </code> (for rbands) <br>
<code>Position = <i>xpos ypos mbtn class widget# menuitem <casc# cascitem></i> </code> (for dropmenus) <br>
<p>
where:
<ul>
<code><i>xpos, ypos</i>    </code>
- coordinates of the mouse click in virtual page units <br>
<code><i>mbtn</i>          </code>
- either 1, 2, or 3 for the left, center, or right mouse button <br>
<code><i>class</i>         </code>
- either 1, 2, 3, or 0 for button, rband, dropmenu, or 'not a widget' <br>
<code><i>widget#</i>       </code>
- the number assigned to the widget when it was originally set up <br>
<code><i>btnstate</i>      </code>
- either 0 (meaning "off") or 1 (meaning "on") <br>
<code><i>xpos2, ypos2</i>  </code>
- coordinates of the mouse release point in virtual page units <br>
<code><i>menuitem</i>      </code>
- the item number selected from the menu list <br>
<code><i>casc#</i>         </code>
- the cascade menu number selected from the dropmenu list <br>
<code><i>cascitem</i>      </code>
- the item number selected from the cascade menu <br>
</ul>
<p>
<h3>Usage Notes</h3>
<ol>
<li>If the user did not click on a widget, then
<code><i>class</i></code> will be 0 and there will be no further
output.
<p>
<li>If the user clicks on a dropmenu but no menu item is selected,
then <code><i>widget#</i></code> and <code><i>menuitem</i></code>
will both be -1.
<p>
<li>There can be up to three levels of nested cascading dropmenus launched
from the main dropmenu. In other words, <code><i>casc#</i></code> and <code><i>cascitem</i></code> will
repeat up to three times in the output from '<code>q pos</code>'.
<p>
<li>
The following reference pages contain information on configuring and drawing the widgets:<br>
<a href="gradcomdsetbutton.html"><code>set button</code></a> <br>
<a href="gradcomddrawbutton.html"><code>draw button</code></a> <br>
<a href="gradcomdredrawbutton.html"><code>redraw button</code></a> <br>
<a href="gradcomdsetrband.html"><code>set rband</code></a> <br>
<a href="gradcomdsetdropmenu.html"><code>set dropmenu</code></a> <br>
<a href="gradcomddrawdropmenu.html"><code>draw dropmenu</code></a>
</ol>
<p>
<h3>Examples </h3>
<p>
See the section of the User's Guide on <a href="script.html#widgets">widgets</a>
for plenty of script examples showing how to use 'q pos'.
</body>
</html>
|