(butPtr)
| 1366 | * Results: |
| 1367 | * A standard Tcl return value. Information is also left in |
| 1368 | * interp->result. |
| 1369 | * |
| 1370 | * Side effects: |
| 1371 | * Depends on the button and its associated command. |
| 1372 | * |
| 1373 | *---------------------------------------------------------------------- |
| 1374 | */ |
| 1375 | |
| 1376 | static int |
| 1377 | InvokeButton(butPtr) |
| 1378 | register Button *butPtr; /* Information about button. */ |
| 1379 | { |
| 1380 | if (butPtr->type == TYPE_CHECK_BUTTON) { |
| 1381 | if (butPtr->flags & SELECTED) { |
| 1382 | Tcl_SetVar(butPtr->interp, butPtr->selVarName, butPtr->offValue, |
| 1383 | TCL_GLOBAL_ONLY); |
| 1384 | } else { |
| 1385 | Tcl_SetVar(butPtr->interp, butPtr->selVarName, butPtr->onValue, |
| 1386 | TCL_GLOBAL_ONLY); |
| 1387 | } |
| 1388 | } else if (butPtr->type == TYPE_RADIO_BUTTON) { |
| 1389 | Tcl_SetVar(butPtr->interp, butPtr->selVarName, butPtr->onValue, |
| 1390 | TCL_GLOBAL_ONLY); |
| 1391 | } |
no test coverage detected