GnuCash  4.11-243-g1cac132214+
Files | Data Structures | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables

Files

file  gnc-ledger-display.h
 Public declarations for GncLedgerDisplay class.
 
file  formulacell-gnome.h
 Implements gnome dependent formula cell functions.
 
file  gnucash-color.h
 Convenience wrapper around GdkRGBA for use in Register Gnome classes.
 
file  gnucash-cursor.h
 Public declarations for GnucashCursor class.
 
file  gnucash-date-picker.h
 Public declarations for GncDatePicker class.
 
file  gnucash-header.h
 Public declarations for GnucashHeader class.
 
file  gnucash-item-edit.h
 Public declarations for GncItemEdit class.
 
file  gnucash-item-list.h
 Public Declarations for GncItemList class.
 
file  gnucash-sheet.h
 Public declarations of GnucashRegister class.
 
file  gnucash-sheet.h
 Public declarations of GnucashRegister class.
 
file  gnucash-sheetP.h
 Private declarations for GnucashSheet class.
 
file  gnucash-style.h
 Styling functions for RegisterGnome.
 

Data Structures

struct  GnucashCursorCell
 
struct  GnucashCursor
 
struct  GnucashCursorClass
 
struct  GNCDatePicker
 
struct  GNCDatePickerClass
 
struct  GncHeader
 
struct  GncHeaderClass
 
struct  PopupToggle
 
struct  GncItemEdit
 
struct  GncItemEditClass
 
struct  GncItemEditTb
 
struct  GncItemEditTbClass
 
struct  GncItemList
 
struct  GncItemListClass
 
struct  SheetBlock
 
struct  GnucashSheet
 
struct  GnucashSheetClass
 
struct  CellDimensions
 
struct  BlockDimensions
 
struct  SheetBlockStyle
 

Macros

#define GNUCASH_TYPE_CURSOR   (gnucash_cursor_get_type ())
 
#define GNUCASH_CURSOR(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNUCASH_TYPE_CURSOR, GnucashCursor))
 
#define GNUCASH_CURSOR_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_CURSOR, GnucashCursorClass))
 
#define GNUCASH_IS_CURSOR(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNUCASH_TYPE_CURSOR))
 
#define GNUCASH_TYPE_ITEM_CURSOR   (gnucash_item_cursor_get_type ())
 
#define GNUCASH_ITEM_CURSOR(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNUCASH_TYPE_ITEM_CURSOR, GnucashItemCursor))
 
#define GNUCASH_ITEM_CURSOR_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_ITEM_CURSOR, GnucashItemCursorClass))
 
#define GNUCASH_IS_ITEM_CURSOR(o)   (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNUCASH_TYPE_ITEM_CURSOR))
 
#define GNC_TYPE_DATE_PICKER   (gnc_date_picker_get_type ())
 
#define GNC_DATE_PICKER(obj)   G_TYPE_CHECK_INSTANCE_CAST((obj), gnc_date_picker_get_type (), GNCDatePicker)
 
#define GNC_DATE_PICKER_CLASS(k)   G_TYPE_CHECK_CLASS_CAST((k), gnc_date_picker_get_type (), GNCDatePickerClass)
 
#define IS_GNC_DATE_PICKER(o)   G_TYPE_CHECK_INSTANCE_TYPE((o), gnc_date_picker_get_type ())
 
#define GNC_TYPE_HEADER   (gnc_header_get_type ())
 
#define GNC_HEADER(o)   (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_HEADER, GncHeader))
 
#define GNC_HEADER_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_HEADER, GncHeaderClass))
 
#define GNC_IS_HEADER(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_HEADER))
 
#define GNC_TYPE_ITEM_EDIT   (gnc_item_edit_get_type ())
 
#define GNC_ITEM_EDIT(o)   (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_ITEM_EDIT, GncItemEdit))
 
#define GNC_ITEM_EDIT_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_ITEM_EDIT, GncItemEditClass))
 
#define GNC_IS_ITEM_EDIT(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_ITEM_EDIT))
 
