00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GNUCASH_ITEM_LIST_H
00024 #define GNUCASH_ITEM_LIST_H
00025
00026
00027 #define GNC_TYPE_ITEM_LIST (gnc_item_list_get_type ())
00028 #define GNC_ITEM_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_ITEM_LIST, GncItemList))
00029 #define GNC_ITEM_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_ITEM_LIST, GncItemListClass))
00030 #define IS_GNC_ITEM_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_ITEM_LIST))
00031
00032 typedef struct
00033 {
00034 GnomeCanvasWidget canvas_widget;
00035
00036 GtkTreeView *tree_view;
00037 GtkListStore *list_store;
00038 GtkWidget *frame;
00039 } GncItemList;
00040
00041 typedef struct
00042 {
00043 GnomeCanvasWidgetClass parent_class;
00044
00045 void (*select_item) (GncItemList *item_list,
00046 char *item_string);
00047
00048 void (*change_item) (GncItemList *item_list,
00049 char *item_string);
00050
00051 void (*activate_item) (GncItemList *item_list,
00052 char *item_string);
00053
00054 void (*key_press_event) (GncItemList *item_list,
00055 GdkEventKey *event);
00056
00057 } GncItemListClass;
00058
00059
00060 GType gnc_item_list_get_type (void);
00061
00062 GnomeCanvasItem *gnc_item_list_new (GnomeCanvasGroup *parent, GtkListStore *shared_store);
00063
00064 gint gnc_item_list_num_entries (GncItemList *item_list);
00065
00066 void gnc_item_list_clear (GncItemList *item_list);
00067
00068 void gnc_item_list_append (GncItemList *item_list, char *string);
00069
00070 void gnc_item_list_set_sort_enabled(GncItemList *item_list, gboolean enabled);
00071
00072 gboolean gnc_item_in_list (GncItemList *item_list, const char *string);
00073
00074 void gnc_item_list_select (GncItemList *item_list, const char *string);
00075
00076 void gnc_item_list_show_selected (GncItemList *item_list);
00077
00078 int gnc_item_list_autosize (GncItemList *item_list);
00079
00080
00081
00082 #endif
00083
00084
00085
00086
00087
00088
00089