Back to index

tetex-bin  3.0
Defines | Typedefs | Enumerations | Functions
message-window.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define Xdvi_MESSAGE_DIALOG_NAME   "dialog"
#define Xdvi_MESSAGE_SHELL_NAME   "message_popup"
#define XAW_SCROLL_ALWAYS   XawtextScrollAlways
#define BROKEN_RECONFIG

Typedefs

typedef void(* pre_message_cbT )(Widget w, XtPointer arg)
typedef void(* message_cbT )(XtPointer arg)
typedef enum popupMessageSizeHintT_ popupMessageSizeHintT
typedef enum popupMessageT_ popupMessageT

Enumerations

enum  popupMessageSizeHintT_ { SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE }
enum  popupMessageT_ {
  MSG_QUESTION, MSG_HELP, MSG_INFO, MSG_WARN,
  MSG_ERR
}

Functions

Widget popup_message (Widget parent, popupMessageT type, const char *helptext, const char *format,...)
Widget popup_message_sized (Widget parent, popupMessageT type, popupMessageSizeHintT size, const char *helptext, const char *format,...)
Widget positioned_popup_message (Widget parent, popupMessageT type, int x, int y, const char *helptext, const char *format,...)
Widget choice_dialog (Widget parent, popupMessageT type, const char *helptext, const char *ret_action_str, pre_message_cbT pre_cb, XtPointer arg, const char *ok_label, message_cbT ok_cb, XtPointer ok_args, const char *cancel_label, message_cbT cancel_cb, XtPointer cancel_args, const char *format,...)
Widget choice_dialog_sized (Widget parent, popupMessageT type, popupMessageSizeHintT size, const char *helptext, const char *ret_action_str, pre_message_cbT pre_cb, XtPointer arg, const char *ok_label, message_cbT ok_cb, XtPointer ok_args, const char *cancel_label, message_cbT cancel_cb, XtPointer cancel_args, const char *format,...)
Widget positioned_choice_dialog (Widget parent, popupMessageT type, int x_pos, int y_pos, const char *helptext, const char *ret_action_str, pre_message_cbT pre_cb, XtPointer arg, const char *ok_label, message_cbT ok_cb, XtPointer ok_args, const char *cancel_label, message_cbT cancel_cb, XtPointer cancel_args, const char *format,...)
void warn_overstrike (void)
Boolean raise_message_windows (void)
Boolean is_message_window (Widget w)
Boolean kill_message_window (Widget w)

Define Documentation

#define BROKEN_RECONFIG
Value:
((                          \
       (strstr(ServerVendor(DISP), "XFree") != NULL)    \
       && VendorRelease(DISP) >= 4000                   \
       && VendorRelease(DISP) < 4002                    \
       ))

Definition at line 128 of file message-window.h.

#define XAW_SCROLL_ALWAYS   XawtextScrollAlways

Definition at line 124 of file message-window.h.

#define Xdvi_MESSAGE_DIALOG_NAME   "dialog"

Definition at line 26 of file message-window.h.

#define Xdvi_MESSAGE_SHELL_NAME   "message_popup"

Definition at line 27 of file message-window.h.


Typedef Documentation

typedef void(* message_cbT)(XtPointer arg)

Definition at line 40 of file message-window.h.

typedef void(* pre_message_cbT)(Widget w, XtPointer arg)

Definition at line 35 of file message-window.h.


Enumeration Type Documentation

Enumerator:
SIZE_SMALL 
SIZE_MEDIUM 
SIZE_LARGE 

Definition at line 44 of file message-window.h.

Enumerator:
MSG_QUESTION 
MSG_HELP 
MSG_INFO 
MSG_WARN 
MSG_ERR 

Definition at line 45 of file message-window.h.


Function Documentation

Widget choice_dialog ( Widget  parent,
popupMessageT  type,
const char *  helptext,
const char *  ret_action_str,
pre_message_cbT  pre_cb,
XtPointer  arg,
const char *  ok_label,
message_cbT  ok_cb,
XtPointer  ok_args,
const char *  cancel_label,
message_cbT  cancel_cb,
XtPointer  cancel_args,
const char *  format,
  ... 
)

Definition at line 1009 of file message-window.c.

