xenocara/lib/libXt/man/XtPopup.man

247 lines
6.7 KiB
Groff
Raw Normal View History

2006-11-25 11:01:46 -07:00
.\" Copyright 1993 X Consortium
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation the rights to use, copy, modify, merge, publish,
.\" distribute, sublicense, and/or sell copies of the Software, and to
.\" permit persons to whom the Software is furnished to do so, subject to
.\" the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be
.\" included in all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" Except as contained in this notice, the name of the X Consortium shall
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from the X Consortium.
.\"
.ds tk X Toolkit
.ds xT X Toolkit Intrinsics \- C Language Interface
.ds xI Intrinsics
.ds xW X Toolkit Athena Widgets \- C Language Interface
.ds xL Xlib \- C Language X Interface
.ds xC Inter-Client Communication Conventions Manual
.ds Rn 3
.ds Vn 2.2
2020-01-14 13:48:59 -07:00
.hw XtPopup-Spring-Loaded XtCallback-None XtCallback-Nonexclusive
.hw XtCallback-Exclusive wid-get
2006-11-25 11:01:46 -07:00
.na
.TH XtPopup __libmansuffix__ __xorgversion__ "XT FUNCTIONS"
.SH NAME
XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallbackNonexclusive, XtCallbackExclusive \- map a pop-up
.SH SYNTAX
2020-01-14 13:48:59 -07:00
#include <X11/Intrinsic.h>
2006-11-25 11:01:46 -07:00
.HP
2012-03-10 09:45:48 -07:00
void XtPopup(Widget \fIpopup_shell\fP, XtGrabKind \fIgrab_kind\fP);
2006-11-25 11:01:46 -07:00
.HP
2012-03-10 09:45:48 -07:00
void XtPopupSpringLoaded(Widget \fIpopup_shell\fP);
2006-11-25 11:01:46 -07:00
.HP
void XtCallbackNone(Widget \fIw\fP, XtPointer \fIclient_data\fP, XtPointer
2020-01-14 13:48:59 -07:00
\fIcall_data\fP);
2006-11-25 11:01:46 -07:00
.HP
void XtCallbackNonexclusive(Widget \fIw\fP, XtPointer \fIclient_data\fP,
2012-03-10 09:45:48 -07:00
XtPointer \fIcall_data\fP);
2006-11-25 11:01:46 -07:00
.HP
void XtCallbackExclusive(Widget \fIw\fP, XtPointer \fIclient_data\fP,
2012-03-10 09:45:48 -07:00
XtPointer \fIcall_data\fP);
2020-01-14 13:48:59 -07:00
.SH ACTIONS
2006-11-25 11:01:46 -07:00
.HP
2020-01-14 13:48:59 -07:00
void XtMenuPopup(String \fIshell_name\fP);
2006-11-25 11:01:46 -07:00
.SH ARGUMENTS
.IP \fIcall_data\fP 1i
Specifies the callback data,
which is not used by this procedure.
.IP \fIclient_data\fP 1i
Specifies the pop-up shell.
.IP \fIgrab_kind\fP 1i
Specifies the way in which user events should be constrained.
.IP \fIpopup_shell\fP 1i
2020-01-14 13:48:59 -07:00
Specifies the widget shell.
2006-11-25 11:01:46 -07:00
.IP \fIw\fP 1i
Specifies the widget.
.SH DESCRIPTION
The
2020-01-14 13:48:59 -07:00
.B XtPopup
2006-11-25 11:01:46 -07:00
function performs the following:
.IP \(bu 5
Calls
2020-01-14 13:48:59 -07:00
.B XtCheckSubclass
2006-11-25 11:01:46 -07:00
.\".ZN XtCheckSubclass(popup_shell, popupShellWidgetClass)
to ensure popup_shell is a subclass of
2020-01-14 13:48:59 -07:00
.BR Shell .
2006-11-25 11:01:46 -07:00
.IP \(bu 5
2012-03-10 09:45:48 -07:00
Generates an error if the shell's popped_up field is already
2020-01-14 13:48:59 -07:00
.BR True .
2006-11-25 11:01:46 -07:00
.IP \(bu 5
Calls the callback procedures on the shell's popup_callback list.
.IP \(bu 5
2012-03-10 09:45:48 -07:00
Sets the shell popped_up field to
2020-01-14 13:48:59 -07:00
.BR True ,
2012-03-10 09:45:48 -07:00
the shell spring_loaded field to
2020-01-14 13:48:59 -07:00
.BR False ,
2006-11-25 11:01:46 -07:00
and the shell grab_kind field from grab_kind.
.IP \(bu 5
If the shell's create_popup_child field is non-NULL,
2020-01-14 13:48:59 -07:00
.B XtPopup
2006-11-25 11:01:46 -07:00
calls it with popup_shell as the parameter.
.IP \(bu 5
If grab_kind is either
2020-01-14 13:48:59 -07:00
.B XtGrabNonexclusive
2006-11-25 11:01:46 -07:00
or
2020-01-14 13:48:59 -07:00
.BR XtGrabExclusive ,
2006-11-25 11:01:46 -07:00
it calls:
.LP
2020-01-14 13:48:59 -07:00
.RS
.ft CW
.nf
2006-11-25 11:01:46 -07:00
XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)
2020-01-14 13:48:59 -07:00
.fi
.ft R
.RE
2006-11-25 11:01:46 -07:00
.IP \(bu 5
Calls
2020-01-14 13:48:59 -07:00
.B XtRealizeWidget
2006-11-25 11:01:46 -07:00
with popup_shell specified.
.IP \(bu 5
Calls
2020-01-14 13:48:59 -07:00
.B XMapWindow
2006-11-25 11:01:46 -07:00
with popup_shell specified.
.LP
The
2020-01-14 13:48:59 -07:00
.B XtPopupSpringLoaded
2006-11-25 11:01:46 -07:00
function performs exactly as
2020-01-14 13:48:59 -07:00
.B XtPopup
2006-11-25 11:01:46 -07:00
except that it sets the shell \fIspring_loaded\fP field to
2020-01-14 13:48:59 -07:00
.B True
2006-11-25 11:01:46 -07:00
and always calls
2020-01-14 13:48:59 -07:00
.B XtAddGrab
2006-11-25 11:01:46 -07:00
with \fIexclusive\fP
2020-01-14 13:48:59 -07:00
.B True
2006-11-25 11:01:46 -07:00
and \fIspring_loaded\fP
2020-01-14 13:48:59 -07:00
.BR True .
2006-11-25 11:01:46 -07:00
.LP
The
2020-01-14 13:48:59 -07:00
.BR XtCallbackNone ,
.BR XtCallbackNonexclusive ,
2006-11-25 11:01:46 -07:00
and
2020-01-14 13:48:59 -07:00
.B XtCallbackExclusive
2006-11-25 11:01:46 -07:00
functions call
2020-01-14 13:48:59 -07:00
.B XtPopup
2006-11-25 11:01:46 -07:00
with the shell specified by the client data argument
and grab_kind set as the name specifies.
2020-01-14 13:48:59 -07:00
.BR XtCallbackNone ,
.BR XtCallbackNonexclusive ,
2006-11-25 11:01:46 -07:00
and
2020-01-14 13:48:59 -07:00
.B XtCallbackExclusive
2006-11-25 11:01:46 -07:00
specify
2020-01-14 13:48:59 -07:00
.BR XtGrabNone ,
.BR XtGrabNonexclusive ,
2006-11-25 11:01:46 -07:00
and
2020-01-14 13:48:59 -07:00
.BR XtGrabExclusive ,
2006-11-25 11:01:46 -07:00
respectively.
2012-03-10 09:45:48 -07:00
Each function then sets the widget that executed the callback list
2006-11-25 11:01:46 -07:00
to be insensitive by using
2020-01-14 13:48:59 -07:00
.BR XtSetSensitive .
2006-11-25 11:01:46 -07:00
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.
.LP
2020-01-14 13:48:59 -07:00
.B XtMenuPopup
2006-11-25 11:01:46 -07:00
is known to the translation manager,
which must perform special actions for spring-loaded pop-ups.
Calls to
2020-01-14 13:48:59 -07:00
.B XtMenuPopup
2006-11-25 11:01:46 -07:00
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.
.LP
If
2020-01-14 13:48:59 -07:00
.B XtMenuPopup
2006-11-25 11:01:46 -07:00
is invoked on
2020-01-14 13:48:59 -07:00
.B ButtonPress
2006-11-25 11:01:46 -07:00
(possibly with modifiers),
the translation manager pops up the shell with grab_kind set to
2020-01-14 13:48:59 -07:00
.B XtGrabExclusive
2012-03-10 09:45:48 -07:00
and spring_loaded set to
2020-01-14 13:48:59 -07:00
.BR True .
2006-11-25 11:01:46 -07:00
If
2020-01-14 13:48:59 -07:00
.B XtMenuPopup
2006-11-25 11:01:46 -07:00
is invoked on
2020-01-14 13:48:59 -07:00
.B EnterWindow
2006-11-25 11:01:46 -07:00
(possibly with modifiers),
the translation manager pops up the shell with grab_kind set to
2020-01-14 13:48:59 -07:00
.B XtGrabNonexclusive
2012-03-10 09:45:48 -07:00
and spring_loaded set to
2020-01-14 13:48:59 -07:00
.BR False .
2006-11-25 11:01:46 -07:00
Otherwise, the translation manager generates an error.
When the widget is popped up,
the following actions occur:
.IP \(bu 5
Calls
2020-01-14 13:48:59 -07:00
.B XtCheckSubclass
2006-11-25 11:01:46 -07:00
.\".ZN XtCheckSubclass(popup_shell, popupShellWidgetClass)
to ensure popup_shell is a subclass of
2020-01-14 13:48:59 -07:00
.BR Shell .
2006-11-25 11:01:46 -07:00
.IP \(bu 5
2012-03-10 09:45:48 -07:00
Generates an error if the shell's popped_up field is already
2020-01-14 13:48:59 -07:00
.BR True .
2006-11-25 11:01:46 -07:00
.IP \(bu 5
Calls the callback procedures on the shell's popup_callback list.
.IP \(bu 5
2012-03-10 09:45:48 -07:00
Sets the shell popped_up field to
2020-01-14 13:48:59 -07:00
.B True
2006-11-25 11:01:46 -07:00
and the shell grab_kind and spring_loaded fields appropriately.
.IP \(bu 5
If the shell's create_popup_child field is non-NULL,
it is called with popup_shell as the parameter.
.IP \(bu 5
Calls:
.LP
2020-01-14 13:48:59 -07:00
.RS
.ft CW
.nf
2006-11-25 11:01:46 -07:00
XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
2020-01-14 13:48:59 -07:00
.fi
.ft R
.RE
2006-11-25 11:01:46 -07:00
.IP \(bu 5
Calls
2020-01-14 13:48:59 -07:00
.B XtRealizeWidget
2006-11-25 11:01:46 -07:00
with popup_shell specified.
.IP \(bu 5
Calls
2020-01-14 13:48:59 -07:00
.B XMapWindow
2006-11-25 11:01:46 -07:00
with popup_shell specified.
.LP
(Note that these actions are the same as those for
2020-01-14 13:48:59 -07:00
.BR XtPopup .)
.B XtMenuPopup
2006-11-25 11:01:46 -07:00
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
2020-01-14 13:48:59 -07:00
.B XtMenuPopup
2006-11-25 11:01:46 -07:00
gets to the application widget and cannot find a matching shell,
it generates an error.
.SH "SEE ALSO"
2011-09-10 03:36:19 -06:00
XtCreatePopupShell(__libmansuffix__),
XtPopdown(__libmansuffix__)
2006-11-25 11:01:46 -07:00
.br
\fI\*(xT\fP
.br
\fI\*(xL\fP