33 #include <gdk/gdkkeysyms.h> 36 #include "quickfillcell-gnome.h" 40 gnc_quickfill_cell_direct_update (BasicCell *bcell,
47 GdkEventKey *
event = gui_data;
48 const char *match_str;
52 if (event->type != GDK_KEY_PRESS)
55 switch (event->keyval)
58 if (!(event->state & GDK_MOD1_MASK))
62 case GDK_KEY_ISO_Left_Tab:
63 if (!(event->state & GDK_CONTROL_MASK))
70 if ((*start_selection <= *cursor_position) &&
71 (*end_selection >= *cursor_position))
72 *cursor_position = *start_selection;
73 else if ((*end_selection <= *cursor_position) &&
74 (*start_selection >= *cursor_position))
75 *cursor_position = *end_selection;
89 if ((match_str != NULL) &&
90 (strncmp (match_str, bcell->value, strlen (bcell->value)) == 0) &&
91 (strcmp (match_str, bcell->value) != 0))
92 gnc_basic_cell_set_value (bcell, match_str);
94 *cursor_position += prefix_len;
95 *start_selection = *cursor_position;
102 gnc_quickfill_cell_gnome_new (
void)
106 cell = gnc_quickfill_cell_new ();
108 cell->direct_update = gnc_quickfill_cell_direct_update;
The QuickFillCell implements a text cell with quick-fill capabilities.
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...
const char * gnc_quickfill_string(QuickFill *qf)
For the given node 'qf', return the best-guess matching string.
QuickFill * gnc_quickfill_get_unique_len_match(QuickFill *qf, int *length)
Walk a 'unique' part of the QuickFill tree.