root / src / gtksctree.h @ 1
History | View | Annotate | Download (1.9 kB)
| 1 | 1 | hiro | /* Mail Summary tree widget for Sylpheed */
|
|---|---|---|---|
| 2 | 1 | hiro | |
| 3 | 1 | hiro | #ifndef __GTK_SCTREE_H__
|
| 4 | 1 | hiro | #define __GTK_SCTREE_H__
|
| 5 | 1 | hiro | |
| 6 | 1 | hiro | #include <gtk/gtk.h> |
| 7 | 1 | hiro | #include <gtk/gtkclist.h> |
| 8 | 1 | hiro | #include <gtk/gtkctree.h> |
| 9 | 1 | hiro | |
| 10 | 1 | hiro | /* This code is based on "gtkflist.{h,c}" from mc-4.5.42 .*/
|
| 11 | 1 | hiro | |
| 12 | 1 | hiro | #define TYPE_GTK_SCTREE (gtk_sctree_get_type ())
|
| 13 | 1 | hiro | #define GTK_SCTREE(obj) (GTK_CHECK_CAST ((obj), TYPE_GTK_SCTREE, GtkSCTree))
|
| 14 | 1 | hiro | #define GTK_SCTREE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_GTK_SCTREE, GtkSCTreeClass))
|
| 15 | 1 | hiro | #define GTK_IS_SCTREE(obj) (GTK_CHECK_TYPE ((obj), TYPE_GTK_SCTREE))
|
| 16 | 1 | hiro | #define GTK_IS_SCTREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_GTK_SCTREE))
|
| 17 | 1 | hiro | |
| 18 | 1 | hiro | |
| 19 | 1 | hiro | typedef struct _GtkSCTree GtkSCTree; |
| 20 | 1 | hiro | typedef struct _GtkSCTreeClass GtkSCTreeClass; |
| 21 | 1 | hiro | |
| 22 | 1 | hiro | struct _GtkSCTree {
|
| 23 | 1 | hiro | GtkCTree ctree; |
| 24 | 1 | hiro | |
| 25 | 1 | hiro | /* The anchor row for range selections */
|
| 26 | 1 | hiro | GtkCTreeNode *anchor_row; |
| 27 | 1 | hiro | |
| 28 | 1 | hiro | /* Mouse button and position saved on button press */
|
| 29 | 1 | hiro | gint dnd_press_button; |
| 30 | 1 | hiro | gint dnd_press_x, dnd_press_y; |
| 31 | 1 | hiro | |
| 32 | 1 | hiro | /* Delayed selection information */
|
| 33 | 1 | hiro | gint dnd_select_pending; |
| 34 | 1 | hiro | guint dnd_select_pending_state; |
| 35 | 1 | hiro | gint dnd_select_pending_row; |
| 36 | 1 | hiro | }; |
| 37 | 1 | hiro | |
| 38 | 1 | hiro | struct _GtkSCTreeClass {
|
| 39 | 1 | hiro | GtkCTreeClass parent_class; |
| 40 | 1 | hiro | |
| 41 | 1 | hiro | /* Signal: invoke the popup menu for rows */
|
| 42 | 1 | hiro | void (* row_popup_menu) (GtkSCTree *sctree, GdkEventButton *event);
|
| 43 | 1 | hiro | |
| 44 | 1 | hiro | /* Signal: invoke the popup menu for empty areas */
|
| 45 | 1 | hiro | void (* empty_popup_menu) (GtkSCTree *sctree, GdkEventButton *event);
|
| 46 | 1 | hiro | |
| 47 | 1 | hiro | /* Signal: open the file in the selected row */
|
| 48 | 1 | hiro | void (* open_row) (GtkSCTree *sctree);
|
| 49 | 1 | hiro | |
| 50 | 1 | hiro | /* Signal: initiate a drag and drop operation */
|
| 51 | 1 | hiro | void (* start_drag) (GtkSCTree *sctree, gint button, GdkEvent *event);
|
| 52 | 1 | hiro | }; |
| 53 | 1 | hiro | |
| 54 | 1 | hiro | |
| 55 | 1 | hiro | GType gtk_sctree_get_type (void);
|
| 56 | 1 | hiro | GtkWidget *gtk_sctree_new_with_titles (gint columns, |
| 57 | 1 | hiro | gint tree_column, |
| 58 | 1 | hiro | gchar *titles[]); |
| 59 | 1 | hiro | void gtk_sctree_select (GtkSCTree *sctree,
|
| 60 | 1 | hiro | GtkCTreeNode *node); |
| 61 | 1 | hiro | void gtk_sctree_unselect_all (GtkSCTree *sctree);
|
| 62 | 1 | hiro | |
| 63 | 1 | hiro | void gtk_sctree_set_anchor_row (GtkSCTree *sctree,
|
| 64 | 1 | hiro | GtkCTreeNode *node); |
| 65 | 1 | hiro | |
| 66 | 1 | hiro | #endif /* __GTK_SCTREE_H__ */ |