GnuCash  5.6-150-g038405b370+
gnc-plugin-page-register.h
Go to the documentation of this file.
1 /**********************************************************************
2  * gnc-plugin-page-register.h -- register page functions *
3  * *
4  * Copyright (C) 2003 Jan Arne Petersen <jpetersen@uni-bonn.de> *
5  * Copyright (C) 2003,2005,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 
35 #ifndef __GNC_PLUGIN_PAGE_REGISTER_H
36 #define __GNC_PLUGIN_PAGE_REGISTER_H
37 
38 #include <gtk/gtk.h>
39 
40 #include "Account.h"
41 #include "gnc-ledger-display.h"
42 #include "gnc-plugin-page.h"
43 #include "gnc-split-reg.h"
44 #include "Query.h"
46 #include "gnc-plugin-page-register-sort.hpp"
47 
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
54 G_BEGIN_DECLS
55 
56 /* type macros */
57 #define GNC_TYPE_PLUGIN_PAGE_REGISTER (gnc_plugin_page_register_get_type ())
58 #define GNC_PLUGIN_PAGE_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_PAGE_REGISTER, GncPluginPageRegister))
59 #define GNC_PLUGIN_PAGE_REGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_PAGE_REGISTER, GncPluginPageRegisterClass))
60 #define GNC_IS_PLUGIN_PAGE_REGISTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_PAGE_REGISTER))
61 #define GNC_IS_PLUGIN_PAGE_REGISTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_PAGE_REGISTER))
62 #define GNC_PLUGIN_PAGE_REGISTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_PAGE_REGISTER, GncPluginPageRegisterClass))
63 #define GNC_PLUGIN_PAGE_REGISTER_NAME "GncPluginPageRegister"
64 
65 /* typedefs & structures */
66 typedef struct
67 {
68  GncPluginPage gnc_plugin_page;
70 
71 typedef struct
72 {
73  GncPluginPageClass gnc_plugin_page;
75 
76 /* function prototypes */
77 
83 
84 
96 GncPluginPage * gnc_plugin_page_register_new (Account *account, gboolean subaccounts);
97 
98 
109 GncPluginPage * gnc_plugin_page_register_new_ledger (GNCLedgerDisplay *ledger);
110 
111 
117 
118 
129  gint lines_default,
130  gboolean read_only);
131 
132 
137 GNCSplitReg * gnc_plugin_page_register_get_gsr (GncPluginPage *plugin_page);
138 
144 
150 
158 
165 
173 
181 void gnc_plugin_register_set_enable_refresh (GncPluginPageRegister* page, gboolean enable_refresh);
182 
191 
192 
201 
202 
210 
211 
212 G_END_DECLS
217 #ifdef __cplusplus
218 }
219 #endif
220 
221 #endif /* __GNC_PLUGIN_PAGE_REGISTER_H */
222 
GncPluginPage * gnc_plugin_page_register_new(Account *account, gboolean subaccounts)
Create a new "register" plugin page, given a pointer to an account.
Public declarations for GncLedgerDisplay class.
Functions providing a register page filter for the GnuCash UI.
void gnc_plugin_register_set_enable_refresh(GncPluginPageRegister *page, gboolean enable_refresh)
This allows controlling when refreshes happen, used to reduce refreshes when different aspects of the...
The instance data structure for a content plugin.
FilterData * gnc_plugin_page_register_get_filter_data(GncPluginPage *plugin_page)
Get the FilterData data structure associated with this register page.
STRUCTS.
GType gnc_plugin_page_register_get_type(void)
Retrieve the type number for the plugin page.
GncPluginPage * gnc_plugin_page_register_new_ledger(GNCLedgerDisplay *ledger)
Create a new "register" plugin page, given a pointer to an already created ledger.
Account handling public routines.
The class data structure for a content plugin.
Transaction * gnc_plugin_page_register_get_current_txn(GncPluginPageRegister *page)
Get the currently selected transaction in this register page.
Functions for adding plugins to a GnuCash window.
SortData * gnc_plugin_page_register_get_sort_data(GncPluginPage *plugin_page)
Get the SortData data structure associated with this register page.
Query * gnc_plugin_page_register_get_query(GncPluginPage *plugin_page)
This function is called to get the query associated with this plugin page.
GncPluginPage * gnc_plugin_page_register_new_gl(void)
Create a new "register" plugin page containing a general journal.
Account * gnc_plugin_page_register_get_account(GncPluginPageRegister *page)
Get the Account associated with this register page.
void gnc_plugin_page_register_query_update(GncPluginPageRegister *page, Query *query)
This updates the query after the filters have been applied.
void gnc_plugin_page_register_clear_current_filter(GncPluginPage *plugin_page)
This function clears the registers current filter.
void gnc_plugin_page_register_update_for_search_query(GncPluginPageRegister *page)
This checks if the register is a search register and if so saves the query.
GNCSplitReg * gnc_plugin_page_register_get_gsr(GncPluginPage *plugin_page)
Get the GNCSplitReg data structure associated with this register page.
A Query.
Definition: qofquery.cpp:74
void gnc_plugin_page_register_set_options(GncPluginPage *plugin_page, gint lines_default, gboolean read_only)
Set various register options on a newly created "register" plugin page.