00001 #ifndef GTASK_VIEW_H
00002 #define GTASK_VIEW_H
00003
00004 #include <gtk/gtknotebook.h>
00005
00006 #include <gtk/gtktreestore.h>
00007 #include <gtk/gtktreemodelfilter.h>
00008 #include <gtk/gtktreeview.h>
00009
00010 #include <gnome.h>
00011
00012 #include <gtask/gtask-generic-task.h>
00013
00014
00017
00018
00019 typedef struct _GTaskView GTaskView;
00020 typedef struct _GTaskViewClass GTaskViewClass;
00021 typedef struct _GTaskViewPrivate GTaskViewPrivate;
00022
00024 #define GTASK_VIEW_TYPE (gtask_view_get_type())
00025
00027 #define GTASK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
00028 GTASK_VIEW_TYPE, \
00029 GTaskView ))
00030
00032 #define GTASK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST( (klass), \
00033 GTASK_VIEW_TYPE, \
00034 GTaskViewClass ))
00035
00040 #define GTASK_IS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE( (obj), \
00041 GTASK_VIEW_TYPE ))
00042
00047 #define GTASK_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE( (klass), \
00048 GTASK_VIEW_TYPE ))
00049
00050 #define GTASK_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS( (obj), \
00051 GTASK_VIEW_TYPE, \
00052 GTaskViewClass ))
00053
00054 #define GTASK_VIEW_MODE_TYPE (gtask_view_mode_get_type())
00055
00056 typedef enum {
00057 GTASK_VIEW_MODE_BASIC,
00058 GTASK_VIEW_MODE_LIST
00059 } GTaskViewMode;
00060
00061 struct _GTaskView {
00062 GtkNotebook parent;
00063 GTaskViewPrivate *private;
00064 };
00065
00066 struct _GTaskViewClass {
00067 GtkNotebookClass parent;
00068
00069 guint tasks_added_signal_id;
00070 guint tasks_updated_signal_id;
00071 guint tasks_removed_signal_id;
00072 };
00073
00074 struct _GTaskViewPrivate {
00075 GtkTreeStore *task_model;
00076 GtkTreeModelFilter *task_model_filter;
00077 GtkTreeView *task_view_basic;
00078 GtkTreeView *task_view_list;
00079
00080 GTaskViewMode view_mode;
00081
00082
00083 GString *filter_string;
00084 GPtrArray *filter_seed;
00085 GPtrArray *filter_columns;
00086
00087 GHashTable *task_hash;
00088 GnomeThumbnailFactory *thumbnailer;
00089 };
00090
00091 GType gtask_view_get_type( void );
00092
00093 GType gtask_view_mode_get_type( void );
00094
00095 GTaskView *
00096 gtask_view_new( void );
00097
00098 void
00099 gtask_view_set_view_mode( GTaskView *view, GTaskViewMode mode );
00100
00101 GTaskViewMode
00102 gtask_view_get_view_mode( GTaskView *view );
00103
00104 void
00105 gtask_view_add_task( GTaskView *view, GTaskGenericTask *task );
00106
00110 void
00111 gtask_view_clear_tasks( GTaskView *view, GTaskActivityState with_state );
00112
00113 void
00114 gtask_view_set_filter_string( GTaskView *view, const gchar *str );
00115
00116 const gchar *
00117 gtask_view_get_filter_string( GTaskView *view );
00118
00119 guint
00120 gtask_view_get_number_of_tasks( GTaskView *view,
00121 GTaskActivityState with_state );
00122
00123
00124
00125 #endif