#define GNC_TYPE_ITEM_EDIT_TB   (gnc_item_edit_tb_get_type ())
 
#define GNC_ITEM_EDIT_TB(o)   (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_ITEM_EDIT_TB, GncItemEditTb))
 
#define GNC_ITEM_EDIT_TB_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_ITEM_EDIT_TB, GncItemEditTbClass))
 
#define GNC_IS_ITEM_EDIT_TB(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_ITEM_EDIT_TB))
 
#define GNC_TYPE_ITEM_LIST   (gnc_item_list_get_type ())
 
#define GNC_ITEM_LIST(o)   (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_ITEM_LIST, GncItemList))
 
#define GNC_ITEM_LIST_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_ITEM_LIST, GncItemListClass))
 
#define IS_GNC_ITEM_LIST(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_ITEM_LIST))
 
#define GNUCASH_TYPE_REGISTER   (gnucash_register_get_type ())
 
#define GNUCASH_REGISTER(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), GNUCASH_TYPE_REGISTER, GnucashRegister))
 
#define GNUCASH_REGISTER_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_REGISTER))
 
#define GNUCASH_IS_REGISTER(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), GNUCASH_TYPE_REGISTER))
 
#define GNUCASH_TYPE_SHEET   (gnucash_sheet_get_type ())
 
#define GNUCASH_SHEET(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), GNUCASH_TYPE_SHEET, GnucashSheet))
 
#define GNUCASH_SHEET_CLASS(k)   (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_SHEET))
 
#define GNUCASH_IS_SHEET(o)   (G_TYPE_CHECK_INSTANCE_TYPE((o), GNUCASH_TYPE_SHEET))
 

Typedefs

typedef void(* GNCLedgerDisplayDestroy) (GNCLedgerDisplay *ld)
 
typedef GtkWidget *(* GNCLedgerDisplayGetParent) (GNCLedgerDisplay *ld)
 
typedef void(* GNCLedgerDisplaySetHelp) (GNCLedgerDisplay *ld, const char *help_str)
 
typedef int(* PopupGetHeight) (GtkWidget *item, int space_available, int row_height, gpointer user_data)
 
typedef int(* PopupAutosize) (GtkWidget *item, int max_width, gpointer user_data)
 
typedef void(* PopupSetFocus) (GtkWidget *item, gpointer user_data)
 
typedef void(* PopupPostShow) (GtkWidget *item, gpointer user_data)
 
typedef int(* PopupGetWidth) (GtkWidget *item, gpointer user_data)
 
typedef gboolean(* VirtualLocationMatchFunc) (VirtualLocation virt_loc, gpointer user_data)
 
typedef GHashTable * GNCHeaderWidths
 

Enumerations

enum  GNCLedgerDisplayType { LD_SINGLE, LD_SUBACCOUNT, LD_GL }
 
enum  { GNUCASH_CURSOR_CELL, GNUCASH_CURSOR_BLOCK, GNUCASH_CURSOR_NUM }
 
enum  Sides {
  left, right, top, bottom,
  left_right, top_bottom
}
 

Functions

Accountgnc_ledger_display_leader (GNCLedgerDisplay *ld)
 returns the 'lead' account of a ledger display, or NULL if none. More...
 
GNCLedgerDisplayType gnc_ledger_display_type (GNCLedgerDisplay *ld)
 
void gnc_ledger_display_set_user_data (GNCLedgerDisplay *ld, gpointer user_data)
 get and set the user data associated with the ledger
 
gpointer gnc_ledger_display_get_user_data (GNCLedgerDisplay *ld)
 
void gnc_ledger_display_set_handlers (GNCLedgerDisplay *ld, GNCLedgerDisplayDestroy destroy, GNCLedgerDisplayGetParent get_parent)
 set the handlers used by the ledger display
 
GtkWidget * gnc_ledger_display_get_parent (GNCLedgerDisplay *ld)
 Returns the parent of a given ledger display.
 
SplitRegister * gnc_ledger_display_get_split_register (GNCLedgerDisplay *ld)
 return the split register associated with a ledger display
 
