func InitTKWidget(wgt) fvar(twgt) twgt = wgt if (isndef(Width)) twgt = twgt && ', width = '+Width end if (isndef(Height)) twgt = twgt && ', height = '+Height end if (isndef(ActiveBackground)) twgt = twgt && ', activebackground = self.hi_color('&&ActiveBackground&&')' end if (isndef(ActiveForeground)) twgt = twgt && ', activeforeground = self.hi_color('&&ActiveForeground&&')' end if (isndef(Background)) twgt = twgt && ', background = self.hi_color('&&Background&&')' end if (isndef(DisabledForeground)) twgt = twgt && ', disabledforeground = self.hi_color('&&DisabledForeground&&')' end if (isndef(Foreground) and isdef(Font)) twgt = twgt && ', foreground = self.hi_color('&&Foreground&&')' end if (isndef(HighlightBackground)) twgt = twgt && ', highlightbackground = self.hi_color('&&HighlightBackground&&')' end if (isndef(HighlightColor)) twgt = twgt && ', highlightcolor = self.hi_color('&&HighlightColor&&')' end if (isndef(State)) twgt = twgt && ', state="'&&code(State)&&'"' end if (isndef(Relief)) twgt = twgt && ', relief="'&&code(Relief)&&'"' end if (isndef(OverRelief)) twgt = twgt && ', overrelief="'&&code(OverRelief)&&'"' end if (isndef(Justify)) twgt = twgt && ', justify="'&&code(Justify)&&'"' end if (isndef(Anchor)) twgt = twgt && ', anchor="'&&code(Anchor)&&'"' end if (isndef(Font)) twgt = twgt && ', font = self.hi_font("'&&code(Font[0])&&'", '&&code(Font[1])&&', '&&code(Font[2])&&'), foreground = self.hi_color('&&code(Font[3])&&')' end println(twgt && ')') end func PackTKWidget(wgt) fvar(twgt) twgt = wgt println(twgt&&'.pack(side="'+Side+'", expand='+Expand+', fill="'+Fill+'")') end func BindTKWidget(wgt) fvar(twgt) twgt = wgt fvar(old) if(linked(onLButton)) println(twgt&&'.bind("", self.onLButton'&&code(_id_)&&')') old=block.select(BLK_FUNC) println('def onLButton'&&code(_id_)&&'(self, e):') block.inclvl() event(onLButton) block.declvl() block.select(old) end if(linked(onRButton)) println(twgt&&'.bind("", self.onRButton'&&code(_id_)&&')') old=block.select(BLK_FUNC) println('def onRButton'&&code(_id_)&&'(self, e):') block.inclvl() event(onRButton) block.declvl() block.select(old) end if(linked(onMButton)) println(twgt&&'.bind("", self.onMButton'&&code(_id_)&&')') old=block.select(BLK_FUNC) println('def onMButton'&&code(_id_)&&'(self, e):') block.inclvl() event(onMButton) block.declvl() block.select(old) end end func doFlash(wgt) fvar(twgt) twgt = wgt println(twgt&&'.flash()') end