Tk-TableMatrix
view release on metacpan or search on metacpan
pTk/mTk/Tktable/tkTable.c view on Meta::CPAN
TableValidateChange(tablePtr, r, c, old, new, index)
register Table *tablePtr; /* Table that needs validation. */
int r, c; /* row,col index of cell in user coords */
char *old; /* current value of cell */
char *new; /* potential new value of cell */
int index; /* index of insert/delete, -1 otherwise */
{
register Tcl_Interp *interp = tablePtr->interp;
int code, booln; /* perltk: Bool to booln to avoid problems with DEFINES*/
Tk_RestrictProc *rstrct;
ClientData cdata;
if (tablePtr->valCmd == NULL || tablePtr->validate == 0) {
return TCL_OK;
}
/* Magic code to make this bit of code UI synchronous in the face of
* possible new key events */
XSync(tablePtr->display, False);
rstrct = Tk_RestrictEvents(TableRestrictProc, (ClientData)
NextRequest(tablePtr->display), &cdata);
/*
* If we're already validating, then we're hitting a loop condition
* Return and set validate to 0 to disallow further validations
* and prevent current validation from finishing
*/
if (tablePtr->flags & VALIDATING) {
tablePtr->validate = 0;
return TCL_OK;
}
pTk/mTk/Tktable/tkTable.c view on Meta::CPAN
*/
if (tablePtr->validate == 0) {
code = TCL_ERROR;
}
/* If validate will return ERROR, then disallow further validations */
if (code == TCL_ERROR) {
tablePtr->validate = 0;
}
Tk_RestrictEvents(rstrct, cdata, &cdata);
tablePtr->flags &= ~VALIDATING;
return code;
}
/*
*--------------------------------------------------------------
*
* ExpandPercents --
* Given a command and an event, produce a new command
pTk/mTk/Tktable800/tkTable.c view on Meta::CPAN
TableValidateChange(tablePtr, r, c, old, new, index)
register Table *tablePtr; /* Table that needs validation. */
int r, c; /* row,col index of cell in user coords */
char *old; /* current value of cell */
char *new; /* potential new value of cell */
int index; /* index of insert/delete, -1 otherwise */
{
register Tcl_Interp *interp = tablePtr->interp;
int code, booln; /* perltk: Bool to booln to avoid problems with DEFINES*/
Tk_RestrictProc *rstrct;
ClientData cdata;
if (tablePtr->valCmd == NULL || tablePtr->validate == 0) {
return TCL_OK;
}
/* Magic code to make this bit of code UI synchronous in the face of
* possible new key events */
XSync(tablePtr->display, False);
rstrct = Tk_RestrictEvents(TableRestrictProc, (ClientData)
NextRequest(tablePtr->display), &cdata);
/*
* If we're already validating, then we're hitting a loop condition
* Return and set validate to 0 to disallow further validations
* and prevent current validation from finishing
*/
if (tablePtr->flags & VALIDATING) {
tablePtr->validate = 0;
return TCL_OK;
}
pTk/mTk/Tktable800/tkTable.c view on Meta::CPAN
*/
if (tablePtr->validate == 0) {
code = TCL_ERROR;
}
/* If validate will return ERROR, then disallow further validations */
if (code == TCL_ERROR) {
tablePtr->validate = 0;
}
Tk_RestrictEvents(rstrct, cdata, &cdata);
tablePtr->flags &= ~VALIDATING;
return code;
}
/*
*--------------------------------------------------------------
*
* ExpandPercents --
* Given a command and an event, produce a new command
pTk/tkTable.c view on Meta::CPAN
TableValidateChange(tablePtr, r, c, old, new, index)
register Table *tablePtr; /* Table that needs validation. */
int r, c; /* row,col index of cell in user coords */
char *old; /* current value of cell */
char *new; /* potential new value of cell */
int index; /* index of insert/delete, -1 otherwise */
{
register Tcl_Interp *interp = tablePtr->interp;
int code, booln; /* perltk: Bool to booln to avoid problems with DEFINES*/
Tk_RestrictProc *rstrct;
ClientData cdata;
if (tablePtr->valCmd == NULL || tablePtr->validate == 0) {
return TCL_OK;
}
/* Magic code to make this bit of code UI synchronous in the face of
* possible new key events */
XSync(tablePtr->display, False);
rstrct = Tk_RestrictEvents(TableRestrictProc, (ClientData)
NextRequest(tablePtr->display), &cdata);
/*
* If we're already validating, then we're hitting a loop condition
* Return and set validate to 0 to disallow further validations
* and prevent current validation from finishing
*/
if (tablePtr->flags & VALIDATING) {
tablePtr->validate = 0;
return TCL_OK;
}
pTk/tkTable.c view on Meta::CPAN
*/
if (tablePtr->validate == 0) {
code = TCL_ERROR;
}
/* If validate will return ERROR, then disallow further validations */
if (code == TCL_ERROR) {
tablePtr->validate = 0;
}
Tk_RestrictEvents(rstrct, cdata, &cdata);
tablePtr->flags &= ~VALIDATING;
return code;
}
/*
*--------------------------------------------------------------
*
* ExpandPercents --
* Given a command and an event, produce a new command
( run in 0.732 second using v1.01-cache-2.11-cpan-454fe037f31 )