GnuCash  5.6-150-g038405b370+
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 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /* Note: make sure to update the help text for this in prefs.scm if these
34  * change! These macros define the account types for which an auto interest
35  * xfer dialog could pop up, if the user's preferences allow it.
36  */
37 #define account_type_has_auto_interest_charge(type) (((type) == ACCT_TYPE_CREDIT) || \
38 ((type) == ACCT_TYPE_LIABILITY) ||\
39 ((type) == ACCT_TYPE_PAYABLE))
40 
41 #define account_type_has_auto_interest_payment(type) (((type) == ACCT_TYPE_BANK) || \
42 ((type) == ACCT_TYPE_ASSET) || \
43 ((type) == ACCT_TYPE_MUTUAL) || \
44 ((type) == ACCT_TYPE_RECEIVABLE))
45 
46 #define account_type_has_auto_interest_xfer(type) \
47 ( account_type_has_auto_interest_charge(type) || \
48 account_type_has_auto_interest_payment(type) )
49 
74 void gnc_ui_edit_account_window (GtkWindow *parent, Account *account);
75 
76 
93 void gnc_ui_new_account_with_types_and_commodity (GtkWindow *parent, QofBook *book,
94  GList *valid_types, gnc_commodity*);
95 
110 void gnc_ui_new_account_window (GtkWindow *parent,
111  QofBook *book, Account *parent_acct);
112 
113 
127 void gnc_ui_new_account_with_types (GtkWindow *parent, QofBook *book,
128  GList *valid_types);
143 Account * gnc_ui_new_accounts_from_name_window (GtkWindow *parent,
144  const char *name);
145 
146 
168  const char *name,
169  GList *valid_types,
170  const gnc_commodity *default_commodity,
171  Account *parent_acct);
172 
173 /*
174  * register a callback that gets called when the account has changed
175  * so significantly that you need to destroy yourself. In particular
176  * this is used by the ledger display to destroy ledgers when the
177  * account type has changed.
178  */
179 void gnc_ui_register_account_destroy_callback (void (*cb)(Account *));
182 void gnc_account_renumber_create_dialog (GtkWidget *window, Account *account);
183 
184 void gnc_account_cascade_properties_dialog (GtkWidget *window, Account *account);
185 
186 #ifdef __cplusplus
187 }
188 #endif
189 
193 #endif
Account * gnc_ui_new_accounts_from_name_window(GtkWindow *parent, const char *name)
Display a modal window for creating a new account.
STRUCTS.
void gnc_ui_new_account_with_types_and_commodity(GtkWindow *parent, QofBook *book, GList *valid_types, gnc_commodity *)
Display a 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.
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.