MAN page from Mandrake Other XITE-3.3-3.i386.rpm
SHELLWIDS
Section: C Library Functions (3)
Updated: 16 Mar 1998
Index
NAME
InitializeVisual, RequestedImageVisualAndColormap,CreateAppShell, CreateTopLevelShell, CreatePopTopShell,CreatePopupShell, CreatePopOver, AddAction, TopLevelWidget,PopupInit, PopupAdd, Popup_add, PopupLine, PopupMenu,PopupExit, PopupWidget, ImageFromMenu - XITE shell widgets.
SYNTAX
#include <
xite/ShellWids.h>
void InitializeVisual( Display* dpy,
int screen, char* imageVisualClass );
void RequestedImageVisualAndColormap(
Display* dpy, int screen, int* planes,
Visual** visual, Colormap* colormap );
Widget CreatePopTopShell( char* name,
Widget parent );
Widget CreatePopupShell( char* name,
Widget parent );
Widget CreateTopLevelShell( Display* dpy,
char* name );
Widget CreatePopOverShell( char *name,
Widget parent );
Widget CreateAppShell( Display* dpy,
char* app_name, char* app_class );
Widget PopupInit( char* name, Widget parent,
char* label );
Widget PopupAdd( char* name, Widget parent,
char* label, XtCallbackProc callback_func,
int arg );
Widget Popup_add( char *name, Widget parent,
char *label, XtCallbackProc callback_func,
XtPointer arg );
Widget PopupLine( char* name, Widget parent );
void PopupMenu( Widget wid, XEvent* event,
String* params, Cardinal* num_params );
void PopupExit( Widget wid, XEvent* event,
String* params, Cardinal* num_params );
Widget PopupWidget( void );
Widget ImageFromMenu( Widget wid );
Widget TopLevelWidget( Widget wid );
void AddAction( Widget parent, char* name,
XtActionProc func, int popup );
OVERVIEW
The functions in this module all deal with shell widgets.They make sure that the necessary information is presentprior to creating a shell widget. Some of them dealspecifically with popup menus.
DESCRIPTION
InitializeVisualinitializes XITE X11 applications in termsof information about the visuals which
screenon
dpyiscapable of supporting and the XITE-initial colormaps forthese visuals.
imageVisualClassis therequested/preferred visual for the application. Refer to
InitialVisualInfos(3)for information about visuals andthe possible values of the
imageVisualClassargument.Refer to
GetImageColormap(3)for information about thecolormaps.
RequestedImageVisualAndColormapworks with the registeredglobally preferred visual (and its depth and colormaps). Itreturns the visual via visual,unless visualis NULL or*visualis non-NULL. In these two cases, don't change*visual.
The depth is returned via planes,unless planesis NULL or*planes!= 0. In the latter case, don't change *planes.Inthis case, depth will be 7 for 8-plane PseudoColor and 21 for24-plane PseudoColor (reduced-color display).
The colormap is returned via colormap.
If no globally preferred visual is registered, thencall InitializeVisualfirst.
RequestedImageVisualAndColormapcalls RequestedImageVisualand GetImageColormapto get its work done.
The shell creation functions make sure that all theinformation about preferred/requested visuals (class anddepth) and colormaps has been collected for image-relatedwidgets as well as for textual widgets. If necessary, thisis done by a call to InitializeVisual.
The shell creation functions create and return a widget ofclass applicationShellWidgetClass (CreateAppShell),topLevelShellWidgetClass (CreateTopLevelShellandCreatePopTopShell),transientShellWidgetClass(CreatePopupShell)or overrideShellWidgetClass(CreatePopOverShell).They get visual class, depth andcolormap from the default visual, depth and colormap.
CreateAppShelluses app_classand app_namefor class andinstance names respectively. The other shell widget creationfunctions use nameas instance name. They all set theresource XtNallowShellResize (allow application to resizeitself). CreatePopOverShell,CreatePopTopShellandCreatePopupShellalso set the resource XtNinput (windowmanager handles keyboard focus).
CreatePopOverShellis typically used for non-permanentmenus.
PopupInitinitializes a popup menu (classsimpleMenuWidgetClass) and returns a reference to it. Theinstance name is given by name(used in resourcespecifications). The visible label is given by labelifnon-NULL, otherwise by name.This string appears at the topof the menu.
PopupAddadds a menu entry (class smeBSBObjectClass) to themenu widget given by parent.The instance name of this newmenu entry is name,the label is label,andcallback_funcis added as a callback function if it is notNULL (to the XtNcallback resource). Space is allocated for acopy of the parameter arg.This (or actually a reference tothe copy) arrives in the callback routine as client_data.
Popup_addis very similar to PopupAdd,but a reference toany chunk of information can be passed along in arg.This reference arrives as the client_data argument incallback_func.It is the responsibility of callback_functo interpret the reference correctly.
PopupLineadds a menu line separator (classsmeLineObjectClass) to the menu widget given by parent.
PopupMenuis an action function which actually pops up amenu. It calls XawPositionSimpleMenu and then the X ToolkitIntrinsics action function MenuPopup.PopupMenuistypically registered as an action function of an applicationand called with the help of a translation table. This isthe case for all applications which use the functionximageInitfrom the ximage(3)toolkit.
PopupExitis also registered as an action function of anapplication and called with the help of a translation table.It does NOT call the X Toolkit Intrinsics functionMenuPopdown(which should be invoked prior to PopupExitby the translation table). Currently PopupExitis empty.
PopupWidgetreturns an Image, ImageOverlay or AsciiTextwidget associated with a popup menu. The menu may have beenpopped up in this widget or in an XfwfPullDown button in amenubar above an Image or ImageOverlay widget. In this case,the Image or ImageOverlay widget is returned.
ImageFromMenureturns Image or ImageOverlay widgetassociated with wid.widis either an Image orImageOverlay widget in which a menu is popped up or anXfwfPullDown button child of an XfwfMenuBar sibling of anImage or ImageOverlay widget.
TopLevelWidgetreturns a reference to the Shell widgetancestor of wid.
AddActionadds an action function to the application towhich widbelongs. nameis the name of the aactionfunction and can be used in translation tables. funcisthe action function. popupshould be non-zero if thefuncinvolves popping up a menu.
RETURN VALUE
Reference to Image, ImageOverlay or AsciiText widget.
SEE ALSO
Visual(3),Cmap(3),Image(3),ImageOverlay(3),ximage(3),visualFromName(3)
AUTHOR
Otto Milvang and Svein Bøe
DOC
Svein Bøe
Index
- NAME
- SYNTAX
- OVERVIEW
- DESCRIPTION
- RETURN VALUE
- SEE ALSO
- AUTHOR
- DOC
This document was created byman2html,using the manual pages.