mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
rename table structures, and redefine
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@645 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
64c0b05dc8
commit
47f7289291
1065
src/register/table-motif.c
Normal file
1065
src/register/table-motif.c
Normal file
File diff suppressed because it is too large
Load Diff
103
src/register/table-motif.h
Normal file
103
src/register/table-motif.h
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* FILE:
|
||||
* table.h
|
||||
*
|
||||
* FUNCTION:
|
||||
* The table is the complete, displayed table.
|
||||
* It consists of a header, followed by a simple
|
||||
* list of repeated entries.
|
||||
*
|
||||
* It provides the mechanism to handle tab-trversing.
|
||||
*
|
||||
* HISTORY:
|
||||
* Copyright (c) 1998 Linas Vepstas
|
||||
*/
|
||||
|
||||
#ifndef __XACC_TABLE_H__
|
||||
#define __XACC_TABLE_H__
|
||||
|
||||
#include <Xm/Xm.h>
|
||||
#include "basiccell.h"
|
||||
#include "cellblock.h"
|
||||
|
||||
typedef struct _Table {
|
||||
|
||||
/* The number of "physical" rows/cols is the number
|
||||
* of displayed one-line gui rows/cols in the table.
|
||||
* The number of physical rows can differ from the
|
||||
* number of "virtual" rows because each virtual row
|
||||
* consist of one or more physical rows.
|
||||
*/
|
||||
|
||||
int num_header_rows;
|
||||
int num_phys_rows;
|
||||
int num_phys_cols;
|
||||
|
||||
CellBlock *header;
|
||||
CellBlock **cursors;
|
||||
|
||||
CellBlock *current_cursor;
|
||||
int current_cursor_row;
|
||||
int current_cursor_col;
|
||||
|
||||
/* callback that is called when the cursor is moved */
|
||||
/* hack alert -- this should be a callback list, actually */
|
||||
void (*move_cursor) (struct _Table *, void *client_data);
|
||||
void * client_data;
|
||||
|
||||
/* string values for each cell,
|
||||
* of dimension num_phys_rows * num_phys_cols */
|
||||
char ***entries;
|
||||
|
||||
/* user hooks, of dimension num_rows * num_cols */
|
||||
void ***user_data;
|
||||
|
||||
/* protected data -- vital for the implementation,
|
||||
* but not something we want to generally expose */
|
||||
Widget table_widget; /* the XbaeMatrix */
|
||||
Widget next_tab_group; /* where to traverse in the end */
|
||||
|
||||
/* private data, caches, etc. */
|
||||
/* This is black-box stuff that no user of this class
|
||||
* should ever want to access */
|
||||
|
||||
/* This class implements tab-key and arrow key
|
||||
* traversal through the cells of the table.
|
||||
* To perform this traversal, the location
|
||||
* of the "previous" cell having input focus
|
||||
* is required.
|
||||
*/
|
||||
int prev_phys_traverse_row;
|
||||
int prev_phys_traverse_col;
|
||||
|
||||
} Table;
|
||||
|
||||
|
||||
Table * xaccMallocTable (void);
|
||||
void xaccInitTable (Table *);
|
||||
|
||||
void xaccSetTableSize (Table * table, int tile_rows, int tile_cols);
|
||||
|
||||
/* create the widget */
|
||||
Widget xaccCreateTable (Table *, Widget parent, char * name);
|
||||
void xaccNextTabGroup (Table *, Widget);
|
||||
|
||||
void xaccDestroyTable (Table *);
|
||||
|
||||
/* redraw the table GUI */
|
||||
void xaccRefreshTableGUI (Table *);
|
||||
|
||||
/* Make the indicated cell block be the cursor for this table */
|
||||
void xaccSetCursor (Table *, CellBlock *);
|
||||
|
||||
/* move the cursor (but not the GUI) to the indicated location. */
|
||||
void xaccMoveCursor (Table *, int virt_row, int virt_col);
|
||||
|
||||
/* move the cursor GUI to the indicated location. */
|
||||
void xaccMoveCursorGUI (Table *, int virt_row, int virt_col);
|
||||
|
||||
/* copy text in the cursor cells to the table */
|
||||
void xaccCommitCursor (Table *);
|
||||
|
||||
#endif __XACC_TABLE_H__
|
||||
/* ================== end of file ======================= */
|
Loading…
Reference in New Issue
Block a user