118 #ifndef TABLE_ALLGUI_H 119 #define TABLE_ALLGUI_H 142 typedef struct table Table;
144 typedef void (*TableCursorRefreshCB) (Table *
table,
145 VirtualCellLocation vcell_loc,
148 typedef void (*TableRedrawHelpCB) (Table *
table);
149 typedef void (*TableDestroyCB) (Table *
table);
153 TableCursorRefreshCB cursor_refresh;
155 TableRedrawHelpCB redraw_help;
156 TableDestroyCB destroy;
170 VirtualLocation current_cursor_loc;
186 COLOR_PRIMARY_ACTIVE,
188 COLOR_SECONDARY_ACTIVE,
199 Table * gnc_table_new (TableLayout *layout,
202 void gnc_virtual_location_init (VirtualLocation *vloc);
205 void gnc_table_destroy (Table *
table);
209 int gnc_table_current_cursor_changed (Table *
table,
210 gboolean include_conditional);
212 void gnc_table_clear_current_cursor_changes (Table *
table);
214 void gnc_table_save_current_cursor (Table *
table, CursorBuffer *buffer);
215 void gnc_table_restore_current_cursor (Table *
table,
216 CursorBuffer *buffer);
218 const char * gnc_table_get_current_cell_name (Table *
table);
220 gboolean gnc_table_get_current_cell_location (Table *
table,
221 const char *cell_name,
222 VirtualLocation *virt_loc);
228 VirtualCellLocation vcell_loc);
230 gboolean gnc_table_virtual_location_in_header (Table *
table,
231 VirtualLocation virt_loc);
237 VirtualCellLocation vcell_loc);
239 const char * gnc_table_get_entry (Table *
table, VirtualLocation virt_loc);
241 char * gnc_table_get_tooltip (Table *
table, VirtualLocation virt_loc);
243 const char * gnc_table_get_label (Table *
table, VirtualLocation virt_loc);
245 CellIOFlags gnc_table_get_io_flags (Table *
table, VirtualLocation virt_loc);
247 guint32 gnc_table_get_color (Table *
table, VirtualLocation virt_loc,
250 void gnc_table_get_borders (Table *
table, VirtualLocation virt_loc,
253 CellAlignment gnc_table_get_align (Table *
table, VirtualLocation virt_loc);
255 gboolean gnc_table_is_popup (Table *
table, VirtualLocation virt_loc);
257 char * gnc_table_get_help (Table *
table);
259 BasicCell * gnc_table_get_cell (Table *
table, VirtualLocation virt_loc);
261 const char * gnc_table_get_cell_name (Table *
table,
262 VirtualLocation virt_loc);
263 const gchar * gnc_table_get_cell_type_name (Table *
table,
264 VirtualLocation virt_loc);
265 gboolean gnc_table_get_cell_location (Table *
table,
266 const char * cell_name,
267 VirtualCellLocation vcell_loc,
268 VirtualLocation *virt_loc);
270 void gnc_table_save_cells (Table *
table, gpointer save_data);
282 gconstpointer vcell_data,
284 gboolean start_primary_color,
285 VirtualCellLocation vcell_loc);
289 VirtualCellLocation vcell_loc,
290 gconstpointer vcell_data);
294 VirtualCellLocation vcell_loc,
299 VirtualCellLocation vcell_loc,
317 VirtualLocation virt_loc);
322 VirtualCellLocation vcell_loc);
328 VirtualLocation *virt_loc,
329 gboolean exact_cell);
336 void gnc_table_realize_gui (Table *
table);
347 VirtualCellLocation start_loc,
348 VirtualCellLocation end_loc);
353 VirtualCellLocation vcell_loc,
358 void gnc_table_wrap_verify_cursor_position (Table *
table,
359 VirtualLocation virt_loc);
361 gboolean gnc_table_virtual_loc_valid(Table *
table,
362 VirtualLocation virt_loc,
363 gboolean exact_pointer);
365 gboolean gnc_table_move_tab (Table *
table,
366 VirtualLocation *virt_loc,
367 gboolean move_right);
383 VirtualLocation *virt_loc,
384 int phys_row_offset);
386 gboolean gnc_table_enter_update(Table *
table,
387 VirtualLocation virt_loc,
388 int *cursor_position,
389 int *start_selection,
392 void gnc_table_leave_update(Table *
table, VirtualLocation virt_loc);
394 gboolean gnc_table_confirm_change(Table *
table, VirtualLocation virt_loc);
396 const char * gnc_table_modify_update(Table *
table,
397 VirtualLocation virt_loc,
402 int *cursor_position,
403 int *start_selection,
405 gboolean *cancelled);
407 gboolean gnc_table_direct_update(Table *
table,
408 VirtualLocation virt_loc,
410 int *cursor_position,
411 int *start_selection,
415 gboolean gnc_table_traverse_update(Table *
table,
416 VirtualLocation virt_loc,
417 gncTableTraversalDir dir,
418 VirtualLocation *dest_loc);
gpointer vcell_data
Array of physical cells.
gpointer gnc_table_get_vcell_data(Table *table, VirtualCellLocation vcell_loc)
returns the virtual cell data associated with a cursor located at the given virtual coords...
void gnc_table_set_virt_cell_visible(Table *table, VirtualCellLocation vcell_loc, gboolean visible)
Set the visibility flag for a particular location.
holds information about each virtual cell.
void gnc_table_move_cursor_gui(Table *table, VirtualLocation virt_loc)
will move the cursor and its GUI to the indicated location.
gboolean gnc_table_find_close_valid_cell(Table *table, VirtualLocation *virt_loc, gboolean exact_cell)
Find a close valid cell.
void gnc_table_set_size(Table *table, int virt_rows, int virt_cols)
The gnc_table_set_size() method will resize the table to the indicated dimensions.
VirtualCell * gnc_table_get_header_cell(Table *table)
Return the virtual cell of the header.
void gnc_table_set_virt_cell_data(Table *table, VirtualCellLocation vcell_loc, gconstpointer vcell_data)
Set the virtual cell data for a particular location.
void gnc_table_init_gui(Table *table)
UI-specific functions.
void gnc_table_refresh_gui(Table *table, gboolean do_scroll)
Refresh the whole GUI from the table.
void gnc_table_show_range(Table *table, VirtualCellLocation start_loc, VirtualCellLocation end_loc)
Try to show the whole range in the register.
VirtualCell * gnc_table_get_virtual_cell(Table *table, VirtualCellLocation vcell_loc)
returns the virtual cell associated with a particular virtual location.
void gnc_table_set_default_gui_handlers(TableGUIHandlers *gui_handlers)
Set the default gui handlers used by new tables.
gboolean gnc_table_verify_cursor_position(Table *table, VirtualLocation virt_loc)
checks the location of the cursor with respect to a virtual location position, and if the resulting v...
unsigned int start_primary_color
visible in the GUI
void gnc_table_set_vcell(Table *table, CellBlock *cursor, gconstpointer vcell_data, gboolean visible, gboolean start_primary_color, VirtualCellLocation vcell_loc)
Indicate what handler should be used for a given virtual block.
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.
unsigned int visible
Used by higher-level code.
void gnc_table_refresh_cursor_gui(Table *table, VirtualCellLocation vcell_loc, gboolean do_scroll)
Refresh the cursor in the given location.
void gnc_table_refresh_current_cursor_gui(Table *table, gboolean do_scroll)
Refresh the current cursor gui.
void gnc_table_set_virt_cell_cursor(Table *table, VirtualCellLocation vcell_loc, CellBlock *cursor)
Set the cellblock handler for a virtual cell.
gboolean gnc_table_virtual_cell_out_of_bounds(Table *table, VirtualCellLocation vcell_loc)
checks the given location and returns true if it is out of bounds of the table.
RegisterColor
Color definitions used for table elements.
void gnc_table_save_state(Table *table, const gchar *state_section)
Implementation.
Declarations for the CellBlock object.
void gnc_table_move_cursor(Table *table, VirtualLocation virt_loc)
will move the cursor (but not the cursor GUI) to the indicated location.
This is the API for GTables, a datatype for 2-dimensional tables with automatic resizing and memory m...
Common declarations for the register core.