GNCLedgerDisplay * gnc_ledger_display_simple (Account *account)
 opens up a register window to display a single account
 
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. More...
 
GNCLedgerDisplay * gnc_ledger_display_gl (void)
 opens up a general ledger window
 
GNCLedgerDisplay * gnc_ledger_display_template_gl (char *id)
 Displays a template ledger. More...
 
GNCLedgerDisplay * gnc_ledger_display_query (Query *query, SplitRegisterType type, SplitRegisterStyle style)
 display a general ledger for an arbitrary query
 
void gnc_ledger_display_set_query (GNCLedgerDisplay *ledger_display, Query *q)
 Set the query used for a register. More...
 
Query * gnc_ledger_display_get_query (GNCLedgerDisplay *ld)
 return the query associated with a ledger
 
GNCLedgerDisplay * gnc_ledger_display_find_by_query (Query *q)
 If the given ledger display still exists, return it. More...
 
void gnc_ledger_display_refresh (GNCLedgerDisplay *ledger_display)
 redisplay/redraw only the indicated window. More...
 
void gnc_ledger_display_refresh_by_split_register (SplitRegister *reg)
 
void gnc_ledger_display_close (GNCLedgerDisplay *ledger_display)
 close the window
 
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.
 
void gnucash_color_init (void)
 
GdkRGBA * gnucash_color_argb_to_gdk (guint32 argb)
 Return the pixel value for the given red, green and blue.
 
GType gnucash_item_cursor_get_type (void)
 
GType gnucash_cursor_get_type (void)
 
GnucashCursorgnucash_cursor_new (GnucashSheet *sheet)
 
void gnucash_cursor_get_virt (GnucashCursor *cursor, VirtualLocation *virt_loc)
 
void gnucash_cursor_set (GnucashCursor *cursor, VirtualLocation virt_loc)
 
void gnucash_cursor_set_style (GnucashCursor *cursor, SheetBlockStyle *style)
 
void gnucash_cursor_configure (GnucashCursor *cursor)
 
GType gnc_date_picker_get_type (void)
 
GtkWidget * gnc_date_picker_new (void)
 
void gnc_date_picker_set_date (GNCDatePicker *date_picker, guint day, guint mon, guint year)
 
void gnc_date_picker_get_date (GNCDatePicker *date_picker, guint *day, guint *mon, guint *year)
 
GType gnc_header_get_type (void)
 
GtkWidget * gnc_header_new (GnucashSheet *sheet)
 
void gnc_header_reconfigure (GncHeader *header)
 
void gnc_header_request_redraw (GncHeader *header)
 
void gnc_header_set_header_rows (GncHeader *header, int num_phys_rows)
 
gint gnc_header_get_cell_offset (GncHeader *header, gint col, gint *cell_width)
 
GType gnc_item_edit_get_type (void)
 
void gnc_item_edit_configure (GncItemEdit *item_edit)
 
void gnc_item_edit_get_pixel_coords (GncItemEdit *item_edit, int *x, int *y, int *w, int *h)
 
GtkWidget * gnc_item_edit_new (GnucashSheet *sheet)
 
void gnc_item_edit_set_popup (GncItemEdit *item_edit, GtkWidget *popup_item, PopupGetHeight popup_get_height, PopupAutosize popup_autosize, PopupSetFocus popup_set_focus, PopupPostShow popup_post_show, PopupGetWidth popup_get_width, gpointer popup_user_data)
 
void gnc_item_edit_show_popup (GncItemEdit *item_edit)
 
void gnc_item_edit_hide_popup (GncItemEdit *item_edit)
 
void gnc_item_edit_cut_clipboard (GncItemEdit *item_edit)
 
void gnc_item_edit_copy_clipboard (GncItemEdit *item_edit)
 
void gnc_item_edit_paste_clipboard (GncItemEdit *item_edit)
 
gboolean gnc_item_edit_get_has_selection (GncItemEdit *item_edit)
 
void gnc_item_edit_focus_in (GncItemEdit *item_edit)
 
void gnc_item_edit_focus_out (GncItemEdit *item_edit)
 
