|
GnuCash 2.4.99
|
00001 00013 /* GnuCash is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU Library General Public License as 00015 * published by the Free Software Foundation; either version 2 of 00016 * the License, or (at your option) any later version. 00017 * 00018 * Gnucash is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 * Library General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program; if not, contact: 00025 * 00026 * Free Software Foundation Voice: +1-617-542-5942 00027 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 00028 * Boston, MA 02110-1301, USA gnu@gnu.org 00029 */ 00030 00031 #ifndef GNC_ACCOUNT_SEL_H 00032 #define GNC_ACCOUNT_SEL_H 00033 00034 #include "Account.h" 00035 00036 #define GNC_TYPE_ACCOUNT_SEL (gnc_account_sel_get_type()) 00037 #define GNC_ACCOUNT_SEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_ACCOUNT_SEL, GNCAccountSel) 00038 #define GNC_ACCOUNT_SEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_ACCOUNT_SEL, GNCAccountSelClass) 00039 #define GNC_IS_ACCOUNT_SEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, GNC_TYPE_ACCOUNT_SEL) 00040 00041 typedef struct 00042 { 00043 GtkHBox hbox; 00044 gboolean initDone; 00045 gboolean isModal; 00046 GtkListStore *store; 00047 GtkComboBoxEntry *combo; 00048 GList *acctTypeFilters; 00049 GList *acctCommodityFilters; 00050 gint eventHandlerId; 00051 /* The state of this pointer also serves as a flag about what state 00052 * the widget is in WRT the new-account-button ability. */ 00053 GtkWidget *newAccountButton; 00054 00055 #if 0 /* completion not implemented. */ 00056 GCompletion *completion; 00057 #endif /* 0 - completion not implemented */ 00058 } GNCAccountSel; 00059 00060 typedef struct 00061 { 00062 GtkHBoxClass parent_class; 00063 00064 /* Signals for notification/filtering of changes */ 00065 void (*account_sel_changed) (GNCAccountSel *gas); 00066 } GNCAccountSelClass; 00067 00068 GType gnc_account_sel_get_type (void); 00069 GtkWidget* gnc_account_sel_new (void); 00070 00076 void gnc_account_sel_set_account( GNCAccountSel *gas, Account *acct, gboolean set_default_acct ); 00081 Account* gnc_account_sel_get_account( GNCAccountSel *gas ); 00082 00089 void gnc_account_sel_set_acct_filters( GNCAccountSel *gas, GList *typeFilters, GList *commodityFilters ); 00090 00096 void gnc_account_sel_set_new_account_ability( GNCAccountSel *gas, 00097 gboolean state ); 00098 00103 void gnc_account_sel_set_new_account_modal( GNCAccountSel *gas, 00104 gboolean state ); 00105 00106 gint gnc_account_sel_get_num_account( GNCAccountSel *gas ); 00107 void gnc_account_sel_purge_account( GNCAccountSel *gas, Account *acc, gboolean recursive); 00108 00109 #endif /* !ndef GNC_ACCOUNT_SEL_H */
1.7.4