Tk-TableMatrix
view release on metacpan or search on metacpan
pTk/mTk/Tktable800/tkTable.h view on Meta::CPAN
int icursor; /* The index of the insertion cursor in the
* active cell */
int flags; /* An or'ed combination of flags concerning
* redraw/cursor etc. */
int dataSource; /* where our data comes from:
* DATA_{NONE,CACHE,ARRAY,COMMAND} */
int maxWidth, maxHeight; /* max width|height required in pixels */
int charWidth, charHeight; /* size of a character in the default font */
int *colPixels, *rowPixels; /* Array of the pixel widths/heights */
int *colStarts, *rowStarts; /* Array of start pixels for rows|columns */
int scanMarkX, scanMarkY; /* Used by "scan" and "border" to mark */
int scanMarkRow, scanMarkCol;/* necessary information for dragto */
/* values in these are kept in user coords */
Tcl_HashTable *cache; /* value cache */
/*
* colWidths and rowHeights are indexed from 0, so always adjust numbers
* by the appropriate *Offset factor
*/
Tcl_HashTable *colWidths; /* hash table of non default column widths */
Tcl_HashTable *rowHeights; /* hash table of non default row heights */
Tcl_HashTable *spanTbl; /* table for spans */
Tcl_HashTable *spanAffTbl; /* table for cells affected by spans */
Tcl_HashTable *tagTable; /* table for style tags */
Tcl_HashTable *winTable; /* table for embedded windows */
Tcl_HashTable *rowStyles; /* table for row styles */
Tcl_HashTable *colStyles; /* table for col styles */
Tcl_HashTable *cellStyles; /* table for cell styles */
Tcl_HashTable *flashCells; /* table of flashing cells */
Tcl_HashTable *selCells; /* table of selected cells */
Tcl_TimerToken cursorTimer; /* timer token for the cursor blinking */
Tcl_TimerToken flashTimer; /* timer token for the cell flashing */
char *activeBuf; /* buffer where the selection is kept
* for editing the active cell */
char **tagPrioNames; /* list of tag names in priority order */
TableTag **tagPrios; /* list of tag pointers in priority order */
TableTag *activeTagPtr; /* cache of active composite tag */
int activeX, activeY; /* cache offset of active layout in cell */
int tagPrioSize; /* size of tagPrios list */
int tagPrioMax; /* max allocated size of tagPrios list */
/* The invalid rectangle if there is an update pending */
int invalidX, invalidY, invalidWidth, invalidHeight;
int seen[4]; /* see TableUndisplay */
#ifdef POSTSCRIPT
/* Pointer to information used for generating Postscript for the canvas.
* NULL means no Postscript is currently being generated. */
struct TkPostscriptInfo *psInfoPtr;
#endif
#ifdef PROCS
Tcl_HashTable *inProc; /* cells where proc is being evaled */
int showProcs; /* whether to show embedded proc (1) or
* its calculated value (0) */
int hasProcs; /* whether table has embedded procs or not */
#endif
} Table;
/*
* HEADERS FOR EMBEDDED WINDOWS
*/
/*
* A structure of the following type holds information for each window
* embedded in a table widget.
*/
typedef struct TableEmbWindow {
Table *tablePtr; /* Information about the overall table
* widget. */
Tk_Window tkwin; /* Window for this segment. NULL means that
* the window hasn't been created yet. */
Tcl_HashEntry *hPtr; /* entry into winTable */
LangCallback *create; /* Script to create window on-demand.
* NULL means no such script.
* Malloc-ed. */
Tk_3DBorder bg; /* background color */
char *borderStr; /* border style */
int borders; /* number of borders specified (1, 2 or 4) */
int bd[4]; /* border width for cell around window */
int relief; /* relief type */
int sticky; /* How to align window in space */
int padX, padY; /* Padding to leave around each side
* of window, in pixels. */
int displayed; /* Non-zero means that the window has been
* displayed on the screen recently. */
} TableEmbWindow;
extern Tk_ConfigSpec tableSpecs[];
extern void EmbWinDisplay _ANSI_ARGS_((Table *tablePtr, Drawable window,
TableEmbWindow *ewPtr, TableTag *tagPtr,
int x, int y, int width, int height));
extern void EmbWinUnmap _ANSI_ARGS_((register Table *tablePtr,
int rlo, int rhi, int clo, int chi));
extern void EmbWinDelete _ANSI_ARGS_((register Table *tablePtr,
TableEmbWindow *ewPtr));
extern int Table_WinMove _ANSI_ARGS_((register Table *tablePtr,
char *CONST srcPtr, char *CONST destPtr, int flags));
extern int Table_WinDelete _ANSI_ARGS_((register Table *tablePtr,
char *CONST idxPtr));
extern int Table_WindowCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
extern int TableValidateChange _ANSI_ARGS_((Table *tablePtr, int r,
int c, char *oldVal, char *newVal, int idx));
extern void TableLostSelection _ANSI_ARGS_((ClientData clientData));
extern void TableSetActiveIndex _ANSI_ARGS_((register Table *tablePtr));
/*
* HEADERS IN tkTableCmds.c
*/
extern int Table_ActivateCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
extern int Table_AdjustCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], int widthType));
extern int Table_BboxCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
( run in 0.966 second using v1.01-cache-2.11-cpan-71847e10f99 )