GnuCash  5.6-150-g038405b370+
dialog-commodity.h
Go to the documentation of this file.
1 /********************************************************************
2  * dialog-commodity.h -- "select" and "new" commodity windows *
3  * (GnuCash) *
4  * Copyright (C) 2000 Bill Gribble <grib@billgribble.com> *
5  * Copyright (c) 2006 David Hampton <hampton@employees.org> *
6  * *
7  * This program is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License as *
9  * published by the Free Software Foundation; either version 2 of *
10  * the License, or (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License*
18  * along with this program; if not, contact: *
19  * *
20  * Free Software Foundation Voice: +1-617-542-5942 *
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
22  * Boston, MA 02110-1301, USA gnu@gnu.org *
23  ********************************************************************/
24 
34 #ifndef GNC_DIALOG_COMMODITY_H
35 #define GNC_DIALOG_COMMODITY_H
36 
37 #include <gtk/gtk.h>
38 #include "gnc-commodity.h"
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
51 typedef enum
52 {
64 
65 
105 gnc_commodity *
106 gnc_ui_select_commodity_modal_full(gnc_commodity * orig_sel,
107  GtkWidget * parent,
109  const char * user_message,
110  const char * cusip,
111  const char * fullname,
112  const char * mnemonic);
113 
114 
132 gnc_commodity *
133 gnc_ui_select_commodity_modal(gnc_commodity * orig_sel,
134  GtkWidget * parent,
135  dialog_commodity_mode mode);
168 gnc_commodity *
169 gnc_ui_new_commodity_modal_full(const char * name_space,
170  GtkWidget * parent,
171  const char * cusip,
172  const char * fullname,
173  const char * mnemonic,
174  const char * user_symbol,
175  int fraction);
176 
188 gnc_commodity *
189 gnc_ui_new_commodity_modal(const char * default_namespace,
190  GtkWidget * parent);
191 
206 gboolean
207 gnc_ui_edit_commodity_modal(gnc_commodity *commodity,
208  GtkWidget * parent);
226 void gnc_ui_update_namespace_picker(GtkWidget *cbwe,
227  const gchar *sel,
228  dialog_commodity_mode mode);
229 
238 gchar *gnc_ui_namespace_picker_ns (GtkWidget *cbwe);
239 
251 void gnc_ui_update_commodity_picker(GtkWidget *cbwe,
252  const gchar *name_space,
253  const gchar *sel);
256 #ifdef __cplusplus
257 }
258 #endif
259 
260 #endif
261 
Dialog box should only allow selection of a currency.
void gnc_ui_update_commodity_picker(GtkWidget *cbwe, const gchar *name_space, const gchar *init_string)
Given a combo box, fill in all the known commodities for the specified namespace, and then select one...
Dialog box should allow selection of anything but a currency.
gchar * gnc_ui_namespace_picker_ns(GtkWidget *cbwe)
Given a combo box, return the currently selected namespaces.
gnc_commodity * gnc_ui_new_commodity_modal(const char *default_namespace, GtkWidget *parent)
Ask the user to provide the information necessary to create a new commodity.
gboolean gnc_ui_edit_commodity_modal(gnc_commodity *commodity, GtkWidget *parent)
Given an existing commodity, uses the gnc_ui_build_commodity_dialog() routine to build a basic edit d...
gnc_commodity * gnc_ui_new_commodity_modal_full(const char *name_space, GtkWidget *parent, const char *cusip, const char *fullname, const char *mnemonic, const char *user_symbol, int fraction)
Ask the user to provide the information necessary to create a new commodity.
Dialog box should allow selection of anything.
Dialog box should allow selection of anything but a currency and should include the "ALL" namespace t...
gnc_commodity * gnc_ui_select_commodity_modal_full(gnc_commodity *orig_sel, GtkWidget *parent, dialog_commodity_mode mode, const char *user_message, const char *cusip, const char *fullname, const char *mnemonic)
Ask the user to select a commodity from the existing set of commodities.
dialog_commodity_mode
The dialog commodity types are used to determine what commodity namespaces the currency dialog will p...
gnc_commodity * gnc_ui_select_commodity_modal(gnc_commodity *orig_sel, GtkWidget *parent, dialog_commodity_mode mode)
Ask the user to select a commodity from the existing set of commodities.
void gnc_ui_update_namespace_picker(GtkWidget *cbwe, const gchar *sel, dialog_commodity_mode mode)
Given a combo box, fill in the known commodity namespaces and then select one.
Commodity handling public routines.