XtPopup


HOME

XtPopup

NAME
SYNTAX
ARGUMENTS
DESCRIPTION
SEE ALSO

NAME

XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallbackNonexclusive, XtCallbackExclusive − map a pop-up

SYNTAX

void XtPopup(Widget popup_shell, XtGrabKind grab_kind);

void XtPopupSpringLoaded(Widget popup_shell);

void XtCallbackNone(Widget w, XtPointer client_data, XtPointer call_data):

void XtCallbackNonexclusive(Widget w, XtPointer client_data, XtPointer call_data);

void XtCallbackExclusive(Widget w, XtPointer client_data, XtPointer call_data);

void MenuPopup(String shell_name);

ARGUMENTS

call_data

Specifies the callback data, which is not used by this procedure.

client_data

Specifies the pop-up shell.

grab_kind

Specifies the way in which user events should be constrained.

popup_shell

Specifies the widget shell.

w

Specifies the widget.

DESCRIPTION

The XtPopup function performs the following:

Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

Generates an error if the shell’s popped_up field is already True.

Calls the callback procedures on the shell’s popup_callback list.

Sets the shell popped_up field to True, the shell spring_loaded field to False, and the shell grab_kind field from grab_kind.

If the shell’s create_popup_child field is non-NULL, XtPopup calls it with popup_shell as the parameter.

If grab_kind is either XtGrabNonexclusive or XtGrabExclusive, it calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

Calls XtRealizeWidget with popup_shell specified.

Calls XMapWindow with popup_shell specified.

The XtPopupSpringLoaded function performs exactly as XtPopup except that it sets the shell spring_loaded field to True and always calls XtAddGrab with exclusive True and spring_loaded True.

The XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive functions call XtPopup with the shell specified by the client data argument and grab_kind set as the name specifies. XtCallbackNone, XtCallbackNonexclusive, and XtCallbackExclusive specify XtGrabNone, XtGrabNonexclusive, and XtGrabExclusive, respectively. Each function then sets the widget that executed the callback list to be insensitive by using XtSetSensitive. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.

MenuPopup is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to MenuPopup in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.

If MenuPopup is invoked on ButtonPress (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabExclusive and spring_loaded set to True. If MenuPopup is invoked on EnterWindow (possibly with modifiers), the translation manager pops up the shell with grab_kind set to XtGrabNonexclusive and spring_loaded set to False. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:

Calls XtCheckSubclass to ensure popup_shell is a subclass of Shell.

Generates an error if the shell’s popped_up field is already True.

Calls the callback procedures on the shell’s popup_callback list.

Sets the shell popped_up field to True and the shell grab_kind and spring_loaded fields appropriately.

If the shell’s create_popup_child field is non-NULL, it is called with popup_shell as the parameter.

Calls:

XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

Calls XtRealizeWidget with popup_shell specified.

Calls XMapWindow with popup_shell specified.

(Note that these actions are the same as those for XtPopup.) MenuPopup tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If MenuPopup gets to the application widget and cannot find a matching shell, it generates an error.

SEE ALSO

XtCreatePopupShell(3Xt), XtPopdown(3Xt)
X Toolkit Intrinsics − C Language Interface
Xlib − C Language X Interface






Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.