Diff of /manuals/vgui_users_guide/node13.html [000000] .. [484dc9] Maximize Restore

  Switch to side-by-side view

--- a
+++ b/manuals/vgui_users_guide/node13.html
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!--Converted with LaTeX2HTML 98.1 release (February 19th, 1998)
+originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
+* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
+* with significant contributions from:
+  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
+<HTML>
+<HEAD>
+<TITLE>Getting mouse position</TITLE>
+<META NAME="description" CONTENT="Getting mouse position">
+<META NAME="keywords" CONTENT="vgui_users_guide">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<LINK REL="STYLESHEET" HREF="vgui_users_guide.css">
+<LINK REL="next" HREF="node14.html">
+<LINK REL="previous" HREF="node12.html">
+<LINK REL="up" HREF="node12.html">
+<LINK REL="next" HREF="node14.html">
+</HEAD>
+<BODY >
+<!--Navigation Panel-->
+<A NAME="tex2html180"
+ HREF="node14.html">
+<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
+ SRC="/usr/local/share/latex2html/icons.gif/next_motif.gif"></A> 
+<A NAME="tex2html177"
+ HREF="node12.html">
+<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
+ SRC="/usr/local/share/latex2html/icons.gif/up_motif.gif"></A> 
+<A NAME="tex2html171"
+ HREF="node12.html">
+<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
+ SRC="/usr/local/share/latex2html/icons.gif/previous_motif.gif"></A> 
+<A NAME="tex2html179"
+ HREF="node1.html">
+<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
+ SRC="/usr/local/share/latex2html/icons.gif/contents_motif.gif"></A>  
+<BR>
+<B> Next:</B> <A NAME="tex2html181"
+ HREF="node14.html">Rubberbanding</A>
+<B> Up:</B> <A NAME="tex2html178"
+ HREF="node12.html">Handling events</A>
+<B> Previous:</B> <A NAME="tex2html172"
+ HREF="node12.html">Handling events</A>
+<BR>
+<BR>
+<!--End of Navigation Panel-->
+
+<H1><A NAME="SECTION00510000000000000000">
+Getting mouse position</A>
+</H1>
+<P>
+<FONT SIZE="-2">When a mouse button is pressed it produces an event which is passed to the 
+<TT>handle_impl</TT> function of the tableau.  In order to use a mouse event we need to write 
+our own tableau which is derived from a <TT>vgui_tableau</TT>.  
+</FONT>
+<P>
+<FONT SIZE="-2">In this next example we get the mouse position when the left mouse button is pressed on
+the image.  The mouse position is given in viewport coordinates with the lower-left corner 
+as the origin. (In general the viewport will be the area displaying OpenGL).
+</FONT>
+<P>
+<FONT SIZE="-2"><IMG
+ WIDTH="622" HEIGHT="842" ALIGN="BOTTOM" BORDER="0"
+ SRC="img10.gif"
+ ALT="\begin{center}\vbox{\input{mouse-position}
+}\end{center}">
+</FONT>
+<P>
+<FONT SIZE="-2">We can use this to draw a line onto the image.  In this next example a line is drawn between
+two points selected by pressing the left mouse button.
+ 
+</FONT>
+<P>
+<BR><HR>
+<ADDRESS>
+<I>Target Junior User</I>
+<BR><I>2000-10-31</I>
+</ADDRESS>
+</BODY>
+</HTML>