]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/assertdlg_gtk.h
2e1a7a800abb3611b8abaeea5ae6cc050b842386
[wxWidgets.git] / include / wx / gtk / assertdlg_gtk.h
1 /* ///////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/assertdlg_gtk.h
3 // Purpose: GtkAssertDialog
4 // Author: Francesco Montorsi
5 // Id: $Id$
6 // Copyright: (c) 2006 Francesco Montorsi
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////// */
9
10 #ifndef _WX_GTK_ASSERTDLG_H_
11 #define _WX_GTK_ASSERTDLG_H_
12
13 #define GTK_TYPE_ASSERT_DIALOG (gtk_assert_dialog_get_type ())
14 #define GTK_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog))
15 #define GTK_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
16 #define GTK_IS_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ASSERT_DIALOG))
17 #define GTK_IS_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASSERT_DIALOG))
18 #define GTK_ASSERT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
19
20 typedef struct _GtkAssertDialog GtkAssertDialog;
21 typedef struct _GtkAssertDialogClass GtkAssertDialogClass;
22 typedef void (*GtkAssertDialogStackFrameCallback)(void *);
23
24 struct _GtkAssertDialog
25 {
26 GtkDialog parent_instance;
27
28 /* GtkAssertDialog widgets */
29 GtkWidget *expander;
30 GtkWidget *message;
31 GtkWidget *treeview;
32
33 GtkWidget *shownexttime;
34
35 /* callback for processing the stack frame */
36 GtkAssertDialogStackFrameCallback callback;
37 void *userdata;
38 };
39
40 struct _GtkAssertDialogClass
41 {
42 GtkDialogClass parent_class;
43 };
44
45 typedef enum
46 {
47 GTK_ASSERT_DIALOG_STOP,
48 GTK_ASSERT_DIALOG_CONTINUE,
49 GTK_ASSERT_DIALOG_CONTINUE_SUPPRESSING
50 } GtkAssertDialogResponseID;
51
52
53
54
55 GType gtk_assert_dialog_get_type(void);
56 GtkWidget *gtk_assert_dialog_new(void);
57
58 /* get the assert message */
59 gchar *gtk_assert_dialog_get_message(GtkAssertDialog *assertdlg);
60
61 /* set the assert message */
62 void gtk_assert_dialog_set_message(GtkAssertDialog *assertdlg, const gchar *msg);
63
64 /* get a string containing all stack frames appended to the dialog */
65 gchar *gtk_assert_dialog_get_backtrace(GtkAssertDialog *assertdlg);
66
67 /* sets the callback to use when the user wants to see the stackframe */
68 void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg,
69 GtkAssertDialogStackFrameCallback callback,
70 void *userdata);
71
72 /* appends a stack frame to the dialog */
73 void gtk_assert_dialog_append_stack_frame(GtkAssertDialog *dlg,
74 const gchar *function,
75 const gchar *sourcefile,
76 guint line_number);
77
78 #endif /* _WX_GTK_ASSERTDLG_H_ */