GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Files | Functions

GnuCash-specific ledger and journal displays based on Register Core. More...

Files

file  split-register-layout.h
 Create the actual register visual layout.
 

Functions

TableLayoutgnc_split_register_layout_new (SplitRegister *reg)
 

Detailed Description

GnuCash-specific ledger and journal displays based on Register Core.

The split register is a spreadsheet-like area that looks like a checkbook register. It displays transactions and allows the user to edit them in-place. The register does not contain any of the other window decorations that one might want to have for a free standing window (e.g. menubars, * toolbars, etc.)

The layout of the register is configurable. There's a broad variety of cell types to choose from: date cells that know how to parse dates, price cells that know how to parse prices, etc. These cells can be laid out in any column; even a multi-row layout is supported. The name "split register" is derived from the fact that this register can display multiple rows of transaction splits underneath a transaction title/summary row.

An area for entering new transactions is provided at the bottom of the register.

All user input to the register is handled by the 'cursor', which is mapped onto one of the displayed rows.

Design Notes.

Some notes about the "blank split":
Q: What is the "blank split"?
A: A new, empty split appended to the bottom of the ledger window. The blank split provides an area where the user can type in new split/transaction info. The "blank split" is treated in a special way for a number of reasons:

To implement the above, the register "user_data" is used to store an SRInfo structure containing the blank split.

Function Documentation

TableLayout* gnc_split_register_layout_new ( SplitRegister reg)

Generate the split register layout.

Definition at line 833 of file split-register-layout.c.

834 {
835  TableLayout *layout;
836 
837  layout = gnc_table_layout_new ();
838 
839  gnc_split_register_layout_add_cells (reg, layout);
840  gnc_split_register_layout_add_cursors (reg, layout);
841  gnc_split_register_set_cells (reg, layout);
842 
843  return layout;
844 }