33#include <gdk/gdkkeysyms.h>
36#include "quickfillcell-gnome.h"
43gnc_quickfill_cell_direct_update (BasicCell *bcell,
50 GdkEventKey *
event = gui_data;
51 const char *match_str;
55 if (event->type != GDK_KEY_PRESS)
58 switch (event->keyval)
63 GnucashSheet *sheet = (GnucashSheet *) bcell->gui_private;
64 const char *value = gnc_table_get_model_entry (sheet->table, bcell->cell_name);
66 gnc_basic_cell_set_value_internal (bcell, value);
67 bcell->changed = FALSE;
75 if (!(event->state & GDK_MOD1_MASK))
79 case GDK_KEY_ISO_Left_Tab:
80 if (!(event->state & GDK_CONTROL_MASK))
87 if ((*start_selection <= *cursor_position) &&
88 (*end_selection >= *cursor_position))
89 *cursor_position = *start_selection;
90 else if ((*end_selection <= *cursor_position) &&
91 (*start_selection >= *cursor_position))
92 *cursor_position = *end_selection;
106 if ((match_str != NULL) &&
107 (strncmp (match_str, bcell->value, strlen (bcell->value)) == 0) &&
108 (strcmp (match_str, bcell->value) != 0))
109 gnc_basic_cell_set_value (bcell, match_str);
111 *cursor_position += prefix_len;
112 *start_selection = *cursor_position;
119gnc_quickfill_cell_gnome_new (
void)
123 cell = gnc_quickfill_cell_new ();
125 cell->direct_update = gnc_quickfill_cell_direct_update;
Private declarations for GnucashSheet class.
Public declarations of GnucashRegister class.
const char * gnc_quickfill_string(QuickFill *qf)
For the given node 'qf', return the best-guess matching string.
QuickFill * gnc_quickfill_get_string_len_match(QuickFill *qf, const char *str, int len)
Same as gnc_quickfill_get_string_match(), except that the string length is explicitly specified.
QuickFill * gnc_quickfill_get_unique_len_match(QuickFill *qf, int *length)
Walk a 'unique' part of the QuickFill tree.
The QuickFillCell implements a text cell with quick-fill capabilities.
Declarations for the Table object.