NAME

widget - X11 User Interface Routines for ImageMagick


SYNOPSIS

XColorBrowserWidget(display,windows,action,reply)

selection_number=XCommandWidget(display,windows,selections,event)

status=XConfirmWidget(display,windows,message,qualifier)

XDialogWidget(display,windows,action,query,reply)

XDrawBevel(display,window_info,bevel_info)

XDrawBeveledButton(display,window_info,button_info)

XDrawBeveledMatte(display,window_info,matte_info)

XDrawMatte(display,window_info,matte_info)

XDrawMatteText(display,window_info,text_info)

XDrawTriangleEast(display,window_info,triangle_info)

XDrawTriangleNorth(display,window_info,triangle_info)

XDrawTriangleSouth(display,window_info,triangle_info)

XDrawWidgetText(display,window_info,text_info)

XEditText(display,text_info,key_symbol,text,state)

XFileBrowserWidget(display,windows,action,reply)

XFontBrowserWidget(display,windows,action,reply)

XGetWidgetInfo(text,widget_info)

XHighlightWidget(display,window_info,x,y)

XInfoWidget(display,windows,activity)

XListBrowserWidget(display,windows,window_info,list,action,query,reply)

selection_number=XMenuWidget(display,windows,title,selections,item)

XMonitorWidget(display,windows,task,quantum,span)

XNoticeWidget(display,windows,message,qualifier)

XPreferencesWidget(display,resource_info,windows)

XScreenEvent(display,event,data)

XSetBevelColor(display,window_info,raised)

XSetMatteColor(display,window_info,raised)

XSetTextColor(display,window_info,raised)

XTextViewWidget(display,resource_info,windows,mono,title,textlist)


FUNCTION DESCRIPTIONS


XDrawBevel

Function XDrawBevel ``sets off'' an area with a highlighted upper and left bevel and a shadowed lower and right bevel. The highlighted and shadowed bevels create a 3-D effect.

