GnuCash  4.11-148-gc20d717b33+
dialog-account.h
Go to the documentation of this file.
1 /********************************************************************\
2  * dialog-account.h -- window for creating and editing accounts for *
3  * GnuCash *
4  * Copyright (C) 2000 Dave Peticolas <petcola@cs.ucdavis.edu> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22 \********************************************************************/
23 
24 #ifndef DIALOG_ACCOUNT_H
25 #define DIALOG_ACCOUNT_H
26 
27 #include "Account.h"
28 
29 /* Note: make sure to update the help text for this in prefs.scm if these
30  * change! These macros define the account types for which an auto interest
31  * xfer dialog could pop up, if the user's preferences allow it.
32  */
33 #define account_type_has_auto_interest_charge(type) (((type) == ACCT_TYPE_CREDIT) || \
34 ((type) == ACCT_TYPE_LIABILITY) ||\
35 ((type) == ACCT_TYPE_PAYABLE))
36 
37 #define account_type_has_auto_interest_payment(type) (((type) == ACCT_TYPE_BANK) || \
38 ((type) == ACCT_TYPE_ASSET) || \
39 ((type) == ACCT_TYPE_MUTUAL) || \
40 ((type) == ACCT_TYPE_RECEIVABLE))
41 
42 #define account_type_has_auto_interest_xfer(type) \
43 ( account_type_has_auto_interest_charge(type) || \
44 account_type_has_auto_interest_payment(type) )
45 
70 void gnc_ui_edit_account_window (GtkWindow *parent, Account *account);
71 
72 
87 void gnc_ui_new_account_window (GtkWindow *parent,
88  QofBook *book, Account *parent_acct);
89 
90 
104 void gnc_ui_new_account_with_types (GtkWindow *parent, QofBook *book,
105  GList *valid_types);
120 Account * gnc_ui_new_accounts_from_name_window (GtkWindow *parent,
121  const char *name);
122 
138 /* Note that the caller owns the valid_types list */
140  const char *name,
141  GList *valid_types);
142 
143 
165  const char *name,
166  GList *valid_types,
167  const gnc_commodity *default_commodity,
168  Account *parent_acct);
169 
170 /*
171  * register a callback that gets called when the account has changed
172  * so significantly that you need to destroy yourself. In particular
173  * this is used by the ledger display to destroy ledgers when the
174  * account type has changed.
175  */
176 void gnc_ui_register_account_destroy_callback (void (*cb)(Account *));
179 void gnc_account_renumber_create_dialog (GtkWidget *window, Account *account);
180 
181 void gnc_account_cascade_properties_dialog (GtkWidget *window, Account *account);
182 
186 #endif
Account * gnc_ui_new_accounts_from_name_window(GtkWindow *parent, const char *name)
Display a modal window for creating a new account.
void gnc_ui_edit_account_window(GtkWindow *parent, Account *account)
Display a window for editing the attributes of an existing account.
Account handling public routines.
Account * gnc_ui_new_accounts_from_name_window_with_types(GtkWindow *parent, const char *name, GList *valid_types)
Display a modal window for creating a new account.
void gnc_ui_new_account_window(GtkWindow *parent, QofBook *book, Account *parent_acct)
Display a window for creating a new account.
Account * gnc_ui_new_accounts_from_name_with_defaults(GtkWindow *parent, const char *name, GList *valid_types, const gnc_commodity *default_commodity, Account *parent_acct)
Display a modal window for creating a new account.
void gnc_ui_new_account_with_types(GtkWindow *parent, QofBook *book, GList *valid_types)
Display a window for creating a new account.