diff options
Diffstat (limited to 'blt/html/winop.html')
-rw-r--r-- | blt/html/winop.html | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/blt/html/winop.html b/blt/html/winop.html new file mode 100644 index 00000000000..396a41f1c95 --- /dev/null +++ b/blt/html/winop.html @@ -0,0 +1,124 @@ + <!-- manual page source format generated by PolyglotMan v3.0.8+XFree86, --> +<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z --> + +<HTML> +<HEAD> +<TITLE>winop(n) manual page</TITLE> +</HEAD> +<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red"> +<A HREF="#toc">Table of Contents</A><P> + +<H2><A NAME="sect0" HREF="#toc0">Name</A></H2> +winop - Perform assorted window operations +<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2> +<B>winop +lower</B> ?<I>window</I>?... <P> +<B>winop map</B> ?<I>window</I>?... <P> +<B>winop move <I>window x y</I></B> <P> +<B>winop raise</B> ?<I>window</I>?... +<P> +<B>winop snap <I>window photoName</I></B> <P> +<B>winop unmap</B> ?<I>window</I>?... <P> +<B>winop warpto</B> ?<I>window</I>? + +<H2><A NAME="sect2" HREF="#toc2">Description</A></H2> +The <B>winop</B> command performs various window operations on Tk windows +using low-level Xlib function calls to work around window manager pecularities. + +<H2><A NAME="sect3" HREF="#toc3">Introduction</A></H2> +Tk has several commands for manipulating its windows: <B>raise</B>, +<B>lower</B>, <B>wm</B>, etc. These commands ask the window manager to perform operations +on Tk windows. In some cases, a particular window manager won't perform +the operation as expected. <P> +For example, if you positioned a toplevel window +using <B>wm geometry</B>, the window may not actually be at those particular coordinates. + The position of the window may be offset by dimensions of the title bar +added by the window manager. <P> +In situations like these, the <B>winop</B> command +can be used to workaround these difficulties. Instead, it makes low-level +Xlib (such <B>XRaiseWindow</B> and <B>XMapWindow</B>) calls to perform these operations. +<BR> +<CODE>toplevel .top<BR> +wm withdraw .top<BR> +<P> +# Set the geometry to make the window manager <BR> +# place the window.<BR> +wm geometry .top +100+100<BR> +<P> +# Move the window to the desired location<BR> +# and "update" to force the window manager<BR> +# to recognize it.<BR> +winop move .top 100 100<BR> +update <BR> +<P> +wm deiconify .top<BR> +winop move .top 100 100<BR> + +<H2><A NAME="sect4" HREF="#toc4"></CODE><P>Operations</A></H2> +The following operations are available for the <B>winop</B> command: + +<DL> + +<DT><B>winop lower</B> ?<I>window</I>?... </DT> +<DD>Lowers <I>window</I> to the bottom of the X window stack. + <I>Window</I> is the path name of a Tk window. </DD> + +<DT><B>winop map</B> ?<I>window</I>?... </DT> +<DD>Maps <I>window</I> +on the screen. <I>Window</I> is the path name of a Tk window. If <I>window</I> is already +mapped, this command has no effect. </DD> + +<DT><B>winop move <I>window x y</I></B> </DT> +<DD>Move <I>window</I> +to the screen location specified by <I>x</I> and <I>y</I>. <I>Window</I> is the path name of +a Tk window, while <I>x</I> and <I>y</I> are screen coordinates. This command returns + the empty string. </DD> + +<DT><B>winop raise</B> ?<I>window</I>?... </DT> +<DD>Raises <I>window</I> to the top of the +X window stack. <I>Window</I> must be a valid path name of a Tk window. This command +returns the empty string. </DD> + +<DT><B>winop snap <I>window photoName</I></B> </DT> +<DD>Takes a snapshot of +the <I>window</I> and stores the contents in the photo image <I>photoName</I>. <I>Window</I> +is the valid path name of a Tk window which must be totally visible (unobscured). + <I>PhotoName</I> is the name of a Tk photo image which must already exist. This +command can fail if the window is obscured in any fashion, such as covered +by another window or partially offscreen. In that case, an error message +is returned. </DD> + +<DT><B>winop unmap</B> ?<I>window</I>?... </DT> +<DD>Unmaps <I>window</I> from the screen. <I>Window</I> is +the path name of a Tk window. </DD> + +<DT><B>winop warpto</B> ?<I>window</I>? </DT> +<DD>Warps the pointer to +<I>window</I>. <I>Window</I> is the path name of a Tk window which must be mapped. If <I>window</I> +is in the form <I>@x,y</I>, where <I>x</I> and <I>y</I> are root screen coordinates, the pointer +is warped to that location on the screen. <P> +[<I>I've never heard a good case for +warping the pointer in an application. It can be useful for testing, but +in applications, it's always a bad idea. Simply stated, the user owns the +pointer, not the application. If you have an application that needs it, +I'd like to hear about it.</I>] <P> +If no <I>window</I> argument is present the current +location of the pointer is returned. The location is returned as a list +in the form "<I>x y</I>", where <I>x</I> and <I>y</I> are the current coordinates of the pointer. +</DD> +</DL> + +<H2><A NAME="sect5" HREF="#toc5">Keywords</A></H2> +window, map, raise, lower, pointer, warp <P> + +<HR><P> +<A NAME="toc"><B>Table of Contents</B></A><P> +<UL> +<LI><A NAME="toc0" HREF="#sect0">Name</A></LI> +<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI> +<LI><A NAME="toc2" HREF="#sect2">Description</A></LI> +<LI><A NAME="toc3" HREF="#sect3">Introduction</A></LI> +<LI><A NAME="toc4" HREF="#sect4">Operations</A></LI> +<LI><A NAME="toc5" HREF="#sect5">Keywords</A></LI> +</UL> +</BODY></HTML> |