GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-ui.h
1 /********************************************************************\
2  * gnc-ui.h - High level UI functions for GnuCash *
3  * Copyright (C) 1997 Robin D. Clark *
4  * Copyright (C) 1999, 2000 Rob Browning <[email protected]> *
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, write to the Free Software *
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
19 \********************************************************************/
20 
21 
31 #ifndef GNC_UI_H
32 #define GNC_UI_H
33 
34 #include <glib.h>
35 
36 #include "Account.h"
37 #include "gnc-pricedb.h"
38 #include <gtk/gtk.h>
39 
40 
42 #ifdef G_OS_WIN32
43 # define HF_GUIDE "gnucash-guide.chm"
44 # define HF_HELP "gnucash-help.chm"
45 #elif defined MAC_INTEGRATION
46 # define HF_GUIDE "Gnucash Guide"
47 # define HF_HELP "Gnucash Help"
48 #else
49 # define HF_GUIDE "gnucash-guide"
50 # define HF_HELP "gnucash-help"
51 #endif
52 
54 #define HL_USAGE "usage"
55 #define HL_USAGE_BSNSS "chapter_busnss"
56 #define HL_USAGE_INVOICE "busnss-ar-invoices1"
57 #define HL_USAGE_BILL "busnss-ap-bills1"
58 #define HL_USAGE_CUSTOMER "busnss-ar-customers1"
59 #define HL_USAGE_VENDOR "busnss-ap-vendors1"
60 #define HL_USAGE_EMPLOYEE "busnss-emply"
61 #define HL_ACC "acct-create"
62 #define HL_ACCEDIT "acct-edit"
63 #define HL_COMMODITY "tool-commodity"
64 #define HL_FIND_TRANSACTIONS "tool-find"
65 #define HL_GLOBPREFS "set-prefs"
66 #define HL_PRINTCHECK "print-check"
67 #define HL_RECNWIN "acct-reconcile"
68 #define HL_SXEDITOR "tool-sched"
69 #define HL_BOOK_OPTIONS "book-options"
70 #define HL_CLOSE_BOOK "tool-close-book"
71 #define HL_USAGE_CUSTOMREP "report-custom"
72 
73 /* GTK Windows - Common Response Codes */
74 
75 #define GNC_RESPONSE_NEW 1
76 #define GNC_RESPONSE_DELETE 2
77 #define GNC_RESPONSE_EDIT 3
78 
79 /* Dialog windows ***************************************************/
80 
81 extern gboolean
82 gnc_verify_dialog(GtkWidget *parent,
83  gboolean yes_is_default,
84  const char *format, ...) G_GNUC_PRINTF (3, 4);
85 
86 extern gint
87 gnc_ok_cancel_dialog(GtkWidget *parent,
88  gint default_result,
89  const char *format, ...) G_GNUC_PRINTF (3, 4);
90 
91 extern void
92 gnc_warning_dialog(GtkWidget *parent,
93  const char *format, ...) G_GNUC_PRINTF (2, 3);
94 
95 extern void
96 gnc_info_dialog(GtkWidget *parent,
97  const char *format, ...) G_GNUC_PRINTF (2, 3);
98 
99 extern void
100 gnc_error_dialog(GtkWidget *parent,
101  const char *format, ...) G_GNUC_PRINTF (2, 3);
102 
103 
104 extern void
105 gnc_gnome_help (const char *file_name, const char *target_link);
106 
107 int gnc_choose_radio_option_dialog (GtkWidget *parent,
108  const char *title,
109  const char *msg,
110  const char *button_name,
111  int default_value,
112  GList *radio_list);
113 
114 void gnc_tax_info_dialog (GtkWidget *parent);
115 void gnc_stock_split_dialog (GtkWidget *parent, Account * initial);
116 
117 typedef enum
118 {
119  GNC_PRICE_EDIT,
120  GNC_PRICE_NEW,
121 } GNCPriceEditType;
122 
123 void gnc_price_edit_dialog (GtkWidget *parent, QofSession *session,
124  GNCPrice *price, GNCPriceEditType type);
125 GNCPrice* gnc_price_edit_by_guid (GtkWidget * parent, const GncGUID * guid);
126 void gnc_prices_dialog (GtkWidget *parent);
127 void gnc_commodities_dialog (GtkWidget *parent);
128 
129 /* Open a dialog asking for username and password. The heading and
130  * either 'initial_*' arguments may be NULL. If the dialog returns
131  * TRUE, the user pressed OK and the entered strings are stored in the
132  * output variables. They should be g_freed when no longer needed. If
133  * the dialog returns FALSE, the user pressed CANCEL and NULL was
134  * stored in username and password. */
135 gboolean gnc_get_username_password (GtkWidget *parent,
136  const char *heading,
137  const char *initial_username,
138  const char *initial_password,
139  char **username,
140  char **password);
141 
142 /* Managing the GUI Windows *****************************************/
143 
144 GtkWidget *gnc_ui_get_toplevel (void);
145 
146 /* Changing the GUI Cursor ******************************************/
147 
148 void gnc_set_busy_cursor(GtkWidget *w, gboolean update_now);
149 void gnc_unset_busy_cursor(GtkWidget *w);
150 
151 
152 #endif
a simple price database for gnucash
Definition: guid.h:65
Account handling public routines.
gboolean gint void void void void gnc_gnome_help(const char *file_name, const char *target_link)
GtkWidget * gnc_ui_get_toplevel(void)