GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TK::POPUP (3)

.ds Aq ’

NAME

Tk::Wm::Popup - popup dialog windows.

CONTENTS

SYNOPSIS



 $dialog->Popup(qw/
     -popover    => cursor | $widget | undef,
     -overanchor => c | n | ne | e | se | s | sw | w | nw,
     -popanchor  => c | n | ne | e | se | s | sw | w | nw,
 /);



DESCRIPTION

You’ve probably had occasion to use a Dialog (or DialogBox) widget. These widgets are derived from a Toplevel (which is a subclass of Tk::Wm, the window manager) and spend most of their time in a withdrawn state. It’s also common to use Toplevels as containers for custom built popup windows. Menus, too, are dialogs derived from the window manager class. For this discussion, we’ll use the simple term dialog to refer any widget that pops up and awaits user interaction, whether it be a Menu, a special purpose Toplevel, or any of the dialog-type widgets, including, but not limited to, ColorEditor, Dialog, DialogBox, ErrorDialog, FileSelect, FBox, getOpenFile and getSaveFile.

When it’s time to display these dialogs, we call the Perl/Tk window manager <B>PopupB> method. <B>PopupB> accepts three special purpose options that specify placement information in high-level terms rather than numerical coordinates. It is <B>PopupB>’s responsibility to take our human specifications and turn them into actual screen coordinates before displaying the dialog.

We can direct the dialog to appear in two general locations, either over another window (e.g. the root window (screen) or a particular widget), or over the cursor. This is called the popover location. Once we’ve made this decision we can further refine the exact placement of the dialog relative to the popover location by specifying the intersection of two anchor points. The popanchor point is associated with the dialog and the overanchor point is associated with the popover location (whether it be a window or the cursor). The point where the two anchor points coincide is the popup locus. Anchor points are string values and can be c (for center), or any of the eight cardinal compass points: n, ne, e, se, s, sw, w or nw.

For example, if -popover specifies a widget, -popanchor is sw, and -overanchor is ne, the the dialog’s southwest corner pops up at the widget’s northeast corner.

OPTIONS

The options recognized by <B>PopupB> are as follows:
<B>-popoverB> Specifies whether the dialog pops over a window or the cursor. It may be the string cursor, a widget reference, or undef for the root window.
<B>-popanchorB> Specifies the anchor point of the dialog. For instance, if e is specified, the right side of the dialog is the anchor.
<B>-overanchorB> Specifies where the dialog should anchor relative to the popover location. For instance, if e is specified the dialog appears over the right side of the popover location and if it’s ne the the dialog is positioned at the upper-right corner of the popover location.

AUTHOR

Nick Ing-Simmons, Steve Lidie

This code is distributed under the same terms as Perl.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 POPUP (3) 2013-11-15

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.