GnuCash c935c2f+
Loading...
Searching...
No Matches
gnc-ledger-display.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 * *
9 * This program is free software; you can redistribute it and/or *
10 * modify it under the terms of the GNU General Public License as *
11 * published by the Free Software Foundation; either version 2 of *
12 * the License, or (at your option) any later version. *
13 * *
14 * This program is distributed in the hope that it will be useful, *
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17 * GNU General Public License for more details. *
18 * *
19 * You should have received a copy of the GNU General Public License*
20 * along with this program; if not, write to the Free Software *
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
22 * *
23\********************************************************************/
24
25#ifndef GNC_LEDGER_DISPLAY_H
26#define GNC_LEDGER_DISPLAY_H
27
28#ifdef __cplusplus
29extern "C"
30{
31#endif
32
33#include <glib.h>
34
35#include "Account.h"
36#include "Query.h"
37#include "split-register.h"
38#include "SchedXaction.h"
39#include "Transaction.h"
40
52typedef struct gnc_ledger_display GNCLedgerDisplay;
53
54typedef void (*GNCLedgerDisplayDestroy) (GNCLedgerDisplay* ld);
55typedef GtkWidget* (*GNCLedgerDisplayGetParent) (GNCLedgerDisplay* ld);
56typedef void (*GNCLedgerDisplaySetHelp) (GNCLedgerDisplay* ld,
57 const char* help_str);
58
59typedef enum
60{
61 LD_SINGLE,
62 LD_SUBACCOUNT,
63 LD_GL,
64} GNCLedgerDisplayType;
65
66
68Account* gnc_ledger_display_leader (GNCLedgerDisplay* ld);
69
70GNCLedgerDisplayType gnc_ledger_display_type (GNCLedgerDisplay* ld);
71
73void gnc_ledger_display_set_user_data (GNCLedgerDisplay* ld,
74 gpointer user_data);
75gpointer gnc_ledger_display_get_user_data (GNCLedgerDisplay* ld);
76
78void gnc_ledger_display_set_handlers (GNCLedgerDisplay* ld,
79 GNCLedgerDisplayDestroy destroy,
80 GNCLedgerDisplayGetParent get_parent);
81
83GtkWidget* gnc_ledger_display_get_parent (GNCLedgerDisplay* ld);
84
86SplitRegister* gnc_ledger_display_get_split_register (GNCLedgerDisplay* ld);
87
89GNCLedgerDisplay* gnc_ledger_display_simple (Account* account);
90
93GNCLedgerDisplay* gnc_ledger_display_subaccounts (Account* account,
94 gboolean mismatched_commodities);
95
97GNCLedgerDisplay* gnc_ledger_display_gl (void);
98
106GNCLedgerDisplay* gnc_ledger_display_template_gl (char* id);
107
109GNCLedgerDisplay* gnc_ledger_display_query (Query* query,
111 SplitRegisterStyle style);
112
114void gnc_ledger_display_set_query (GNCLedgerDisplay* ledger_display,
115 Query* q);
116
118Query* gnc_ledger_display_get_query (GNCLedgerDisplay* ld);
119
122GNCLedgerDisplay* gnc_ledger_display_find_by_query (Query* q);
123
126void gnc_ledger_display_refresh (GNCLedgerDisplay* ledger_display);
127void gnc_ledger_display_refresh_by_split_register (SplitRegister* reg);
128
130void gnc_ledger_display_set_focus (GNCLedgerDisplay* ld, gboolean focus);
131
133void gnc_ledger_display_close (GNCLedgerDisplay* ledger_display);
134
137gboolean gnc_ledger_display_default_double_line (GNCLedgerDisplay* gld);
138
139#ifdef __cplusplus
140}
141#endif
142
143#endif
Account handling public routines.
Scheduled Transactions public handling routines.
API for Transactions and Splits (journal entries)
void gnc_ledger_display_set_handlers(GNCLedgerDisplay *ld, GNCLedgerDisplayDestroy destroy, GNCLedgerDisplayGetParent get_parent)
set the handlers used by the ledger display
GNCLedgerDisplay * gnc_ledger_display_gl(void)
opens up a general ledger window
GNCLedgerDisplay * gnc_ledger_display_template_gl(char *id)
Displays a template ledger.
gboolean gnc_ledger_display_default_double_line(GNCLedgerDisplay *gld)
Returns a boolean of whether this display should be single or double lined mode by default.
Query * gnc_ledger_display_get_query(GNCLedgerDisplay *ld)
return the query associated with a ledger
GNCLedgerDisplay * gnc_ledger_display_simple(Account *account)
opens up a register window to display a single account
void gnc_ledger_display_refresh(GNCLedgerDisplay *ledger_display)
redisplay/redraw only the indicated window.
GNCLedgerDisplay * gnc_ledger_display_query(Query *query, SplitRegisterType type, SplitRegisterStyle style)
display a general ledger for an arbitrary query
GtkWidget * gnc_ledger_display_get_parent(GNCLedgerDisplay *ld)
Returns the parent of a given ledger display.
void gnc_ledger_display_close(GNCLedgerDisplay *ledger_display)
close the window
void gnc_ledger_display_set_query(GNCLedgerDisplay *ledger_display, Query *q)
Set the query used for a register.
Account * gnc_ledger_display_leader(GNCLedgerDisplay *ld)
returns the 'lead' account of a ledger display, or NULL if none.
void gnc_ledger_display_set_user_data(GNCLedgerDisplay *ld, gpointer user_data)
get and set the user data associated with the ledger
GNCLedgerDisplay * gnc_ledger_display_find_by_query(Query *q)
If the given ledger display still exists, return it.
GNCLedgerDisplay * gnc_ledger_display_subaccounts(Account *account, gboolean mismatched_commodities)
opens up a register window to display the parent account and all of its children.
SplitRegister * gnc_ledger_display_get_split_register(GNCLedgerDisplay *ld)
return the split register associated with a ledger display
void gnc_ledger_display_set_focus(GNCLedgerDisplay *ld, gboolean focus)
Mark the ledger as being in focus (refresh immediately) or not.
SplitRegisterStyle
Register styles.
SplitRegisterType
Register types.
API for checkbook register display area.
STRUCTS.
A Query.
Definition qofquery.cpp:75
The GNCLedgerDisplay struct describes a single register/ledger instance.