|
GnuCash 2.4.99
|
00001 /********************************************************************\ 00002 * gnucash-item-list.h -- A scrollable list box * 00003 * * 00004 * This program is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU General Public License as * 00006 * published by the Free Software Foundation; either version 2 of * 00007 * the License, or (at your option) any later version. * 00008 * * 00009 * This program is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU General Public License* 00015 * along with this program; if not, contact: * 00016 * * 00017 * Free Software Foundation Voice: +1-617-542-5942 * 00018 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00019 * Boston, MA 02110-1301, USA gnu@gnu.org * 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; /* Contains the list items */ 00038 GtkWidget *frame; /* frame around everything */ 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, const 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 /* GNUCASH_ITEM_LIST_H */ 00083 00084
1.7.4