GnuCash
2.6.99
|
Modules | |
Split Register | |
GnuCash-specific ledger and journal displays based on Register Core. | |
Register Core | |
An infrastructure for building a modular matrix of cells like a spreadsheet or checkbook register. | |
Files | |
file | split-register.h |
API for checkbook register display area. | |
Data Structures | |
struct | split_register |
The type, style and table for the register. More... | |
Typedefs | |
typedef struct split_register | SplitRegister |
A split register created with gnc_split_register_new. | |
typedef struct sr_info | SRInfo |
typedef GtkWidget *(* | SRGetParentCallback )(gpointer user_data) |
Enumerations | |
enum | CursorClass { CURSOR_CLASS_NONE = -1, CURSOR_CLASS_SPLIT, CURSOR_CLASS_TRANS, NUM_CURSOR_CLASSES } |
typedef GtkWidget*(* SRGetParentCallback)(gpointer user_data) |
Callback function type
Definition at line 265 of file split-register.h.
enum CursorClass |
enum SplitRegisterStyle |
enum SplitRegisterType |
Register types.
"registers" are single-account display windows. "ledgers" are multiple-account display windows
Definition at line 152 of file split-register.h.
void gnc_split_register_cancel_cursor_split_changes | ( | SplitRegister * | reg | ) |
Cancels any changes made to the current cursor, reloads the cursor from the engine, reloads the table from the cursor, and updates the GUI. The change flags are cleared.
Definition at line 1300 of file split-register.c.
void gnc_split_register_cancel_cursor_trans_changes | ( | SplitRegister * | reg | ) |
Cancels any changes made to the current pending transaction, reloads the table from the engine, and updates the GUI. The change flags are cleared.
Definition at line 1323 of file split-register.c.
gboolean gnc_split_register_changed | ( | SplitRegister * | reg | ) |
Returns TRUE if the register has changed cells.
Definition at line 2345 of file split-register.c.
void gnc_split_register_collapse_current_trans | ( | SplitRegister * | reg | ) |
Mark the current transaction as collapsed, and do callbacks.
void gnc_split_register_config | ( | SplitRegister * | reg, |
SplitRegisterType | type, | ||
SplitRegisterStyle | style, | ||
gboolean | use_double_line | ||
) |
Sets a split register's type, style or line use.
reg | a SplitRegister |
type | a SplitRegisterType to use for the register |
style | a SplitRegisterStyle to use for the register |
use_double_line | TRUE to show two lines for transactions, FALSE for one |
Definition at line 2753 of file split-register.c.
void gnc_split_register_copy_current | ( | SplitRegister * | reg | ) |
Makes a copy of the current entity, either a split or a transaction, so that it can be pasted later.
Definition at line 811 of file split-register.c.
gboolean gnc_split_register_current_trans_expanded | ( | SplitRegister * | reg | ) |
Return TRUE if current trans is expanded and style is REG_STYLE_LEDGER.
Definition at line 254 of file split-register.c.
void gnc_split_register_cut_current | ( | SplitRegister * | reg | ) |
Equivalent to copying the current entity and the deleting it with the approriate delete method.
Definition at line 817 of file split-register.c.
void gnc_split_register_delete_current_split | ( | SplitRegister * | reg | ) |
Deletes the split associated with the current cursor, if both are non-NULL. Deleting the blank split just clears cursor values.
Definition at line 1029 of file split-register.c.
void gnc_split_register_delete_current_trans | ( | SplitRegister * | reg | ) |
Deletes the transaction associated with the current cursor, if both are non-NULL.
Definition at line 1084 of file split-register.c.
void gnc_split_register_destroy | ( | SplitRegister * | reg | ) |
Destroys a split register.
reg | a SplitRegister |
Definition at line 2913 of file split-register.c.
Split* gnc_split_register_duplicate_current | ( | SplitRegister * | reg | ) |
Duplicates either the current transaction or the current split depending on the register mode and cursor position. Returns the split just created, or the 'main' split of the transaction just created, or NULL if nothing happened.
Definition at line 391 of file split-register.c.
void gnc_split_register_empty_current_trans_except_split | ( | SplitRegister * | reg, |
Split * | split | ||
) |
Deletes the non-transaction splits associated wih the current cursor, if both are non-NULL.
Definition at line 1247 of file split-register.c.
void gnc_split_register_expand_current_trans | ( | SplitRegister * | reg, |
gboolean | expand | ||
) |
Expand the current transaction if it is collapsed.
Definition at line 194 of file split-register.c.
Split* gnc_split_register_get_blank_split | ( | SplitRegister * | reg | ) |
Gets the blank split for a register.
reg | a SplitRegister |
NULL
if there currently isn't one Definition at line 303 of file split-register.c.
const char* gnc_split_register_get_credit_string | ( | SplitRegister * | reg | ) |
Return the credit string used in the register.
Definition at line 2322 of file split-register.c.
CursorClass gnc_split_register_get_current_cursor_class | ( | SplitRegister * | reg | ) |
Returns the class of a register's current cursor.
reg | a SplitRegister |
Definition at line 545 of file split-register-util.c.
Split* gnc_split_register_get_current_split | ( | SplitRegister * | reg | ) |
Returns the split at which the cursor is currently located.
reg | a SplitRegister |
Definition at line 293 of file split-register.c.
Transaction* gnc_split_register_get_current_trans | ( | SplitRegister * | reg | ) |
Gets the transaction at the current cursor location, which may be on the transaction itself or on any of its splits.
reg | a SplitRegister |
NULL
Definition at line 269 of file split-register.c.
Split* gnc_split_register_get_current_trans_split | ( | SplitRegister * | reg, |
VirtualCellLocation * | vcell_loc | ||
) |
Gets the anchoring split of the transaction at the current cursor location, which may be on the transaction itself or on any of its splits.
reg | a SplitRegister |
vcell_loc | a pointer to be filled with the location of the transaction's virtual cell |
Definition at line 186 of file split-register-util.c.
CursorClass gnc_split_register_get_cursor_class | ( | SplitRegister * | reg, |
VirtualCellLocation | vcell_loc | ||
) |
Returns the class of the cursor at the given virtual cell location.
reg | a SplitRegister |
vcell_loc | the location of a virtual cell |
Definition at line 524 of file split-register-util.c.
const char* gnc_split_register_get_debit_string | ( | SplitRegister * | reg | ) |
Return the debit string used in the register.
Definition at line 2299 of file split-register.c.
gboolean gnc_split_register_get_split_amount_virt_loc | ( | SplitRegister * | reg, |
Split * | split, | ||
VirtualLocation * | virt_loc | ||
) |
Searches the split register for the given split and determines the location of either its credit (if non-zero) or debit cell.
reg | a SplitRegister |
split | the Split to find |
virt_loc | a pointer to be filled with the amount cell's location |
TRUE
if the split was found and the location has been stored at virt_loc, FALSE
otherwise Definition at line 353 of file split-register.c.
gboolean gnc_split_register_get_split_virt_loc | ( | SplitRegister * | reg, |
Split * | split, | ||
VirtualCellLocation * | vcell_loc | ||
) |
Searches the split register for a given split. The search begins from the bottom row and works backwards. The location of the first virtual cell that matches will be returned in vcell_loc.
reg | a SplitRegister |
split | the Split to find |
vcell_loc | a pointer to be filled with the location of the matching virtual cell |
TRUE
if the split was found and the location has been stored at vcell_loc, FALSE
otherwise Definition at line 313 of file split-register.c.
gboolean gnc_split_register_handle_exchange | ( | SplitRegister * | reg, |
gboolean | force_dialog | ||
) |
Pop up the exchange-rate dialog, maybe, for the current split. If force_dialog is TRUE, the forces the dialog to to be called. If the dialog does not complete successfully, then return TRUE. Return FALSE in all other cases (meaning "move on")
Definition at line 1296 of file split-register-control.c.
void gnc_split_register_load | ( | SplitRegister * | reg, |
GList * | slist, | ||
Account * | default_account | ||
) |
Populates the rows of a register.
The rows are filled, based on the register style, with data associated with the given list of splits slist. In addition, an area for the user to begin entering new transactions is placed at the tail end of the register. This area is anchored by the "blank split".
The account default_account, if provided, is used to determine various default values for the blank split (such as currency, last check number, and transfer account) for the blank split.
reg | a SplitRegister |
slist | a list of splits |
default_account | an account to provide defaults for the blank split |
Definition at line 327 of file split-register-load.c.
SplitRegister* gnc_split_register_new | ( | SplitRegisterType | type, |
SplitRegisterStyle | style, | ||
gboolean | use_double_line, | ||
gboolean | is_template | ||
) |
Creates a new split register.
type | a SplitRegisterType to use for the new register |
style | a SplitRegisterStyle to use for the new register |
use_double_line | TRUE to show two lines for transactions, FALSE for one |
is_template | TRUE for a new template, FALSE otherwise |
Definition at line 2729 of file split-register.c.
void gnc_split_register_paste_current | ( | SplitRegister * | reg | ) |
Pastes a previous copied entity onto the current entity, but only if the copied and current entity have the same type.
Definition at line 860 of file split-register.c.
void gnc_split_register_redraw | ( | SplitRegister * | reg | ) |
Causes a redraw of the register window associated with reg.
Definition at line 1354 of file split-register.c.
gboolean gnc_split_register_save | ( | SplitRegister * | reg, |
gboolean | do_commit | ||
) |
Copy the contents of the current cursor to a split. The split and transaction that are updated are the ones associated with the current cursor (register entry) position. If the do_commit flag is set, the transaction will also be committed. If it is the blank transaction, and the do_commit flag is set, a refresh will result in a new blank transaction. The method returns TRUE if something was changed.
Definition at line 1562 of file split-register.c.
void gnc_split_register_set_auto_complete | ( | SplitRegister * | reg, |
gboolean | do_auto_complete | ||
) |
Sets whether a register uses auto-completion.
reg | a SplitRegister |
do_auto_complete | TRUE to use auto-completion, FALSE otherwise |
Definition at line 2795 of file split-register.c.
void gnc_split_register_set_data | ( | SplitRegister * | reg, |
gpointer | user_data, | ||
SRGetParentCallback | get_parent | ||
) |
Sets the user data and callback hooks for the register.
void gnc_split_register_set_read_only | ( | SplitRegister * | reg, |
gboolean | read_only | ||
) |
Sets whether a register window is "read only".
reg | a SplitRegister |
read_only | TRUE to use "read only" mode, FALSE otherwise |
Definition at line 2941 of file split-register.c.
void gnc_split_register_set_template_account | ( | SplitRegister * | reg, |
Account * | template_account | ||
) |
Set the template account for use in a template register.
reg | a SplitRegister |
template_account | the account to use for the template |
Definition at line 116 of file split-register-util.c.
void gnc_split_register_show_present_divider | ( | SplitRegister * | reg, |
gboolean | show_present | ||
) |
If TRUE, visually indicate the demarcation between splits with post dates prior to the present, and after. This will only make sense if the splits are ordered primarily by post date.
Definition at line 2377 of file split-register.c.
void gnc_split_register_unvoid_current_trans | ( | SplitRegister * | reg | ) |
Unvoids the transaction associated with the current cursor, if non-NULL.
Definition at line 1200 of file split-register.c.
void gnc_split_register_void_current_trans | ( | SplitRegister * | reg, |
const char * | reason | ||
) |
Voids the transaction associated with the current cursor, if non-NULL.
Definition at line 1150 of file split-register.c.