GnuCash  4.12+
gnc-ledger-display2.h
Go to the documentation of this file.
1 /********************************************************************\
2  * gnc-ledger-display.h -- utilities for dealing with multiple *
3  * register/ledger windows in GnuCash *
4  * *
5  * Copyright (C) 1997 Robin D. Clark *
6  * Copyright (C) 1997, 1998 Linas Vepstas *
7  * Copyright (C) 2001 Linux Developers Group *
8  * Copyright (C) 2012 Robert Fewell *
9  * *
10  * This program is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU General Public License as *
12  * published by the Free Software Foundation; either version 2 of *
13  * the License, or (at your option) any later version. *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License*
21  * along with this program; if not, write to the Free Software *
22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
23  * *
24 \********************************************************************/
25 
26 #ifndef GNC_LEDGER_DISPLAY2_H
27 #define GNC_LEDGER_DISPLAY2_H
28 
29 #include <glib.h>
30 
31 #include "Account.h"
32 #include "Query.h"
33 
34 #include "split-register.h"
35 
36 #include "SchedXaction.h"
37 #include "Transaction.h"
40 
54 typedef struct gnc_ledger_display2 GNCLedgerDisplay2;
55 
56 typedef void (*GNCLedgerDisplay2Destroy) (GNCLedgerDisplay2 *ld);
57 typedef GtkWidget *(*GNCLedgerDisplay2GetParent) (GNCLedgerDisplay2 *ld);
58 typedef void (*GNCLedgerDisplay2SetHelp) (GNCLedgerDisplay2 *ld,
59  const char *help_str);
60 
61 
62 typedef enum
63 {
64  LD2_SINGLE,
65  LD2_SUBACCOUNT,
66  LD2_GL,
67 } GNCLedgerDisplay2Type;
68 
69 
71 Account * gnc_ledger_display2_leader (GNCLedgerDisplay2 *ld);
72 
73 GNCLedgerDisplay2Type gnc_ledger_display2_type (GNCLedgerDisplay2 *ld);
74 
76 void gnc_ledger_display2_set_user_data (GNCLedgerDisplay2 *ld,
77  gpointer user_data);
78 gpointer gnc_ledger_display2_get_user_data (GNCLedgerDisplay2 *ld);
79 
81 void gnc_ledger_display2_set_handlers (GNCLedgerDisplay2 *ld,
82  GNCLedgerDisplay2Destroy destroy,
83  GNCLedgerDisplay2GetParent get_parent);
84 
86 void gnc_ledger_display2_set_split_view_register (GNCLedgerDisplay2 *ld, GncTreeViewSplitReg *view);
87 GncTreeViewSplitReg * gnc_ledger_display2_get_split_view_register (GNCLedgerDisplay2 *ld);
88 
89 void gnc_ledger_display2_set_split_view_refresh (GNCLedgerDisplay2 *ld, gboolean ok);
90 
92 GtkWidget *gnc_ledger_display2_get_parent( GNCLedgerDisplay2 *ld );
93 
96 
98 GNCLedgerDisplay2 * gnc_ledger_display2_simple (Account *account);
99 
102 GNCLedgerDisplay2 * gnc_ledger_display2_subaccounts (Account *account, gboolean mismatched_commodities);
103 
105 GNCLedgerDisplay2 * gnc_ledger_display2_gl (void);
106 
114 GNCLedgerDisplay2 * gnc_ledger_display2_template_gl (char *id);
115 
117 GNCLedgerDisplay2 * gnc_ledger_display2_query (Query *query,
118  SplitRegisterType2 type,
119  SplitRegisterStyle2 style);
120 
122 void gnc_ledger_display2_set_query (GNCLedgerDisplay2 *ledger_display,
123  Query *q);
124 
126 Query * gnc_ledger_display2_get_query (GNCLedgerDisplay2 *ld);
127 
130 GNCLedgerDisplay2 * gnc_ledger_display2_find_by_query (Query *q);
131 
134 void gnc_ledger_display2_refresh (GNCLedgerDisplay2 * ledger_display);
135 void gnc_ledger_display2_refresh_by_split_register (GncTreeModelSplitReg *model);
136 
138 void gnc_ledger_display2_refresh_sched (GNCLedgerDisplay2 *ld, GList *splits);
139 
141 void gnc_ledger_display2_refilter (GNCLedgerDisplay2 *ld);
142 
144 void gnc_ledger_display2_close (GNCLedgerDisplay2 * ledger_display);
145 
148 gboolean gnc_ledger_display2_default_double_line (GNCLedgerDisplay2 *gld);
149 
150 #endif
SplitRegisterType2
Register types.
void gnc_ledger_display2_refilter(GNCLedgerDisplay2 *ld)
Refilter the register.
void gnc_ledger_display2_set_user_data(GNCLedgerDisplay2 *ld, gpointer user_data)
get and set the user data associated with the ledger
void gnc_ledger_display2_refresh(GNCLedgerDisplay2 *ledger_display)
redisplay/redraw only the indicated window.
void gnc_ledger_display2_set_split_view_register(GNCLedgerDisplay2 *ld, GncTreeViewSplitReg *view)
Set and Get the tree view used by the ledger display.
void gnc_ledger_display2_set_query(GNCLedgerDisplay2 *ledger_display, Query *q)
Set the query used for a register.
GNCLedgerDisplay2 * gnc_ledger_display2_subaccounts(Account *account, gboolean mismatched_commodities)
opens up a register window to display the parent account and all of its children. ...
gboolean gnc_ledger_display2_default_double_line(GNCLedgerDisplay2 *gld)
Returns a boolean of whether this display should be single or double lined mode by default...
GNCLedgerDisplay2 * gnc_ledger_display2_template_gl(char *id)
Displays a template ledger.
GNCLedgerDisplay2 * gnc_ledger_display2_gl(void)
opens up a general ledger window
GNCLedgerDisplay2 * gnc_ledger_display2_find_by_query(Query *q)
If the given ledger display still exists, return it.
Account handling public routines.
Account * gnc_ledger_display2_leader(GNCLedgerDisplay2 *ld)
returns the &#39;lead&#39; account of a ledger display, or NULL if none.
void gnc_ledger_display2_close(GNCLedgerDisplay2 *ledger_display)
close the window
void gnc_ledger_display2_refresh_sched(GNCLedgerDisplay2 *ld, GList *splits)
This is used to load the register for the schedule.
GncTreeModelSplitReg * gnc_ledger_display2_get_split_model_register(GNCLedgerDisplay2 *ld)
return the split register associated with a ledger display
GNCLedgerDisplay2 * gnc_ledger_display2_query(Query *query, SplitRegisterType2 type, SplitRegisterStyle2 style)
display a general ledger for an arbitrary query
GtkWidget * gnc_ledger_display2_get_parent(GNCLedgerDisplay2 *ld)
Returns the parent of a given ledger display.
API for checkbook register display area.
Defines a single register/ledger instance.
SplitRegisterStyle2
Register styles.
void gnc_ledger_display2_set_handlers(GNCLedgerDisplay2 *ld, GNCLedgerDisplay2Destroy destroy, GNCLedgerDisplay2GetParent get_parent)
set the handlers used by the ledger display
The instance data structure for an account tree model.
GNCLedgerDisplay2 * gnc_ledger_display2_simple(Account *account)
opens up a register window to display a single account
Scheduled Transactions public handling routines.
API for Transactions and Splits (journal entries)
Query * gnc_ledger_display2_get_query(GNCLedgerDisplay2 *ld)
return the query associated with a ledger