The format of the XDrawBevel function is:

        XDrawBevel(display,window_info,bevel_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o bevel_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the bevel.


XDrawBeveledButton

Function XDrawBeveledButton draws a button with a highlighted upper and left bevel and a shadowed lower and right bevel. The highlighted and shadowed bevels create a 3-D effect.

The format of the XDrawBeveledButton function is:

        XDrawBeveledButton(display,window_info,button_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o button_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the button.


XDrawBeveledMatte

Function XDrawBeveledMatte draws a matte with a shadowed upper and left bevel and a highlighted lower and right bevel. The highlighted and shadowed bevels create a 3-D effect.

The format of the XDrawBeveledMatte function is:

        XDrawBeveledMatte(display,window_info,matte_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o matte_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the matte.


XDrawMatte

Function XDrawMatte fills a rectangular area with the matte color.

The format of the XDrawMatte function is:

        XDrawMatte(display,window_info,matte_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o matte_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the matte.


XDrawMatteText

Function XDrawMatteText draws a matte with text. If the text exceeds the extents of the text, a portion of the text relative to the cursor is displayed.

The format of the XDrawMatteText function is:

        XDrawMatteText(display,window_info,text_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o text_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the text.


XDrawTriangleEast

Function XDrawTriangleEast draws a triangle with a highlighted left bevel and a shadowed right and lower bevel. The highlighted and shadowed bevels create a 3-D effect.

The format of the XDrawTriangleEast function is:

        XDrawTriangleEast(display,window_info,triangle_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o triangle_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the triangle.


XDrawTriangleNorth

Function XDrawTriangleNorth draws a triangle with a highlighted left bevel and a shadowed right and lower bevel. The highlighted and shadowed bevels create a 3-D effect.

The format of the XDrawTriangleNorth function is:

        XDrawTriangleNorth(display,window_info,triangle_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o triangle_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the triangle.


XDrawTriangleSouth

Function XDrawTriangleSouth draws a border with a highlighted left and right bevel and a shadowed lower bevel. The highlighted and shadowed bevels create a 3-D effect.

The format of the XDrawTriangleSouth function is:

        XDrawTriangleSouth(display,window_info,triangle_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o triangle_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the triangle.


XDrawWidgetText

Function XDrawWidgetText first clears the widget and draws a text string justifed left (or center) in the x-direction and centered within the y-direction.

The format of the XDrawWidgetText function is:

        XDrawWidgetText(display,window_info,text_info)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a XWindowText structure.

o text_info:
Specifies a pointer to XWidgetInfo structure.


XEditText

Function XEditText edits a text string as indicated by the key symbol.

The format of the XEditText function is:

        XEditText(display,text_info,key_symbol,text,state)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o text_info:
Specifies a pointer to a XWidgetInfo structure. It contains the extents of the text.

o key_symbol:
A X11 KeySym that indicates what editing function to perform to the text.

o text:
A character string to insert into the text.

o state:
An unsigned long that indicates whether the key symbol is a control character or not.


XGetWidgetInfo

Function XGetWidgetInfo initializes the XWidgetInfo structure.

The format of the XGetWidgetInfo function is:

        XGetWidgetInfo(text,widget_info)

A description of each parameter follows:

o text:
A string of characters associated with the widget.

o widget_info:
Specifies a pointer to a X11 XWidgetInfo structure.


XHighlightWidget

Function XHighlightWidget draws a highlighted border around a window.

The format of the XHighlightWidget function is:

        XHighlightWidget(display,window_info,x,y)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o x:
Specifies an integer representing the rectangle offset in the x-direction.

o y:
Specifies an integer representing the rectangle offset in the y-direction.


XScreenEvent

Function XScreenEvent returns True if the any event on the X server queue is associated with the widget window.

The format of the XScreenEvent function is:

        XScreenEvent(display,event,data)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o event:
Specifies a pointer to a X11 XEvent structure.

o data:
Specifies a pointer to a XWindows structure.


XSetBevelColor

Function XSetBevelColor sets the graphic context for drawing a beveled border.

The format of the XSetBevelColor function is:

        XSetBevelColor(display,window_info,raised)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o raised:
A value other than zero indicates the color show be a ``highlight'' color, otherwise the ``shadow'' color is set.


XSetMatteColor

Function XSetMatteColor sets the graphic context for drawing the matte.

The format of the XSetMatteColor function is:

        XSetMatteColor(display,window_info,raised)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o raised:
A value other than zero indicates the matte is active.


XSetTextColor

Function XSetTextColor sets the graphic context for drawing text on a matte.

The format of the XSetTextColor function is:

        XSetTextColor(display,window_info,raised)

A description of each parameter follows:

o display:
Specifies a pointer to the Display structure; returned from XOpenDisplay.

o window_info:
Specifies a pointer to a X11 XWindowInfo structure.

o raised:
A value other than zero indicates the color show be a ``highlight'' color, otherwise the ``shadow'' color is set.


XColorBrowserWidget

Function XColorBrowserWidget displays a Color Browser widget with a color query to the user. The user keys a reply and presses the Action or Cancel button to exit. The typed text is returned as the reply function parameter.

The format of the XColorBrowserWidget routine is:

      XColorBrowserWidget(display,windows,action,reply)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o action:
Specifies a pointer to the action of this widget.

o reply:
The response from the user is returned in this parameter.


XCommandWidget

Function XCommandWidget maps a menu and returns the command pointed to by the user when the button is released.

The format of the XCommandWidget routine is:

      selection_number=XCommandWidget(display,windows,selections,event)

A description of each parameter follows:

o selection_number:
Specifies the number of the selection that the user choose.

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o selections:
Specifies a pointer to one or more strings that comprise the choices in the menu.

o event:
Specifies a pointer to a X11 XEvent structure.


XConfirmWidget

Function XConfirmWidget displays a Confirm widget with a notice to the user. The function returns -1 if Dismiss is pressed, 0 for Cancel, and 1 for Yes.

The format of the XConfirmWidget routine is:

      status=XConfirmWidget(display,windows,message,qualifier)

A description of each parameter follows:

o status:
Function XConfirmWidget returns True if the user presses Yes otherwise False is returned.

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o message:
Specifies the message to display before terminating the program.

o qualifier:
Specifies any qualifier to the message.


XDialogWidget

Function XDialogWidget displays a Dialog widget with a query to the user. The user keys a reply and presses the Ok or Cancel button to exit. The typed text is returned as the reply function parameter.

The format of the XDialogWidget routine is:

      XDialogWidget(display,windows,action,query,reply)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o action:
Specifies a pointer to the action of this widget.

o query:
Specifies a pointer to the query to present to the user.

o reply:
The response from the user is returned in this parameter.


XFileBrowserWidget

Function XFileBrowserWidget displays a File Browser widget with a file query to the user. The user keys a reply and presses the Action or Cancel button to exit. The typed text is returned as the reply function parameter.

The format of the XFileBrowserWidget routine is:

      XFileBrowserWidget(display,windows,action,reply)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o action:
Specifies a pointer to the action of this widget.

o reply:
The response from the user is returned in this parameter.


XFontBrowserWidget

Function XFontBrowserWidget displays a Font Browser widget with a font query to the user. The user keys a reply and presses the Action or Cancel button to exit. The typed text is returned as the reply function parameter.

The format of the XFontBrowserWidget routine is:

      XFontBrowserWidget(display,windows,action,reply)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o action:
Specifies a pointer to the action of this widget.

o reply:
The response from the user is returned in this parameter.


XInfoWidget

Function XInfoWidget displays text in the Info widget. The purpose is to inform the user that what activity is currently being performed (e.g. reading an image, rotating an image, etc.).

The format of the XInfoWidget routine is:

      XInfoWidget(display,windows,activity)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o activity:
This character string reflects the current activity and is displayed in the Info widget.


XListBrowserWidget

Function XListBrowserWidget displays a List Browser widget with a query to the user. The user keys a reply or select a reply from the list. Finally, the user presses the Action or Cancel button to exit. The typed text is returned as the reply function parameter.

The format of the XListBrowserWidget routine is:

      XListBrowserWidget(display,windows,window_info,list,action,query,reply)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o list:
Specifies a pointer to an array of strings. The user can select from these strings as a possible reply value.

o action:
Specifies a pointer to the action of this widget.

o query:
Specifies a pointer to the query to present to the user.

o reply:
The response from the user is returned in this parameter.


XMenuWidget

Function XMenuWidget maps a menu and returns the command pointed to by the user when the button is released.

The format of the XMenuWidget routine is:

      selection_number=XMenuWidget(display,windows,title,selections,item)

A description of each parameter follows:

o selection_number:
Specifies the number of the selection that the user choose.

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o title:
Specifies a character string that describes the menu selections.

o selections:
Specifies a pointer to one or more strings that comprise the choices in the menu.

o item:
Specifies a character array. The item selected from the menu is returned here.


XMonitorWidget

Function XMonitorWidget displays the progress a task is making in completing a task. A span of zero toggles the active status. An inactive state disables the progress monitor.

The format of the XMonitorWidget routine is:

      XMonitorWidget(display,windows,task,quantum,span)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o task:
Identifies the task in progress.

o quantum:
Specifies the quantum position within the span which represents how much progress has been made in completing a task.

o span:
Specifies the span relative to completing a task.


XNoticeWidget

Function XNoticeWidget displays a Notice widget with a notice to the user. The function returns when the user presses the ``Dismiss'' button.

The format of the XNoticeWidget routine is:

      XNoticeWidget(display,windows,message,qualifier)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o window:
Specifies a pointer to a XWindows structure.

o message:
Specifies the message to display before terminating the program.

o qualifier:
Specifies any qualifier to the message.


XPreferencesWidget

Function XPreferencesWidget displays a Preferences widget with program preferences. If the user presses the Apply button, the preferences are stored in a configuration file in the users' home directory.

The format of the XPreferencesWidget routine is:

      XPreferencesWidget(display,resource_info,windows)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o resource_info:
Specifies a pointer to a X11 XResourceInfo structure.

o window:
Specifies a pointer to a XWindows structure.


XTextViewWidget

Function XTextViewWidget displays text in a Text View widget.

The format of the XTextViewWidget routine is:

      XTextViewWidget(display,resource_info,windows,mono,title,textlist)

A description of each parameter follows:

o display:
Specifies a connection to an X server; returned from XOpenDisplay.

o resource_info:
Specifies a pointer to a X11 XResourceInfo structure.

o window:
Specifies a pointer to a XWindows structure.

o mono:
Use mono-spaced font when displaying text.

o title:
This character string is displayed at the top of the widget window.

o textlist:
This string list is displayed within the Text View widget.