GraphicsMagick

- Home
- Project
- Download
- Install
- Source
- News
- Utilities
- Programming
- Reference

# widget

X11 Widgets

# XColorBrowserWidget

## Synopsis

    void MagickXColorBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                    char *reply );

## Description

Method MagickXColorBrowserWidget 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 MagickXColorBrowserWidget method is:

    void MagickXColorBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                    char *reply );

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

action:

  Specifies a pointer to the action of this widget.

reply:

  The response from the user is returned in this parameter.

# XCommandWidget

## Synopsis

    int MagickXCommandWidget( Display *display, MagickXWindows *windows,
                              const char ** selections, XEvent *event );

## Description

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

The format of the MagickXCommandWidget method is:

    int MagickXCommandWidget( Display *display, MagickXWindows *windows,
                              const char ** selections, XEvent *event );

selection_number:

  Specifies the number of the selection that the user choose.

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

selections:

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

event:

  Specifies a pointer to a X11 XEvent structure.

# XConfirmWidget

## Synopsis

    int MagickXConfirmWidget( Display *display, MagickXWindows *windows, const char *reason,
                              const char *description );

## Description

Method MagickXConfirmWidget 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 MagickXConfirmWidget method is:

    int MagickXConfirmWidget( Display *display, MagickXWindows *windows, const char *reason,
                              const char *description );

status:

  Method MagickXConfirmWidget returns True if the user presses Yes otherwise False is returned.

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

reason:

  Specifies the message to display before terminating the program.

description:

  Specifies any description to the message.

# XDialogWidget

## Synopsis

    int MagickXDialogWidget( Display *display, MagickXWindows *windows, const char *action,
                             const char *query, char *reply );

## Description

Method MagickXDialogWidget 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 MagickXDialogWidget method is:

    int MagickXDialogWidget( Display *display, MagickXWindows *windows, const char *action,
                             const char *query, char *reply );

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

action:

  Specifies a pointer to the action of this widget.

query:

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

reply:

  The response from the user is returned in this parameter.

# XFileBrowserWidget

## Synopsis

    void MagickXFileBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                   char *reply );

## Description

Method MagickXFileBrowserWidget 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 MagickXFileBrowserWidget method is:

    void MagickXFileBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                   char *reply );

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

action:

  Specifies a pointer to the action of this widget.

reply:

  The response from the user is returned in this parameter.

# XFontBrowserWidget

## Synopsis

    void MagickXFontBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                   char *reply );

## Description

Method MagickXFontBrowserWidget 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 MagickXFontBrowserWidget method is:

    void MagickXFontBrowserWidget( Display *display, MagickXWindows *windows, const char *action,
                                   char *reply );

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

action:

  Specifies a pointer to the action of this widget.

reply:

  The response from the user is returned in this parameter.

# XInfoWidget

## Synopsis

    void MagickXInfoWidget( Display *display, MagickXWindows *windows, const char *activity );

## Description

Method MagickXInfoWidget 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 MagickXInfoWidget method is:

    void MagickXInfoWidget( Display *display, MagickXWindows *windows, const char *activity );

A description of each parameter follows:

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

activity:

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

# XListBrowserWidget

## Synopsis

    void MagickXListBrowserWidget( Display *display, MagickXWindows *windows,
                                   MagickXWindowInfo *window_info, const char ** list,
                                   const char *action, const char *query, char *reply );

## Description

Method MagickXListBrowserWidget 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 MagickXListBrowserWidget method is:

    void MagickXListBrowserWidget( Display *display, MagickXWindows *windows,
                                   MagickXWindowInfo *window_info, const char ** list,
                                   const char *action, const char *query, char *reply );

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

list:

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

action:

  Specifies a pointer to the action of this widget.

query:

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

reply:

  The response from the user is returned in this parameter.

# XMenuWidget

## Synopsis

    int MagickXMenuWidget( Display *display, MagickXWindows *windows, const char *title,
                           const char ** selections, char *item );

## Description

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

The format of the MagickXMenuWidget method is:

    int MagickXMenuWidget( Display *display, MagickXWindows *windows, const char *title,
                           const char ** selections, char *item );

selection_number:

  Specifies the number of the selection that the user choose.

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

title:

  Specifies a character string that describes the menu selections.

selections:

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

item:

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

# XMonitorWidget

## Synopsis

    void MagickXMonitorWidget( Display *display, MagickXWindows *windows, const char *task,
                               const magick_int64_t quantum, const magick_uint64_t span );

## Description

Method MagickXMonitorWidget 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 MagickXMonitorWidget method is:

    void MagickXMonitorWidget( Display *display, MagickXWindows *windows, const char *task,
                               const magick_int64_t quantum, const magick_uint64_t span );

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

task:

  Identifies the task in progress.

quantum:

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

span:

  Specifies the span relative to completing a task.

# XNoticeWidget

## Synopsis

    void MagickXNoticeWidget( Display *display, MagickXWindows *windows, const char *reason,
                              const char *description );

## Description

Method MagickXNoticeWidget displays a Notice widget with a notice to the user. The function returns when the user presses the "Dismiss" button.

The format of the MagickXNoticeWidget method is:

    void MagickXNoticeWidget( Display *display, MagickXWindows *windows, const char *reason,
                              const char *description );

display:

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

window:

  Specifies a pointer to a MagickXWindows structure.

reason:

  Specifies the message to display before terminating the program.

description:

  Specifies any description to the message.

# XPreferencesWidget

## Synopsis

    unsigned int MagickXPreferencesWidget( Display *display,
                                           MagickXResourceInfo *resource_info,
                                           MagickXWindows *windows );

## Description

Method MagickXPreferencesWidget 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 MagickXPreferencesWidget method is:

    unsigned int MagickXPreferencesWidget( Display *display,
                                           MagickXResourceInfo *resource_info,
                                           MagickXWindows *windows );

display:

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

resource_info:

  Specifies a pointer to a X11 MagickXResourceInfo structure.

window:

  Specifies a pointer to a MagickXWindows structure.

# XTextViewWidget

## Synopsis

    void MagickXTextViewWidget( Display *display, const MagickXResourceInfo *resource_info,
                                MagickXWindows *windows, const unsigned int mono,
                                const char *title, const char ** textlist );

## Description

Method MagickXTextViewWidget displays text in a Text View widget.

The format of the MagickXTextViewWidget method is:

    void MagickXTextViewWidget( Display *display, const MagickXResourceInfo *resource_info,
                                MagickXWindows *windows, const unsigned int mono,
                                const char *title, const char ** textlist );

display:

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

resource_info:

  Specifies a pointer to a X11 MagickXResourceInfo structure.

window:

  Specifies a pointer to a MagickXWindows structure.

mono:

  Use mono-spaced font when displaying text.

title:

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

textlist:

  This string list is displayed within the Text View widget.

Copyright © GraphicsMagick Group 2002-2026