2 * $XConsortium: MessageMgr.hh /main/7 1996/11/23 14:04:55 cde-hal $
4 * Copyright (c) 1991 HaL Computer Systems, Inc. All rights reserved.
5 * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
6 * States. Use of a copyright notice is precautionary only and does not
7 * imply publication or disclosure.
9 * This software contains confidential information and trade secrets of HaL
10 * Computer Systems, Inc. Use, disclosure, or reproduction is prohibited
11 * without the prior express written permission of HaL Computer Systems, Inc.
13 * RESTRICTED RIGHTS LEGEND
14 * Use, duplication, or disclosure by the Government is subject to
15 * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
16 * Technical Data and Computer Software clause at DFARS 252.227-7013.
17 * HaL Computer Systems, Inc.
18 * 1315 Dell Avenue, Campbell, CA 95008
23 #include <X11/Intrinsic.h>
29 struct CancelOperation {
33 class MessageMgr : public Long_Lived, public UAS_Receiver<CancelOperation>
41 // NOTE: need way to get answer back in some cases!!
43 Widget create_dialog(unsigned char dialog_type,
44 char *message_text, Widget parent = NULL);
45 void quit_dialog (char *message_text, Widget parent = NULL);
46 void error_dialog (char *message_text, Widget parent = NULL);
47 void warning_dialog (char *message_text, Widget parent = NULL);
48 void info_dialog (char *message_text, Widget parent = NULL);
49 void progress_dialog (char *message_text, Widget parent = NULL);
50 void progress_dialog_done ();
51 bool question_dialog (char *message_text, Widget parent = NULL);
52 void assert_failed (char *statement, char *file,
53 int line, Widget parent = NULL);
54 int get_integer (const char* msg, const char* title,
55 int default_value, Widget parent = NULL);
56 const char *get_string (const char* msg, const char* title,
57 const char *default_value, Widget parent = NULL);
58 void receive (CancelOperation &, void *client_data);
60 STATIC_SENDER_HH(UAS_CancelRetrievalMsg);
62 void demo_failure(demoException &, Widget parent = NULL);
64 void set_max_length(int, Widget parent = NULL);
73 void show_it(Widget dialog);
74 void destroy_it(Widget dialog);
77 MessageAgent &f_booklist_message;
78 MessageAgent &f_nodeview_message;
80 int f_booklist_process;
81 int f_nodeview_process;
89 LONG_LIVED_HH(MessageMgr,message_mgr);
92 LONG_LIVED_HH2(MessageMgr,message_mgr);
97 #define Xassert(STMT) \
99 message_mgr().assert_failed ((char*)#STMT, (char*)__FILE__, __LINE__); \
103 #define Xassert(STMT) \
105 message_mgr().assert_failed ("STMT", __FILE__, __LINE__); \