r1996: Cope slightly better with invalid filenames in various places (reported by
[rox-filer.git] / ROX-Filer / src / abox.h
blob919eb38cc70a1aef6ecd5b09c37a390c513037fd
1 /*
2 * $Id$
5 * ROX-Filer, filer for the ROX desktop project
6 * By Thomas Leonard, <tal197@users.sourceforge.net>.
7 */
9 #ifndef __ABOX_H__
10 #define __ABOX_H__
12 #include <gtk/gtk.h>
14 #define ABOX(obj) GTK_CHECK_CAST((obj), abox_get_type(), ABox)
15 #define ABOX_CLASS(klass) GTK_CHECK_CLASS_CAST((klass), \
16 abox_get_type(), ABoxClass)
17 #define IS_ABOX(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), abox_get_type())
19 typedef struct _ABoxClass ABoxClass;
20 typedef struct _ABox ABox;
22 struct _ABox
24 GtkDialog parent_widget;
26 GtkWidget *quiet;
27 GtkWidget *flag_box; /* HBox for flags */
28 GtkWidget *dir_label; /* Shows what is being processed now */
29 GtkWidget *log; /* The TextView for the messages */
30 GtkWidget *log_hbox;
31 GtkWidget *results; /* List of filenames found */
32 GtkWidget *entry; /* Plain entry, or part of combo */
33 FilerWindow *preview;
35 gchar *next_dir; /* NULL => no timer active */
36 gint next_timer;
38 gboolean question; /* Asking a question? */
41 struct _ABoxClass
43 GtkDialogClass parent_class;
45 void (*flag_toggled)(ABox *abox, gint response);
48 GType abox_get_type (void);
49 GtkWidget* abox_new (const gchar *title, gboolean quiet);
50 GtkWidget *abox_add_flag (ABox *abox,
51 const gchar *label,
52 const gchar *tip,
53 gint response,
54 gboolean default_value);
55 void abox_ask (ABox *abox,
56 const gchar *question);
57 void abox_cancel_ask (ABox *abox);
58 void abox_set_current_object (ABox *abox,
59 const gchar *message);
60 void abox_log (ABox *abox,
61 const gchar *message,
62 const gchar *style);
63 void abox_add_results (ABox *abox);
64 void abox_add_filename (ABox *abox,
65 const gchar *pathname);
66 void abox_clear_results (ABox *abox);
67 void abox_add_combo (ABox *abox,
68 GList *presets,
69 const gchar *text,
70 GtkWidget *help_button);
71 void abox_add_entry (ABox *abox,
72 const gchar *text,
73 GtkWidget *help_button);
75 #endif /* __ABOX_H__ */