/* LabelframeConfigure -- * Configuration hook. */ static int LabelframeConfigure(Tcl_Interp *interp,void *recordPtr,int mask) { Labelframe *lframePtr = recordPtr; Tk_Window labelWidget = lframePtr->label.labelWidget; Ttk_PositionSpec unused; /* Validate options: */ if (mask & LABELWIDGET_CHANGED && labelWidget != NULL) { if (!Ttk_Maintainable(interp, labelWidget, lframePtr->core.tkwin)) { return TCL_ERROR; } } if (TtkGetLabelAnchorFromObj( interp, lframePtr->label.labelAnchorObj, &unused) != TCL_OK) { return TCL_ERROR; } /* Base class configuration: */ if (FrameConfigure(interp, recordPtr, mask) != TCL_OK) { return TCL_ERROR; } /* Update -labelwidget changes, if any: */ if (mask & LABELWIDGET_CHANGED) { if (Ttk_NumberSlaves(lframePtr->label.mgr) == 1) { Ttk_ForgetSlave(lframePtr->label.mgr, 0); /* Restore labelWidget field (see <<NOTE-LABELREMOVED>>) */ lframePtr->label.labelWidget = labelWidget; } if (labelWidget) { Ttk_InsertSlave(lframePtr->label.mgr, 0, labelWidget, NULL); RaiseLabelWidget(lframePtr); } } if (mask & GEOMETRY_CHANGED) { Ttk_ManagerSizeChanged(lframePtr->label.mgr); Ttk_ManagerLayoutChanged(lframePtr->label.mgr); } return TCL_OK; }
void Ttk_DeleteManager(Ttk_Manager *mgr) { Tk_DeleteEventHandler( mgr->masterWindow, ManagerEventMask, ManagerEventHandler, mgr); while (mgr->nSlaves > 0) { Ttk_ForgetSlave(mgr, mgr->nSlaves - 1); } if (mgr->slaves) { ckfree((ClientData)mgr->slaves); } Tcl_CancelIdleCall(ManagerIdleProc, mgr); ckfree((ClientData)mgr); }
/* $pw forget $pane */ static int PanedForgetCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { Paned *pw = recordPtr; int paneIndex; if (objc != 3) { Tcl_WrongNumArgs(interp, 2,objv, "pane"); return TCL_ERROR; } if (TCL_OK != Ttk_GetSlaveIndexFromObj( interp, pw->paned.mgr, objv[2], &paneIndex)) { return TCL_ERROR; } Ttk_ForgetSlave(pw->paned.mgr, paneIndex); return TCL_OK; }