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