gint gnc_item_edit_get_margin (GncItemEdit *item_edit, Sides side)
 
gint gnc_item_edit_get_padding_border (GncItemEdit *item_edit, Sides side)
 
gint gnc_item_edit_get_button_width (GncItemEdit *item_edit)
 
GType gnc_item_edit_tb_get_type (void)
 
GtkWidget * gnc_item_edit_tb_new (GnucashSheet *sheet)
 
GType gnc_item_list_get_type (void)
 
GtkWidget * gnc_item_list_new (GtkListStore *shared_store)
 
gint gnc_item_list_num_entries (GncItemList *item_list)
 
gint gnc_item_list_get_cell_height (GncItemList *item_list)
 
void gnc_item_list_clear (GncItemList *item_list)
 
void gnc_item_list_append (GncItemList *item_list, const char *string)
 
void gnc_item_list_set_sort_enabled (GncItemList *item_list, gboolean enabled)
 
gboolean gnc_item_in_list (GncItemList *item_list, const char *string)
 
void gnc_item_list_select (GncItemList *item_list, const char *string)
 
void gnc_item_list_show_selected (GncItemList *item_list)
 
char * gnc_item_list_get_selection (GncItemList *item_list)
 Retrieve the selected string from the item_list's active GtkListStore. More...
 
int gnc_item_list_autosize (GncItemList *item_list)
 
void gnc_item_list_set_temp_store (GncItemList *item_list, GtkListStore *store)
 
gboolean gnc_item_list_using_temp (GncItemList *item_list)
 
GType gnucash_register_get_type (void)
 
void gnucash_register_add_cell_types (void)
 Add cell types defined by gnucash_register to gnc_register. More...
 
GtkWidget * gnucash_register_new (Table *table, const gchar *state_section)
 this already has scrollbars attached
 
void gnucash_register_goto_virt_cell (GnucashRegister *reg, VirtualCellLocation vcell_loc)
 
void gnucash_register_goto_virt_loc (GnucashRegister *reg, VirtualLocation virt_loc)
 
void gnucash_register_goto_next_virt_row (GnucashRegister *reg)
 
void gnucash_register_goto_next_matching_row (GnucashRegister *reg, VirtualLocationMatchFunc match, gpointer user_data)
 
void gnucash_register_attach_popup (GnucashRegister *reg, GtkWidget *popup, gpointer data)
 
gboolean gnucash_register_has_selection (GnucashRegister *reg)
 
void gnucash_register_cut_clipboard (GnucashRegister *reg)
 
void gnucash_register_copy_clipboard (GnucashRegister *reg)
 
void gnucash_register_paste_clipboard (GnucashRegister *reg)
 
void gnucash_register_refresh_from_prefs (GnucashRegister *reg)
 
void gnucash_register_set_moved_cb (GnucashRegister *reg, GFunc cb, gpointer cb_data)
 
void gnucash_register_set_open_doclink_cb (GnucashRegister *reg, GFunc cb, gpointer cb_data)
 
GnucashSheet * gnucash_register_get_sheet (GnucashRegister *reg)
 
void gnucash_register_reset_sheet_layout (GnucashRegister *reg)
 
GType gnucash_sheet_get_type (void)
 
GtkWidget * gnucash_sheet_new (Table *table)
 
void gnucash_sheet_table_load (GnucashSheet *sheet, gboolean do_scroll)
 
void gnucash_sheet_recompute_block_offsets (GnucashSheet *sheet)
 
SheetBlockgnucash_sheet_get_block (GnucashSheet *sheet, VirtualCellLocation vcell_loc)
 
gint gnucash_sheet_col_max_width (GnucashSheet *sheet, gint virt_col, gint cell_col)
 
void gnucash_sheet_redraw_all (GnucashSheet *sheet)
 
void gnucash_sheet_redraw_help (GnucashSheet *sheet)
 
void gnucash_sheet_redraw_block (GnucashSheet *sheet, VirtualCellLocation vcell_loc)
 
const char * gnucash_sheet_modify_current_cell (GnucashSheet *sheet, const gchar *new_text)
 
gboolean gnucash_sheet_block_set_from_table (GnucashSheet *sheet, VirtualCellLocation vcell_loc)
 
void gnucash_sheet_set_scroll_region (GnucashSheet *sheet)
 
void gnucash_sheet_cursor_set_from_table (GnucashSheet *sheet, gboolean do_scroll)
 
void gnucash_sheet_compute_visible_range (GnucashSheet *sheet)
 
void gnucash_sheet_make_cell_visible (GnucashSheet *sheet, VirtualLocation virt_loc)
 
void gnucash_sheet_show_range (GnucashSheet *sheet, VirtualCellLocation start_loc, VirtualCellLocation end_loc)
 
void gnucash_sheet_update_adjustments (GnucashSheet *sheet)
 
void gnucash_sheet_set_window (GnucashSheet *sheet, GtkWidget *window)
 
void gnucash_get_style_classes (GnucashSheet *sheet, GtkStyleContext *stylectxt, RegisterColor field_type, gboolean use_neg_class)
 Map a cell color type to a css style class. More...
 
void gnucash_sheet_set_text_bounds (GnucashSheet *sheet, GdkRectangle *rect, gint x, gint y, gint width, gint height)
 
gint gnucash_sheet_get_text_offset (GnucashSheet *sheet, const VirtualLocation virt_loc, gint rect_width, gint logical_width)
 
gboolean gnucash_sheet_is_read_only (GnucashSheet *sheet)
 
void gnucash_sheet_set_has_focus (GnucashSheet *sheet, gboolean has_focus)
 
GncItemEditgnucash_sheet_get_item_edit (GnucashSheet *sheet)
 
void gnucash_sheet_set_popup (GnucashSheet *sheet, GtkWidget *popup, gpointer data)
 
void gnucash_sheet_goto_virt_loc (GnucashSheet *sheet, VirtualLocation virt_loc)
 
void gnucash_sheet_refresh_from_prefs (GnucashSheet *sheet)
 
gboolean gnucash_sheet_find_loc_by_pixel (GnucashSheet *sheet, gint x, gint y, VirtualLocation *vcell_loc)
 
gboolean gnucash_sheet_draw_internal (GnucashSheet *sheet, cairo_t *cr, GtkAllocation *alloc)
 
void gnucash_sheet_draw_cursor (GnucashCursor *cursor, cairo_t *cr)
 
gboolean gnucash_style_init (void)
 
void gnucash_sheet_style_init (void)
 
gint gnucash_style_col_is_resizable (SheetBlockStyle *style, int col)
 
CellDimensionsgnucash_style_get_cell_dimensions (SheetBlockStyle *style, int row, int col)
 
void gnucash_sheet_set_col_width (GnucashSheet *sheet, int col, int width)
 
gint gnucash_style_row_width (SheetBlockStyle *style, int row)
 
void gnucash_sheet_styles_set_dimensions (GnucashSheet *sheet, int width)
 
void gnucash_sheet_style_destroy (GnucashSheet *sheet, SheetBlockStyle *style)
 
void gnucash_sheet_clear_styles (GnucashSheet *sheet)
 
void gnucash_sheet_create_styles (GnucashSheet *sheet)
 
void gnucash_sheet_compile_styles (GnucashSheet *sheet)
 
void gnucash_sheet_styles_recompile (GnucashSheet *sheet)
 
SheetBlockStyle * gnucash_sheet_get_style (GnucashSheet *sheet, VirtualCellLocation vcell_loc)
 
SheetBlockStyle * gnucash_sheet_get_style_from_table (GnucashSheet *sheet, VirtualCellLocation vcell_loc)
 
SheetBlockStyle * gnucash_sheet_get_style_from_cursor (GnucashSheet *sheet, const char *cursor_name)
 
void gnucash_sheet_style_get_cell_pixel_rel_coords (SheetBlockStyle *style, gint cell_row, gint cell_col, gint *x, gint *y, gint *w, gint *h)
 
void gnucash_sheet_style_ref (GnucashSheet *sheet, SheetBlockStyle *style)
 
void gnucash_sheet_style_unref (GnucashSheet *sheet, SheetBlockStyle *style)
 
void gnucash_sheet_get_borders (GnucashSheet *sheet, VirtualLocation virt_loc, PhysicalCellBorders *borders)
 
GNCHeaderWidths gnc_header_widths_new (void)
 
void gnc_header_widths_destroy (GNCHeaderWidths widths)
 
void gnc_header_widths_set_width (GNCHeaderWidths widths, const char *cell_name, int width)
 
int gnc_header_widths_get_width (GNCHeaderWidths widths, const char *cell_name)
 
void gnucash_sheet_get_header_widths (GnucashSheet *sheet, GNCHeaderWidths widths)
 
void gnucash_sheet_set_header_widths (GnucashSheet *sheet, GNCHeaderWidths widths)
 

Variables

GdkRGBA gn_white
 
GdkRGBA gn_light_gray
 
GdkRGBA gn_dark_gray
 
GdkRGBA gn_black
 
GdkRGBA gn_blue
 
GdkRGBA gn_red
 
GdkRGBA gn_yellow
 
BasicCell * gnc_formula_cell_gnome_new (void)
 

Detailed Description

Function Documentation

◆ gnc_item_list_get_selection()

char* gnc_item_list_get_selection ( GncItemList item_list)

Retrieve the selected string from the item_list's active GtkListStore.

Parameters
item_listthe GncItemList
Returns
the string value. It must be freed with g_free().

Definition at line 206 of file gnucash-item-list.c.

207 {
208  GtkTreeIter iter;
209  GtkTreeModel* model;
210  gchar* string;
211 
212  GtkTreeSelection *selection =
213  gtk_tree_view_get_selection (item_list->tree_view);
214  if (!gtk_tree_selection_get_selected (selection, &model, &iter))
215  return NULL;
216 
217  gtk_tree_model_get (model, &iter, 0, &string, -1);
218  return string;
219 }

◆ gnc_ledger_display_find_by_query()

GNCLedgerDisplay* gnc_ledger_display_find_by_query ( Query *  q)

If the given ledger display still exists, return it.

Otherwise, return NULL

Definition at line 892 of file gnc-ledger-display.c.

893 {
894  if (!q)
895  return NULL;
896 
897  return gnc_find_first_gui_component (REGISTER_GL_CM_CLASS, find_by_query, q);
898 }

◆ gnc_ledger_display_leader()

Account* gnc_ledger_display_leader ( GNCLedgerDisplay *  ld)

returns the 'lead' account of a ledger display, or NULL if none.

returns the 'lead' account of a ledger display, or NULL if none.

Definition at line 107 of file gnc-ledger-display.c.

108 {
109  if (!ld)
110  return NULL;
111 
112  return xaccAccountLookup (&ld->leader, gnc_get_current_book());
113 }
Account * xaccAccountLookup(const GncGUID *guid, QofBook *book)
The xaccAccountLookup() subroutine will return the account associated with the given id...
Definition: Account.cpp:2050

◆ gnc_ledger_display_refresh()

void gnc_ledger_display_refresh ( GNCLedgerDisplay *  ledger_display)

redisplay/redraw only the indicated window.

Both routines do same thing, they differ only by the argument they take.

Definition at line 922 of file gnc-ledger-display.c.

923 {
924  ENTER ("ld=%p", ld);
925 
926  if (!ld)
927  {
928  LEAVE ("no display");
929  return;
930  }
931 
932  if (ld->loading)
933  {
934  LEAVE ("already loading");
935  return;
936  }
937 
938  // Exclude any template accounts for search register and gl
939  if (!ld->reg->is_template && (ld->reg->type == SEARCH_LEDGER || ld->ld_type == LD_GL))
940  exclude_template_accounts (ld->query, ld->excluded_template_acc_hash);
941 
942  gnc_ledger_display_refresh_internal (ld, qof_query_run (ld->query));
943  LEAVE (" ");
944 }
#define ENTER(format, args...)
Print a function entry debugging message.
Definition: qoflog.h:272
GList * qof_query_run(QofQuery *query)
Perform the query, return the results.
#define LEAVE(format, args...)
Print a function exit debugging message.
Definition: qoflog.h:282

◆ gnc_ledger_display_set_query()

void gnc_ledger_display_set_query ( GNCLedgerDisplay *  ledger_display,
Query *  q 
)

Set the query used for a register.

Definition at line 880 of file gnc-ledger-display.c.

881 {
882  if (!ledger_display || !q)
883  return;
884 
885  g_return_if_fail (ledger_display->ld_type == LD_GL);
886 
887  qof_query_destroy (ledger_display->query);
888  ledger_display->query = qof_query_copy (q);
889 }
QofQuery * qof_query_copy(QofQuery *q)
Make a copy of the indicated query.
Definition: qofquery.cpp:1002
void qof_query_destroy(QofQuery *query)
Frees the resources associate with a Query object.

◆ gnc_ledger_display_subaccounts()

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.

Definition at line 422 of file gnc-ledger-display.c.

424 {
425  SplitRegisterType reg_type;
426  GNCLedgerDisplay* ld;
427 
428  ENTER ("account=%p", account);
429 
430  reg_type = gnc_get_reg_type (account, LD_SUBACCOUNT);
431 
432  ld = gnc_ledger_display_internal (account, NULL, LD_SUBACCOUNT,
433  reg_type, REG_STYLE_JOURNAL, FALSE,
434  FALSE, mismatched_commodities);
435  LEAVE ("%p", ld);
436  return ld;
437 }
#define ENTER(format, args...)
Print a function entry debugging message.
Definition: qoflog.h:272
#define LEAVE(format, args...)
Print a function exit debugging message.
Definition: qoflog.h:282
SplitRegisterType
Register types.

◆ gnc_ledger_display_template_gl()

GNCLedgerDisplay* gnc_ledger_display_template_gl ( char *  id)

Displays a template ledger.

This lists template Splits from the given ScheduledTransaction.

Really, requires a GList of scheduled transactions and kvp-frame data.

Parameters
idThe string version of the GncGUID of the context of template transaction being edited in this template GL. As used by scheduled transactions, this is the GncGUID of the SX itself which is magically the name of the (template) account which contains the transactions for this scheduled transaction. That's right. The stringified GncGUID of the SX is the name of the SX'es template account.

Definition at line 493 of file gnc-ledger-display.c.

494 {
495  QofBook* book;
496  Query* q;
497  GNCLedgerDisplay* ld;
498  SplitRegister* sr;
499  Account* root, *acct;
500  gboolean isTemplateModeTrue;
501 
502  ENTER ("id=%s", id ? id : "(null)");
503 
504  acct = NULL;
505  isTemplateModeTrue = TRUE;
506 
507  q = qof_query_create_for (GNC_ID_SPLIT);
508 
509  book = gnc_get_current_book();
510  qof_query_set_book (q, book);
511 
512  if (id != NULL)
513  {
514  root = gnc_book_get_template_root (book);
515  acct = gnc_account_lookup_by_name (root, id);
516  g_assert (acct);
517  xaccQueryAddSingleAccountMatch (q, acct, QOF_QUERY_AND);
518  }
519 
520  ld = gnc_ledger_display_internal (NULL, q, LD_GL,
521  SEARCH_LEDGER,
522  REG_STYLE_JOURNAL,
523  FALSE,
524  isTemplateModeTrue,
525  FALSE);
526 
528  if (acct)
529  {
531  }
532 
533  qof_query_destroy (q);
534 
535  LEAVE ("%p", ld);
536  return ld;
537 }
void gnc_split_register_set_template_account(SplitRegister *reg, Account *template_account)
Set the template account for use in a template register.
Account * gnc_book_get_template_root(const QofBook *book)
Returns the template group from the book.
Definition: SX-book.c:65
#define ENTER(format, args...)
Print a function entry debugging message.
Definition: qoflog.h:272
Account * gnc_account_lookup_by_name(const Account *parent, const char *name)
The gnc_account_lookup_by_name() subroutine fetches the account by name from the descendants of the s...
Definition: Account.cpp:3083
void qof_query_destroy(QofQuery *query)
Frees the resources associate with a Query object.
void qof_query_set_book(QofQuery *query, QofBook *book)
Set the book to be searched.
#define LEAVE(format, args...)
Print a function exit debugging message.
Definition: qoflog.h:282
SplitRegister * gnc_ledger_display_get_split_register(GNCLedgerDisplay *ld)
return the split register associated with a ledger display

◆ gnucash_get_style_classes()

void gnucash_get_style_classes ( GnucashSheet *  sheet,
GtkStyleContext *  stylectxt,
RegisterColor  field_type,
gboolean  use_neg_class 
)

Map a cell color type to a css style class.

Definition at line 2274 of file gnucash-sheet.c.

2276 {
2277  gchar *full_class, *style_class = NULL;
2278 
2279  if (field_type >= COLOR_NEGATIVE) // Require a Negative fg color
2280  {
2281  if (use_neg_class)
2282  gtk_style_context_add_class (stylectxt, "gnc-class-negative-numbers");
2283  field_type -= COLOR_NEGATIVE;
2284  }
2285  else
2286  {
2287  if (sheet->use_gnc_color_theme) // only add this class if builtin colors used
2288  gtk_style_context_add_class (stylectxt, "gnc-class-register-foreground");
2289  }
2290 
2291  switch (field_type)
2292  {
2293  default:
2294  case COLOR_UNDEFINED:
2295  gtk_style_context_add_class (stylectxt, GTK_STYLE_CLASS_BACKGROUND);
2296  return;
2297 
2298  case COLOR_HEADER:
2299  style_class = "header";
2300  break;
2301 
2302  case COLOR_PRIMARY:
2303  style_class = "primary";
2304  break;
2305 
2306  case COLOR_PRIMARY_ACTIVE:
2307  case COLOR_SECONDARY_ACTIVE:
2308  case COLOR_SPLIT_ACTIVE:
2309  gtk_style_context_set_state (stylectxt, GTK_STATE_FLAG_SELECTED);
2310  style_class = "cursor";
2311  break;
2312 
2313  case COLOR_SECONDARY:
2314  style_class = "secondary";
2315  break;
2316 
2317  case COLOR_SPLIT:
2318  style_class = "split";
2319  break;
2320  }
2321 
2322  if (sheet->use_gnc_color_theme)
2323  full_class = g_strconcat ("gnc-class-register-", style_class, NULL);
2324  else
2325  {
2326  gtk_style_context_add_class (stylectxt, GTK_STYLE_CLASS_VIEW);
2327  full_class = g_strconcat ("gnc-class-user-register-", style_class, NULL);
2328  }
2329 
2330  gtk_style_context_add_class (stylectxt, full_class);
2331 
2332  g_free (full_class);
2333 }

◆ gnucash_register_add_cell_types()

void gnucash_register_add_cell_types ( void  )

Add cell types defined by gnucash_register to gnc_register.

Should be called before any table layout is created using these new types

Add cell types defined by gnucash_register to gnc_register.

Definition at line 99 of file gnucash-register.c.

100 {
101  gnc_register_add_cell_type (COMBO_CELL_TYPE_NAME, gnc_combo_cell_new);
102  gnc_register_add_cell_type (DATE_CELL_TYPE_NAME, gnc_date_cell_new);
103  gnc_register_add_cell_type (PRICE_CELL_TYPE_NAME,
104  gnc_price_cell_gnome_new);
105  gnc_register_add_cell_type (QUICKFILL_CELL_TYPE_NAME,
106  gnc_quickfill_cell_gnome_new);
107  gnc_register_add_cell_type( FORMULA_CELL_TYPE_NAME,
108  gnc_formula_cell_gnome_new );
109  gnc_table_gnome_init ();
110 }
BasicCell * gnc_date_cell_new(void)
installs a callback to handle date recording