GnuCash  4.12-68-g5dc52459a1+
gnucash-register.c
1 /********************************************************************\
2  * This program is free software; you can redistribute it and/or *
3  * modify it under the terms of the GNU General Public License as *
4  * published by the Free Software Foundation; either version 2 of *
5  * the License, or (at your option) any later version. *
6  * *
7  * This program is distributed in the hope that it will be useful, *
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10  * GNU General Public License for more details. *
11  * *
12  * You should have received a copy of the GNU General Public License*
13  * along with this program; if not, contact: *
14  * *
15  * Free Software Foundation Voice: +1-617-542-5942 *
16  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
17  * Boston, MA 02110-1301, USA gnu@gnu.org *
18  * *
19 \********************************************************************/
20 
21 /*
22  * The Gnucash Register widget
23  *
24  * Based heavily on the Gnumeric Sheet widget.
25  *
26  * Authors:
27  * Heath Martin <martinh@pegasus.cc.ucf.edu>
28  * Dave Peticolas <dave@krondo.com>
29  */
30 
31 #include <config.h>
32 #include <glib.h>
33 #include <glib/gprintf.h>
34 #include <gdk/gdkkeysyms.h>
35 
36 #include "gnucash-register.h"
37 #include "gnucash-sheet.h"
38 #include "gnucash-sheetP.h"
39 
40 #include "gnucash-cursor.h"
41 #include "gnucash-style.h"
42 #include "gnucash-header.h"
43 #include "gnucash-item-edit.h"
44 #include "split-register.h"
45 #include "gnc-engine.h" // For debugging, e.g. ENTER(), LEAVE()
46 #include "gnc-prefs.h"
47 #include "gnc-state.h"
48 
49 #include "combocell.h"
50 #include "datecell.h"
51 #include "formulacell-gnome.h"
52 #include "pricecell-gnome.h"
53 #include "quickfillcell-gnome.h"
54 #include "table-gnome.h"
55 
56 
57 /* Register signals */
58 enum
59 {
60  ACTIVATE_CURSOR,
61  REDRAW_ALL,
62  REDRAW_HELP,
63  SHOW_POPUP_MENU,
64  LAST_SIGNAL
65 };
66 
67 
70 /* This static indicates the debugging module that this .o belongs to. */
71 static QofLogModule log_module = GNC_MOD_REGISTER;
72 static GtkGrid *register_parent_class;
73 static guint register_signals[LAST_SIGNAL];
74 
75 
77 {
78  GtkGrid table;
79 
80  GtkWidget *hscrollbar;
81  GtkWidget *sheet;
82  gboolean hscrollbar_visible;
83 };
84 
85 
87 {
88  GtkGridClass parent_class;
89 
90  void (*activate_cursor) (GnucashRegister *reg);
91  void (*redraw_all) (GnucashRegister *reg);
92  void (*redraw_help) (GnucashRegister *reg);
93  void (*show_popup_menu) (GnucashRegister *reg);
94 };
95 
98 void
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 }
111 
112 gboolean
113 gnucash_register_has_selection (GnucashRegister *reg)
114 {
115  GnucashSheet *sheet;
116  GncItemEdit *item_edit;
117 
118  g_return_val_if_fail((reg != NULL), FALSE);
119  g_return_val_if_fail(GNUCASH_IS_REGISTER(reg), FALSE);
120 
121  sheet = GNUCASH_SHEET(reg->sheet);
122  item_edit = GNC_ITEM_EDIT(sheet->item_editor);
123 
124  return gnc_item_edit_get_has_selection(item_edit);
125 }
126 
127 void
128 gnucash_register_cut_clipboard (GnucashRegister *reg)
129 {
130  GnucashSheet *sheet;
131  GncItemEdit *item_edit;
132 
133  g_return_if_fail(reg != NULL);
134  g_return_if_fail(GNUCASH_IS_REGISTER(reg));
135 
136  sheet = GNUCASH_SHEET(reg->sheet);
137  item_edit = GNC_ITEM_EDIT(sheet->item_editor);
138 
139  gnc_item_edit_cut_clipboard(item_edit);
140 }
141 
142 void
143 gnucash_register_copy_clipboard (GnucashRegister *reg)
144 {
145  GnucashSheet *sheet;
146  GncItemEdit *item_edit;
147 
148  g_return_if_fail(reg != NULL);
149  g_return_if_fail(GNUCASH_IS_REGISTER(reg));
150 
151  sheet = GNUCASH_SHEET(reg->sheet);
152  item_edit = GNC_ITEM_EDIT(sheet->item_editor);
153 
154  gnc_item_edit_copy_clipboard(item_edit);
155 }
156 
157 void
158 gnucash_register_paste_clipboard (GnucashRegister *reg)
159 {
160  GnucashSheet *sheet;
161  GncItemEdit *item_edit;
162 
163  g_return_if_fail(reg != NULL);
164  g_return_if_fail(GNUCASH_IS_REGISTER(reg));
165 
166  sheet = GNUCASH_SHEET(reg->sheet);
167  item_edit = GNC_ITEM_EDIT(sheet->item_editor);
168 
169  gnc_item_edit_paste_clipboard (item_edit);
170 }
171 
172 void
173 gnucash_register_refresh_from_prefs (GnucashRegister *reg)
174 {
175  GnucashSheet *sheet;
176 
177  g_return_if_fail(reg != NULL);
178  g_return_if_fail(GNUCASH_IS_REGISTER(reg));
179 
180  sheet = GNUCASH_SHEET(reg->sheet);
181  gnucash_sheet_refresh_from_prefs(sheet);
182  gnc_header_request_redraw (GNC_HEADER(sheet->header_item));
183 }
184 
185 void
186 gnucash_register_reset_sheet_layout (GnucashRegister *reg)
187 {
188  GNCHeaderWidths widths;
189  GnucashSheet *sheet;
190  gint current_width;
191 
192  g_return_if_fail (reg != NULL);
193 
194  sheet = GNUCASH_SHEET(reg->sheet);
195 
196  g_return_if_fail (sheet != NULL);
197  g_return_if_fail (GNUCASH_IS_SHEET (sheet));
198 
199  current_width = sheet->window_width - 1;
200 
201  widths = gnc_header_widths_new ();
202  gnucash_sheet_set_header_widths (sheet, widths);
203 
204  gnucash_sheet_styles_set_dimensions (sheet, current_width);
205 
206  gnucash_sheet_compile_styles (sheet);
207  gnucash_sheet_table_load (sheet, TRUE);
208  gnucash_sheet_cursor_set_from_table (sheet, TRUE);
209  gnucash_sheet_redraw_all (sheet);
210  gnc_header_widths_destroy (widths);
211 }
212 
213 void
214 gnucash_register_goto_virt_cell (GnucashRegister *reg,
215  VirtualCellLocation vcell_loc)
216 {
217  GnucashSheet *sheet;
218  VirtualLocation virt_loc;
219 
220  g_return_if_fail(reg != NULL);
221  g_return_if_fail(GNUCASH_IS_REGISTER(reg));
222 
223  sheet = GNUCASH_SHEET(reg->sheet);
224 
225  virt_loc.vcell_loc = vcell_loc;
226  virt_loc.phys_row_offset = 0;
227  virt_loc.phys_col_offset = 0;
228 
229  gnucash_sheet_goto_virt_loc(sheet, virt_loc);
230 }
231 
232 void
233 gnucash_register_goto_virt_loc (GnucashRegister *reg,
234  VirtualLocation virt_loc)
235 {
236  GnucashSheet *sheet;
237 
238  g_return_if_fail(reg != NULL);
239  g_return_if_fail(GNUCASH_IS_REGISTER(reg));
240 
241  sheet = GNUCASH_SHEET(reg->sheet);
242 
243  gnucash_sheet_goto_virt_loc(sheet, virt_loc);
244 }
245 
246 void
247 gnucash_register_goto_next_virt_row (GnucashRegister *reg)
248 {
249  GnucashSheet *sheet;
250  VirtualLocation virt_loc;
251  int start_virt_row;
252 
253  g_return_if_fail (reg != NULL);
254  g_return_if_fail (GNUCASH_IS_REGISTER(reg));
255 
256  sheet = GNUCASH_SHEET(reg->sheet);
257 
258  gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &virt_loc);
259 
260  /* Move down one physical row at a time until we
261  * reach the next visible virtual cell. */
262  start_virt_row = virt_loc.vcell_loc.virt_row;
263  do
264  {
265  if (!gnc_table_move_vertical_position (sheet->table, &virt_loc, 1))
266  return;
267  }
268  while (start_virt_row == virt_loc.vcell_loc.virt_row);
269 
270  if (virt_loc.vcell_loc.virt_row >= sheet->num_virt_rows)
271  return;
272 
273  virt_loc.phys_row_offset = 0;
274  virt_loc.phys_col_offset = 0;
275 
276  gnucash_sheet_goto_virt_loc (sheet, virt_loc);
277 }
278 
279 void
280 gnucash_register_goto_next_matching_row (GnucashRegister *reg,
281  VirtualLocationMatchFunc match,
282  gpointer user_data)
283 {
284  GnucashSheet *sheet;
285  SheetBlockStyle *style;
286  VirtualLocation virt_loc;
287 
288  g_return_if_fail (reg != NULL);
289  g_return_if_fail (GNUCASH_IS_REGISTER(reg));
290  g_return_if_fail (match != NULL);
291 
292  sheet = GNUCASH_SHEET (reg->sheet);
293 
294  gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &virt_loc);
295 
296  do
297  {
298  if (!gnc_table_move_vertical_position (sheet->table,
299  &virt_loc, 1))
300  return;
301 
302  if (virt_loc.vcell_loc.virt_row >= sheet->num_virt_rows)
303  return;
304 
305  style = gnucash_sheet_get_style (sheet, virt_loc.vcell_loc);
306  if (!style || !style->cursor)
307  return;
308  }
309  while (!match (virt_loc, user_data));
310 
311  virt_loc.phys_row_offset = 0;
312  virt_loc.phys_col_offset = 0;
313 
314  gnucash_sheet_goto_virt_loc (sheet, virt_loc);
315 }
316 
317 static gboolean
318 gnucash_register_sheet_resize (GnucashRegister *reg)
319 {
320  // Sometimes the space left by the horizontal scrollbar does
321  // not get filled on load, this makes sure it does
322  if (!reg->hscrollbar_visible)
323  gtk_widget_queue_resize (GTK_WIDGET (reg->sheet));
324 
325  return FALSE;
326 }
327 
328 static void
329 gnucash_register_update_hadjustment (GtkAdjustment *adj,
330  GnucashRegister *reg)
331 {
332  g_return_if_fail (reg != NULL);
333  g_return_if_fail (GNUCASH_IS_REGISTER(reg));
334 
335  if (gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj)
336  > gtk_adjustment_get_page_size (adj))
337  {
338  if (!reg->hscrollbar_visible)
339  {
340  gtk_widget_show(reg->hscrollbar);
341  reg->hscrollbar_visible = TRUE;
342  }
343  }
344  else
345  {
346  if (reg->hscrollbar_visible)
347  {
348  gtk_widget_hide(reg->hscrollbar);
349  reg->hscrollbar_visible = FALSE;
350  // When sheet first loaded and the scrollbar is hidden, the space left
351  // is not always automatically taken up by the sheet so queue a resize
352  // when all is idle
353  g_idle_add ((GSourceFunc) gnucash_register_sheet_resize, reg);
354  }
355  }
356 }
357 
358 /*************************************************************/
359 
360 
361 static void
362 gnucash_register_class_init (GnucashRegisterClass *klass)
363 {
364  GObjectClass *gobject_class;
365 
366  gobject_class = G_OBJECT_CLASS (klass);
367 
368  gtk_widget_class_set_css_name (GTK_WIDGET_CLASS(klass), "gnc-id-register");
369 
370  register_parent_class = g_type_class_peek_parent (klass);
371 
372  register_signals[ACTIVATE_CURSOR] =
373  g_signal_new("activate_cursor",
374  G_TYPE_FROM_CLASS(gobject_class),
375  G_SIGNAL_RUN_LAST,
376  G_STRUCT_OFFSET(GnucashRegisterClass,
377  activate_cursor),
378  NULL, NULL,
379  g_cclosure_marshal_VOID__VOID,
380  G_TYPE_NONE, 0);
381 
382  register_signals[REDRAW_ALL] =
383  g_signal_new("redraw_all",
384  G_TYPE_FROM_CLASS(gobject_class),
385  G_SIGNAL_RUN_LAST,
386  G_STRUCT_OFFSET(GnucashRegisterClass,
387  redraw_all),
388  NULL, NULL,
389  g_cclosure_marshal_VOID__VOID,
390  G_TYPE_NONE, 0);
391 
392  register_signals[REDRAW_HELP] =
393  g_signal_new("redraw_help",
394  G_TYPE_FROM_CLASS(gobject_class),
395  G_SIGNAL_RUN_LAST,
396  G_STRUCT_OFFSET(GnucashRegisterClass,
397  redraw_help),
398  NULL, NULL,
399  g_cclosure_marshal_VOID__VOID,
400  G_TYPE_NONE, 0);
401 
402  register_signals[SHOW_POPUP_MENU] =
403  g_signal_new("show_popup_menu",
404  G_TYPE_FROM_CLASS(gobject_class),
405  G_SIGNAL_RUN_LAST,
406  G_STRUCT_OFFSET(GnucashRegisterClass,
407  show_popup_menu),
408  NULL, NULL,
409  g_cclosure_marshal_VOID__VOID,
410  G_TYPE_NONE, 0);
411 
412  klass->activate_cursor = NULL;
413  klass->redraw_all = NULL;
414  klass->redraw_help = NULL;
415  klass->show_popup_menu = NULL;
416 }
417 
418 
419 static void
420 gnucash_register_init (GnucashRegister *g_reg)
421 {
422  GtkGrid *table = GTK_GRID(g_reg);
423 
424  gtk_widget_set_can_focus (GTK_WIDGET(table), FALSE);
425  gtk_widget_set_can_default (GTK_WIDGET(table), FALSE);
426 
427  gtk_grid_set_row_homogeneous (GTK_GRID(table), FALSE);
428  gtk_grid_set_column_homogeneous (GTK_GRID(table), FALSE);
429 }
430 
431 
432 GType
433 gnucash_register_get_type (void)
434 {
435  static GType gnucash_register_type = 0;
436 
437  if (!gnucash_register_type)
438  {
439  static const GTypeInfo gnucash_register_info =
440  {
441  sizeof (GnucashRegisterClass),
442  NULL, /* base_init */
443  NULL, /* base_finalize */
444  (GClassInitFunc) gnucash_register_class_init,
445  NULL, /* class_finalize */
446  NULL, /* class_data */
447  sizeof (GnucashRegister),
448  0, /* n_preallocs */
449  (GInstanceInitFunc) gnucash_register_init,
450  };
451 
452  gnucash_register_type = g_type_register_static
453  (gtk_grid_get_type (),
454  "GnucashRegister",
455  &gnucash_register_info, 0);
456  }
457 
458  return gnucash_register_type;
459 }
460 
461 
462 void
463 gnucash_register_attach_popup (GnucashRegister *reg,
464  GtkWidget *popup,
465  gpointer data)
466 {
467  g_return_if_fail (GNUCASH_IS_REGISTER(reg));
468  g_return_if_fail (reg->sheet != NULL);
469  if (popup)
470  g_return_if_fail (GTK_IS_WIDGET(popup));
471 
472  gnucash_sheet_set_popup (GNUCASH_SHEET (reg->sheet), popup, data);
473 }
474 
475 
476 /* Um, this function checks that data is not null but never uses it.
477  * Weird. Also, since this function only works with a GnucashRegister
478  * widget, maybe some of it should be moved to gnucash-sheet.c. */
479 /* Adding to previous note: Since data doesn't appear do anything and to
480  * align the function with save_state() I've removed the check for
481  * NULL and changed two calls in dialog_order.c and dialog_invoice.c
482  * to pass NULL as second parameter. */
483 
484 static void
485 gnucash_register_configure (GnucashSheet *sheet, const gchar * state_section)
486 {
487  GNCHeaderWidths widths;
488  Table *table;
489  GList *node;
490  gchar *key;
491  guint value;
492  GKeyFile *state_file = gnc_state_get_current();
493 
494  // Stuff for per-register settings load.
495  g_return_if_fail (sheet != NULL);
496  g_return_if_fail (GNUCASH_IS_SHEET (sheet));
497 
498  PINFO("state_section=%s",state_section);
499 
500  ENTER("sheet=%p, data=%p", sheet, "");
501 
502  table = sheet->table;
504  table->ui_data = sheet;
505 
506  g_object_ref (sheet);
507 
508  /* config the cell-block styles */
509 
510  widths = gnc_header_widths_new ();
511 
512  if (state_section && gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_SAVE_GEOMETRY))
513  {
514  node = gnc_table_layout_get_cells (table->layout);
515  for (; node; node = node->next)
516  {
517  BasicCell *cell = node->data;
518 
519  if (cell->expandable)
520  continue;
521 
522  /* Remember whether the column is visible */
523  key = g_strdup_printf("%s_width", cell->cell_name);
524  value = g_key_file_get_integer (state_file, state_section, key, NULL);
525  if (value != 0)
526  gnc_header_widths_set_width (widths, cell->cell_name, value);
527  g_free(key);
528  }
529  }
530 
531  gnucash_sheet_create_styles (sheet);
532 
533  gnucash_sheet_set_header_widths (sheet, widths);
534 
535  gnucash_sheet_compile_styles (sheet);
536 
537  gnucash_sheet_table_load (sheet, TRUE);
538  gnucash_sheet_cursor_set_from_table (sheet, TRUE);
539  gnucash_sheet_redraw_all (sheet);
540 
541  gnc_header_widths_destroy (widths);
542 
543  LEAVE(" ");
544 }
545 
546 
547 static GtkWidget *
548 gnucash_register_create_widget (Table *table)
549 {
550  GnucashRegister *reg;
551  GtkWidget *header;
552  GtkWidget *widget;
553  GtkWidget *sheet;
554  GtkWidget *scrollbar;
555  GtkWidget *box;
556 
557  reg = g_object_new (GNUCASH_TYPE_REGISTER, NULL);
558  widget = GTK_WIDGET(reg);
559 
560  sheet = gnucash_sheet_new (table);
561  reg->sheet = sheet;
562  GNUCASH_SHEET(sheet)->reg = widget;
563 
564  header = gnc_header_new (GNUCASH_SHEET(sheet));
565 
566  gtk_grid_attach (GTK_GRID(widget), header, 0, 0, 1, 1);
567  gtk_widget_set_hexpand (header, TRUE);
568  gtk_widget_set_halign (header, GTK_ALIGN_FILL);
569  gtk_widget_set_vexpand (header, FALSE);
570  gtk_widget_set_valign (header, GTK_ALIGN_FILL);
571  g_object_set (header, "margin", 0, NULL);
572  gtk_widget_show (header);
573 
574  gtk_grid_attach (GTK_GRID(widget), sheet, 0, 1, 1, 1);
575  gtk_widget_set_hexpand (sheet, TRUE);
576  gtk_widget_set_halign (sheet, GTK_ALIGN_FILL);
577  gtk_widget_set_vexpand (sheet, TRUE);
578  gtk_widget_set_valign (sheet, GTK_ALIGN_FILL);
579  g_object_set (sheet, "margin", 0, NULL);
580  gtk_widget_show (sheet);
581 
582  scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, GNUCASH_SHEET(sheet)->vadj);
583  gtk_grid_attach (GTK_GRID(widget), GTK_WIDGET(scrollbar), 1, 0, 1, 2);
584  gtk_widget_set_hexpand (GTK_WIDGET(scrollbar), FALSE);
585  gtk_widget_set_halign (GTK_WIDGET(scrollbar), GTK_ALIGN_FILL);
586  gtk_widget_set_vexpand (GTK_WIDGET(scrollbar), TRUE);
587  gtk_widget_set_valign (GTK_WIDGET(scrollbar), GTK_ALIGN_FILL);
588  g_object_set (GTK_WIDGET(scrollbar), "margin", 0, NULL);
589  gtk_widget_show (scrollbar);
590  GNUCASH_SHEET(sheet)->vscrollbar = scrollbar;
591 
592  scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GNUCASH_SHEET(sheet)->hadj);
593  gtk_grid_attach (GTK_GRID(widget), GTK_WIDGET(scrollbar), 0, 2, 1, 1);
594  gtk_widget_set_hexpand (GTK_WIDGET(scrollbar), TRUE);
595  gtk_widget_set_halign (GTK_WIDGET(scrollbar), GTK_ALIGN_FILL);
596  gtk_widget_set_vexpand (GTK_WIDGET(scrollbar), FALSE);
597  gtk_widget_set_valign (GTK_WIDGET(scrollbar), GTK_ALIGN_FILL);
598  g_object_set (GTK_WIDGET(scrollbar), "margin", 0, NULL);
599  reg->hscrollbar = scrollbar;
600  gtk_widget_show (reg->hscrollbar);
601  reg->hscrollbar_visible = TRUE;
602  GNUCASH_SHEET(sheet)->hscrollbar = scrollbar;
603 
604  g_signal_connect (GNUCASH_SHEET(sheet)->hadj, "changed",
605  G_CALLBACK (gnucash_register_update_hadjustment), reg);
606 
607  return widget;
608 }
609 
610 
611 GtkWidget *
612 gnucash_register_new (Table *table, const gchar *state_section)
613 {
614  GnucashRegister *reg;
615  GtkWidget *widget;
616 
617  widget = gnucash_register_create_widget(table);
618  reg = GNUCASH_REGISTER(widget);
619 
620  gnucash_register_configure (GNUCASH_SHEET(reg->sheet), state_section);
621 
622  return widget;
623 }
624 
625 
626 void gnucash_register_set_moved_cb (GnucashRegister *reg,
627  GFunc cb, gpointer cb_data)
628 {
629  GnucashSheet *sheet;
630 
631  if (!reg || !reg->sheet)
632  return;
633  sheet = GNUCASH_SHEET(reg->sheet);
634  sheet->moved_cb = cb;
635  sheet->moved_cb_data = cb_data;
636 }
637 
638 
639 GnucashSheet *gnucash_register_get_sheet (GnucashRegister *reg)
640 {
641  g_return_val_if_fail (reg != NULL, NULL);
642  g_return_val_if_fail (GNUCASH_IS_REGISTER(reg), NULL);
643 
644  return GNUCASH_SHEET(reg->sheet);
645 }
646 
647 
648 void
649 gnucash_register_set_open_doclink_cb (GnucashRegister *reg,
650  GFunc cb, gpointer cb_data)
651 {
652  GnucashSheet *sheet;
653 
654  if (!reg || !reg->sheet)
655  return;
656  sheet = GNUCASH_SHEET(reg->sheet);
657  sheet->open_doclink_cb = cb;
658  sheet->open_doclink_cb_data = cb_data;
659 }
660 
661 
Functions to load, save and get gui state.
Implements gnome dependent formula cell functions.
#define PINFO(format, args...)
Print an informational note.
Definition: qoflog.h:256
GtkWidget * gnucash_register_new(Table *table, const gchar *state_section)
this already has scrollbars attached
#define ENTER(format, args...)
Print a function entry debugging message.
Definition: qoflog.h:272
GKeyFile * gnc_state_get_current(void)
Returns a pointer to the most recently loaded state.
Definition: gnc-state.c:248
void gnc_table_init_gui(Table *table)
UI-specific functions.
Definition: table-gnome.c:158
Public declarations for GnucashCursor class.
BasicCell * gnc_date_cell_new(void)
installs a callback to handle date recording
Public declarations of GnucashRegister class.
Public declarations for GnucashHeader class.
Private declarations for GnucashSheet class.
gboolean gnc_table_move_vertical_position(Table *table, VirtualLocation *virt_loc, int phys_row_offset)
Moves away from virtual location virt_loc by phys_row_offset physical rows.
All type declarations for the whole Gnucash engine.
API for checkbook register display area.
Generic api to store and retrieve preferences.
Public declarations for GncItemEdit class.
gboolean gnc_prefs_get_bool(const gchar *group, const gchar *pref_name)
Get a boolean value from the preferences backend.
#define LEAVE(format, args...)
Print a function exit debugging message.
Definition: qoflog.h:282
Styling functions for RegisterGnome.
void gnucash_register_add_cell_types(void)
Implementation.