{
    char *msg_buf = NULL;
    Widget w;
    
    XDVI_GET_STRING_ARGP(msg_buf, format);

    w = internal_popup_window(parent,
                           SIZE_SMALL,
                           type,
                           -1, -1, /* just center it */
                           helptext, msg_buf,
#ifndef MOTIF
                           xaw_ret_action_str,
#endif
                           pre_cb, arg,
                           ok_label, ok_cb, ok_arg,
                           NULL, NULL, NULL,
                           cancel_label, cancel_cb, cancel_arg);
    free(msg_buf);
    return w;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Widget choice_dialog_sized ( Widget  parent,
popupMessageT  type,
popupMessageSizeHintT  size,
const char *  helptext,
const char *  ret_action_str,
pre_message_cbT  pre_cb,
XtPointer  arg,
const char *  ok_label,
message_cbT  ok_cb,
XtPointer  ok_args,
const char *  cancel_label,
message_cbT  cancel_cb,
XtPointer  cancel_args,
const char *  format,
  ... 
)

Definition at line 1072 of file message-window.c.

{
    char *msg_buf = NULL;
    Widget w;
    
    XDVI_GET_STRING_ARGP(msg_buf, format);

    w = internal_popup_window(parent,
                           sizehint,
                           type,
                           -1, -1, /* just center it */
                           helptext, msg_buf,
#ifndef MOTIF
                           xaw_ret_action_str,
#endif
                           pre_cb, arg,
                           ok_label, ok_cb, ok_arg,
                           NULL, NULL, NULL,
                           cancel_label, cancel_cb, cancel_arg);
    free(msg_buf);
    return w;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean is_message_window ( Widget  w)

Definition at line 1163 of file message-window.c.

{
    int i;
    for (i = 0; i < MAX_POPUPS; i++) {
       if (w == popup_window[i])
           return True;
    }
    return False;
}

Here is the caller graph for this function:

Definition at line 1174 of file message-window.c.

{
    int i;
    for (i = 0; i < MAX_POPUPS; i++) {
       if (g_popup_array[i] != 0 && XtIsRealized(popup_window[i]) && w == popup_window[i]) {
           g_popup_array[i] = 0;
           XtPopdown(popup_window[i]);
           XtDestroyWidget(popup_window[i]);
           XSync(DISP, True);
           return True;
       }
    }
    return False;
}

Here is the caller graph for this function:

Widget popup_message ( Widget  parent,
popupMessageT  type,
const char *  helptext,
const char *  format,
  ... 
)

Definition at line 927 of file message-window.c.

{
    char *msg_buf = NULL;
    Widget w;

    XDVI_GET_STRING_ARGP(msg_buf, format);

    w = internal_popup_window(parent,
                           SIZE_SMALL,
                           type,
                           -1, -1, /* just center it */
                           helptext, msg_buf,
#ifndef MOTIF
                           NULL,
#endif
                           /* no special callbacks here */
                           NULL, NULL,
                           NULL, NULL, NULL,
                           NULL, NULL, NULL,
                           NULL, NULL, NULL);
    free(msg_buf);
    return w;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Widget popup_message_sized ( Widget  parent,
popupMessageT  type,
popupMessageSizeHintT  size,
const char *  helptext,
const char *  format,
  ... 
)

Definition at line 952 of file message-window.c.

{
    char *msg_buf = NULL;
    Widget w;
    
    XDVI_GET_STRING_ARGP(msg_buf, format);

    w = internal_popup_window(parent,
                           sizehint,
                           type,
                           -1, -1, /* just center it */
                           helptext, msg_buf,
#ifndef MOTIF
                           NULL,
#endif
                           /* empty callbacks */
                           NULL, NULL,
                           NULL, NULL, NULL,
                           NULL, NULL, NULL,
                           NULL, NULL, NULL);
    free(msg_buf);
    return w;
}

Here is the call graph for this function:

Widget positioned_choice_dialog ( Widget  parent,
popupMessageT  type,
int  x_pos,
int  y_pos,
const char *  helptext,
const char *  ret_action_str,
pre_message_cbT  pre_cb,
XtPointer  arg,
const char *  ok_label,
message_cbT  ok_cb,
XtPointer  ok_args,
const char *  cancel_label,
message_cbT  cancel_cb,
XtPointer  cancel_args,
const char *  format,
  ... 
)

Definition at line 1106 of file message-window.c.

{
    char *msg_buf = NULL;
    Widget w;
    
    XDVI_GET_STRING_ARGP(msg_buf, format);

    w = internal_popup_window(parent,
                           SIZE_SMALL,
                           type,
                           x_pos, y_pos,
                           helptext, msg_buf,
#ifndef MOTIF
                           xaw_ret_action_str,
#endif
                           pre_cb, arg,
                           ok_label, ok_cb, ok_arg,
                           NULL, NULL, NULL,
                           cancel_label, cancel_cb, cancel_arg);
    free(msg_buf);
    return w;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Widget positioned_popup_message ( Widget  parent,
popupMessageT  type,
int  x,
int  y,
const char *  helptext,
const char *  format,
  ... 
)

Definition at line 981 of file message-window.c.

{
    char *msg_buf = NULL;
    Widget w;
    
    XDVI_GET_STRING_ARGP(msg_buf, format);

    w = internal_popup_window(parent,
                           SIZE_SMALL,
                           type,
                           x, y, /* position at these coordinates */
                           helptext, msg_buf,
#ifndef MOTIF
                           NULL,
#endif
                           /* empty callbacks */
                           NULL, NULL,
                           NULL, NULL, NULL,
                           NULL, NULL, NULL,
                           NULL, NULL, NULL);
    free(msg_buf);
    return w;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1194 of file message-window.c.

{
    int i;
    Boolean have_popups = False;
    
    for (i = 0; i < MAX_POPUPS; i++) {
       if (g_popup_array[i] != 0 && XtIsRealized(popup_window[i])) {
           XRaiseWindow(DISP, XtWindow(popup_window[i]));
           have_popups = True;
       }
    }
    
    return have_popups;
}

Here is the caller graph for this function:

Definition at line 1140 of file message-window.c.

{
    static Boolean warned_overstrike = False;

    if (!warned_overstrike) {
       popup_message(globals.widgets.top_level,
                    MSG_WARN,
                    /* helptext */
                    "Greyscaling is running in copy mode; this will cause overstrike characters to "
                    "appear incorrectly, and may result in poor display quality.  "
                    "Possible fixes are:\n"
                    "- Use the ``-thorough'' command-line option.\n"
                    "- Quit some other color-hungry applications (e.g. Netscape).\n"
                    "- Use the ``-install'' command-line option.\n"
                    "See the section ``GREYSCALING AND COLORMAPS'' in the "
                    "xdvi manual page for more details.",
                    /* text */
                    "Couldn't allocate enough colors - expect low display quality.");
       warned_overstrike = True;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function: