generated.go 252 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735
  1. // Code generated by generator.go, DO NOT EDIT.
  2. package tk9_0 // import "modernc.org/tk9.0"
  3. import "fmt"
  4. // Button — Create and manipulate 'button' action widgets
  5. //
  6. // # Description
  7. //
  8. // The button command creates a new window (given by the
  9. // pathName argument) and makes it into a button widget.
  10. // Additional
  11. // options, described above, may be specified on the command line
  12. // or in the option database
  13. // to configure aspects of the button such as its colors, font,
  14. // text, and initial relief. The button command returns its
  15. // pathName argument. At the time this command is invoked,
  16. // there must not exist a window named pathName, but
  17. // pathName's parent must exist.
  18. //
  19. // A button is a widget that displays a textual string, bitmap or image.
  20. // If text is displayed, it must all be in a single font, but it
  21. // can occupy multiple lines on the screen (if it contains newlines
  22. // or if wrapping occurs because of the -wraplength option) and
  23. // one of the characters may optionally be underlined using the
  24. // It can display itself in either of three different ways, according
  25. // to
  26. // the -state option;
  27. // it can be made to appear raised, sunken, or flat;
  28. // and it can be made to flash. When a user invokes the
  29. // button (by pressing mouse button 1 with the cursor over the
  30. // button), then the Tcl command specified in the -command
  31. // option is invoked.
  32. //
  33. // Use [Window.Button] to create a Button with a particular parent.
  34. //
  35. // More information might be available at the [Tcl/Tk button] page.
  36. //
  37. // # Standard options
  38. //
  39. // - [Activebackground]
  40. // - [Activeforeground]
  41. // - [Anchor]
  42. // - [Background]
  43. // - [Bitmap]
  44. // - [Borderwidth]
  45. // - [Compound]
  46. // - [Cursor]
  47. // - [Disabledforeground]
  48. // - [Foreground]
  49. // - [Highlightbackground]
  50. // - [Highlightcolor]
  51. // - [Highlightthickness]
  52. // - [Image]
  53. // - [Justify]
  54. // - [Padx]
  55. // - [Pady]
  56. // - [Relief]
  57. // - [Repeatdelay]
  58. // - [Repeatinterval]
  59. // - [Takefocus]
  60. // - [Textvariable]
  61. // - [Txt]
  62. // - [Underline]
  63. // - [Wraplength]
  64. //
  65. // # Widget specific options
  66. //
  67. // [Command]
  68. //
  69. // Specifies a Tcl command to associate with the button. This command
  70. // is typically invoked when mouse button 1 is released over the button
  71. // window.
  72. //
  73. // [Default]
  74. //
  75. // Specifies one of three states for the default ring: normal,
  76. // active, or disabled. In active state, the button is drawn
  77. // with the platform specific appearance for a default button. In normal
  78. // state, the button is drawn with the platform specific appearance for a
  79. // non-default button, leaving enough space to draw the default button
  80. // appearance. The normal and active states will result in buttons of
  81. // the same size. In disabled state, the button is drawn with the
  82. // non-default button appearance without leaving space for the default
  83. // appearance. The disabled state may result in a smaller button than
  84. // the active state.
  85. //
  86. // [Height]
  87. //
  88. // Specifies a desired height for the button.
  89. // If an image or bitmap is being displayed in the button then the value is in
  90. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  91. // for text it is in lines of text.
  92. // If this option is not specified, the button's desired height is computed
  93. // from the size of the image or bitmap or text being displayed in it.
  94. //
  95. // [Overrelief]
  96. //
  97. // Specifies an alternative relief for the button, to be used when the
  98. // mouse cursor is over the widget. This option can be used to make
  99. // toolbar buttons, by configuring -relief flat -overrelief
  100. // raised. If the value of this option is the empty string, then no
  101. // alternative relief is used when the mouse cursor is over the button.
  102. // The empty string is the default value.
  103. //
  104. // [State]
  105. //
  106. // Specifies one of three states for the button: normal, active,
  107. // or disabled. In normal state the button is displayed using the
  108. // -foreground and -background options. The active state is
  109. // typically used when the pointer is over the button. In active state
  110. // the button is displayed using the -activeforeground and
  111. // -activebackground options. Disabled state means that the button
  112. // should be insensitive: the default bindings will refuse to activate
  113. // the widget and will ignore mouse button presses.
  114. // In this state the -disabledforeground and
  115. // -background options determine how the button is displayed.
  116. //
  117. // [Width]
  118. //
  119. // Specifies a desired width for the button.
  120. // If an image or bitmap is being displayed in the button then the value is in
  121. // screen units (i.e. any of the forms acceptable to Tk_GetPixels).
  122. // For a text button (no image or with -compound none) then the width
  123. // specifies how much space in characters to allocate for the text label.
  124. // If the width is negative then this specifies a minimum width.
  125. // If this option is not specified, the button's desired width is computed
  126. // from the size of the image or bitmap or text being displayed in it.
  127. //
  128. // [Tcl/Tk button]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/button.html
  129. func Button(options ...Opt) *ButtonWidget {
  130. return App.Button(options...)
  131. }
  132. // Button — Create and manipulate 'button' action widgets
  133. //
  134. // The resulting [Window] is a child of 'w'
  135. //
  136. // For details please see [Button]
  137. func (w *Window) Button(options ...Opt) *ButtonWidget {
  138. return &ButtonWidget{w.newChild("button", options...)}
  139. }
  140. // ButtonWidget represents the Tcl/Tk button widget/window
  141. type ButtonWidget struct {
  142. *Window
  143. }
  144. // Canvas — Create and manipulate 'canvas' hypergraphics drawing surface widgets
  145. //
  146. // Use [Window.Canvas] to create a Canvas with a particular parent.
  147. //
  148. // More information might be available at the [Tcl/Tk canvas] page.
  149. //
  150. // # Standard options
  151. //
  152. // - [Background]
  153. // - [Borderwidth]
  154. // - [Cursor]
  155. // - [Highlightbackground]
  156. // - [Highlightcolor]
  157. // - [Highlightthickness]
  158. // - [Insertbackground]
  159. // - [Insertborderwidth]
  160. // - [Insertofftime]
  161. // - [Insertontime]
  162. // - [Insertwidth]
  163. // - [Relief]
  164. // - [Selectbackground]
  165. // - [Selectborderwidth]
  166. // - [Selectforeground]
  167. // - [Takefocus]
  168. // - [Xscrollcommand]
  169. // - [Yscrollcommand]
  170. //
  171. // # Widget specific options
  172. //
  173. // [Closeenough]
  174. //
  175. // Specifies a floating-point value indicating how close the mouse cursor
  176. // must be to an item before it is considered to be
  177. // the item. Defaults to 1.0.
  178. //
  179. // [Confine]
  180. //
  181. // Specifies a boolean value that indicates whether or not it should be
  182. // allowable to set the canvas's view outside the region defined by the
  183. // scrollRegion argument.
  184. // Defaults to true, which means that the view will
  185. // be constrained within the scroll region.
  186. //
  187. // [Height]
  188. //
  189. // Specifies a desired window height that the canvas widget should request from
  190. // its geometry manager. The value may be specified in any
  191. // of the forms described in the COORDINATES section below.
  192. //
  193. // [Scrollregion]
  194. //
  195. // Specifies a list with four coordinates describing the left, top, right, and
  196. // bottom coordinates of a rectangular region.
  197. // This region is used for scrolling purposes and is considered to be
  198. // the boundary of the information in the canvas.
  199. // Each of the coordinates may be specified
  200. // in any of the forms given in the COORDINATES section below.
  201. //
  202. // [State]
  203. //
  204. // Modifies the default state of the canvas where state may be set to
  205. // one of: normal, disabled, or hidden. Individual canvas
  206. // objects all have their own state option which may override the default
  207. // state. Many options can take separate specifications such that the
  208. // appearance of the item can be different in different situations. The
  209. // options that start with active control the appearance when the mouse
  210. // pointer is over it, while the option starting with disabled controls
  211. // the appearance when the state is disabled. Canvas items which are
  212. // disabled will not react to canvas bindings.
  213. //
  214. // [Width]
  215. //
  216. // Specifies a desired window width that the canvas widget should request from
  217. // its geometry manager. The value may be specified in any
  218. // of the forms described in the COORDINATES section below.
  219. //
  220. // [Xscrollincrement]
  221. //
  222. // Specifies an increment for horizontal scrolling, in any of the usual forms
  223. // permitted for screen distances. If the value of this option is greater
  224. // than zero, the horizontal view in the window will be constrained so that
  225. // the canvas x coordinate at the left edge of the window is always an even
  226. // multiple of xScrollIncrement; furthermore, the units for scrolling
  227. // (e.g., the change in view when the left and right arrows of a scrollbar
  228. // are selected) will also be xScrollIncrement. If the value of
  229. // this option is negative or zero, then horizontal scrolling
  230. // is unconstrained.
  231. //
  232. // [Yscrollincrement]
  233. //
  234. // Specifies an increment for vertical scrolling, in any of the usual forms
  235. // permitted for screen distances. If the value of this option is greater
  236. // than zero, the vertical view in the window will be constrained so that
  237. // the canvas y coordinate at the top edge of the window is always an even
  238. // multiple of yScrollIncrement; furthermore, the units for scrolling
  239. // (e.g., the change in view when the top and bottom arrows of a scrollbar
  240. // are selected) will also be yScrollIncrement. If the value of
  241. // this option is negative or zero, then vertical scrolling
  242. // is unconstrained.
  243. //
  244. // [Tcl/Tk canvas]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/canvas.html
  245. func Canvas(options ...Opt) *CanvasWidget {
  246. return App.Canvas(options...)
  247. }
  248. // Canvas — Create and manipulate 'canvas' hypergraphics drawing surface widgets
  249. //
  250. // The resulting [Window] is a child of 'w'
  251. //
  252. // For details please see [Canvas]
  253. func (w *Window) Canvas(options ...Opt) *CanvasWidget {
  254. return &CanvasWidget{w.newChild("canvas", options...)}
  255. }
  256. // CanvasWidget represents the Tcl/Tk canvas widget/window
  257. type CanvasWidget struct {
  258. *Window
  259. }
  260. // Checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
  261. //
  262. // # Description
  263. //
  264. // The checkbutton command creates a new window (given by the
  265. // pathName argument) and makes it into a checkbutton widget.
  266. // Additional
  267. // options, described above, may be specified on the command line
  268. // or in the option database
  269. // to configure aspects of the checkbutton such as its colors, font,
  270. // text, and initial relief. The checkbutton command returns its
  271. // pathName argument. At the time this command is invoked,
  272. // there must not exist a window named pathName, but
  273. // pathName's parent must exist.
  274. //
  275. // A checkbutton is a widget
  276. // that displays a textual string, bitmap or image
  277. // and a square called an indicator.
  278. // If text is displayed, it must all be in a single font, but it
  279. // can occupy multiple lines on the screen (if it contains newlines
  280. // or if wrapping occurs because of the -wraplength option) and
  281. // one of the characters may optionally be underlined using the
  282. // A checkbutton has
  283. // all of the behavior of a simple button, including the
  284. // following: it can display itself in either of three different
  285. // ways, according to the -state option;
  286. // it can be made to appear
  287. // raised, sunken, or flat; it can be made to flash; and it invokes
  288. // a Tcl command whenever mouse button 1 is clicked over the
  289. // checkbutton.
  290. //
  291. // In addition, checkbuttons can be selected.
  292. // If a checkbutton is selected then the indicator is normally
  293. // drawn with a selected appearance, and
  294. // a Tcl variable associated with the checkbutton is set to a particular
  295. // value (normally 1).
  296. // The indicator is drawn with a check mark inside.
  297. // If the checkbutton is not selected, then the indicator is drawn with a
  298. // deselected appearance, and the associated variable is
  299. // set to a different value (typically 0).
  300. // The indicator is drawn without a check mark inside. In the special case
  301. // where the variable (if specified) has a value that matches the tristatevalue,
  302. // the indicator is drawn with a tri-state appearance and is in the tri-state
  303. // mode indicating mixed or multiple values. (This is used when the check
  304. // box represents the state of multiple items.)
  305. // The indicator is drawn in a platform dependent manner. Under Unix and
  306. // Windows, the background interior of the box is
  307. // grayed .
  308. // Under Mac, the indicator is drawn with a dash mark inside.
  309. // By default, the name of the variable associated with a checkbutton is the
  310. // same as the name used to create the checkbutton.
  311. // The variable name, and the
  312. // on ,
  313. // off
  314. // and
  315. // tristate
  316. // values stored in it, may be modified with options on the command line
  317. // or in the option database.
  318. // Configuration options may also be used to modify the way the
  319. // indicator is displayed (or whether it is displayed at all).
  320. // By default a checkbutton is configured to select and deselect
  321. // itself on alternate button clicks.
  322. // In addition, each checkbutton monitors its associated variable and
  323. // automatically selects and deselects itself when the variables value
  324. // changes to and from the button's
  325. // on ,
  326. // off
  327. // and
  328. // tristate
  329. // values.
  330. //
  331. // Use [Window.Checkbutton] to create a Checkbutton with a particular parent.
  332. //
  333. // More information might be available at the [Tcl/Tk checkbutton] page.
  334. //
  335. // # Standard options
  336. //
  337. // - [Activebackground]
  338. // - [Activeforeground]
  339. // - [Anchor]
  340. // - [Background]
  341. // - [Bitmap]
  342. // - [Borderwidth]
  343. // - [Compound]
  344. // - [Cursor]
  345. // - [Disabledforeground]
  346. // - [Foreground]
  347. // - [Highlightbackground]
  348. // - [Highlightcolor]
  349. // - [Highlightthickness]
  350. // - [Image]
  351. // - [Justify]
  352. // - [Padx]
  353. // - [Pady]
  354. // - [Relief]
  355. // - [Takefocus]
  356. // - [Textvariable]
  357. // - [Txt]
  358. // - [Underline]
  359. // - [Wraplength]
  360. //
  361. // # Widget specific options
  362. //
  363. // [Command]
  364. //
  365. // Specifies a Tcl command to associate with the button. This command
  366. // is typically invoked when mouse button 1 is released over the button
  367. // window. The button's global variable (-variable option) will
  368. // be updated before the command is invoked.
  369. //
  370. // [Height]
  371. //
  372. // Specifies a desired height for the button.
  373. // If an image or bitmap is being displayed in the button then the value is in
  374. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  375. // for text it is in lines of text.
  376. // If this option is not specified, the button's desired height is computed
  377. // from the size of the image or bitmap or text being displayed in it.
  378. //
  379. // [Indicatoron]
  380. //
  381. // Specifies whether or not the indicator should be drawn. Must be a
  382. // proper boolean value. If false, the -relief option is
  383. // ignored and the widget's relief is always sunken if the widget is
  384. // selected and raised otherwise.
  385. //
  386. // [Offrelief]
  387. //
  388. // Specifies the relief for the checkbutton when the indicator is not drawn and
  389. // the checkbutton is off. The default value is
  390. // By setting this option to
  391. // and setting -indicatoron to false and -overrelief to
  392. // the effect is achieved
  393. // of having a flat button that raises on mouse-over and which is
  394. // depressed when activated. This is the behavior typically exhibited by
  395. // the Bold, Italic, and Underline checkbuttons on the toolbar of a
  396. // word-processor, for example.
  397. //
  398. // [Offvalue]
  399. //
  400. // Specifies value to store in the button's associated variable whenever
  401. // this button is deselected. Defaults to
  402. //
  403. // [Onvalue]
  404. //
  405. // Specifies value to store in the button's associated variable whenever
  406. // this button is selected. Defaults to
  407. //
  408. // [Overrelief]
  409. //
  410. // Specifies an alternative relief for the checkbutton, to be used when the
  411. // mouse cursor is over the widget. This option can be used to make
  412. // toolbar buttons, by configuring -relief flat -overrelief
  413. // raised. If the value of this option is the empty string, then no
  414. // alternative relief is used when the mouse cursor is over the checkbutton.
  415. // The empty string is the default value.
  416. //
  417. // [Selectcolor]
  418. //
  419. // Specifies a background color to use when the button is selected.
  420. // If indicatorOn is true then the color is used as the background for
  421. // the indicator regardless of the select state.
  422. // If indicatorOn is false, this color is used as the background
  423. // for the entire widget, in place of background or activeBackground,
  424. // whenever the widget is selected.
  425. // If specified as an empty string then no special color is used for
  426. // displaying when the widget is selected.
  427. //
  428. // [Selectimage]
  429. //
  430. // Specifies an image to display (in place of the -image option)
  431. // when the checkbutton is selected.
  432. // This option is ignored unless the -image option has been
  433. // specified.
  434. //
  435. // [State]
  436. //
  437. // Specifies one of three states for the checkbutton: normal, active,
  438. // or disabled. In normal state the checkbutton is displayed using the
  439. // -foreground and -background options. The active state is
  440. // typically used when the pointer is over the checkbutton. In active state
  441. // the checkbutton is displayed using the -activeforeground and
  442. // -activebackground options. Disabled state means that the checkbutton
  443. // should be insensitive: the default bindings will refuse to activate
  444. // the widget and will ignore mouse button presses.
  445. // In this state the -disabledforeground and
  446. // -background options determine how the checkbutton is displayed.
  447. //
  448. // [Tristateimage]
  449. //
  450. // Specifies an image to display (in place of the -image option)
  451. // when the checkbutton is in tri-state mode.
  452. // This option is ignored unless the -image option has been
  453. // specified.
  454. //
  455. // [Tristatevalue]
  456. //
  457. // Specifies the value that causes the checkbutton to display the multi-value
  458. // selection, also known as the tri-state mode. Defaults to
  459. //
  460. // [Variable]
  461. //
  462. // Specifies the name of a global variable to set to indicate whether
  463. // or not this button is selected. Defaults to the name of the
  464. // button within its parent (i.e. the last element of the button
  465. // window's path name).
  466. //
  467. // [Width]
  468. //
  469. // Specifies a desired width for the button.
  470. // If an image or bitmap is being displayed in the button then the value is in
  471. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  472. // for text it is in characters.
  473. // If this option is not specified, the button's desired width is computed
  474. // from the size of the image or bitmap or text being displayed in it.
  475. //
  476. // [Tcl/Tk checkbutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/checkbutton.html
  477. func Checkbutton(options ...Opt) *CheckbuttonWidget {
  478. return App.Checkbutton(options...)
  479. }
  480. // Checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
  481. //
  482. // The resulting [Window] is a child of 'w'
  483. //
  484. // For details please see [Checkbutton]
  485. func (w *Window) Checkbutton(options ...Opt) *CheckbuttonWidget {
  486. return &CheckbuttonWidget{w.newChild("checkbutton", options...)}
  487. }
  488. // CheckbuttonWidget represents the Tcl/Tk checkbutton widget/window
  489. type CheckbuttonWidget struct {
  490. *Window
  491. }
  492. // Entry — Create and manipulate 'entry' one-line text entry widgets
  493. //
  494. // # Description
  495. //
  496. // The entry command creates a new window (given by the
  497. // pathName argument) and makes it into an entry widget.
  498. // Additional options, described above, may be specified on the
  499. // command line or in the option database
  500. // to configure aspects of the entry such as its colors, font,
  501. // and relief. The entry command returns its
  502. // pathName argument. At the time this command is invoked,
  503. // there must not exist a window named pathName, but
  504. // pathName's parent must exist.
  505. //
  506. // An entry is a widget that displays a one-line text string and
  507. // allows that string to be edited using widget commands described below, which
  508. // are typically bound to keystrokes and mouse actions.
  509. // When first created, an entry's string is empty.
  510. // A portion of the entry may be selected as described below.
  511. // If an entry is exporting its selection (see the -exportselection
  512. // option), then it will observe the standard X11 protocols for handling the
  513. // selection; entry selections are available as type STRING.
  514. // Entries also observe the standard Tk rules for dealing with the
  515. // input focus. When an entry has the input focus it displays an
  516. // insertion cursor to indicate where new characters will be
  517. // inserted.
  518. //
  519. // Entries are capable of displaying strings that are too long to
  520. // fit entirely within the widget's window. In this case, only a
  521. // portion of the string will be displayed; commands described below
  522. // may be used to change the view in the window. Entries use
  523. // the standard -xscrollcommand mechanism for interacting with
  524. // scrollbars (see the description of the -xscrollcommand option
  525. // for details). They also support scanning, as described below.
  526. //
  527. // Use [Window.Entry] to create a Entry with a particular parent.
  528. //
  529. // More information might be available at the [Tcl/Tk entry] page.
  530. //
  531. // # Standard options
  532. //
  533. // - [Background]
  534. // - [Borderwidth]
  535. // - [Cursor]
  536. // - [Exportselection]
  537. // - [Foreground]
  538. // - [Highlightbackground]
  539. // - [Highlightcolor]
  540. // - [Highlightthickness]
  541. // - [Insertbackground]
  542. // - [Insertborderwidth]
  543. // - [Insertofftime]
  544. // - [Insertontime]
  545. // - [Insertwidth]
  546. // - [Justify]
  547. // - [Placeholder]
  548. // - [Placeholderforeground]
  549. // - [Relief]
  550. // - [Selectbackground]
  551. // - [Selectborderwidth]
  552. // - [Selectforeground]
  553. // - [Takefocus]
  554. // - [Textvariable]
  555. // - [Xscrollcommand]
  556. //
  557. // # Widget specific options
  558. //
  559. // [Disabledbackground]
  560. //
  561. // Specifies the background color to use when the entry is disabled. If
  562. // this option is the empty string, the normal background color is used.
  563. //
  564. // [Disabledforeground]
  565. //
  566. // Specifies the foreground color to use when the entry is disabled. If
  567. // this option is the empty string, the normal foreground color is used.
  568. //
  569. // [Invalidcommand]
  570. //
  571. // Specifies a script to eval when -validatecommand returns 0.
  572. // Setting it to {} disables this feature (the default). The best use
  573. // of this option is to set it to bell. See VALIDATION
  574. // below for more information.
  575. //
  576. // [Readonlybackground]
  577. //
  578. // Specifies the background color to use when the entry is readonly. If
  579. // this option is the empty string, the normal background color is used.
  580. //
  581. // [Show]
  582. //
  583. // If this option is specified, then the true contents of the entry
  584. // are not displayed in the window.
  585. // Instead, each character in the entry's value will be displayed as
  586. // the first character in the value of this option, such as
  587. // This is useful, for example, if the entry is to be used to enter
  588. // a password.
  589. // If characters in the entry are selected and copied elsewhere, the
  590. // information copied will be what is displayed, not the true contents
  591. // of the entry.
  592. //
  593. // [State]
  594. //
  595. // Specifies one of three states for the entry: normal,
  596. // disabled, or readonly. If the entry is readonly, then the
  597. // value may not be changed using widget commands and no insertion cursor
  598. // will be displayed, even if the input focus is in the widget; the
  599. // contents of the widget may still be selected. If the entry is
  600. // disabled, the value may not be changed, no insertion cursor will be
  601. // displayed, the contents will not be selectable, and the entry may
  602. // be displayed in a different color, depending on the values of the
  603. // -disabledforeground and -disabledbackground options.
  604. //
  605. // [Validate]
  606. //
  607. // Specifies the mode in which validation should operate: none,
  608. // focus, focusin, focusout, key, or all.
  609. // It defaults to none. When you want validation, you must explicitly
  610. // state which mode you wish to use. See VALIDATION below for more.
  611. //
  612. // [Validatecommand]
  613. //
  614. // Specifies a script to eval when you want to validate the input into
  615. // the entry widget. Setting it to {} disables this feature (the default).
  616. // This command must return a valid Tcl boolean value. If it returns 0 (or
  617. // the valid Tcl boolean equivalent) then it means you reject the new edition
  618. // and it will not occur and the -invalidcommand will be evaluated if it
  619. // is set. If it returns 1, then the new edition occurs.
  620. // See VALIDATION below for more information.
  621. //
  622. // [Width]
  623. //
  624. // Specifies an integer value indicating the desired width of the entry window,
  625. // in average-size characters of the widget's font.
  626. // If the value is negative or zero, the widget picks a
  627. // size just large enough to hold its current text.
  628. //
  629. // [Tcl/Tk entry]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/entry.html
  630. func Entry(options ...Opt) *EntryWidget {
  631. return App.Entry(options...)
  632. }
  633. // Entry — Create and manipulate 'entry' one-line text entry widgets
  634. //
  635. // The resulting [Window] is a child of 'w'
  636. //
  637. // For details please see [Entry]
  638. func (w *Window) Entry(options ...Opt) *EntryWidget {
  639. return &EntryWidget{w.newChild("entry", options...)}
  640. }
  641. // EntryWidget represents the Tcl/Tk entry widget/window
  642. type EntryWidget struct {
  643. *Window
  644. }
  645. // Frame — Create and manipulate 'frame' simple container widgets
  646. //
  647. // # Description
  648. //
  649. // The frame command creates a new window (given by the
  650. // pathName argument) and makes it into a frame widget.
  651. // Additional
  652. // options, described above, may be specified on the command line
  653. // or in the option database
  654. // to configure aspects of the frame such as its background color
  655. // and relief. The frame command returns the
  656. // path name of the new window.
  657. //
  658. // A frame is a simple widget. Its primary purpose is to act as a
  659. // spacer or container for complex window layouts. The only features
  660. // of a frame are its background and an optional 3-D border to make the
  661. // frame appear raised or sunken.
  662. //
  663. // Use [Window.Frame] to create a Frame with a particular parent.
  664. //
  665. // More information might be available at the [Tcl/Tk frame] page.
  666. //
  667. // # Standard options
  668. //
  669. // - [Borderwidth]
  670. // - [Cursor]
  671. // - [Highlightbackground]
  672. // - [Highlightcolor]
  673. // - [Highlightthickness]
  674. // - [Padx]
  675. // - [Pady]
  676. // - [Relief]
  677. // - [Takefocus]
  678. //
  679. // # Widget specific options
  680. //
  681. // [Background]
  682. //
  683. // This option is the same as the standard -background option
  684. // except that its value may also be specified as an empty string.
  685. // In this case, the widget will display no background or border, and
  686. // no colors will be consumed from its colormap for its background
  687. // and border.
  688. // An empty background will disable drawing the background image.
  689. //
  690. // [Backgroundimage]
  691. //
  692. // This specifies an image to display on the frame's background within
  693. // the border of the frame (i.e., the image will be clipped by the
  694. // frame's highlight ring and border, if either are present); subwidgets
  695. // of the frame will be drawn on top. The image must have been created
  696. // with the image create command. If specified as the empty string,
  697. // no image will be displayed.
  698. //
  699. // [Class]
  700. //
  701. // Specifies a class for the window.
  702. // This class will be used when querying the option database for
  703. // the window's other options, and it will also be used later for
  704. // other purposes such as bindings.
  705. // The -class option may not be changed with the configure
  706. // widget command.
  707. //
  708. // [Colormap]
  709. //
  710. // Specifies a colormap to use for the window.
  711. // The value may be either new, in which case a new colormap is
  712. // created for the window and its children, or the name of another
  713. // window (which must be on the same screen and have the same visual
  714. // as pathName), in which case the new window will use the colormap
  715. // from the specified window.
  716. // If the -colormap option is not specified, the new window
  717. // uses the same colormap as its parent.
  718. // This option may not be changed with the configure
  719. // widget command.
  720. //
  721. // [Container]
  722. //
  723. // The value must be a boolean. If true, it means that this window will
  724. // be used as a container in which some other application will be embedded
  725. // (for example, a Tk toplevel can be embedded using the -use option).
  726. // The window will support the appropriate window manager protocols for
  727. // things like geometry requests. The window should not have any
  728. // children of its own in this application.
  729. // This option may not be changed with the configure
  730. // widget command.
  731. // Note that -borderwidth, -padx and -pady are ignored when
  732. // configured as a container since a container has no border.
  733. //
  734. // [Height]
  735. //
  736. // Specifies the desired height for the window in any of the forms
  737. // acceptable to Tk_GetPixels. If this option is negative or
  738. // zero then the window will not request any size at all. Note that this
  739. // sets the total height of the frame, any -borderwidth or similar is
  740. // not added. Normally -height should not be used if a propagating
  741. // geometry manager, such as grid or pack, is used within the
  742. // frame since the geometry manager will override the height of the frame.
  743. //
  744. // [Tile]
  745. //
  746. // This specifies how to draw the background image (see
  747. // -backgroundimage) on the frame.
  748. // If true (according to Tcl_GetBoolean), the image will be tiled
  749. // to fill the whole frame, with the origin of the first copy of the
  750. // image being the top left of the interior of the frame.
  751. // If false (the default), the image will be centered within the frame.
  752. //
  753. // [Visual]
  754. //
  755. // Specifies visual information for the new window in any of the
  756. // forms accepted by Tk_GetVisual.
  757. // If this option is not specified, the new window will use the same
  758. // visual as its parent.
  759. // The -visual option may not be modified with the configure
  760. // widget command.
  761. //
  762. // [Width]
  763. //
  764. // Specifies the desired width for the window in any of the forms
  765. // acceptable to Tk_GetPixels. If this option is negative or
  766. // zero then the window will not request any size at all. Note that this
  767. // sets the total width of the frame, any -borderwidth or similar is
  768. // not added. Normally -width should not be used if a propagating
  769. // geometry manager, such as grid or pack, is used within the
  770. // frame since the geometry manager will override the width of the frame.
  771. //
  772. // [Tcl/Tk frame]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/frame.html
  773. func Frame(options ...Opt) *FrameWidget {
  774. return App.Frame(options...)
  775. }
  776. // Frame — Create and manipulate 'frame' simple container widgets
  777. //
  778. // The resulting [Window] is a child of 'w'
  779. //
  780. // For details please see [Frame]
  781. func (w *Window) Frame(options ...Opt) *FrameWidget {
  782. return &FrameWidget{w.newChild("frame", options...)}
  783. }
  784. // FrameWidget represents the Tcl/Tk frame widget/window
  785. type FrameWidget struct {
  786. *Window
  787. }
  788. // Label — Create and manipulate 'label' non-interactive text or image widgets
  789. //
  790. // # Description
  791. //
  792. // The label command creates a new window (given by the
  793. // pathName argument) and makes it into a label widget.
  794. // Additional
  795. // options, described above, may be specified on the command line
  796. // or in the option database
  797. // to configure aspects of the label such as its colors, font,
  798. // text, and initial relief. The label command returns its
  799. // pathName argument. At the time this command is invoked,
  800. // there must not exist a window named pathName, but
  801. // pathName's parent must exist.
  802. //
  803. // A label is a widget that displays a textual string, bitmap or image.
  804. // If text is displayed, it must all be in a single font, but it
  805. // can occupy multiple lines on the screen (if it contains newlines
  806. // or if wrapping occurs because of the -wraplength option) and
  807. // one of the characters may optionally be underlined using the
  808. // The label can be manipulated in a few simple ways, such as
  809. // changing its relief or text, using the commands described below.
  810. //
  811. // Use [Window.Label] to create a Label with a particular parent.
  812. //
  813. // More information might be available at the [Tcl/Tk label] page.
  814. //
  815. // # Standard options
  816. //
  817. // - [Activebackground]
  818. // - [Activeforeground]
  819. // - [Anchor]
  820. // - [Background]
  821. // - [Bitmap]
  822. // - [Borderwidth]
  823. // - [Compound]
  824. // - [Cursor]
  825. // - [Disabledforeground]
  826. // - [Foreground]
  827. // - [Highlightbackground]
  828. // - [Highlightcolor]
  829. // - [Highlightthickness]
  830. // - [Image]
  831. // - [Justify]
  832. // - [Padx]
  833. // - [Pady]
  834. // - [Relief]
  835. // - [Takefocus]
  836. // - [Textvariable]
  837. // - [Txt]
  838. // - [Underline]
  839. // - [Wraplength]
  840. //
  841. // # Widget specific options
  842. //
  843. // [Height]
  844. //
  845. // Specifies a desired height for the label.
  846. // If an image or bitmap is being displayed in the label then the value is in
  847. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  848. // for text it is in lines of text.
  849. // If this option is not specified, the label's desired height is computed
  850. // from the size of the image or bitmap or text being displayed in it.
  851. //
  852. // [State]
  853. //
  854. // Specifies one of three states for the label: normal, active,
  855. // or disabled. In normal state the button is displayed using the
  856. // -foreground and -background options. In active state
  857. // the label is displayed using the -activeforeground and
  858. // -activebackground options. In the disabled state the
  859. // -disabledforeground and -background options determine how
  860. // the button is displayed.
  861. //
  862. // [Width]
  863. //
  864. // Specifies a desired width for the label.
  865. // If an image or bitmap is being displayed in the label then the value is in
  866. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  867. // for text it is in characters.
  868. // If this option is not specified, the label's desired width is computed
  869. // from the size of the image or bitmap or text being displayed in it.
  870. //
  871. // [Tcl/Tk label]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/label.html
  872. func Label(options ...Opt) *LabelWidget {
  873. return App.Label(options...)
  874. }
  875. // Label — Create and manipulate 'label' non-interactive text or image widgets
  876. //
  877. // The resulting [Window] is a child of 'w'
  878. //
  879. // For details please see [Label]
  880. func (w *Window) Label(options ...Opt) *LabelWidget {
  881. return &LabelWidget{w.newChild("label", options...)}
  882. }
  883. // LabelWidget represents the Tcl/Tk label widget/window
  884. type LabelWidget struct {
  885. *Window
  886. }
  887. // Labelframe — Create and manipulate 'labelframe' labelled container widgets
  888. //
  889. // # Description
  890. //
  891. // The labelframe command creates a new window (given by the
  892. // pathName argument) and makes it into a labelframe widget.
  893. // Additional
  894. // options, described above, may be specified on the command line
  895. // or in the option database
  896. // to configure aspects of the labelframe such as its background color
  897. // and relief. The labelframe command returns the
  898. // path name of the new window.
  899. //
  900. // A labelframe is a simple widget. Its primary purpose is to act as a
  901. // spacer or container for complex window layouts. It has the features
  902. // of a frame plus the ability to display a label.
  903. //
  904. // Use [Window.Labelframe] to create a Labelframe with a particular parent.
  905. //
  906. // More information might be available at the [Tcl/Tk labelframe] page.
  907. //
  908. // # Standard options
  909. //
  910. // - [Borderwidth]
  911. // - [Cursor]
  912. // - [Foreground]
  913. // - [Highlightbackground]
  914. // - [Highlightcolor]
  915. // - [Highlightthickness]
  916. // - [Padx]
  917. // - [Pady]
  918. // - [Relief]
  919. // - [Takefocus]
  920. // - [Txt]
  921. //
  922. // # Widget specific options
  923. //
  924. // [Background]
  925. //
  926. // This option is the same as the standard -background option
  927. // except that its value may also be specified as an empty string.
  928. // In this case, the widget will display no background or border, and
  929. // no colors will be consumed from its colormap for its background
  930. // and border.
  931. //
  932. // [Class]
  933. //
  934. // Specifies a class for the window.
  935. // This class will be used when querying the option database for
  936. // the window's other options, and it will also be used later for
  937. // other purposes such as bindings.
  938. // The -class option may not be changed with the configure
  939. // widget command.
  940. //
  941. // [Colormap]
  942. //
  943. // Specifies a colormap to use for the window.
  944. // The value may be either new, in which case a new colormap is
  945. // created for the window and its children, or the name of another
  946. // window (which must be on the same screen and have the same visual
  947. // as pathName), in which case the new window will use the colormap
  948. // from the specified window.
  949. // If the -colormap option is not specified, the new window
  950. // uses the same colormap as its parent.
  951. // This option may not be changed with the configure
  952. // widget command.
  953. //
  954. // [Height]
  955. //
  956. // Specifies the desired height for the window in any of the forms
  957. // acceptable to Tk_GetPixels.
  958. // If this option is negative or zero then the window will
  959. // not request any size at all.
  960. //
  961. // [Labelanchor]
  962. //
  963. // Specifies where to place the label. A label is only displayed if the
  964. // -text option is not the empty string.
  965. // Valid values for this option are (listing them clockwise)
  966. // nw, n, ne, en, e, es,
  967. // se, s,sw, ws, w and wn.
  968. // The default value is nw.
  969. //
  970. // [Labelwidget]
  971. //
  972. // Specifies a widget to use as label. This overrides any -text
  973. // option. The widget must exist before being used as -labelwidget
  974. // and if it is not a descendant of this window, it will be raised
  975. // above it in the stacking order.
  976. //
  977. // [Visual]
  978. //
  979. // Specifies visual information for the new window in any of the
  980. // forms accepted by Tk_GetVisual.
  981. // If this option is not specified, the new window will use the same
  982. // visual as its parent.
  983. // The -visual option may not be modified with the configure
  984. // widget command.
  985. //
  986. // [Width]
  987. //
  988. // Specifies the desired width for the window in any of the forms
  989. // acceptable to Tk_GetPixels.
  990. // If this option is negative or zero then the window will
  991. // not request any size at all.
  992. //
  993. // [Tcl/Tk labelframe]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/labelframe.html
  994. func Labelframe(options ...Opt) *LabelframeWidget {
  995. return App.Labelframe(options...)
  996. }
  997. // Labelframe — Create and manipulate 'labelframe' labelled container widgets
  998. //
  999. // The resulting [Window] is a child of 'w'
  1000. //
  1001. // For details please see [Labelframe]
  1002. func (w *Window) Labelframe(options ...Opt) *LabelframeWidget {
  1003. return &LabelframeWidget{w.newChild("labelframe", options...)}
  1004. }
  1005. // LabelframeWidget represents the Tcl/Tk labelframe widget/window
  1006. type LabelframeWidget struct {
  1007. *Window
  1008. }
  1009. // Listbox — Create and manipulate 'listbox' item list widgets
  1010. //
  1011. // # Description
  1012. //
  1013. // The listbox command creates a new window (given by the
  1014. // pathName argument) and makes it into a listbox widget.
  1015. // Additional
  1016. // options, described above, may be specified on the command line
  1017. // or in the option database
  1018. // to configure aspects of the listbox such as its colors, font,
  1019. // text, and relief. The listbox command returns its
  1020. // pathName argument. At the time this command is invoked,
  1021. // there must not exist a window named pathName, but
  1022. // pathName's parent must exist.
  1023. //
  1024. // A listbox is a widget that displays a list of strings, one per line.
  1025. // When first created, a new listbox has no elements.
  1026. // Elements may be added or deleted using widget commands described
  1027. // below. In addition, one or more elements may be selected as described
  1028. // below.
  1029. // If a listbox is exporting its selection (see -exportselection
  1030. // option), then it will observe the standard X11 protocols
  1031. // for handling the selection.
  1032. // Listbox selections are available as type STRING;
  1033. // the value of the selection will be the text of the selected elements, with
  1034. // newlines separating the elements.
  1035. //
  1036. // It is not necessary for all the elements to be
  1037. // displayed in the listbox window at once; commands described below
  1038. // may be used to change the view in the window. Listboxes allow
  1039. // scrolling in both directions using the standard -xscrollcommand
  1040. // and -yscrollcommand options.
  1041. // They also support scanning, as described below.
  1042. //
  1043. // Use [Window.Listbox] to create a Listbox with a particular parent.
  1044. //
  1045. // More information might be available at the [Tcl/Tk listbox] page.
  1046. //
  1047. // # Standard options
  1048. //
  1049. // - [Background]
  1050. // - [Borderwidth]
  1051. // - [Cursor]
  1052. // - [Disabledforeground]
  1053. // - [Exportselection]
  1054. // - [Foreground]
  1055. // - [Highlightbackground]
  1056. // - [Highlightcolor]
  1057. // - [Highlightthickness]
  1058. // - [Justify]
  1059. // - [Relief]
  1060. // - [Selectbackground]
  1061. // - [Selectborderwidth]
  1062. // - [Selectforeground]
  1063. // - [Setgrid]
  1064. // - [Takefocus]
  1065. // - [Xscrollcommand]
  1066. // - [Yscrollcommand]
  1067. //
  1068. // # Widget specific options
  1069. //
  1070. // [Activestyle]
  1071. //
  1072. // Specifies the style in which to draw the active element. This must be
  1073. // one of dotbox (show a focus ring around the active element),
  1074. // none (no special indication of active element) or
  1075. // underline (underline the active element).
  1076. // The default is underline on Windows, and dotbox elsewhere.
  1077. //
  1078. // [Height]
  1079. //
  1080. // Specifies the desired height for the window, in lines.
  1081. // If zero or less, then the desired height for the window is made just
  1082. // large enough to hold all the elements in the listbox.
  1083. //
  1084. // [Listvariable]
  1085. //
  1086. // Specifies the name of a global variable. The value of the variable is a list to
  1087. // be displayed inside the widget; if the variable value changes then the
  1088. // widget will automatically update itself to reflect the new value. Attempts
  1089. // to assign a variable with an invalid list value to -listvariable
  1090. // will cause an error. Attempts to unset a variable in use as a
  1091. // -listvariable will fail but will not generate an error.
  1092. //
  1093. // [Selectmode]
  1094. //
  1095. // Specifies one of several styles for manipulating the selection.
  1096. // The value of the option may be arbitrary, but the default bindings
  1097. // expect it to be either single, browse, multiple,
  1098. // or extended; the default value is browse.
  1099. //
  1100. // [State]
  1101. //
  1102. // Specifies one of two states for the listbox: normal or disabled.
  1103. // If the listbox is disabled then items may not be inserted or deleted,
  1104. // items are drawn in the -disabledforeground color, and selection
  1105. // cannot be modified and is not shown (though selection information is retained).
  1106. //
  1107. // [Width]
  1108. //
  1109. // Specifies the desired width for the window in characters.
  1110. // If the font does not have a uniform width then the width of the character
  1111. // is used in translating from character units to screen units.
  1112. // If zero or less, then the desired width for the window is made just
  1113. // large enough to hold all the elements in the listbox.
  1114. //
  1115. // [Tcl/Tk listbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/listbox.html
  1116. func Listbox(options ...Opt) *ListboxWidget {
  1117. return App.Listbox(options...)
  1118. }
  1119. // Listbox — Create and manipulate 'listbox' item list widgets
  1120. //
  1121. // The resulting [Window] is a child of 'w'
  1122. //
  1123. // For details please see [Listbox]
  1124. func (w *Window) Listbox(options ...Opt) *ListboxWidget {
  1125. return &ListboxWidget{w.newChild("listbox", options...)}
  1126. }
  1127. // ListboxWidget represents the Tcl/Tk listbox widget/window
  1128. type ListboxWidget struct {
  1129. *Window
  1130. }
  1131. // Menu — Create and manipulate 'menu' widgets and menubars
  1132. //
  1133. // Use [Window.Menu] to create a Menu with a particular parent.
  1134. //
  1135. // More information might be available at the [Tcl/Tk menu] page.
  1136. //
  1137. // # Standard options
  1138. //
  1139. // - [Activebackground]
  1140. // - [Activeborderwidth]
  1141. // - [Activeforeground]
  1142. // - [Activerelief]
  1143. // - [Background]
  1144. // - [Borderwidth]
  1145. // - [Cursor]
  1146. // - [Disabledforeground]
  1147. // - [Foreground]
  1148. // - [Relief]
  1149. // - [Takefocus]
  1150. //
  1151. // # Widget specific options
  1152. //
  1153. // [Postcommand]
  1154. //
  1155. // If this option is specified then it provides a Tcl command to execute
  1156. // each time the menu is posted. The command is invoked by the post
  1157. // widget command before posting the menu. Note that in Tk 8.0 on Macintosh
  1158. // and Windows, all post-commands in a system of menus are executed before any
  1159. // of those menus are posted.
  1160. // This is due to the limitations in the individual platforms' menu managers.
  1161. //
  1162. // [Selectcolor]
  1163. //
  1164. // For menu entries that are check buttons or radio buttons, this option
  1165. // specifies the color to display in the indicator when the check button
  1166. // or radio button is selected.
  1167. //
  1168. // [Tearoff]
  1169. //
  1170. // This option must have a proper boolean value (default is false),
  1171. // which specifies whether or not the menu should include a tear-off
  1172. // entry at the top. If so, it will exist as entry 0 of the menu and
  1173. // the other entries will number starting at 1. The default menu
  1174. // bindings arrange for the menu to be torn off when the tear-off entry
  1175. // is invoked.
  1176. // This option is ignored under Aqua/macOS, where menus cannot
  1177. // be torn off.
  1178. //
  1179. // [Tearoffcommand]
  1180. //
  1181. // If this option has a non-empty value, then it specifies a Tcl command
  1182. // to invoke whenever the menu is torn off. The actual command will
  1183. // consist of the value of this option, followed by a space, followed
  1184. // by the name of the menu window, followed by a space, followed by
  1185. // the name of the name of the torn off menu window. For example, if
  1186. // the option's value is
  1187. // and menu .x.y is torn off to
  1188. // create a new menu .x.tearoff1, then the command
  1189. // will be invoked.
  1190. // This option is ignored under Aqua/macOS, where menus cannot
  1191. // be torn off.
  1192. //
  1193. // [Title]
  1194. //
  1195. // The string will be used to title the window created when this menu is
  1196. // torn off. If the title is NULL, then the window will have the title
  1197. // of the menubutton or the text of the cascade item from which this menu
  1198. // was invoked.
  1199. //
  1200. // [Type]
  1201. //
  1202. // This option can be one of menubar, tearoff, or
  1203. // normal, and is set when the menu is created. While the string
  1204. // returned by the configuration database will change if this option is
  1205. // changed, this does not affect the menu widget's behavior. This is used
  1206. // by the cloning mechanism and is not normally set outside of the Tk
  1207. // library.
  1208. //
  1209. // [Tcl/Tk menu]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/menu.html
  1210. func Menu(options ...Opt) *MenuWidget {
  1211. return App.Menu(options...)
  1212. }
  1213. // Menu — Create and manipulate 'menu' widgets and menubars
  1214. //
  1215. // The resulting [Window] is a child of 'w'
  1216. //
  1217. // For details please see [Menu]
  1218. func (w *Window) Menu(options ...Opt) *MenuWidget {
  1219. return &MenuWidget{w.newChild("menu", options...)}
  1220. }
  1221. // MenuWidget represents the Tcl/Tk menu widget/window
  1222. type MenuWidget struct {
  1223. *Window
  1224. }
  1225. // Menubutton — Create and manipulate 'menubutton' pop-up menu indicator widgets
  1226. //
  1227. // Use [Window.Menubutton] to create a Menubutton with a particular parent.
  1228. //
  1229. // More information might be available at the [Tcl/Tk menubutton] page.
  1230. //
  1231. // # Standard options
  1232. //
  1233. // - [Activebackground]
  1234. // - [Activeforeground]
  1235. // - [Anchor]
  1236. // - [Background]
  1237. // - [Bitmap]
  1238. // - [Borderwidth]
  1239. // - [Compound]
  1240. // - [Cursor]
  1241. // - [Disabledforeground]
  1242. // - [Foreground]
  1243. // - [Highlightbackground]
  1244. // - [Highlightcolor]
  1245. // - [Highlightthickness]
  1246. // - [Image]
  1247. // - [Justify]
  1248. // - [Padx]
  1249. // - [Pady]
  1250. // - [Relief]
  1251. // - [Takefocus]
  1252. // - [Textvariable]
  1253. // - [Txt]
  1254. // - [Underline]
  1255. // - [Wraplength]
  1256. //
  1257. // # Widget specific options
  1258. //
  1259. // [Direction]
  1260. //
  1261. // Specifies where the menu is going to be popup up. above tries to
  1262. // pop the menu above the menubutton. below tries to pop the menu
  1263. // below the menubutton. left tries to pop the menu to the left of
  1264. // the menubutton. right tries to pop the menu to the right of the
  1265. // menu button. flush pops the menu directly over the menubutton.
  1266. // In the case of above or below, the direction will be
  1267. // reversed if the menu would show offscreen.
  1268. //
  1269. // [Height]
  1270. //
  1271. // Specifies a desired height for the menubutton.
  1272. // If an image or bitmap is being displayed in the menubutton then the value is in
  1273. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  1274. // for text it is in lines of text.
  1275. // If this option is not specified, the menubutton's desired height is computed
  1276. // from the size of the image or bitmap or text being displayed in it.
  1277. //
  1278. // [Indicatoron]
  1279. //
  1280. // The value must be a proper boolean value. If it is true then
  1281. // a small indicator rectangle will be displayed on the right side
  1282. // of the menubutton and the default menu bindings will treat this
  1283. // as an option menubutton. If false then no indicator will be
  1284. // displayed.
  1285. //
  1286. // [Mnu]
  1287. //
  1288. // Specifies the path name of the menu associated with this menubutton.
  1289. // The menu must be a child of the menubutton.
  1290. //
  1291. // [State]
  1292. //
  1293. // Specifies one of three states for the menubutton: normal, active,
  1294. // or disabled. In normal state the menubutton is displayed using the
  1295. // foreground and background options. The active state is
  1296. // typically used when the pointer is over the menubutton. In active state
  1297. // the menubutton is displayed using the -activeforeground and
  1298. // -activebackground options. Disabled state means that the menubutton
  1299. // should be insensitive: the default bindings will refuse to activate
  1300. // the widget and will ignore mouse button presses.
  1301. // In this state the -disabledforeground and
  1302. // -background options determine how the button is displayed.
  1303. //
  1304. // [Width]
  1305. //
  1306. // Specifies a desired width for the menubutton.
  1307. // If an image or bitmap is being displayed in the menubutton then the value is in
  1308. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  1309. // for text it is in characters.
  1310. // If this option is not specified, the menubutton's desired width is computed
  1311. // from the size of the image or bitmap or text being displayed in it.
  1312. //
  1313. // [Tcl/Tk menubutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/menubutton.html
  1314. func Menubutton(options ...Opt) *MenubuttonWidget {
  1315. return App.Menubutton(options...)
  1316. }
  1317. // Menubutton — Create and manipulate 'menubutton' pop-up menu indicator widgets
  1318. //
  1319. // The resulting [Window] is a child of 'w'
  1320. //
  1321. // For details please see [Menubutton]
  1322. func (w *Window) Menubutton(options ...Opt) *MenubuttonWidget {
  1323. return &MenubuttonWidget{w.newChild("menubutton", options...)}
  1324. }
  1325. // MenubuttonWidget represents the Tcl/Tk menubutton widget/window
  1326. type MenubuttonWidget struct {
  1327. *Window
  1328. }
  1329. // Message — Create and manipulate 'message' non-interactive text widgets
  1330. //
  1331. // # Description
  1332. //
  1333. // The message command creates a new window (given by the
  1334. // pathName argument) and makes it into a message widget.
  1335. // Additional
  1336. // options, described above, may be specified on the command line
  1337. // or in the option database
  1338. // to configure aspects of the message such as its colors, font,
  1339. // text, and initial relief. The message command returns its
  1340. // pathName argument. At the time this command is invoked,
  1341. // there must not exist a window named pathName, but
  1342. // pathName's parent must exist.
  1343. //
  1344. // A message is a widget that displays a textual string. A message
  1345. // widget has three special features that differentiate it from a
  1346. // label widget. First, it breaks up
  1347. // its string into lines in order to produce a given aspect ratio
  1348. // for the window. The line breaks are chosen at word boundaries
  1349. // wherever possible (if not even a single word would fit on a
  1350. // line, then the word will be split across lines). Newline characters
  1351. // in the string will force line breaks; they can be used, for example,
  1352. // to leave blank lines in the display.
  1353. //
  1354. // The second feature of a message widget is justification. The text
  1355. // may be displayed left-justified (each line starts at the left side of
  1356. // the window), centered on a line-by-line basis, or right-justified
  1357. // (each line ends at the right side of the window).
  1358. //
  1359. // The third feature of a message widget is that it handles control
  1360. // characters and non-printing characters specially. Tab characters
  1361. // are replaced with enough blank space to line up on the next
  1362. // 8-character boundary. Newlines cause line breaks. Other control
  1363. // characters (ASCII code less than 0x20) and characters not defined
  1364. // in the font are displayed as a four-character sequence \exhh where
  1365. // hh is the two-digit hexadecimal number corresponding to
  1366. // the character. In the unusual case where the font does not contain
  1367. // all of the characters in
  1368. // 0123456789abcdef\ex
  1369. // then control characters and undefined characters are not displayed at all.
  1370. //
  1371. // Use [Window.Message] to create a Message with a particular parent.
  1372. //
  1373. // More information might be available at the [Tcl/Tk message] page.
  1374. //
  1375. // # Standard options
  1376. //
  1377. // - [Anchor]
  1378. // - [Background]
  1379. // - [Borderwidth]
  1380. // - [Cursor]
  1381. // - [Foreground]
  1382. // - [Highlightbackground]
  1383. // - [Highlightcolor]
  1384. // - [Highlightthickness]
  1385. // - [Padx]
  1386. // - [Pady]
  1387. // - [Relief]
  1388. // - [Takefocus]
  1389. // - [Textvariable]
  1390. // - [Txt]
  1391. //
  1392. // # Widget specific options
  1393. //
  1394. // [Aspect]
  1395. //
  1396. // Specifies a non-negative integer value indicating desired
  1397. // aspect ratio for the text. The aspect ratio is specified as
  1398. // 100*width/height. 100 means the text should
  1399. // be as wide as it is tall, 200 means the text should
  1400. // be twice as wide as it is tall, 50 means the text should
  1401. // be twice as tall as it is wide, and so on.
  1402. // Used to choose line length for text if -width option
  1403. // is not specified.
  1404. // Defaults to 150.
  1405. //
  1406. // [Justify]
  1407. //
  1408. // Specifies how to justify lines of text.
  1409. // Must be one of left, center, or right. Defaults
  1410. // to left.
  1411. // This option works together with the -anchor, -aspect,
  1412. // -padx, -pady, and -width options to provide a variety
  1413. // of arrangements of the text within the window.
  1414. // The -aspect and -width options determine the amount of
  1415. // screen space needed to display the text.
  1416. // The -anchor, -padx, and -pady options determine where this
  1417. // rectangular area is displayed within the widget's window, and the
  1418. // -justify option determines how each line is displayed within that
  1419. // rectangular region.
  1420. // For example, suppose -anchor is e and -justify is
  1421. // left, and that the message window is much larger than needed
  1422. // for the text.
  1423. // The text will be displayed so that the left edges of all the lines
  1424. // line up and the right edge of the longest line is -padx from
  1425. // the right side of the window; the entire text block will be centered
  1426. // in the vertical span of the window.
  1427. //
  1428. // [Width]
  1429. //
  1430. // Specifies the length of lines in the window.
  1431. // The value may have any of the forms acceptable to Tk_GetPixels.
  1432. // If this option has a value greater than zero then the -aspect
  1433. // option is ignored and the -width option determines the line
  1434. // length.
  1435. // If this option value is negative or zero, then
  1436. // the -aspect option determines the line length.
  1437. //
  1438. // [Tcl/Tk message]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/message.html
  1439. func Message(options ...Opt) *MessageWidget {
  1440. return App.Message(options...)
  1441. }
  1442. // Message — Create and manipulate 'message' non-interactive text widgets
  1443. //
  1444. // The resulting [Window] is a child of 'w'
  1445. //
  1446. // For details please see [Message]
  1447. func (w *Window) Message(options ...Opt) *MessageWidget {
  1448. return &MessageWidget{w.newChild("message", options...)}
  1449. }
  1450. // MessageWidget represents the Tcl/Tk message widget/window
  1451. type MessageWidget struct {
  1452. *Window
  1453. }
  1454. // Panedwindow — Create and manipulate 'panedwindow' split container widgets
  1455. //
  1456. // # Description
  1457. //
  1458. // The panedwindow command creates a new window (given by the
  1459. // pathName argument) and makes it into a panedwindow widget.
  1460. // Additional options, described above, may be specified on the command
  1461. // line or in the option database to configure aspects of the panedwindow
  1462. // such as its default background color and relief. The
  1463. // panedwindow command returns the path name of the new window.
  1464. //
  1465. // A panedwindow widget contains any number of panes, arranged
  1466. // horizontally or vertically, according to the value of the
  1467. // panes is separated by a moveable (via mouse movements) sash. Moving a
  1468. // sash causes the widgets on either side of the sash to be resized.
  1469. //
  1470. // Use [Window.Panedwindow] to create a Panedwindow with a particular parent.
  1471. //
  1472. // More information might be available at the [Tcl/Tk panedwindow] page.
  1473. //
  1474. // # Standard options
  1475. //
  1476. // - [Background]
  1477. // - [Borderwidth]
  1478. // - [Cursor]
  1479. // - [Orient]
  1480. // - [Relief]
  1481. //
  1482. // # Widget specific options
  1483. //
  1484. // [Handlepad]
  1485. //
  1486. // When sash handles are drawn, specifies the distance from the top or
  1487. // left end of the sash (depending on the orientation of the widget) at
  1488. // which to draw the handle. May be any value accepted by Tk_GetPixels.
  1489. //
  1490. // [Handlesize]
  1491. //
  1492. // Specifies the side length of a sash handle. Handles are always
  1493. // drawn as squares. May be any value accepted by Tk_GetPixels.
  1494. //
  1495. // [Height]
  1496. //
  1497. // Specifies a desired height for the overall panedwindow widget. May be any
  1498. // value accepted by Tk_GetPixels. If an empty string, the widget will be
  1499. // made high enough to allow all contained widgets to have their natural height.
  1500. //
  1501. // [Opaqueresize]
  1502. //
  1503. // Specifies whether panes should be resized as a sash is moved (true),
  1504. // or if resizing should be deferred until the sash is placed (false).
  1505. // In the latter case, a
  1506. // version of the sash is displayed during the resizing to show where the
  1507. // panes will be resized to when releasing the mouse button. This
  1508. // version of the sash is the proxy. It's rendering can be configured
  1509. // using the -proxybackground, -proxyborderwidth and
  1510. // -proxyrelief options.
  1511. //
  1512. // [Proxybackground]
  1513. //
  1514. // Background color to use when drawing the proxy. If an empty string, the
  1515. // value of the -background option will be used.
  1516. //
  1517. // [Proxyborderwidth]
  1518. //
  1519. // Specifies the borderwidth of the proxy. May be any value accepted by
  1520. // Tk_GetPixels.
  1521. //
  1522. // [Proxyrelief]
  1523. //
  1524. // Relief to use when drawing the proxy. May be any of the standard Tk
  1525. // relief values. If an empty string, the value of the -sashrelief
  1526. // option will be used.
  1527. //
  1528. // [Sashcursor]
  1529. //
  1530. // Mouse cursor to use when over a sash. If null,
  1531. // sb_h_double_arrow will be used for horizontal panedwindows, and
  1532. // sb_v_double_arrow will be used for vertical panedwindows.
  1533. //
  1534. // [Sashpad]
  1535. //
  1536. // Specifies the amount of padding to leave of each side of a sash. May
  1537. // be any value accepted by Tk_GetPixels.
  1538. //
  1539. // [Sashrelief]
  1540. //
  1541. // Relief to use when drawing a sash. May be any of the standard Tk
  1542. // relief values.
  1543. //
  1544. // [Sashwidth]
  1545. //
  1546. // Specifies the width of each sash. May be any value accepted by
  1547. // Tk_GetPixels.
  1548. //
  1549. // [Showhandle]
  1550. //
  1551. // Specifies whether sash handles should be shown. May be any valid Tcl
  1552. // boolean value.
  1553. //
  1554. // [Width]
  1555. //
  1556. // Specifies a desired width for the overall panedwindow widget. May be any
  1557. // value accepted by Tk_GetPixels. If an empty string, the widget will be
  1558. // made wide enough to allow all contained widgets to have their natural width.
  1559. //
  1560. // [Tcl/Tk panedwindow]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/panedwindow.html
  1561. func Panedwindow(options ...Opt) *PanedwindowWidget {
  1562. return App.Panedwindow(options...)
  1563. }
  1564. // Panedwindow — Create and manipulate 'panedwindow' split container widgets
  1565. //
  1566. // The resulting [Window] is a child of 'w'
  1567. //
  1568. // For details please see [Panedwindow]
  1569. func (w *Window) Panedwindow(options ...Opt) *PanedwindowWidget {
  1570. return &PanedwindowWidget{w.newChild("panedwindow", options...)}
  1571. }
  1572. // PanedwindowWidget represents the Tcl/Tk panedwindow widget/window
  1573. type PanedwindowWidget struct {
  1574. *Window
  1575. }
  1576. // Radiobutton — Create and manipulate 'radiobutton' pick-one widgets
  1577. //
  1578. // # Description
  1579. //
  1580. // The radiobutton command creates a new window (given by the
  1581. // pathName argument) and makes it into a radiobutton widget.
  1582. // Additional
  1583. // options, described above, may be specified on the command line
  1584. // or in the option database
  1585. // to configure aspects of the radiobutton such as its colors, font,
  1586. // text, and initial relief. The radiobutton command returns its
  1587. // pathName argument. At the time this command is invoked,
  1588. // there must not exist a window named pathName, but
  1589. // pathName's parent must exist.
  1590. //
  1591. // A radiobutton is a widget that displays a textual string, bitmap or image
  1592. // and a diamond or circle called an indicator.
  1593. // If text is displayed, it must all be in a single font, but it
  1594. // can occupy multiple lines on the screen (if it contains newlines
  1595. // or if wrapping occurs because of the -wraplength option) and
  1596. // one of the characters may optionally be underlined using the
  1597. // all of the behavior of a simple button: it can display itself in either
  1598. // of three different ways, according to the -state option;
  1599. // it can be made to appear
  1600. // raised, sunken, or flat; it can be made to flash; and it invokes
  1601. // a Tcl command whenever mouse button 1 is clicked over the
  1602. // check button.
  1603. //
  1604. // In addition, radiobuttons can be selected.
  1605. // If a radiobutton is selected, the indicator is normally
  1606. // drawn with a selected appearance, and
  1607. // a Tcl variable associated with the radiobutton is set to a particular
  1608. // value (normally 1).
  1609. // Under Unix, the indicator is drawn with a sunken relief and a special
  1610. // color. Under Windows, the indicator is drawn with a round mark inside.
  1611. // If the radiobutton is not selected, then the indicator is drawn with a
  1612. // deselected appearance, and the associated variable is
  1613. // set to a different value (typically 0).
  1614. // The indicator is drawn without a round mark inside.
  1615. // Typically, several radiobuttons share a single variable and the
  1616. // value of the variable indicates which radiobutton is to be selected.
  1617. // When a radiobutton is selected it sets the value of the variable to
  1618. // indicate that fact; each radiobutton also monitors the value of
  1619. // the variable and automatically selects and deselects itself when the
  1620. // variable's value changes.
  1621. // If the variable's value matches the -tristatevalue, then the radiobutton
  1622. // is drawn using the tri-state mode. This mode is used to indicate mixed or
  1623. // multiple values. (This is used when the radiobutton represents the state
  1624. // of multiple items.)
  1625. // By default the variable selectedButton
  1626. // is used; its contents give the name of the button that is
  1627. // selected, or the empty string if no button associated with that
  1628. // variable is selected.
  1629. // The name of the variable for a radiobutton,
  1630. // plus the variable to be stored into it, may be modified with options
  1631. // on the command line or in the option database.
  1632. // Configuration options may also be used to modify the way the
  1633. // indicator is displayed (or whether it is displayed at all).
  1634. // By default a radiobutton is configured to select itself on button clicks.
  1635. //
  1636. // Use [Window.Radiobutton] to create a Radiobutton with a particular parent.
  1637. //
  1638. // More information might be available at the [Tcl/Tk radiobutton] page.
  1639. //
  1640. // # Standard options
  1641. //
  1642. // - [Activebackground]
  1643. // - [Activeforeground]
  1644. // - [Anchor]
  1645. // - [Background]
  1646. // - [Bitmap]
  1647. // - [Borderwidth]
  1648. // - [Compound]
  1649. // - [Cursor]
  1650. // - [Disabledforeground]
  1651. // - [Foreground]
  1652. // - [Highlightbackground]
  1653. // - [Highlightcolor]
  1654. // - [Highlightthickness]
  1655. // - [Image]
  1656. // - [Justify]
  1657. // - [Padx]
  1658. // - [Pady]
  1659. // - [Relief]
  1660. // - [Takefocus]
  1661. // - [Textvariable]
  1662. // - [Txt]
  1663. // - [Underline]
  1664. // - [Wraplength]
  1665. //
  1666. // # Widget specific options
  1667. //
  1668. // [Command]
  1669. //
  1670. // Specifies a Tcl command to associate with the button. This command
  1671. // is typically invoked when mouse button 1 is released over the button
  1672. // window. The button's global variable (-variable option) will
  1673. // be updated before the command is invoked.
  1674. //
  1675. // [Height]
  1676. //
  1677. // Specifies a desired height for the button.
  1678. // If an image or bitmap is being displayed in the button then the value is in
  1679. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  1680. // for text it is in lines of text.
  1681. // If this option is not specified, the button's desired height is computed
  1682. // from the size of the image or bitmap or text being displayed in it.
  1683. //
  1684. // [Indicatoron]
  1685. //
  1686. // Specifies whether or not the indicator should be drawn. Must be a
  1687. // proper boolean value. If false, the -relief option is
  1688. // ignored and the widget's relief is always sunken if the widget is
  1689. // selected and raised otherwise.
  1690. //
  1691. // [Offrelief]
  1692. //
  1693. // Specifies the relief for the checkbutton when the indicator is not drawn and
  1694. // the checkbutton is off. The default value is
  1695. // By setting this option to
  1696. // and setting -indicatoron to false and -overrelief to
  1697. // the effect is achieved
  1698. // of having a flat button that raises on mouse-over and which is
  1699. // depressed when activated. This is the behavior typically exhibited by
  1700. // the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a
  1701. // word-processor, for example.
  1702. //
  1703. // [Overrelief]
  1704. //
  1705. // Specifies an alternative relief for the radiobutton, to be used when the
  1706. // mouse cursor is over the widget. This option can be used to make
  1707. // toolbar buttons, by configuring -relief flat -overrelief
  1708. // raised. If the value of this option is the empty string, then no
  1709. // alternative relief is used when the mouse cursor is over the radiobutton.
  1710. // The empty string is the default value.
  1711. //
  1712. // [Selectcolor]
  1713. //
  1714. // Specifies a background color to use when the button is selected.
  1715. // If indicatorOn is true then the color is used as the background for
  1716. // the indicator regardless of the select state.
  1717. // If -indicatoron is false, this color is used as the background for the
  1718. // entire widget, in place of -background or -activeBackground,
  1719. // whenever the widget is selected.
  1720. // If specified as an empty string then no special color is used for
  1721. // displaying when the widget is selected.
  1722. //
  1723. // [Selectimage]
  1724. //
  1725. // Specifies an image to display (in place of the -image option)
  1726. // when the radiobutton is selected.
  1727. // This option is ignored unless the -image option has been
  1728. // specified.
  1729. //
  1730. // [State]
  1731. //
  1732. // Specifies one of three states for the radiobutton: normal, active,
  1733. // or disabled. In normal state the radiobutton is displayed using the
  1734. // -foreground and -background options. The active state is
  1735. // typically used when the pointer is over the radiobutton. In active state
  1736. // the radiobutton is displayed using the -activeforeground and
  1737. // -activebackground options. Disabled state means that the radiobutton
  1738. // should be insensitive: the default bindings will refuse to activate
  1739. // the widget and will ignore mouse button presses.
  1740. // In this state the -disabledforeground and
  1741. // -background options determine how the radiobutton is displayed.
  1742. //
  1743. // [Tristateimage]
  1744. //
  1745. // Specifies an image to display (in place of the -image option)
  1746. // when the radiobutton is selected.
  1747. // This option is ignored unless the -image option has been
  1748. // specified.
  1749. //
  1750. // [Tristatevalue]
  1751. //
  1752. // Specifies the value that causes the radiobutton to display the multi-value
  1753. // selection, also known as the tri-state mode. Defaults to
  1754. //
  1755. // [Value]
  1756. //
  1757. // Specifies value to store in the button's associated variable whenever
  1758. // this button is selected.
  1759. //
  1760. // [Variable]
  1761. //
  1762. // Specifies the name of a global variable to set whenever this button is
  1763. // selected. Changes in this variable also cause the button to select
  1764. // or deselect itself.
  1765. // Defaults to the value selectedButton.
  1766. //
  1767. // [Width]
  1768. //
  1769. // Specifies a desired width for the button.
  1770. // If an image or bitmap is being displayed in the button, the value is in
  1771. // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
  1772. // for text it is in characters.
  1773. // If this option is not specified, the button's desired width is computed
  1774. // from the size of the image or bitmap or text being displayed in it.
  1775. //
  1776. // [Tcl/Tk radiobutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/radiobutton.html
  1777. func Radiobutton(options ...Opt) *RadiobuttonWidget {
  1778. return App.Radiobutton(options...)
  1779. }
  1780. // Radiobutton — Create and manipulate 'radiobutton' pick-one widgets
  1781. //
  1782. // The resulting [Window] is a child of 'w'
  1783. //
  1784. // For details please see [Radiobutton]
  1785. func (w *Window) Radiobutton(options ...Opt) *RadiobuttonWidget {
  1786. return &RadiobuttonWidget{w.newChild("radiobutton", options...)}
  1787. }
  1788. // RadiobuttonWidget represents the Tcl/Tk radiobutton widget/window
  1789. type RadiobuttonWidget struct {
  1790. *Window
  1791. }
  1792. // Scale — Create and manipulate 'scale' value-controlled slider widgets
  1793. //
  1794. // # Description
  1795. //
  1796. // The scale command creates a new window (given by the
  1797. // pathName argument) and makes it into a scale widget.
  1798. // Additional
  1799. // options, described above, may be specified on the command line
  1800. // or in the option database
  1801. // to configure aspects of the scale such as its colors, orientation,
  1802. // and relief. The scale command returns its
  1803. // pathName argument. At the time this command is invoked,
  1804. // there must not exist a window named pathName, but
  1805. // pathName's parent must exist.
  1806. //
  1807. // A scale is a widget that displays a rectangular trough and a
  1808. // small slider. The trough corresponds to a range
  1809. // of real values (determined by the -from, -to, and
  1810. // and the position of the slider selects a particular real value.
  1811. // The slider's position (and hence the scale's value) may be adjusted
  1812. // with the mouse or keyboard as described in the BINDINGS
  1813. // section below. Whenever the scale's value is changed, a Tcl
  1814. // command is invoked (using the -command option) to notify
  1815. // other interested widgets of the change.
  1816. // In addition, the value
  1817. // of the scale can be linked to a Tcl variable (using the -variable
  1818. // option), so that changes in either are reflected in the other.
  1819. //
  1820. // Three annotations may be displayed in a scale widget: a label
  1821. // appearing at the top right of the widget (top left for horizontal
  1822. // scales), a number displayed just to the left of the slider
  1823. // (just above the slider for horizontal scales), and a collection
  1824. // of numerical tick marks just to the left of the current value
  1825. // (just below the trough for horizontal scales). Each of these three
  1826. // annotations may be enabled or disabled using the
  1827. // configuration options.
  1828. //
  1829. // Use [Window.Scale] to create a Scale with a particular parent.
  1830. //
  1831. // More information might be available at the [Tcl/Tk scale] page.
  1832. //
  1833. // # Standard options
  1834. //
  1835. // - [Activebackground]
  1836. // - [Background]
  1837. // - [Borderwidth]
  1838. // - [Cursor]
  1839. // - [Foreground]
  1840. // - [Highlightbackground]
  1841. // - [Highlightcolor]
  1842. // - [Highlightthickness]
  1843. // - [Orient]
  1844. // - [Relief]
  1845. // - [Repeatdelay]
  1846. // - [Repeatinterval]
  1847. // - [Takefocus]
  1848. // - [Troughcolor]
  1849. //
  1850. // # Widget specific options
  1851. //
  1852. // [Bigincrement]
  1853. //
  1854. // Some interactions with the scale cause its value to change by
  1855. // increments; this option specifies the size of the
  1856. // large increments. If specified as 0, the large increments default
  1857. // to 1/10 the range of the scale.
  1858. //
  1859. // [Command]
  1860. //
  1861. // Specifies the prefix of a Tcl command to invoke whenever the scale's
  1862. // value is changed via a widget command.
  1863. // The actual command consists
  1864. // of this option followed by a space and a real number indicating the
  1865. // new value of the scale.
  1866. //
  1867. // [Digits]
  1868. //
  1869. // An integer specifying how many significant digits should be retained
  1870. // when converting the value of the scale to a string.
  1871. // If the number is negative or zero, then the scale picks
  1872. // the smallest value that guarantees that every possible slider
  1873. // position prints as a different string.
  1874. //
  1875. // [From]
  1876. //
  1877. // A real value corresponding to the left or top end of the scale.
  1878. //
  1879. // [Lbl]
  1880. //
  1881. // A string to display as a label for the scale. For
  1882. // vertical scales the label is displayed just to the right of the
  1883. // top end of the scale. For horizontal scales the label is displayed
  1884. // just above the left end of the scale. If the option is specified
  1885. // as an empty string, no label is displayed.
  1886. //
  1887. // [Length]
  1888. //
  1889. // Specifies the desired long dimension of the scale in screen units
  1890. // (i.e. any of the forms acceptable to Tk_GetPixels).
  1891. // For vertical scales this is the scale's height; for horizontal scales
  1892. // it is the scale's width.
  1893. //
  1894. // [Resolution]
  1895. //
  1896. // A real value specifying the resolution for the scale.
  1897. // If this value is greater than zero then the scale's value will always be
  1898. // rounded to an even multiple of this value, as will
  1899. // the endpoints of the scale. If the value is negative then no
  1900. // rounding occurs. Defaults to 1 (i.e., the value will be integral).
  1901. //
  1902. // [Showvalue]
  1903. //
  1904. // Specifies a boolean value indicating whether or not the current
  1905. // value of the scale is to be displayed.
  1906. //
  1907. // [Sliderlength]
  1908. //
  1909. // Specifies the size of the slider, measured in screen units along the slider's
  1910. // long dimension. The value may be specified in any of the forms acceptable
  1911. // to Tk_GetPixels.
  1912. //
  1913. // [Sliderrelief]
  1914. //
  1915. // Specifies the relief to use when drawing the slider, such as raised
  1916. // or sunken.
  1917. //
  1918. // [State]
  1919. //
  1920. // Specifies one of three states for the scale: normal,
  1921. // active, or disabled.
  1922. // If the scale is disabled then the value may not be changed and the scale
  1923. // will not activate.
  1924. // If the scale is active, the slider is displayed using the color
  1925. // specified by the -activebackground option.
  1926. //
  1927. // [Tickinterval]
  1928. //
  1929. // Must be a real value.
  1930. // Determines the spacing between numerical
  1931. // tick marks displayed below or to the left of the slider. The values will all
  1932. // be displayed with the same number of decimal places, which will be enough to
  1933. // ensure they are all accurate to within 20% of a tick interval.
  1934. // If 0, no tick marks will be displayed.
  1935. //
  1936. // [To]
  1937. //
  1938. // Specifies a real value corresponding
  1939. // to the right or bottom end of the scale.
  1940. // This value may be either less than or greater than the -from option.
  1941. //
  1942. // [Variable]
  1943. //
  1944. // Specifies the name of a global variable to link to the scale. Whenever the
  1945. // value of the variable changes, the scale will update to reflect this
  1946. // value.
  1947. // Whenever the scale is manipulated interactively, the variable
  1948. // will be modified to reflect the scale's new value.
  1949. //
  1950. // [Width]
  1951. //
  1952. // Specifies the desired narrow dimension of the scale in screen units
  1953. // (i.e. any of the forms acceptable to Tk_GetPixels).
  1954. // For vertical scales this is the scale's width; for horizontal scales
  1955. // this is the scale's height.
  1956. //
  1957. // [Tcl/Tk scale]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/scale.html
  1958. func Scale(options ...Opt) *ScaleWidget {
  1959. return App.Scale(options...)
  1960. }
  1961. // Scale — Create and manipulate 'scale' value-controlled slider widgets
  1962. //
  1963. // The resulting [Window] is a child of 'w'
  1964. //
  1965. // For details please see [Scale]
  1966. func (w *Window) Scale(options ...Opt) *ScaleWidget {
  1967. return &ScaleWidget{w.newChild("scale", options...)}
  1968. }
  1969. // ScaleWidget represents the Tcl/Tk scale widget/window
  1970. type ScaleWidget struct {
  1971. *Window
  1972. }
  1973. // Scrollbar — Create and manipulate 'scrollbar' scrolling control and indicator widgets
  1974. //
  1975. // # Description
  1976. //
  1977. // The scrollbar command creates a new window (given by the
  1978. // pathName argument) and makes it into a scrollbar widget.
  1979. // Additional options, described above, may be specified on the command
  1980. // line or in the option database to configure aspects of the scrollbar
  1981. // such as its colors, orientation, and relief.
  1982. // The scrollbar command returns its pathName argument.
  1983. // At the time this command is invoked, there must not exist a window
  1984. // named pathName, but pathName's parent must exist.
  1985. //
  1986. // A scrollbar is a widget that displays two arrows, one at each end of
  1987. // the scrollbar, and a slider in the middle portion of the
  1988. // scrollbar.
  1989. // It provides information about what is visible in an associated window
  1990. // that displays a document of some sort (such as a file being edited or
  1991. // a drawing).
  1992. // The position and size of the slider indicate which portion of the
  1993. // document is visible in the associated window. For example, if the
  1994. // slider in a vertical scrollbar covers the top third of the area
  1995. // between the two arrows, it means that the associated window displays
  1996. // the top third of its document.
  1997. //
  1998. // Scrollbars can be used to adjust the view in the associated window
  1999. // by clicking or dragging with the mouse. See the BINDINGS section
  2000. // below for details.
  2001. //
  2002. // Use [Window.Scrollbar] to create a Scrollbar with a particular parent.
  2003. //
  2004. // More information might be available at the [Tcl/Tk scrollbar] page.
  2005. //
  2006. // # Standard options
  2007. //
  2008. // - [Activebackground]
  2009. // - [Background]
  2010. // - [Borderwidth]
  2011. // - [Cursor]
  2012. // - [Highlightbackground]
  2013. // - [Highlightcolor]
  2014. // - [Highlightthickness]
  2015. // - [Jump]
  2016. // - [Orient]
  2017. // - [Relief]
  2018. // - [Repeatdelay]
  2019. // - [Repeatinterval]
  2020. // - [Takefocus]
  2021. // - [Troughcolor]
  2022. //
  2023. // # Widget specific options
  2024. //
  2025. // [Activerelief]
  2026. //
  2027. // Specifies the relief to use when displaying the element that is
  2028. // active, if any.
  2029. // Elements other than the active element are always displayed with
  2030. // a raised relief.
  2031. //
  2032. // [Command]
  2033. //
  2034. // Specifies the prefix of a Tcl command to invoke to change the view
  2035. // in the widget associated with the scrollbar. When a user requests
  2036. // a view change by manipulating the scrollbar, a Tcl command is
  2037. // invoked. The actual command consists of this option followed by
  2038. // additional information as described later. This option almost always has
  2039. // a value such as .t xview or .t yview, consisting of the
  2040. // name of a widget and either xview (if the scrollbar is for
  2041. // horizontal scrolling) or yview (for vertical scrolling).
  2042. // All scrollable widgets have xview and yview commands
  2043. // that take exactly the additional arguments appended by the scrollbar
  2044. // as described in SCROLLING COMMANDS below.
  2045. //
  2046. // [Elementborderwidth]
  2047. //
  2048. // Specifies the width of borders drawn around the internal elements
  2049. // of the scrollbar (the two arrows and the slider). The value may
  2050. // have any of the forms acceptable to Tk_GetPixels.
  2051. // If this value is the empty string (the default), the value of
  2052. // the -borderwidth option is used in its place.
  2053. //
  2054. // [Width]
  2055. //
  2056. // Specifies the desired narrow dimension of the scrollbar window,
  2057. // not including 3-D border, if any. For vertical
  2058. // scrollbars this will be the width and for horizontal scrollbars
  2059. // this will be the height.
  2060. // The value may have any of the forms acceptable to Tk_GetPixels.
  2061. //
  2062. // [Tcl/Tk scrollbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/scrollbar.html
  2063. func Scrollbar(options ...Opt) *ScrollbarWidget {
  2064. return App.Scrollbar(options...)
  2065. }
  2066. // Scrollbar — Create and manipulate 'scrollbar' scrolling control and indicator widgets
  2067. //
  2068. // The resulting [Window] is a child of 'w'
  2069. //
  2070. // For details please see [Scrollbar]
  2071. func (w *Window) Scrollbar(options ...Opt) *ScrollbarWidget {
  2072. return &ScrollbarWidget{w.newChild("scrollbar", options...)}
  2073. }
  2074. // ScrollbarWidget represents the Tcl/Tk scrollbar widget/window
  2075. type ScrollbarWidget struct {
  2076. *Window
  2077. }
  2078. // Spinbox — Create and manipulate 'spinbox' value spinner widgets
  2079. //
  2080. // # Description
  2081. //
  2082. // The spinbox command creates a new window (given by the
  2083. // pathName argument) and makes it into a spinbox widget.
  2084. // Additional options, described above, may be specified on the
  2085. // command line or in the option database
  2086. // to configure aspects of the spinbox such as its colors, font,
  2087. // and relief. The spinbox command returns its
  2088. // pathName argument. At the time this command is invoked,
  2089. // there must not exist a window named pathName, but
  2090. // pathName's parent must exist.
  2091. //
  2092. // A spinbox is an extended entry widget that allows he user
  2093. // to move, or spin, through a fixed set of ascending or descending values
  2094. // such as times or dates in addition to editing the value as in an
  2095. // entry. When first created, a spinbox's string is empty.
  2096. // A portion of the spinbox may be selected as described below.
  2097. // If a spinbox is exporting its selection (see the -exportselection
  2098. // option), then it will observe the standard protocols for handling the
  2099. // selection; spinbox selections are available as type STRING.
  2100. // Spinboxes also observe the standard Tk rules for dealing with the
  2101. // input focus. When a spinbox has the input focus it displays an
  2102. // insertion cursor to indicate where new characters will be
  2103. // inserted.
  2104. //
  2105. // Spinboxes are capable of displaying strings that are too long to
  2106. // fit entirely within the widget's window. In this case, only a
  2107. // portion of the string will be displayed; commands described below
  2108. // may be used to change the view in the window. Spinboxes use
  2109. // the standard -xscrollcommand mechanism for interacting with
  2110. // scrollbars (see the description of the -xscrollcommand option
  2111. // for details). They also support scanning, as described below.
  2112. //
  2113. // Use [Window.Spinbox] to create a Spinbox with a particular parent.
  2114. //
  2115. // More information might be available at the [Tcl/Tk spinbox] page.
  2116. //
  2117. // # Standard options
  2118. //
  2119. // - [Activebackground]
  2120. // - [Background]
  2121. // - [Borderwidth]
  2122. // - [Cursor]
  2123. // - [Exportselection]
  2124. // - [Foreground]
  2125. // - [Highlightbackground]
  2126. // - [Highlightcolor]
  2127. // - [Highlightthickness]
  2128. // - [Insertbackground]
  2129. // - [Insertborderwidth]
  2130. // - [Insertofftime]
  2131. // - [Insertontime]
  2132. // - [Insertwidth]
  2133. // - [Justify]
  2134. // - [Placeholder]
  2135. // - [Placeholderforeground]
  2136. // - [Relief]
  2137. // - [Repeatdelay]
  2138. // - [Repeatinterval]
  2139. // - [Selectbackground]
  2140. // - [Selectborderwidth]
  2141. // - [Selectforeground]
  2142. // - [Takefocus]
  2143. // - [Textvariable]
  2144. // - [Xscrollcommand]
  2145. //
  2146. // # Widget specific options
  2147. //
  2148. // [Buttonbackground]
  2149. //
  2150. // The background color to be used for the spin buttons.
  2151. //
  2152. // [Buttoncursor]
  2153. //
  2154. // The cursor to be used when over the spin buttons. If this is empty
  2155. // (the default), a default cursor will be used.
  2156. //
  2157. // [Buttondownrelief]
  2158. //
  2159. // The relief to be used for the upper spin button.
  2160. //
  2161. // [Buttonuprelief]
  2162. //
  2163. // The relief to be used for the lower spin button.
  2164. //
  2165. // [Command]
  2166. //
  2167. // Specifies a Tcl command to invoke whenever a spinbutton is invoked.
  2168. // The command recognizes several percent substitutions: %W for
  2169. // the widget path, %s for the current value of the widget, and
  2170. // %d for the direction of the button pressed (up or down).
  2171. //
  2172. // [Disabledbackground]
  2173. //
  2174. // Specifies the background color to use when the spinbox is disabled. If
  2175. // this option is the empty string, the normal background color is used.
  2176. //
  2177. // [Disabledforeground]
  2178. //
  2179. // Specifies the foreground color to use when the spinbox is disabled. If
  2180. // this option is the empty string, the normal foreground color is used.
  2181. //
  2182. // [Format]
  2183. //
  2184. // Specifies an alternate format to use when setting the string value
  2185. // when using the -from and -to range.
  2186. // This must be a format specifier of the form %<pad>.<pad>f,
  2187. // as it will format a floating-point number.
  2188. //
  2189. // [From]
  2190. //
  2191. // A floating-point value corresponding to the lowest value for a spinbox, to
  2192. // be used in conjunction with -to and -increment. When all
  2193. // are specified correctly, the spinbox will use these values to control its
  2194. // contents. If this value is greater than the -to option, then
  2195. // -from and -to values are automatically swapped.
  2196. // If -values is specified, it supersedes this option.
  2197. //
  2198. // [Invalidcommand]
  2199. //
  2200. // Specifies a script to eval when -validatecommand returns 0. Setting
  2201. // it to an empty string disables this feature (the default). The best use of
  2202. // this option is to set it to bell. See VALIDATION below for
  2203. // more information.
  2204. //
  2205. // [Increment]
  2206. //
  2207. // A floating-point value specifying the increment. When used with
  2208. // -from and -to, the value in the widget will be adjusted by
  2209. // -increment when a spin button is pressed (up adds the value,
  2210. // down subtracts the value).
  2211. //
  2212. // [Readonlybackground]
  2213. //
  2214. // Specifies the background color to use when the spinbox is readonly. If
  2215. // this option is the empty string, the normal background color is used.
  2216. //
  2217. // [State]
  2218. //
  2219. // Specifies one of three states for the spinbox: normal,
  2220. // disabled, or readonly. If the spinbox is readonly, then the
  2221. // value may not be changed using widget commands and no insertion cursor
  2222. // will be displayed, even if the input focus is in the widget; the
  2223. // contents of the widget may still be selected. If the spinbox is
  2224. // disabled, the value may not be changed, no insertion cursor will be
  2225. // displayed, the contents will not be selectable, and the spinbox may
  2226. // be displayed in a different color, depending on the values of the
  2227. // -disabledforeground and -disabledbackground options.
  2228. //
  2229. // [To]
  2230. //
  2231. // A floating-point value corresponding to the highest value for the spinbox,
  2232. // to be used in conjunction with -from and -increment. When
  2233. // all are specified correctly, the spinbox will use these values to control
  2234. // its contents. If this value is less than the -from option, then
  2235. // -from and -to values are automatically swapped.
  2236. // If -values is specified, it supersedes this option.
  2237. //
  2238. // [Validate]
  2239. //
  2240. // Specifies the mode in which validation should operate: none,
  2241. // focus, focusin, focusout, key, or all.
  2242. // It defaults to none. When you want validation, you must explicitly
  2243. // state which mode you wish to use. See VALIDATION below for more.
  2244. //
  2245. // [Validatecommand]
  2246. //
  2247. // Specifies a script to evaluate when you want to validate the input in the
  2248. // widget. Setting it to an empty string disables this feature (the default).
  2249. // Validation occurs according to the value of -validate.
  2250. // This command must return a valid Tcl boolean value. If it returns 0 (or
  2251. // the valid Tcl boolean equivalent) then the value of the widget will not
  2252. // change and the -invalidcommand will be evaluated if it is set. If it
  2253. // returns 1, then value will be changed.
  2254. // See VALIDATION below for more information.
  2255. //
  2256. // [Values]
  2257. //
  2258. // Must be a proper list value. If specified, the spinbox will use these
  2259. // values as to control its contents, starting with the first value. This
  2260. // option has precedence over the -from and -to range.
  2261. //
  2262. // [Width]
  2263. //
  2264. // Specifies an integer value indicating the desired width of the spinbox window,
  2265. // in average-size characters of the widget's font.
  2266. // If the value is negative or zero, the widget picks a
  2267. // size just large enough to hold its current text.
  2268. //
  2269. // [Wrap]
  2270. //
  2271. // Must be a proper boolean value. If on, the spinbox will wrap around the
  2272. // values of data in the widget.
  2273. //
  2274. // [Tcl/Tk spinbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/spinbox.html
  2275. func Spinbox(options ...Opt) *SpinboxWidget {
  2276. return App.Spinbox(options...)
  2277. }
  2278. // Spinbox — Create and manipulate 'spinbox' value spinner widgets
  2279. //
  2280. // The resulting [Window] is a child of 'w'
  2281. //
  2282. // For details please see [Spinbox]
  2283. func (w *Window) Spinbox(options ...Opt) *SpinboxWidget {
  2284. return &SpinboxWidget{w.newChild("spinbox", options...)}
  2285. }
  2286. // SpinboxWidget represents the Tcl/Tk spinbox widget/window
  2287. type SpinboxWidget struct {
  2288. *Window
  2289. }
  2290. // Text — Create and manipulate 'text' hypertext editing widgets
  2291. //
  2292. // # Description
  2293. //
  2294. // The text command creates a new window (given by the pathName
  2295. // argument) and makes it into a text widget. Additional options, described
  2296. // above, may be specified on the command line or in the option database to
  2297. // configure aspects of the text such as its default background color and relief.
  2298. // The text command returns the path name of the new window.
  2299. //
  2300. // A text widget displays one or more lines of text and allows that text to be
  2301. // edited. Text widgets support four different kinds of annotations on the text,
  2302. // called tags, marks, embedded windows or embedded images. Tags allow different
  2303. // portions of the text to be displayed with different fonts and colors. In
  2304. // addition, Tcl commands can be associated with tags so that scripts are invoked
  2305. // when particular actions such as keystrokes and mouse button presses occur in
  2306. // particular ranges of the text. See TAGS below for more details.
  2307. //
  2308. // The second form of annotation consists of floating markers in the text called
  2309. // marks .
  2310. // Marks are used to keep track of various interesting positions in the text as
  2311. // it is edited. See MARKS below for more details.
  2312. //
  2313. // The third form of annotation allows arbitrary windows to be embedded in a text
  2314. // widget. See EMBEDDED WINDOWS below for more details.
  2315. //
  2316. // The fourth form of annotation allows Tk images to be embedded in a text
  2317. // widget. See EMBEDDED IMAGES below for more details.
  2318. //
  2319. // The text widget also has a built-in undo/redo mechanism. See
  2320. // THE UNDO MECHANISM below for more details.
  2321. //
  2322. // The text widget allows for the creation of peer widgets. These are other text
  2323. // widgets which share the same underlying data (text, marks, tags, images, etc).
  2324. // See PEER WIDGETS below for more details.
  2325. //
  2326. // Use [Window.Text] to create a Text with a particular parent.
  2327. //
  2328. // More information might be available at the [Tcl/Tk text] page.
  2329. //
  2330. // # Standard options
  2331. //
  2332. // - [Background]
  2333. // - [Borderwidth]
  2334. // - [Cursor]
  2335. // - [Exportselection]
  2336. // - [Foreground]
  2337. // - [Highlightbackground]
  2338. // - [Highlightcolor]
  2339. // - [Highlightthickness]
  2340. // - [Insertbackground]
  2341. // - [Insertborderwidth]
  2342. // - [Insertofftime]
  2343. // - [Insertontime]
  2344. // - [Insertwidth]
  2345. // - [Padx]
  2346. // - [Pady]
  2347. // - [Relief]
  2348. // - [Selectbackground]
  2349. // - [Selectborderwidth]
  2350. // - [Selectforeground]
  2351. // - [Setgrid]
  2352. // - [Takefocus]
  2353. // - [Xscrollcommand]
  2354. // - [Yscrollcommand]
  2355. //
  2356. // # Widget specific options
  2357. //
  2358. // [Autoseparators]
  2359. //
  2360. // Specifies a boolean that says whether separators are automatically inserted in
  2361. // the undo stack. Only meaningful when the -undo option is true.
  2362. //
  2363. // [Blockcursor]
  2364. //
  2365. // Specifies a boolean that says whether the blinking insertion cursor should be
  2366. // drawn as a character-sized rectangular block. If false (the default) a thin
  2367. // vertical line is used for the insertion cursor.
  2368. //
  2369. // [Endline]
  2370. //
  2371. // Specifies an integer line index representing the line of the underlying
  2372. // textual data store that should be just after the last line contained in
  2373. // the widget. This allows a text widget to reflect only a portion of a
  2374. // larger piece of text. Instead of an integer, the empty string can be
  2375. // provided to this configuration option, which will configure the widget
  2376. // to end at the very last line in the textual data store.
  2377. //
  2378. // [Height]
  2379. //
  2380. // Specifies the desired height for the window, in units of characters in the
  2381. // font given by the -font option. Must be at least one.
  2382. //
  2383. // [Inactiveselectbackground]
  2384. //
  2385. // Specifies the colour to use for the selection (the sel tag) when the
  2386. // window does not have the input focus. If empty, {}, then no selection is
  2387. // shown when the window does not have the focus.
  2388. //
  2389. // [Insertunfocussed]
  2390. //
  2391. // Specifies how to display the insertion cursor when the widget does not have
  2392. // the focus. Must be none (the default) which means to not display the
  2393. // cursor, hollow which means to display a hollow box, or solid which
  2394. // means to display a solid box. Note that hollow and solid will
  2395. // appear very similar when the -blockcursor option is false.
  2396. //
  2397. // [Maxundo]
  2398. //
  2399. // Specifies the maximum number of compound undo actions on the undo stack. A
  2400. // zero or a negative value imply an unlimited undo stack.
  2401. //
  2402. // [Spacing1]
  2403. //
  2404. // Requests additional space above each text line in the widget, using any of the
  2405. // standard forms for screen distances. If a line wraps, this option only applies
  2406. // to the first line on the display. This option may be overridden with
  2407. // -spacing1 options in tags.
  2408. //
  2409. // [Spacing2]
  2410. //
  2411. // For lines that wrap (so that they cover more than one line on the display)
  2412. // this option specifies additional space to provide between the display lines
  2413. // that represent a single line of text. The value may have any of the standard
  2414. // forms for screen distances. This option may be overridden with
  2415. // -spacing2 options in tags.
  2416. //
  2417. // [Spacing3]
  2418. //
  2419. // Requests additional space below each text line in the widget, using any of the
  2420. // standard forms for screen distances. If a line wraps, this option only applies
  2421. // to the last line on the display. This option may be overridden with
  2422. // -spacing3 options in tags.
  2423. //
  2424. // [Startline]
  2425. //
  2426. // Specifies an integer line index representing the first line of the underlying
  2427. // textual data store that should be contained in the widget. This allows a text
  2428. // widget to reflect only a portion of a larger piece of text. Instead of an
  2429. // integer, the empty string can be provided to this configuration option, which
  2430. // will configure the widget to start at the very first line in the textual data
  2431. // store.
  2432. //
  2433. // [State]
  2434. //
  2435. // Specifies one of two states for the text: normal or disabled. If
  2436. // the text is disabled then characters may not be inserted or deleted and no
  2437. // insertion cursor will be displayed, even if the input focus is in the widget.
  2438. //
  2439. // [Tabs]
  2440. //
  2441. // Specifies a set of tab stops for the window. The option's value consists of a
  2442. // list of screen distances giving the positions of the tab stops, each of which
  2443. // is a distance relative to the left edge of the widget (excluding borders,
  2444. // padding, etc). Each position may optionally be followed in the next list
  2445. // element by one of the keywords left, right, center, or
  2446. // numeric, which specifies how to justify text relative to the tab stop.
  2447. // Left is the default; it causes the text following the tab character to
  2448. // be positioned with its left edge at the tab position. Right means that
  2449. // the right edge of the text following the tab character is positioned at the
  2450. // tab position, and center means that the text is centered at the tab
  2451. // position. Numeric means that the decimal point in the text is positioned
  2452. // at the tab position; if there is no decimal point then the least significant
  2453. // digit of the number is positioned just to the left of the tab position; if
  2454. // there is no number in the text then the text is right-justified at the tab
  2455. // position. For example,
  2456. // creates three tab stops at two-centimeter intervals; the first two use left
  2457. // justification and the third uses center justification.
  2458. //
  2459. // [Tabstyle]
  2460. //
  2461. // Specifies how to interpret the relationship between tab stops on a line and
  2462. // tabs in the text of that line. The value must be tabular (the default)
  2463. // or wordprocessor. Note that tabs are interpreted as they are encountered
  2464. // in the text. If the tab style is tabular then the n'th tab
  2465. // character in the line's text will be associated with the n'th tab stop
  2466. // defined for that line. If the tab character's x coordinate falls to the right
  2467. // of the n'th tab stop, then a gap of a single space will be inserted as a
  2468. // fallback. If the tab style is wordprocessor then any tab character being
  2469. // laid out will use (and be defined by) the first tab stop to the right of the
  2470. // preceding characters already laid out on that line. The value of the
  2471. // -tabstyle option may be overridden by -tabstyle options in tags.
  2472. //
  2473. // [Undo]
  2474. //
  2475. // Specifies a boolean that says whether the undo mechanism is active or not.
  2476. //
  2477. // [Width]
  2478. //
  2479. // Specifies the desired width for the window in units of characters in the font
  2480. // given by the -font option. If the font does not have a uniform width
  2481. // then the width of the character
  2482. // is used in translating from character units to screen units.
  2483. //
  2484. // [Wrap]
  2485. //
  2486. // Specifies how to handle lines in the text that are too long to be displayed in
  2487. // a single line of the text's window. The value must be none or char
  2488. // or word. A wrap mode of none means that each line of text appears
  2489. // as exactly one line on the screen; extra characters that do not fit on the
  2490. // screen are not displayed. In the other modes each line of text will be broken
  2491. // up into several screen lines if necessary to keep all the characters visible.
  2492. // In char mode a screen line break may occur after any character; in
  2493. // word mode a line break will only be made at word boundaries.
  2494. //
  2495. // [Tcl/Tk text]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/text.html
  2496. func Text(options ...Opt) *TextWidget {
  2497. return App.Text(options...)
  2498. }
  2499. // Text — Create and manipulate 'text' hypertext editing widgets
  2500. //
  2501. // The resulting [Window] is a child of 'w'
  2502. //
  2503. // For details please see [Text]
  2504. func (w *Window) Text(options ...Opt) *TextWidget {
  2505. return &TextWidget{w.newChild("text", options...)}
  2506. }
  2507. // TextWidget represents the Tcl/Tk text widget/window
  2508. type TextWidget struct {
  2509. *Window
  2510. }
  2511. // Toplevel — Create and manipulate 'toplevel' main and popup window widgets
  2512. //
  2513. // # Description
  2514. //
  2515. // The toplevel command creates a new toplevel widget (given
  2516. // by the pathName argument). Additional
  2517. // options, described above, may be specified on the command line
  2518. // or in the option database
  2519. // to configure aspects of the toplevel such as its background color
  2520. // and relief. The toplevel command returns the
  2521. // path name of the new window.
  2522. //
  2523. // A toplevel is similar to a frame except that it is created as a
  2524. // top-level window: its X parent is the root window of a screen
  2525. // rather than the logical parent from its Tk path name. The primary
  2526. // purpose of a toplevel is to serve as a container for dialog boxes
  2527. // and other collections of widgets. The only visible features
  2528. // of a toplevel are its background and an optional 3-D border
  2529. // to make the toplevel appear raised or sunken.
  2530. //
  2531. // Use [Window.Toplevel] to create a Toplevel with a particular parent.
  2532. //
  2533. // More information might be available at the [Tcl/Tk toplevel] page.
  2534. //
  2535. // # Standard options
  2536. //
  2537. // - [Borderwidth]
  2538. // - [Cursor]
  2539. // - [Highlightbackground]
  2540. // - [Highlightcolor]
  2541. // - [Highlightthickness]
  2542. // - [Padx]
  2543. // - [Pady]
  2544. // - [Relief]
  2545. // - [Takefocus]
  2546. //
  2547. // # Widget specific options
  2548. //
  2549. // [Background]
  2550. //
  2551. // This option is the same as the standard -background option
  2552. // except that its value may also be specified as an empty string.
  2553. // In this case, the widget will display no background or border, and
  2554. // no colors will be consumed from its colormap for its background
  2555. // and border.
  2556. // An empty background will disable drawing the background image.
  2557. //
  2558. // [Backgroundimage]
  2559. //
  2560. // This specifies an image to display on the toplevel's background within
  2561. // the border of the toplevel (i.e., the image will be clipped by the
  2562. // toplevel's highlight ring and border, if either are present) on top of
  2563. // the background;
  2564. // subwidgets of the toplevel will be drawn on top. The image must have
  2565. // been created with the image create command. If specified as the
  2566. // empty string, no image will be displayed.
  2567. //
  2568. // [Class]
  2569. //
  2570. // Specifies a class for the window.
  2571. // This class will be used when querying the option database for
  2572. // the window's other options, and it will also be used later for
  2573. // other purposes such as bindings. Some window managers display the
  2574. // class name for windows in their dock while some others display the
  2575. // window title.
  2576. // The -class option may not be changed with the configure
  2577. // widget command.
  2578. //
  2579. // [Colormap]
  2580. //
  2581. // Specifies a colormap to use for the window.
  2582. // The value may be either new, in which case a new colormap is
  2583. // created for the window and its children, or the name of another
  2584. // window (which must be on the same screen and have the same visual
  2585. // as pathName), in which case the new window will use the colormap
  2586. // from the specified window.
  2587. // If the -colormap option is not specified, the new window
  2588. // uses the default colormap of its screen.
  2589. // This option may not be changed with the configure
  2590. // widget command.
  2591. //
  2592. // [Container]
  2593. //
  2594. // The value must be a boolean. If true, it means that this window will
  2595. // be used as a container in which some other application will be embedded
  2596. // (for example, a Tk toplevel can be embedded using the -use option).
  2597. // The window will support the appropriate window manager protocols for
  2598. // things like geometry requests. The window should not have any
  2599. // children of its own in this application.
  2600. // This option may not be changed with the configure
  2601. // widget command.
  2602. //
  2603. // [Height]
  2604. //
  2605. // Specifies the desired height for the window in any of the forms
  2606. // acceptable to Tk_GetPixels.
  2607. // If this option is negative or zero then the window will
  2608. // not request any size at all.
  2609. //
  2610. // [Mnu]
  2611. //
  2612. // Specifies a menu widget to be used as a menubar. On the Macintosh, the
  2613. // menubar will be displayed across the top of the main monitor. On
  2614. // Microsoft Windows and all UNIX platforms, the menu will appear across
  2615. // the toplevel window as part of the window dressing maintained by the
  2616. // window manager.
  2617. //
  2618. // [Screen]
  2619. //
  2620. // Specifies the screen on which to place the new window.
  2621. // Any valid screen name may be used, even one associated with a
  2622. // different display.
  2623. // Defaults to the same screen as its parent.
  2624. // This option is special in that it may not be specified via the option
  2625. // database, and it may not be modified with the configure
  2626. // widget command.
  2627. //
  2628. // [Tile]
  2629. //
  2630. // This specifies how to draw the background image (see
  2631. // -backgroundimage) on the toplevel.
  2632. // If true (according to Tcl_GetBoolean), the image will be tiled
  2633. // to fill the whole toplevel, with the origin of the first copy of the
  2634. // image being the top left of the interior of the toplevel.
  2635. // If false (the default), the image will be centered within the toplevel.
  2636. //
  2637. // [Use]
  2638. //
  2639. // This option is used for embedding. If the value is not an empty string,
  2640. // it must be the window identifier of a container window, specified as
  2641. // a hexadecimal string like the ones returned by the winfo id
  2642. // command. The toplevel widget will be created as a child of the given
  2643. // container instead of the root window for the screen. If the container
  2644. // window is in a Tk application, it must be a frame or toplevel widget for
  2645. // which the -container option was specified.
  2646. // This option may not be changed with the configure
  2647. // widget command.
  2648. //
  2649. // [Visual]
  2650. //
  2651. // Specifies visual information for the new window in any of the
  2652. // forms accepted by Tk_GetVisual.
  2653. // If this option is not specified, the new window will use the default
  2654. // visual for its screen.
  2655. // The -visual option may not be modified with the configure
  2656. // widget command.
  2657. //
  2658. // [Width]
  2659. //
  2660. // Specifies the desired width for the window in any of the forms
  2661. // acceptable to Tk_GetPixels.
  2662. // If this option is negative or zero then the window will
  2663. // not request any size at all.
  2664. //
  2665. // [Tcl/Tk toplevel]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/toplevel.html
  2666. func Toplevel(options ...Opt) *ToplevelWidget {
  2667. return App.Toplevel(options...)
  2668. }
  2669. // Toplevel — Create and manipulate 'toplevel' main and popup window widgets
  2670. //
  2671. // The resulting [Window] is a child of 'w'
  2672. //
  2673. // For details please see [Toplevel]
  2674. func (w *Window) Toplevel(options ...Opt) *ToplevelWidget {
  2675. return &ToplevelWidget{w.newChild("toplevel", options...)}
  2676. }
  2677. // ToplevelWidget represents the Tcl/Tk toplevel widget/window
  2678. type ToplevelWidget struct {
  2679. *Window
  2680. }
  2681. // TButton — Widget that issues a command when pressed
  2682. //
  2683. // # Description
  2684. //
  2685. // A ttk::button widget displays a textual label and/or image,
  2686. // and evaluates a command when pressed.
  2687. //
  2688. // Use [Window.TButton] to create a TButton with a particular parent.
  2689. //
  2690. // More information might be available at the [Tcl/Tk ttk_button] page.
  2691. //
  2692. // # Standard options
  2693. //
  2694. // - [Class]
  2695. // - [Compound]
  2696. // - [Cursor]
  2697. // - [Image]
  2698. // - [Justify]
  2699. // - [State]
  2700. // - [Style]
  2701. // - [Takefocus]
  2702. // - [Textvariable]
  2703. // - [Txt]
  2704. // - [Underline]
  2705. // - [Width]
  2706. //
  2707. // # Widget specific options
  2708. //
  2709. // [Command]
  2710. //
  2711. // A script to evaluate when the widget is invoked.
  2712. //
  2713. // [Default]
  2714. //
  2715. // May be set to one of normal, active, or disabled.
  2716. // In a dialog box, one button may be designated the
  2717. // button (meaning, roughly,
  2718. // active indicates that this is currently the default button;
  2719. // normal means that it may become the default button, and
  2720. // disabled means that it is not defaultable.
  2721. // The default is normal.
  2722. //
  2723. // # Standard styles
  2724. //
  2725. // Ttk::button widgets support the Toolbutton style in all standard
  2726. // themes, which is useful for creating widgets for toolbars.
  2727. //
  2728. // In the Aqua theme there are several other styles which can be used to
  2729. // produce replicas of many of the different button types that are
  2730. // discussed in Apple's Human Interface Guidelines. These include
  2731. // DisclosureButton, DisclosureTriangle, HelpButton,
  2732. // ImageButton, InlineButton, GradientButton,
  2733. // RoundedRectButton, and RecessedButton.
  2734. //
  2735. // # Styling options
  2736. //
  2737. // The class name for a ttk::button is TButton.
  2738. //
  2739. // Dynamic states: active, disabled, pressed, readonly.
  2740. //
  2741. // TButton styling options configurable with ttk::style
  2742. // are:
  2743. // - [Anchor] anchor
  2744. // - [Background] color
  2745. // - [Bordercolor] color
  2746. // - [Compound] compound
  2747. // - [Darkcolor] color
  2748. // - [Foreground] color
  2749. // - [Font] font
  2750. // - [Highlightcolor] color
  2751. // - [Highlightthickness] amount
  2752. // - [Lightcolor] color
  2753. // - [Padding] padding
  2754. // - [Relief] relief
  2755. // - [Shiftrelief] amount
  2756. // - [Width] amount
  2757. //
  2758. // Some options are only available for specific themes.
  2759. //
  2760. // See the ttk::style manual page for information on how to configure
  2761. // ttk styles.
  2762. //
  2763. // [Tcl/Tk ttk_button]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_button.html
  2764. func TButton(options ...Opt) *TButtonWidget {
  2765. return App.TButton(options...)
  2766. }
  2767. // TButton — Widget that issues a command when pressed
  2768. //
  2769. // The resulting [Window] is a child of 'w'
  2770. //
  2771. // For details please see [TButton]
  2772. func (w *Window) TButton(options ...Opt) *TButtonWidget {
  2773. return &TButtonWidget{w.newChild("ttk::button", options...)}
  2774. }
  2775. // TButtonWidget represents the Tcl/Tk ttk_button widget/window
  2776. type TButtonWidget struct {
  2777. *Window
  2778. }
  2779. // TCheckbutton — On/off widget
  2780. //
  2781. // # Description
  2782. //
  2783. // A ttk::checkbutton widget is used to show or change a setting.
  2784. // It has two states, selected and deselected.
  2785. // The state of the checkbutton may be linked to a Tcl variable.
  2786. //
  2787. // Use [Window.TCheckbutton] to create a TCheckbutton with a particular parent.
  2788. //
  2789. // More information might be available at the [Tcl/Tk ttk_checkbutton] page.
  2790. //
  2791. // # Standard options
  2792. //
  2793. // - [Class]
  2794. // - [Compound]
  2795. // - [Cursor]
  2796. // - [Image]
  2797. // - [State]
  2798. // - [Style]
  2799. // - [Takefocus]
  2800. // - [Textvariable]
  2801. // - [Txt]
  2802. // - [Underline]
  2803. // - [Width]
  2804. //
  2805. // # Widget specific options
  2806. //
  2807. // [Command]
  2808. //
  2809. // A Tcl script to execute whenever the widget is invoked.
  2810. //
  2811. // [Offvalue]
  2812. //
  2813. // The value to store in the associated -variable
  2814. // when the widget is deselected. Defaults to 0.
  2815. //
  2816. // [Onvalue]
  2817. //
  2818. // The value to store in the associated -variable
  2819. // when the widget is selected. Defaults to 1.
  2820. //
  2821. // [Variable]
  2822. //
  2823. // The name of a global variable whose value is linked to the widget.
  2824. // Defaults to the widget pathname if not specified.
  2825. //
  2826. // # Standard styles
  2827. //
  2828. // Ttk::checkbutton widgets support the Toolbutton style in all
  2829. // standard themes, which is useful for creating widgets for toolbars.
  2830. //
  2831. // # Styling options
  2832. //
  2833. // The class name for a ttk::checkbutton is TCheckbutton.
  2834. //
  2835. // Dynamic states: active, alternate, disabled,
  2836. // pressed, selected, readonly.
  2837. //
  2838. // TCheckbutton styling options configurable with ttk::style
  2839. // are:
  2840. // - [Background] color
  2841. // - [Compound] compound
  2842. // - [Foreground] color
  2843. // - [Indicatorbackground] color
  2844. // - [Indicatorcolor] color
  2845. // - [Indicatormargin] padding
  2846. // - [Indicatorrelief] relief
  2847. // - [Padding] padding
  2848. //
  2849. // Some options are only available for specific themes.
  2850. //
  2851. // See the ttk::style manual page for information on how to configure
  2852. // ttk styles.
  2853. //
  2854. // [Tcl/Tk ttk_checkbutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_checkbutton.html
  2855. func TCheckbutton(options ...Opt) *TCheckbuttonWidget {
  2856. return App.TCheckbutton(options...)
  2857. }
  2858. // TCheckbutton — On/off widget
  2859. //
  2860. // The resulting [Window] is a child of 'w'
  2861. //
  2862. // For details please see [TCheckbutton]
  2863. func (w *Window) TCheckbutton(options ...Opt) *TCheckbuttonWidget {
  2864. return &TCheckbuttonWidget{w.newChild("ttk::checkbutton", options...)}
  2865. }
  2866. // TCheckbuttonWidget represents the Tcl/Tk ttk_checkbutton widget/window
  2867. type TCheckbuttonWidget struct {
  2868. *Window
  2869. }
  2870. // TCombobox — Text field with popdown selection list
  2871. //
  2872. // # Description
  2873. //
  2874. // A ttk::combobox combines a text field with a pop-down list of values;
  2875. // the user may select the value of the text field from among the
  2876. // values in the list.
  2877. //
  2878. // Use [Window.TCombobox] to create a TCombobox with a particular parent.
  2879. //
  2880. // More information might be available at the [Tcl/Tk ttk_combobox] page.
  2881. //
  2882. // # Standard options
  2883. //
  2884. // - [Class]
  2885. // - [Cursor]
  2886. // - [Placeholder]
  2887. // - [Placeholderforeground]
  2888. // - [Style]
  2889. // - [Takefocus]
  2890. //
  2891. // # Widget specific options
  2892. //
  2893. // [Exportselection]
  2894. //
  2895. // Boolean value.
  2896. // If set, the widget selection is linked to the X selection.
  2897. //
  2898. // [Justify]
  2899. //
  2900. // Specifies how the text is aligned within the widget.
  2901. // Must be one of left, center, or right.
  2902. //
  2903. // [Height]
  2904. //
  2905. // Specifies the height of the pop-down listbox, in rows.
  2906. //
  2907. // [Postcommand]
  2908. //
  2909. // A Tcl script to evaluate immediately before displaying the listbox.
  2910. // The -postcommand script may specify the -values to display.
  2911. //
  2912. // [State]
  2913. //
  2914. // One of normal, readonly, or disabled.
  2915. // In the readonly state,
  2916. // the value may not be edited directly, and
  2917. // the user can only select one of the -values from the
  2918. // dropdown list.
  2919. // In the normal state,
  2920. // the text field is directly editable.
  2921. // In the disabled state, no interaction is possible.
  2922. //
  2923. // [Textvariable]
  2924. //
  2925. // Specifies the name of a global variable whose value is linked
  2926. // to the widget value.
  2927. // Whenever the variable changes value the widget value is updated,
  2928. // and vice versa.
  2929. //
  2930. // [Values]
  2931. //
  2932. // Specifies the list of values to display in the drop-down listbox.
  2933. //
  2934. // [Width]
  2935. //
  2936. // Specifies an integer value indicating the desired width of the entry window,
  2937. // in average-size characters of the widget's font.
  2938. //
  2939. // # Styling options
  2940. //
  2941. // The class name for a ttk::combobox is TCombobox.
  2942. // The ttk::combobox uses the entry and
  2943. // listbox widgets internally.
  2944. // The listbox frame has a class name of ComboboxPopdownFrame.
  2945. //
  2946. // Dynamic states: disabled, focus, pressed, readonly.
  2947. //
  2948. // TCombobox styling options configurable with ttk::style
  2949. // are:
  2950. // - [Arrowcolor] color
  2951. // - [Arrowsize] amount
  2952. // - [Background] color
  2953. // - [Bordercolor] color
  2954. // - [Darkcolor] color
  2955. // - [Focusfill] color
  2956. // - [Foreground] color
  2957. // - [Fieldbackground] color
  2958. // - [Insertcolor] color
  2959. // - [Insertwidth] amount
  2960. // - [Lightcolor] color
  2961. // - [Padding] padding
  2962. // - [Placeholderforeground] color
  2963. // - [Postoffset] padding
  2964. // - [Selectbackground] color
  2965. // - [Selectforeground] color
  2966. //
  2967. // The ttk::combobox popdown listbox cannot be configured using
  2968. // ttk::style nor via the widget configure command. The listbox
  2969. // can be configured using the option database.
  2970. //
  2971. // option add *TCombobox*Listbox.background color
  2972. // option add *TCombobox*Listbox.font font
  2973. // option add *TCombobox*Listbox.foreground color
  2974. // option add *TCombobox*Listbox.selectBackground color
  2975. // option add *TCombobox*Listbox.selectForeground color
  2976. //
  2977. // To configure a specific listbox (subject to future change):
  2978. //
  2979. // ComboboxPopdownFrame
  2980. // styling options configurable with ttk::style
  2981. // are:
  2982. // - [Borderwidth] amount
  2983. // - [Relief] relief
  2984. //
  2985. // Some options are only available for specific themes.
  2986. //
  2987. // See the ttk::style manual page for information on how to configure
  2988. // ttk styles.
  2989. //
  2990. // [Tcl/Tk ttk_combobox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_combobox.html
  2991. func TCombobox(options ...Opt) *TComboboxWidget {
  2992. return App.TCombobox(options...)
  2993. }
  2994. // TCombobox — Text field with popdown selection list
  2995. //
  2996. // The resulting [Window] is a child of 'w'
  2997. //
  2998. // For details please see [TCombobox]
  2999. func (w *Window) TCombobox(options ...Opt) *TComboboxWidget {
  3000. return &TComboboxWidget{w.newChild("ttk::combobox", options...)}
  3001. }
  3002. // TComboboxWidget represents the Tcl/Tk ttk_combobox widget/window
  3003. type TComboboxWidget struct {
  3004. *Window
  3005. }
  3006. // TEntry — Editable text field widget
  3007. //
  3008. // # Description
  3009. //
  3010. // An ttk::entry widget displays a one-line text string and
  3011. // allows that string to be edited by the user.
  3012. // The value of the string may be linked to a Tcl variable
  3013. // with the -textvariable option.
  3014. // Entry widgets support horizontal scrolling with the
  3015. // standard -xscrollcommand option and xview widget command.
  3016. //
  3017. // Use [Window.TEntry] to create a TEntry with a particular parent.
  3018. //
  3019. // More information might be available at the [Tcl/Tk ttk_entry] page.
  3020. //
  3021. // # Standard options
  3022. //
  3023. // - [Class]
  3024. // - [Cursor]
  3025. // - [Foreground]
  3026. // - [Placeholder]
  3027. // - [Placeholderforeground]
  3028. // - [Style]
  3029. // - [Takefocus]
  3030. // - [Xscrollcommand]
  3031. //
  3032. // # Widget specific options
  3033. //
  3034. // [Exportselection]
  3035. //
  3036. // A boolean value specifying whether or not
  3037. // a selection in the widget should be linked to the X selection.
  3038. // If the selection is exported, then selecting in the widget deselects
  3039. // the current X selection, selecting outside the widget deselects any
  3040. // widget selection, and the widget will respond to selection retrieval
  3041. // requests when it has a selection.
  3042. //
  3043. // [Invalidcommand]
  3044. //
  3045. // A script template to evaluate whenever the -validatecommand returns 0.
  3046. // See VALIDATION below for more information.
  3047. //
  3048. // [Justify]
  3049. //
  3050. // Specifies how the text is aligned within the entry widget.
  3051. // One of left, center, or right.
  3052. //
  3053. // [Show]
  3054. //
  3055. // If this option is specified, then the true contents of the entry
  3056. // are not displayed in the window.
  3057. // Instead, each character in the entry's value will be displayed as
  3058. // the first character in the value of this option, such as
  3059. // or a bullet.
  3060. // This is useful, for example, if the entry is to be used to enter
  3061. // a password.
  3062. // If characters in the entry are selected and copied elsewhere, the
  3063. // information copied will be what is displayed, not the true contents
  3064. // of the entry.
  3065. //
  3066. // [State]
  3067. //
  3068. // Compatibility option; see ttk::widget(n) for details.
  3069. // Specifies one of three states for the entry,
  3070. // normal, disabled, or readonly.
  3071. // See WIDGET STATES, below.
  3072. //
  3073. // [Textvariable]
  3074. //
  3075. // Specifies the name of a global variable whose value is linked
  3076. // to the entry widget's contents.
  3077. // Whenever the variable changes value, the widget's contents are updated,
  3078. // and vice versa.
  3079. //
  3080. // [Validate]
  3081. //
  3082. // Specifies the mode in which validation should operate:
  3083. // none, focus, focusin, focusout, key, or all.
  3084. // Default is none, meaning that validation is disabled.
  3085. // See VALIDATION below.
  3086. //
  3087. // [Validatecommand]
  3088. //
  3089. // A script template to evaluate whenever validation is triggered.
  3090. // If set to the empty string (the default), validation is disabled.
  3091. // The script must return a boolean value.
  3092. // See VALIDATION below.
  3093. //
  3094. // [Width]
  3095. //
  3096. // Specifies an integer value indicating the desired width of the entry window,
  3097. // in average-size characters of the widget's font.
  3098. //
  3099. // # Styling options
  3100. //
  3101. // The class name for a ttk::entry is TEntry.
  3102. //
  3103. // Dynamic states: disabled, focus, readonly.
  3104. //
  3105. // TEntry styling options configurable with ttk::style
  3106. // are:
  3107. // - [Background] color
  3108. // - [Bordercolor] color
  3109. // - [Darkcolor] color
  3110. // - [Fieldbackground] color
  3111. // - [Foreground] color
  3112. // - [Insertcolor] color
  3113. // - [Insertwidth] amount
  3114. // - [Lightcolor] color
  3115. // - [Padding] padding
  3116. // - [Placeholderforeground] color
  3117. // - [Relief] relief
  3118. // - [Selectbackground] color
  3119. // - [Selectborderwidth] amount
  3120. // - [Selectforeground] color
  3121. //
  3122. // See the ttk::style manual page for information on how to configure
  3123. // ttk styles.
  3124. //
  3125. // [Tcl/Tk ttk_entry]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_entry.html
  3126. func TEntry(options ...Opt) *TEntryWidget {
  3127. return App.TEntry(options...)
  3128. }
  3129. // TEntry — Editable text field widget
  3130. //
  3131. // The resulting [Window] is a child of 'w'
  3132. //
  3133. // For details please see [TEntry]
  3134. func (w *Window) TEntry(options ...Opt) *TEntryWidget {
  3135. return &TEntryWidget{w.newChild("ttk::entry", options...)}
  3136. }
  3137. // TEntryWidget represents the Tcl/Tk ttk_entry widget/window
  3138. type TEntryWidget struct {
  3139. *Window
  3140. }
  3141. // TFrame — Simple container widget
  3142. //
  3143. // # Description
  3144. //
  3145. // A ttk::frame widget is a container, used to group other widgets
  3146. // together.
  3147. //
  3148. // Use [Window.TFrame] to create a TFrame with a particular parent.
  3149. //
  3150. // More information might be available at the [Tcl/Tk ttk_frame] page.
  3151. //
  3152. // # Standard options
  3153. //
  3154. // - [Class]
  3155. // - [Cursor]
  3156. // - [Padding]
  3157. // - [Style]
  3158. // - [Takefocus]
  3159. //
  3160. // # Widget specific options
  3161. //
  3162. // [Borderwidth]
  3163. //
  3164. // The desired width of the widget border. Defaults to 0.
  3165. // May be ignored depending on the theme used.
  3166. //
  3167. // [Relief]
  3168. //
  3169. // One of the standard Tk border styles:
  3170. // flat, groove, raised, ridge,
  3171. // solid, or sunken.
  3172. // Defaults to flat.
  3173. //
  3174. // [Width]
  3175. //
  3176. // If specified, the widget's requested width in pixels.
  3177. //
  3178. // [Height]
  3179. //
  3180. // If specified, the widget's requested height in pixels.
  3181. //
  3182. // # Styling options
  3183. //
  3184. // The class name for a ttk::frame is TFrame.
  3185. //
  3186. // TFrame styling options configurable with ttk::style
  3187. // are:
  3188. // - [Background] color
  3189. // - [Relief] relief
  3190. //
  3191. // Some options are only available for specific themes.
  3192. //
  3193. // See the ttk::style manual page for information on how to configure
  3194. // ttk styles.
  3195. //
  3196. // [Tcl/Tk ttk_frame]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_frame.html
  3197. func TFrame(options ...Opt) *TFrameWidget {
  3198. return App.TFrame(options...)
  3199. }
  3200. // TFrame — Simple container widget
  3201. //
  3202. // The resulting [Window] is a child of 'w'
  3203. //
  3204. // For details please see [TFrame]
  3205. func (w *Window) TFrame(options ...Opt) *TFrameWidget {
  3206. return &TFrameWidget{w.newChild("ttk::frame", options...)}
  3207. }
  3208. // TFrameWidget represents the Tcl/Tk ttk_frame widget/window
  3209. type TFrameWidget struct {
  3210. *Window
  3211. }
  3212. // TLabel — Display a text string and/or image
  3213. //
  3214. // # Description
  3215. //
  3216. // A ttk::label widget displays a textual label and/or image.
  3217. // The label may be linked to a Tcl variable
  3218. // to automatically change the displayed text.
  3219. //
  3220. // Use [Window.TLabel] to create a TLabel with a particular parent.
  3221. //
  3222. // More information might be available at the [Tcl/Tk ttk_label] page.
  3223. //
  3224. // # Standard options
  3225. //
  3226. // - [Anchor]
  3227. // - [Class]
  3228. // - [Compound]
  3229. // - [Cursor]
  3230. // - [Foreground]
  3231. // - [Image]
  3232. // - [Justify]
  3233. // - [Padding]
  3234. // - [State]
  3235. // - [Style]
  3236. // - [Takefocus]
  3237. // - [Textvariable]
  3238. // - [Txt]
  3239. // - [Underline]
  3240. // - [Width]
  3241. // - [Wraplength]
  3242. //
  3243. // # Widget specific options
  3244. //
  3245. // [Background]
  3246. //
  3247. // The widget's background color.
  3248. // If unspecified, the theme default is used.
  3249. //
  3250. // [Relief]
  3251. //
  3252. // Specifies the 3-D effect desired for the widget border.
  3253. // Valid values are
  3254. // flat, groove, raised, ridge, solid,
  3255. // and sunken.
  3256. //
  3257. // [Wraplength]
  3258. //
  3259. // Specifies the maximum line length (in pixels).
  3260. // If this option is negative or zero,
  3261. // then automatic wrapping is not performed; otherwise
  3262. // the text is split into lines such that no line is longer
  3263. // than the specified value.
  3264. //
  3265. // # Styling options
  3266. //
  3267. // The class name for a ttk::label is TLabel.
  3268. //
  3269. // Dynamic states: disabled, readonly.
  3270. //
  3271. // TLabel styling options configurable with ttk::style
  3272. // are:
  3273. // - [Background] color
  3274. // - [Compound] compound
  3275. // - [Foreground] color
  3276. // - [Font] font
  3277. //
  3278. // Some options are only available for specific themes.
  3279. //
  3280. // See the ttk::style manual page for information on how to configure
  3281. // ttk styles.
  3282. //
  3283. // [Tcl/Tk ttk_label]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_label.html
  3284. func TLabel(options ...Opt) *TLabelWidget {
  3285. return App.TLabel(options...)
  3286. }
  3287. // TLabel — Display a text string and/or image
  3288. //
  3289. // The resulting [Window] is a child of 'w'
  3290. //
  3291. // For details please see [TLabel]
  3292. func (w *Window) TLabel(options ...Opt) *TLabelWidget {
  3293. return &TLabelWidget{w.newChild("ttk::label", options...)}
  3294. }
  3295. // TLabelWidget represents the Tcl/Tk ttk_label widget/window
  3296. type TLabelWidget struct {
  3297. *Window
  3298. }
  3299. // TLabelframe — Container widget with optional label
  3300. //
  3301. // # Description
  3302. //
  3303. // A ttk::labelframe widget is a container used to group other widgets
  3304. // together. It has an optional label, which may be a plain text string or
  3305. // another widget.
  3306. //
  3307. // Use [Window.TLabelframe] to create a TLabelframe with a particular parent.
  3308. //
  3309. // More information might be available at the [Tcl/Tk ttk_labelframe] page.
  3310. //
  3311. // # Standard options
  3312. //
  3313. // - [Class]
  3314. // - [Cursor]
  3315. // - [Padding]
  3316. // - [Style]
  3317. // - [Takefocus]
  3318. //
  3319. // # Widget specific options
  3320. //
  3321. // [Height]
  3322. //
  3323. // If specified, the widget's requested height in pixels.
  3324. // (See ttk::frame(n) for further notes on -width and
  3325. // -height).
  3326. //
  3327. // [Labelanchor]
  3328. //
  3329. // Specifies where to place the label.
  3330. // Allowed values are (clockwise from the top upper left corner):
  3331. // nw, n, ne, en, e, es,
  3332. // se, s,sw, ws, w and wn.
  3333. // The default value is theme-dependent.
  3334. //
  3335. // [Labelwidget]
  3336. //
  3337. // The name of a widget to use for the label.
  3338. // If set, overrides the -text option.
  3339. // The -labelwidget must be a child of the labelframe widget
  3340. // or one of the labelframe's ancestors, and must belong to the
  3341. // same top-level widget as the labelframe.
  3342. //
  3343. // [Txt]
  3344. //
  3345. // Specifies the text of the label.
  3346. //
  3347. // [Underline]
  3348. //
  3349. // If set, specifies the integer index (0-based) of a character to
  3350. // underline in the text string.
  3351. // The underlined character is used for mnemonic activation.
  3352. // Mnemonic activation for a ttk::labelframe
  3353. // sets the keyboard focus to the first child of the ttk::labelframe widget.
  3354. //
  3355. // [Width]
  3356. //
  3357. // If specified, the widget's requested width in pixels.
  3358. //
  3359. // # Styling options
  3360. //
  3361. // The class name for a ttk::labelframe is TLabelframe.
  3362. // The text label
  3363. // has a class of TLabelframe.Label.
  3364. //
  3365. // Dynamic states: disabled, readonly.
  3366. //
  3367. // TLabelframe styling options configurable with ttk::style
  3368. // are:
  3369. // - [Background] color
  3370. // - [Bordercolor] color
  3371. // - [Borderwidth] amount
  3372. // - [Darkcolor] color
  3373. // - [Labelmargins] amount
  3374. // - [Labeloutside] boolean
  3375. // - [Lightcolor] color
  3376. // - [Relief] relief
  3377. //
  3378. // TLabelframe.Label styling options configurable with ttk::style
  3379. // are:
  3380. // - [Background] color
  3381. // - [Font] font
  3382. // - [Foreground] color
  3383. //
  3384. // Some options are only available for specific themes.
  3385. //
  3386. // See the ttk::style manual page for information on how to configure
  3387. // ttk styles.
  3388. //
  3389. // [Tcl/Tk ttk_labelframe]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_labelframe.html
  3390. func TLabelframe(options ...Opt) *TLabelframeWidget {
  3391. return App.TLabelframe(options...)
  3392. }
  3393. // TLabelframe — Container widget with optional label
  3394. //
  3395. // The resulting [Window] is a child of 'w'
  3396. //
  3397. // For details please see [TLabelframe]
  3398. func (w *Window) TLabelframe(options ...Opt) *TLabelframeWidget {
  3399. return &TLabelframeWidget{w.newChild("ttk::labelframe", options...)}
  3400. }
  3401. // TLabelframeWidget represents the Tcl/Tk ttk_labelframe widget/window
  3402. type TLabelframeWidget struct {
  3403. *Window
  3404. }
  3405. // TMenubutton — Widget that pops down a menu when pressed
  3406. //
  3407. // # Description
  3408. //
  3409. // A ttk::menubutton widget displays a textual label and/or image,
  3410. // and displays a menu when pressed.
  3411. //
  3412. // Use [Window.TMenubutton] to create a TMenubutton with a particular parent.
  3413. //
  3414. // More information might be available at the [Tcl/Tk ttk_menubutton] page.
  3415. //
  3416. // # Standard options
  3417. //
  3418. // - [Class]
  3419. // - [Compound]
  3420. // - [Cursor]
  3421. // - [Image]
  3422. // - [State]
  3423. // - [Style]
  3424. // - [Takefocus]
  3425. // - [Textvariable]
  3426. // - [Txt]
  3427. // - [Underline]
  3428. // - [Width]
  3429. //
  3430. // # Widget specific options
  3431. //
  3432. // [Direction]
  3433. //
  3434. // Specifies where the menu is to be popped up relative
  3435. // to the menubutton.
  3436. // One of: above, below, left, right,
  3437. // or flush. The default is below.
  3438. // flush pops the menu up directly over the menubutton.
  3439. //
  3440. // [Mnu]
  3441. //
  3442. // Specifies the path name of the menu associated with the menubutton.
  3443. // To be on the safe side, the menu ought to be a direct child of the
  3444. // menubutton.
  3445. //
  3446. // # Standard styles
  3447. //
  3448. // Ttk::menubutton widgets support the Toolbutton style in all
  3449. // standard themes, which is useful for creating widgets for toolbars.
  3450. //
  3451. // # Styling options
  3452. //
  3453. // The class name for a ttk::menubutton is TMenubutton.
  3454. //
  3455. // Dynamic states: active, disabled, readonly.
  3456. //
  3457. // TMenubutton styling options configurable with ttk::style
  3458. // are:
  3459. // - [Arrowsize] amount
  3460. // - [Background] color
  3461. // - [Compound] compound
  3462. // - [Foreground] color
  3463. // - [Font] font
  3464. // - [Padding] padding
  3465. // - [Relief] relief
  3466. // - [Width] amount
  3467. //
  3468. // Some options are only available for specific themes.
  3469. //
  3470. // See the ttk::style manual page for information on how to configure
  3471. // ttk styles.
  3472. //
  3473. // [Tcl/Tk ttk_menubutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_menubutton.html
  3474. func TMenubutton(options ...Opt) *TMenubuttonWidget {
  3475. return App.TMenubutton(options...)
  3476. }
  3477. // TMenubutton — Widget that pops down a menu when pressed
  3478. //
  3479. // The resulting [Window] is a child of 'w'
  3480. //
  3481. // For details please see [TMenubutton]
  3482. func (w *Window) TMenubutton(options ...Opt) *TMenubuttonWidget {
  3483. return &TMenubuttonWidget{w.newChild("ttk::menubutton", options...)}
  3484. }
  3485. // TMenubuttonWidget represents the Tcl/Tk ttk_menubutton widget/window
  3486. type TMenubuttonWidget struct {
  3487. *Window
  3488. }
  3489. // TNotebook — Multi-paned container widget
  3490. //
  3491. // # Description
  3492. //
  3493. // A ttk::notebook widget manages a collection of windows
  3494. // and displays a single one at a time.
  3495. // Each content window is associated with a tab,
  3496. // which the user may select to change the currently-displayed window.
  3497. //
  3498. // Use [Window.TNotebook] to create a TNotebook with a particular parent.
  3499. //
  3500. // More information might be available at the [Tcl/Tk ttk_notebook] page.
  3501. //
  3502. // # Standard options
  3503. //
  3504. // - [Class]
  3505. // - [Cursor]
  3506. // - [Style]
  3507. // - [Takefocus]
  3508. //
  3509. // # Widget specific options
  3510. //
  3511. // [Height]
  3512. //
  3513. // If present and greater than zero,
  3514. // specifies the desired height of the pane area
  3515. // (not including internal padding or tabs).
  3516. // Otherwise, the maximum height of all panes is used.
  3517. //
  3518. // [Padding]
  3519. //
  3520. // Specifies the amount of extra space to add around the outside
  3521. // of the notebook.
  3522. // The padding is a list of up to four length specifications
  3523. // left top right bottom.
  3524. // If fewer than four elements are specified,
  3525. // bottom defaults to top,
  3526. // right defaults to left, and
  3527. // top defaults to left.
  3528. // In other words, a list of three numbers specify the left, vertical, and right
  3529. // padding; a list of two numbers specify the horizontal and the vertical padding;
  3530. // a single number specifies the same padding all the way around the widget.
  3531. //
  3532. // [Width]
  3533. //
  3534. // If present and greater than zero,
  3535. // specifies the desired width of the pane area
  3536. // (not including internal padding).
  3537. // Otherwise, the maximum width of all panes is used.
  3538. //
  3539. // # Styling options
  3540. //
  3541. // The class name for a ttk::notebook is TNotebook. The tab has
  3542. // a class name of TNotebook.Tab
  3543. //
  3544. // Dynamic states: active, disabled, selected.
  3545. //
  3546. // TNotebook styling options configurable with ttk::style
  3547. // are:
  3548. // - [Background] color
  3549. // - [Bordercolor] color
  3550. // - [Darkcolor] color
  3551. // - [Foreground] color
  3552. // - [Lightcolor] color
  3553. // - [Padding] padding
  3554. // - [Tabmargins] padding
  3555. // - [Tabposition] position
  3556. //
  3557. // TNotebook.Tab styling options configurable with ttk::style
  3558. // are:
  3559. // - [Background] color
  3560. // - [Bordercolor] color
  3561. // - [Compound] compound
  3562. // - [Expand] padding
  3563. // - [Font] font
  3564. // - [Foreground] color
  3565. // - [Padding] padding
  3566. //
  3567. // Some options are only available for specific themes.
  3568. //
  3569. // See the ttk::style manual page for information on how to configure
  3570. // ttk styles.
  3571. //
  3572. // [Tcl/Tk ttk_notebook]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_notebook.html
  3573. func TNotebook(options ...Opt) *TNotebookWidget {
  3574. return App.TNotebook(options...)
  3575. }
  3576. // TNotebook — Multi-paned container widget
  3577. //
  3578. // The resulting [Window] is a child of 'w'
  3579. //
  3580. // For details please see [TNotebook]
  3581. func (w *Window) TNotebook(options ...Opt) *TNotebookWidget {
  3582. return &TNotebookWidget{w.newChild("ttk::notebook", options...)}
  3583. }
  3584. // TNotebookWidget represents the Tcl/Tk ttk_notebook widget/window
  3585. type TNotebookWidget struct {
  3586. *Window
  3587. }
  3588. // TPanedwindow — Multi-pane container window
  3589. //
  3590. // # Description
  3591. //
  3592. // A ttk::panedwindow widget displays a number of subwindows,
  3593. // stacked either vertically or horizontally.
  3594. // The user may adjust the relative sizes of the subwindows
  3595. // by dragging the sash between panes.
  3596. //
  3597. // Use [Window.TPanedwindow] to create a TPanedwindow with a particular parent.
  3598. //
  3599. // More information might be available at the [Tcl/Tk ttk_panedwindow] page.
  3600. //
  3601. // # Standard options
  3602. //
  3603. // - [Class]
  3604. // - [Cursor]
  3605. // - [Style]
  3606. // - [Takefocus]
  3607. //
  3608. // # Widget specific options
  3609. //
  3610. // [Orient]
  3611. //
  3612. // Specifies the orientation of the window.
  3613. // If vertical, subpanes are stacked top-to-bottom;
  3614. // if horizontal, subpanes are stacked left-to-right.
  3615. //
  3616. // [Width]
  3617. //
  3618. // If present and greater than zero,
  3619. // specifies the desired width of the widget in pixels.
  3620. // Otherwise, the requested width is determined by the width
  3621. // of the managed windows.
  3622. //
  3623. // [Height]
  3624. //
  3625. // If present and greater than zero,
  3626. // specifies the desired height of the widget in pixels.
  3627. // Otherwise, the requested height is determined by the height
  3628. // of the managed windows.
  3629. //
  3630. // # Styling options
  3631. //
  3632. // The class name for a ttk::panedwindow is TPanedwindow. The
  3633. // sash has a class name of Sash.
  3634. //
  3635. // TPanedwindow styling options configurable with ttk::style
  3636. // are:
  3637. // - [Background] color
  3638. //
  3639. // Sash styling options configurable with ttk::style
  3640. // are:
  3641. // - [Background] color
  3642. // - [Bordercolor] color
  3643. // - [Gripsize] size (number of screen units)
  3644. // - [Handlepad] amount
  3645. // - [Handlesize] amount
  3646. // - [Lightcolor] color
  3647. // - [Sashpad] amount
  3648. // - [Sashrelief] relief
  3649. // - [Sashthickness] amount
  3650. //
  3651. // Some options are only available for specific themes.
  3652. //
  3653. // See the ttk::style manual page for information on how to configure
  3654. // ttk styles.
  3655. //
  3656. // [Tcl/Tk ttk_panedwindow]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_panedwindow.html
  3657. func TPanedwindow(options ...Opt) *TPanedwindowWidget {
  3658. return App.TPanedwindow(options...)
  3659. }
  3660. // TPanedwindow — Multi-pane container window
  3661. //
  3662. // The resulting [Window] is a child of 'w'
  3663. //
  3664. // For details please see [TPanedwindow]
  3665. func (w *Window) TPanedwindow(options ...Opt) *TPanedwindowWidget {
  3666. return &TPanedwindowWidget{w.newChild("ttk::panedwindow", options...)}
  3667. }
  3668. // TPanedwindowWidget represents the Tcl/Tk ttk_panedwindow widget/window
  3669. type TPanedwindowWidget struct {
  3670. *Window
  3671. }
  3672. // TProgressbar — Provide progress feedback
  3673. //
  3674. // # Description
  3675. //
  3676. // A ttk::progressbar widget shows the status of a long-running
  3677. // operation. They can operate in two modes: determinate mode shows the
  3678. // amount completed relative to the total amount of work to be done, and
  3679. // indeterminate mode provides an animated display to let the user know
  3680. // that something is happening.
  3681. //
  3682. // If the value of -orient is horizontal a text string can be
  3683. // displayed inside the progressbar. This string can be configured using
  3684. // the -anchor, -font, -foreground, -justify,
  3685. // is vertical then these options are ignored.
  3686. //
  3687. // Use [Window.TProgressbar] to create a TProgressbar with a particular parent.
  3688. //
  3689. // More information might be available at the [Tcl/Tk ttk_progressbar] page.
  3690. //
  3691. // # Standard options
  3692. //
  3693. // - [Anchor]
  3694. // - [Class]
  3695. // - [Cursor]
  3696. // - [Foreground]
  3697. // - [Justify]
  3698. // - [Style]
  3699. // - [Takefocus]
  3700. // - [Txt]
  3701. // - [Wraplength]
  3702. //
  3703. // # Widget specific options
  3704. //
  3705. // [Length]
  3706. //
  3707. // Specifies the length of the long axis of the progress bar
  3708. // (width if horizontal, height if vertical). The value may have any of the forms
  3709. // acceptable to Tk_GetPixels.
  3710. //
  3711. // [Maximum]
  3712. //
  3713. // A floating point number specifying the maximum -value.
  3714. // Defaults to 100.
  3715. //
  3716. // [Mode]
  3717. //
  3718. // One of determinate or indeterminate.
  3719. //
  3720. // [Orient]
  3721. //
  3722. // One of horizontal or vertical.
  3723. // Specifies the orientation of the progress bar.
  3724. //
  3725. // [Phase]
  3726. //
  3727. // Read-only option.
  3728. // The widget periodically increments the value of this option
  3729. // whenever the -value is greater than 0 and,
  3730. // in determinate mode, less than -maximum.
  3731. // This option may be used by the current theme
  3732. // to provide additional animation effects.
  3733. //
  3734. // [Value]
  3735. //
  3736. // The current value of the progress bar.
  3737. // In determinate mode, this represents the amount of work completed.
  3738. // In indeterminate mode, it is interpreted modulo -maximum;
  3739. // that is, the progress bar completes one
  3740. // when the -value increases by -maximum.
  3741. // If -variable is set to an existing variable, specifying -value
  3742. // has no effect (the variable value takes precedence).
  3743. //
  3744. // [Variable]
  3745. //
  3746. // The name of a global Tcl variable which is linked to the -value.
  3747. // If specified to an existing variable, the -value of the progress bar is
  3748. // automatically set to the value of the variable whenever
  3749. // the latter is modified.
  3750. //
  3751. // # Styling options
  3752. //
  3753. // The class name for a ttk::progressbar is TProgressbar.
  3754. //
  3755. // TProgressbar styling options configurable with ttk::style
  3756. // are:
  3757. // - [Background] color
  3758. // - [Bordercolor] color
  3759. // - [Darkcolor] color
  3760. // - [Lightcolor] color
  3761. // - [Maxphase]
  3762. // - [Period]
  3763. // - [Troughcolor] color
  3764. //
  3765. // Some options are only available for specific themes.
  3766. //
  3767. // See the ttk::style manual page for information on how to configure
  3768. // ttk styles.
  3769. //
  3770. // [Tcl/Tk ttk_progressbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_progressbar.html
  3771. func TProgressbar(options ...Opt) *TProgressbarWidget {
  3772. return App.TProgressbar(options...)
  3773. }
  3774. // TProgressbar — Provide progress feedback
  3775. //
  3776. // The resulting [Window] is a child of 'w'
  3777. //
  3778. // For details please see [TProgressbar]
  3779. func (w *Window) TProgressbar(options ...Opt) *TProgressbarWidget {
  3780. return &TProgressbarWidget{w.newChild("ttk::progressbar", options...)}
  3781. }
  3782. // TProgressbarWidget represents the Tcl/Tk ttk_progressbar widget/window
  3783. type TProgressbarWidget struct {
  3784. *Window
  3785. }
  3786. // TRadiobutton — Mutually exclusive option widget
  3787. //
  3788. // # Description
  3789. //
  3790. // ttk::radiobutton widgets are used in groups to show or change
  3791. // a set of mutually-exclusive options.
  3792. // Radiobuttons are linked to a Tcl variable,
  3793. // and have an associated value; when a radiobutton is clicked,
  3794. // it sets the variable to its associated value.
  3795. //
  3796. // Use [Window.TRadiobutton] to create a TRadiobutton with a particular parent.
  3797. //
  3798. // More information might be available at the [Tcl/Tk ttk_radiobutton] page.
  3799. //
  3800. // # Standard options
  3801. //
  3802. // - [Class]
  3803. // - [Compound]
  3804. // - [Cursor]
  3805. // - [Image]
  3806. // - [State]
  3807. // - [Style]
  3808. // - [Takefocus]
  3809. // - [Textvariable]
  3810. // - [Txt]
  3811. // - [Underline]
  3812. // - [Width]
  3813. //
  3814. // # Widget specific options
  3815. //
  3816. // [Command]
  3817. //
  3818. // A Tcl script to evaluate whenever the widget is invoked.
  3819. //
  3820. // [Value]
  3821. //
  3822. // The value to store in the associated -variable
  3823. // when the widget is selected.
  3824. //
  3825. // [Variable]
  3826. //
  3827. // The name of a global variable whose value is linked to the widget.
  3828. // Default value is ::selectedButton.
  3829. //
  3830. // # Standard styles
  3831. //
  3832. // Ttk::radiobutton widgets support the Toolbutton style in all
  3833. // standard themes, which is useful for creating widgets for toolbars.
  3834. //
  3835. // # Styling options
  3836. //
  3837. // The class name for a ttk::radiobutton is TRadiobutton.
  3838. //
  3839. // Dynamic states: active, alternate, disabled,
  3840. // pressed, readonly, selected.
  3841. //
  3842. // TRadiobutton styling options configurable with ttk::style
  3843. // are:
  3844. // - [Background] color
  3845. // - [Compound] compound
  3846. // - [Foreground] color
  3847. // - [Indicatorbackground] color
  3848. // - [Indicatorcolor] color
  3849. // - [Indicatormargin] padding
  3850. // - [Indicatorrelief] relief
  3851. // - [Padding] padding
  3852. //
  3853. // Some options are only available for specific themes.
  3854. //
  3855. // See the ttk::style manual page for information on how to configure
  3856. // ttk styles.
  3857. //
  3858. // [Tcl/Tk ttk_radiobutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_radiobutton.html
  3859. func TRadiobutton(options ...Opt) *TRadiobuttonWidget {
  3860. return App.TRadiobutton(options...)
  3861. }
  3862. // TRadiobutton — Mutually exclusive option widget
  3863. //
  3864. // The resulting [Window] is a child of 'w'
  3865. //
  3866. // For details please see [TRadiobutton]
  3867. func (w *Window) TRadiobutton(options ...Opt) *TRadiobuttonWidget {
  3868. return &TRadiobuttonWidget{w.newChild("ttk::radiobutton", options...)}
  3869. }
  3870. // TRadiobuttonWidget represents the Tcl/Tk ttk_radiobutton widget/window
  3871. type TRadiobuttonWidget struct {
  3872. *Window
  3873. }
  3874. // TScale — Create and manipulate a scale widget
  3875. //
  3876. // # Description
  3877. //
  3878. // A ttk::scale widget is typically used to control the numeric value of a
  3879. // linked variable that varies uniformly over some range. A scale displays a
  3880. // slider that can be moved along over a trough, with the relative
  3881. // position of the slider over the trough indicating the value of the variable.
  3882. //
  3883. // Use [Window.TScale] to create a TScale with a particular parent.
  3884. //
  3885. // More information might be available at the [Tcl/Tk ttk_scale] page.
  3886. //
  3887. // # Standard options
  3888. //
  3889. // - [Class]
  3890. // - [Cursor]
  3891. // - [Style]
  3892. // - [Takefocus]
  3893. //
  3894. // # Widget specific options
  3895. //
  3896. // [Command]
  3897. //
  3898. // Specifies the prefix of a Tcl command to invoke whenever the scale's value is
  3899. // changed via a widget command. The actual command consists of this option
  3900. // followed by a space and a real number indicating the new value of the scale.
  3901. //
  3902. // [From]
  3903. //
  3904. // A real value corresponding to the left or top end of the scale.
  3905. //
  3906. // [Length]
  3907. //
  3908. // Specifies the desired long dimension of the scale in screen units (i.e. any of
  3909. // the forms acceptable to Tk_GetPixels). For vertical scales this is the
  3910. // scale's height; for horizontal scales it is the scale's width.
  3911. //
  3912. // [Orient]
  3913. //
  3914. // Specifies which orientation whether the widget should be laid out horizontally
  3915. // or vertically. Must be either horizontal or vertical or an
  3916. // abbreviation of one of these.
  3917. //
  3918. // [To]
  3919. //
  3920. // Specifies a real value corresponding to the right or bottom end of the scale.
  3921. // This value may be either less than or greater than the -from option.
  3922. //
  3923. // [Value]
  3924. //
  3925. // Specifies the current floating-point value of the variable.
  3926. // If -variable is set to an existing variable, specifying -value
  3927. // has no effect (the variable value takes precedence).
  3928. //
  3929. // [Variable]
  3930. //
  3931. // Specifies the name of a global variable to link to the scale. Whenever the
  3932. // value of the variable changes, the scale will update to reflect this value.
  3933. // Whenever the scale is manipulated interactively, the variable will be modified
  3934. // to reflect the scale's new value.
  3935. //
  3936. // # Styling options
  3937. //
  3938. // The class name for a ttk::scale is TScale.
  3939. //
  3940. // Dynamic states: active.
  3941. //
  3942. // TScale styling options configurable with ttk::style
  3943. // are:
  3944. // - [Background] color
  3945. // - [Borderwidth] amount
  3946. // - [Darkcolor] color
  3947. // - [Groovewidth] amount
  3948. // - [Lightcolor] color
  3949. // - [Sliderwidth] amount
  3950. // - [Troughcolor] color
  3951. // - [Troughrelief] relief
  3952. //
  3953. // Some options are only available for specific themes.
  3954. //
  3955. // See the ttk::style manual page for information on how to configure
  3956. // ttk styles.
  3957. //
  3958. // [Tcl/Tk ttk_scale]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_scale.html
  3959. func TScale(options ...Opt) *TScaleWidget {
  3960. return App.TScale(options...)
  3961. }
  3962. // TScale — Create and manipulate a scale widget
  3963. //
  3964. // The resulting [Window] is a child of 'w'
  3965. //
  3966. // For details please see [TScale]
  3967. func (w *Window) TScale(options ...Opt) *TScaleWidget {
  3968. return &TScaleWidget{w.newChild("ttk::scale", options...)}
  3969. }
  3970. // TScaleWidget represents the Tcl/Tk ttk_scale widget/window
  3971. type TScaleWidget struct {
  3972. *Window
  3973. }
  3974. // TScrollbar — Control the viewport of a scrollable widget
  3975. //
  3976. // # Description
  3977. //
  3978. // ttk::scrollbar widgets are typically linked to an associated window
  3979. // that displays a document of some sort, such as a file being edited or a
  3980. // drawing.
  3981. // A scrollbar displays a thumb in the middle portion of the scrollbar,
  3982. // whose position and size provides information about the portion of the
  3983. // document visible in the associated window.
  3984. // The thumb may be dragged by the user to control the visible region.
  3985. // Depending on the theme, two or more arrow buttons may also be present;
  3986. // these are used to scroll the visible region in discrete units.
  3987. //
  3988. // Use [Window.TScrollbar] to create a TScrollbar with a particular parent.
  3989. //
  3990. // More information might be available at the [Tcl/Tk ttk_scrollbar] page.
  3991. //
  3992. // # Standard options
  3993. //
  3994. // - [Class]
  3995. // - [Cursor]
  3996. // - [Style]
  3997. // - [Takefocus]
  3998. //
  3999. // # Widget specific options
  4000. //
  4001. // [Command]
  4002. //
  4003. // A Tcl script prefix to evaluate
  4004. // to change the view in the widget associated with the scrollbar.
  4005. // Additional arguments are appended to the value of this option,
  4006. // as described in SCROLLING COMMANDS below,
  4007. // whenever the user requests a view change by manipulating the scrollbar.
  4008. //
  4009. // [Orient]
  4010. //
  4011. // One of horizontal or vertical.
  4012. // Specifies the orientation of the scrollbar.
  4013. //
  4014. // # Styling options
  4015. //
  4016. // The class name for a ttk::scrollbar is TScrollbar.
  4017. //
  4018. // Dynamic states: active, disabled.
  4019. //
  4020. // TScrollbar (or more specifically Vertical.TScrollbar and
  4021. // Horizontal.TScrollbar) styling options that are configurable with
  4022. // ttk::style are:
  4023. // - [Arrowcolor] color
  4024. // - [Arrowsize] amount
  4025. // - [Background] color
  4026. // - [Bordercolor] color
  4027. // - [Darkcolor] color (color of the dark part of the 3D relief)
  4028. // - [Foreground] color
  4029. // - [Gripsize] size (number of screen units)
  4030. // - [Lightcolor] color (color of the light part of the 3D relief)
  4031. // - [Troughcolor] color
  4032. //
  4033. // Some options are only available for specific themes.
  4034. //
  4035. // See the ttk::style manual page for information on how to configure
  4036. // ttk styles.
  4037. //
  4038. // [Tcl/Tk ttk_scrollbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_scrollbar.html
  4039. func TScrollbar(options ...Opt) *TScrollbarWidget {
  4040. return App.TScrollbar(options...)
  4041. }
  4042. // TScrollbar — Control the viewport of a scrollable widget
  4043. //
  4044. // The resulting [Window] is a child of 'w'
  4045. //
  4046. // For details please see [TScrollbar]
  4047. func (w *Window) TScrollbar(options ...Opt) *TScrollbarWidget {
  4048. return &TScrollbarWidget{w.newChild("ttk::scrollbar", options...)}
  4049. }
  4050. // TScrollbarWidget represents the Tcl/Tk ttk_scrollbar widget/window
  4051. type TScrollbarWidget struct {
  4052. *Window
  4053. }
  4054. // TSeparator — Separator bar
  4055. //
  4056. // # Description
  4057. //
  4058. // A ttk::separator widget displays a horizontal or vertical separator
  4059. // bar.
  4060. //
  4061. // Use [Window.TSeparator] to create a TSeparator with a particular parent.
  4062. //
  4063. // More information might be available at the [Tcl/Tk ttk_separator] page.
  4064. //
  4065. // # Standard options
  4066. //
  4067. // - [Class]
  4068. // - [Cursor]
  4069. // - [Style]
  4070. // - [Takefocus]
  4071. //
  4072. // # Widget specific options
  4073. //
  4074. // [Orient]
  4075. //
  4076. // One of horizontal or vertical.
  4077. // Specifies the orientation of the separator.
  4078. //
  4079. // # Styling options
  4080. //
  4081. // The class name for a ttk::separator is TSeparator.
  4082. //
  4083. // TSeparator styling options configurable with ttk::style
  4084. // are:
  4085. // - [Background] color
  4086. //
  4087. // Some options are only available for specific themes.
  4088. //
  4089. // See the ttk::style manual page for information on how to configure
  4090. // ttk styles.
  4091. //
  4092. // [Tcl/Tk ttk_separator]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_separator.html
  4093. func TSeparator(options ...Opt) *TSeparatorWidget {
  4094. return App.TSeparator(options...)
  4095. }
  4096. // TSeparator — Separator bar
  4097. //
  4098. // The resulting [Window] is a child of 'w'
  4099. //
  4100. // For details please see [TSeparator]
  4101. func (w *Window) TSeparator(options ...Opt) *TSeparatorWidget {
  4102. return &TSeparatorWidget{w.newChild("ttk::separator", options...)}
  4103. }
  4104. // TSeparatorWidget represents the Tcl/Tk ttk_separator widget/window
  4105. type TSeparatorWidget struct {
  4106. *Window
  4107. }
  4108. // TSizegrip — Bottom-right corner resize widget
  4109. //
  4110. // # Description
  4111. //
  4112. // A ttk::sizegrip widget (also known as a grow box)
  4113. // allows the user to resize the containing toplevel window
  4114. // by pressing and dragging the grip.
  4115. //
  4116. // Use [Window.TSizegrip] to create a TSizegrip with a particular parent.
  4117. //
  4118. // More information might be available at the [Tcl/Tk ttk_sizegrip] page.
  4119. //
  4120. // # Standard options
  4121. //
  4122. // - [Class]
  4123. // - [Cursor]
  4124. // - [Style]
  4125. // - [Takefocus]
  4126. //
  4127. // # Styling options
  4128. //
  4129. // The class name for a ttk::sizegrip is TSizegrip.
  4130. //
  4131. // TSizegrip styling options configurable with ttk::style
  4132. // are:
  4133. // - [Background] color
  4134. //
  4135. // Some options are only available for specific themes.
  4136. //
  4137. // See the ttk::style manual page for information on how to configure
  4138. // ttk styles.
  4139. //
  4140. // [Tcl/Tk ttk_sizegrip]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_sizegrip.html
  4141. func TSizegrip(options ...Opt) *TSizegripWidget {
  4142. return App.TSizegrip(options...)
  4143. }
  4144. // TSizegrip — Bottom-right corner resize widget
  4145. //
  4146. // The resulting [Window] is a child of 'w'
  4147. //
  4148. // For details please see [TSizegrip]
  4149. func (w *Window) TSizegrip(options ...Opt) *TSizegripWidget {
  4150. return &TSizegripWidget{w.newChild("ttk::sizegrip", options...)}
  4151. }
  4152. // TSizegripWidget represents the Tcl/Tk ttk_sizegrip widget/window
  4153. type TSizegripWidget struct {
  4154. *Window
  4155. }
  4156. // TSpinbox — Selecting text field widget
  4157. //
  4158. // # Description
  4159. //
  4160. // A ttk::spinbox widget is a ttk::entry widget with built-in
  4161. // up and down buttons that are used to either modify a numeric value or
  4162. // to select among a set of values. The widget implements all the features
  4163. // of the ttk::entry widget including support of the
  4164. // to a Tcl variable.
  4165. //
  4166. // Use [Window.TSpinbox] to create a TSpinbox with a particular parent.
  4167. //
  4168. // More information might be available at the [Tcl/Tk ttk_spinbox] page.
  4169. //
  4170. // # Standard options
  4171. //
  4172. // - [Class]
  4173. // - [Cursor]
  4174. // - [Placeholder]
  4175. // - [Placeholderforeground]
  4176. // - [State]
  4177. // - [Style]
  4178. // - [Takefocus]
  4179. // - [Validate]
  4180. // - [Validatecommand]
  4181. // - [Xscrollcommand]
  4182. //
  4183. // # Widget specific options
  4184. //
  4185. // [Command]
  4186. //
  4187. // Specifies a Tcl command to be invoked whenever a spinbutton is invoked.
  4188. //
  4189. // [Format]
  4190. //
  4191. // Specifies an alternate format to use when setting the string value
  4192. // when using the -from and -to range.
  4193. // This must be a format specifier of the form %<pad>.<pad>f,
  4194. // as it will format a floating-point number.
  4195. //
  4196. // [From]
  4197. //
  4198. // A floating-point value specifying the lowest value for the spinbox. This is
  4199. // used in conjunction with -to and -increment to set a numerical
  4200. // range.
  4201. //
  4202. // [Increment]
  4203. //
  4204. // A floating-point value specifying the change in value to be applied each
  4205. // time one of the widget spin buttons is pressed. The up button applies a
  4206. // positive increment, the down button applies a negative increment.
  4207. //
  4208. // [To]
  4209. //
  4210. // A floating-point value specifying the highest permissible value for the
  4211. // widget. See also -from and -increment.
  4212. // range.
  4213. //
  4214. // [Values]
  4215. //
  4216. // This must be a Tcl list of values. If this option is set then this will
  4217. // override any range set using the -from, -to and
  4218. // -increment options. The widget will instead use the values
  4219. // specified beginning with the first value.
  4220. //
  4221. // [Wrap]
  4222. //
  4223. // Must be a proper boolean value. If on, the spinbox will wrap around the
  4224. // values of data in the widget.
  4225. //
  4226. // # Styling options
  4227. //
  4228. // The class name for a ttk::spinbox is TSpinbox.
  4229. //
  4230. // Dynamic states: active, disabled, focus, readonly.
  4231. //
  4232. // TSpinbox styling options configurable with ttk::style
  4233. // are:
  4234. // - [Arrowcolor] color
  4235. // - [Arrowsize] amount
  4236. // - [Background] color
  4237. // - [Bordercolor] color
  4238. // - [Darkcolor] color
  4239. // - [Fieldbackground] color
  4240. // - [Foreground] color
  4241. // - [Insertcolor] color
  4242. // - [Insertwidth] amount
  4243. // - [Lightcolor] color
  4244. // - [Padding] padding
  4245. // - [Placeholderforeground] color
  4246. // - [Selectbackground] color
  4247. // - [Selectforeground] color
  4248. //
  4249. // Some options are only available for specific themes.
  4250. //
  4251. // See the ttk::style manual page for information on how to configure
  4252. // ttk styles.
  4253. //
  4254. // [Tcl/Tk ttk_spinbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_spinbox.html
  4255. func TSpinbox(options ...Opt) *TSpinboxWidget {
  4256. return App.TSpinbox(options...)
  4257. }
  4258. // TSpinbox — Selecting text field widget
  4259. //
  4260. // The resulting [Window] is a child of 'w'
  4261. //
  4262. // For details please see [TSpinbox]
  4263. func (w *Window) TSpinbox(options ...Opt) *TSpinboxWidget {
  4264. return &TSpinboxWidget{w.newChild("ttk::spinbox", options...)}
  4265. }
  4266. // TSpinboxWidget represents the Tcl/Tk ttk_spinbox widget/window
  4267. type TSpinboxWidget struct {
  4268. *Window
  4269. }
  4270. // TTreeview — Hierarchical multicolumn data display widget
  4271. //
  4272. // # Description
  4273. //
  4274. // The ttk::treeview widget displays a hierarchical collection of items.
  4275. // Each item has a textual label, an optional image,
  4276. // and an optional list of data values.
  4277. // The data values are displayed in successive columns after
  4278. // the tree label.
  4279. //
  4280. // The order in which data values are displayed may be controlled
  4281. // by setting the -displaycolumns widget option.
  4282. // The tree widget can also display column headings.
  4283. // Columns may be accessed by number or by symbolic names
  4284. // listed in the -columns widget option;
  4285. // see COLUMN IDENTIFIERS.
  4286. //
  4287. // Each item is identified by a unique name.
  4288. // The widget will generate item IDs if they are not supplied by the caller.
  4289. // There is a distinguished root item, named {}.
  4290. // The root item itself is not displayed;
  4291. // its children appear at the top level of the hierarchy.
  4292. //
  4293. // Each item also has a list of tags,
  4294. // which can be used to associate event bindings with individual items
  4295. // and control the appearance of the item.
  4296. //
  4297. // Treeview widgets support horizontal and vertical scrolling with the
  4298. // standard -[xy]scrollcommand options
  4299. // and [xy]view widget commands.
  4300. //
  4301. // Use [Window.TTreeview] to create a TTreeview with a particular parent.
  4302. //
  4303. // More information might be available at the [Tcl/Tk ttk_treeview] page.
  4304. //
  4305. // # Standard options
  4306. //
  4307. // - [Class]
  4308. // - [Cursor]
  4309. // - [Padding]
  4310. // - [Style]
  4311. // - [Takefocus]
  4312. // - [Xscrollcommand]
  4313. // - [Yscrollcommand]
  4314. //
  4315. // # Widget specific options
  4316. //
  4317. // [Columns]
  4318. //
  4319. // A list of column identifiers,
  4320. // specifying the number of columns and their names.
  4321. //
  4322. // [Displaycolumns]
  4323. //
  4324. // A list of column identifiers
  4325. // (either symbolic names or integer indices)
  4326. // specifying which data columns are displayed
  4327. // and the order in which they appear,
  4328. // or the string #all.
  4329. // If set to #all (the default),
  4330. // all columns are shown in the order given.
  4331. //
  4332. // [Height]
  4333. //
  4334. // Specifies the number of rows which should be visible.
  4335. // Note that
  4336. // the requested width is determined from the sum of the column widths.
  4337. //
  4338. // [Selectmode]
  4339. //
  4340. // Controls how the built-in class bindings manage the selection.
  4341. // One of extended, browse, or none.
  4342. //
  4343. // [Selecttype]
  4344. //
  4345. // Controls how the built-in class bindings manage the selection.
  4346. // One of item or cell.
  4347. //
  4348. // [Show]
  4349. //
  4350. // A list containing zero or more of the following values, specifying
  4351. // which elements of the tree to display.
  4352. //
  4353. // [Striped]
  4354. //
  4355. // Boolean specifying zebra striped item coloring.
  4356. // Note that
  4357. // striped items uses the -stripedbackground option if set by the theme or
  4358. // a tag. If not supported by the current theme, it will not show.
  4359. //
  4360. // [Titlecolumns]
  4361. //
  4362. // Number of display columns at the left that should not be scrolled. The tree
  4363. // column counts, even if -show tree is not specified. Thus for value N of
  4364. // this option, column #N is the first one that is scrollable. Default is 0.
  4365. //
  4366. // [Titleitems]
  4367. //
  4368. // Number of items at the top that should not be vertically scrolled. Default is 0.
  4369. //
  4370. // # Styling options
  4371. //
  4372. // The class name for a ttk::treeview is Treeview.
  4373. // The treeview header class name is Heading.
  4374. // The treeview item class name is Item.
  4375. // The treeview cell class name is Cell.
  4376. //
  4377. // Dynamic states: disabled, selected.
  4378. //
  4379. // Treeview styling options configurable with ttk::style
  4380. // are:
  4381. // - [Background] color
  4382. // - [Fieldbackground] color
  4383. // - [Font] font
  4384. // - [Foreground] color
  4385. // - [Indent] amount
  4386. // - [Columnseparatorwidth] amount
  4387. // - [Rowheight] amount
  4388. // - [Stripedbackground] color
  4389. //
  4390. // Heading styling options configurable with ttk::style
  4391. // are:
  4392. // - [Background] color
  4393. // - [Font] font
  4394. // - [Relief] relief
  4395. //
  4396. // Item styling options configurable with ttk::style
  4397. // are:
  4398. // - [Foreground] color
  4399. // - [Indicatormargins] padding
  4400. // - [Indicatorsize] amount
  4401. // - [Padding] padding
  4402. //
  4403. // Cell styling options configurable with ttk::style
  4404. // are:
  4405. // - [Padding] padding
  4406. //
  4407. // Some options are only available for specific themes.
  4408. //
  4409. // See the ttk::style manual page for information on how to configure
  4410. // ttk styles.
  4411. //
  4412. // [Tcl/Tk ttk_treeview]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_treeview.html
  4413. func TTreeview(options ...Opt) *TTreeviewWidget {
  4414. return App.TTreeview(options...)
  4415. }
  4416. // TTreeview — Hierarchical multicolumn data display widget
  4417. //
  4418. // The resulting [Window] is a child of 'w'
  4419. //
  4420. // For details please see [TTreeview]
  4421. func (w *Window) TTreeview(options ...Opt) *TTreeviewWidget {
  4422. return &TTreeviewWidget{w.newChild("ttk::treeview", options...)}
  4423. }
  4424. // TTreeviewWidget represents the Tcl/Tk ttk_treeview widget/window
  4425. type TTreeviewWidget struct {
  4426. *Window
  4427. }
  4428. // Accelerator option.
  4429. //
  4430. // Known uses:
  4431. // - [MenuWidget.AddCascade] (command specific)
  4432. // - [MenuWidget.AddCommand] (command specific)
  4433. // - [MenuWidget.AddSeparator] (command specific)
  4434. func Accelerator(val any) Opt {
  4435. return rawOption(fmt.Sprintf(`-accelerator %s`, optionString(val)))
  4436. }
  4437. // Activebackground option.
  4438. //
  4439. // Specifies background color to use when drawing active elements.
  4440. // An element (a widget or portion of a widget) is active if the
  4441. // mouse cursor is positioned over the element and pressing a mouse button
  4442. // will cause some action to occur.
  4443. // If strict Motif compliance has been requested by setting the
  4444. // tk_strictMotif variable, this option will normally be
  4445. // ignored; the normal background color will be used instead.
  4446. // For some elements on Windows and Macintosh systems, the active color
  4447. // will only be used while mouse button 1 is pressed over the element.
  4448. //
  4449. // Known uses:
  4450. // - [Button]
  4451. // - [Checkbutton]
  4452. // - [Label]
  4453. // - [MenuWidget.AddCascade] (command specific)
  4454. // - [MenuWidget.AddCommand] (command specific)
  4455. // - [MenuWidget.AddSeparator] (command specific)
  4456. // - [Menu]
  4457. // - [Menubutton]
  4458. // - [Radiobutton]
  4459. // - [Scale]
  4460. // - [Scrollbar]
  4461. // - [Spinbox]
  4462. func Activebackground(val any) Opt {
  4463. return rawOption(fmt.Sprintf(`-activebackground %s`, optionString(val)))
  4464. }
  4465. // Activebackground — Get the configured option value.
  4466. //
  4467. // Known uses:
  4468. // - [Button]
  4469. // - [Checkbutton]
  4470. // - [Label]
  4471. // - [Menu]
  4472. // - [Menubutton]
  4473. // - [Radiobutton]
  4474. // - [Scale]
  4475. // - [Scrollbar]
  4476. // - [Spinbox]
  4477. func (w *Window) Activebackground() string {
  4478. return evalErr(fmt.Sprintf(`%s cget -activebackground`, w))
  4479. }
  4480. // Activeborderwidth option.
  4481. //
  4482. // Specifies a non-negative value indicating
  4483. // the width of the 3-D border drawn around active elements. See above for
  4484. // definition of active elements.
  4485. // The value may have any of the forms acceptable to Tk_GetPixels.
  4486. // This option is typically only available in widgets displaying more
  4487. // than one element at a time (e.g. menus but not buttons).
  4488. //
  4489. // Known uses:
  4490. // - [Menu]
  4491. func Activeborderwidth(val any) Opt {
  4492. return rawOption(fmt.Sprintf(`-activeborderwidth %s`, optionString(val)))
  4493. }
  4494. // Activeborderwidth — Get the configured option value.
  4495. //
  4496. // Known uses:
  4497. // - [Menu]
  4498. func (w *Window) Activeborderwidth() string {
  4499. return evalErr(fmt.Sprintf(`%s cget -activeborderwidth`, w))
  4500. }
  4501. // Activeforeground option.
  4502. //
  4503. // Specifies foreground color to use when drawing active elements.
  4504. // See above for definition of active elements.
  4505. //
  4506. // Known uses:
  4507. // - [Button]
  4508. // - [Checkbutton]
  4509. // - [Label]
  4510. // - [MenuWidget.AddCascade] (command specific)
  4511. // - [MenuWidget.AddCommand] (command specific)
  4512. // - [MenuWidget.AddSeparator] (command specific)
  4513. // - [Menu]
  4514. // - [Menubutton]
  4515. // - [Radiobutton]
  4516. func Activeforeground(val any) Opt {
  4517. return rawOption(fmt.Sprintf(`-activeforeground %s`, optionString(val)))
  4518. }
  4519. // Activeforeground — Get the configured option value.
  4520. //
  4521. // Known uses:
  4522. // - [Button]
  4523. // - [Checkbutton]
  4524. // - [Label]
  4525. // - [Menu]
  4526. // - [Menubutton]
  4527. // - [Radiobutton]
  4528. func (w *Window) Activeforeground() string {
  4529. return evalErr(fmt.Sprintf(`%s cget -activeforeground`, w))
  4530. }
  4531. // Activerelief option.
  4532. //
  4533. // Specifies the 3-D effect desired for the active item of the widget.
  4534. // See the -relief option for details.
  4535. //
  4536. // Known uses:
  4537. // - [Menu]
  4538. // - [Scrollbar] (widget specific)
  4539. func Activerelief(val any) Opt {
  4540. return rawOption(fmt.Sprintf(`-activerelief %s`, optionString(val)))
  4541. }
  4542. // Activerelief — Get the configured option value.
  4543. //
  4544. // Known uses:
  4545. // - [Menu]
  4546. // - [Scrollbar] (widget specific)
  4547. func (w *Window) Activerelief() string {
  4548. return evalErr(fmt.Sprintf(`%s cget -activerelief`, w))
  4549. }
  4550. // Activestyle option.
  4551. //
  4552. // Known uses:
  4553. // - [Listbox] (widget specific)
  4554. func Activestyle(val any) Opt {
  4555. return rawOption(fmt.Sprintf(`-activestyle %s`, optionString(val)))
  4556. }
  4557. // Activestyle — Get the configured option value.
  4558. //
  4559. // Known uses:
  4560. // - [Listbox] (widget specific)
  4561. func (w *Window) Activestyle() string {
  4562. return evalErr(fmt.Sprintf(`%s cget -activestyle`, w))
  4563. }
  4564. // After option.
  4565. //
  4566. // Known uses:
  4567. // - [Pack] (command specific)
  4568. func After(val any) Opt {
  4569. return rawOption(fmt.Sprintf(`-after %s`, optionString(val)))
  4570. }
  4571. // Anchor option.
  4572. //
  4573. // Specifies how the information in a widget (e.g. text or a bitmap)
  4574. // is to be displayed in the widget.
  4575. // Must be one of the values n, ne, e, se,
  4576. // s, sw, w, nw, or center.
  4577. // For example, nw means display the information such that its
  4578. // top-left corner is at the top-left corner of the widget.
  4579. //
  4580. // Known uses:
  4581. // - [Button]
  4582. // - [Checkbutton]
  4583. // - [Label]
  4584. // - [Menubutton]
  4585. // - [Message]
  4586. // - [Pack] (command specific)
  4587. // - [Place] (command specific)
  4588. // - [Radiobutton]
  4589. // - [TLabel]
  4590. // - [TProgressbar]
  4591. func Anchor(val any) Opt {
  4592. return rawOption(fmt.Sprintf(`-anchor %s`, optionString(val)))
  4593. }
  4594. // Anchor — Get the configured option value.
  4595. //
  4596. // Known uses:
  4597. // - [Button]
  4598. // - [Checkbutton]
  4599. // - [Label]
  4600. // - [Menubutton]
  4601. // - [Message]
  4602. // - [Radiobutton]
  4603. // - [TLabel]
  4604. // - [TProgressbar]
  4605. func (w *Window) Anchor() string {
  4606. return evalErr(fmt.Sprintf(`%s cget -anchor`, w))
  4607. }
  4608. // Aspect option.
  4609. //
  4610. // Known uses:
  4611. // - [Message] (widget specific)
  4612. func Aspect(val any) Opt {
  4613. return rawOption(fmt.Sprintf(`-aspect %s`, optionString(val)))
  4614. }
  4615. // Aspect — Get the configured option value.
  4616. //
  4617. // Known uses:
  4618. // - [Message] (widget specific)
  4619. func (w *Window) Aspect() string {
  4620. return evalErr(fmt.Sprintf(`%s cget -aspect`, w))
  4621. }
  4622. // Autoseparators option.
  4623. //
  4624. // Known uses:
  4625. // - [Text] (widget specific)
  4626. func Autoseparators(val any) Opt {
  4627. return rawOption(fmt.Sprintf(`-autoseparators %s`, optionString(val)))
  4628. }
  4629. // Autoseparators — Get the configured option value.
  4630. //
  4631. // Known uses:
  4632. // - [Text] (widget specific)
  4633. func (w *Window) Autoseparators() string {
  4634. return evalErr(fmt.Sprintf(`%s cget -autoseparators`, w))
  4635. }
  4636. // Background option.
  4637. //
  4638. // Specifies the normal background color to use when displaying the
  4639. // widget.
  4640. //
  4641. // Known uses:
  4642. // - [Button]
  4643. // - [Canvas]
  4644. // - [Checkbutton]
  4645. // - [Entry]
  4646. // - [Frame] (widget specific)
  4647. // - [Label]
  4648. // - [Labelframe] (widget specific)
  4649. // - [Listbox]
  4650. // - [MenuWidget.AddCascade] (command specific)
  4651. // - [MenuWidget.AddCommand] (command specific)
  4652. // - [MenuWidget.AddSeparator] (command specific)
  4653. // - [Menu]
  4654. // - [Menubutton]
  4655. // - [Message]
  4656. // - [NewBitmap] (command specific)
  4657. // - [Panedwindow]
  4658. // - [Radiobutton]
  4659. // - [Scale]
  4660. // - [Scrollbar]
  4661. // - [Spinbox]
  4662. // - [TLabel] (widget specific)
  4663. // - [TextWidget.TagConfigure] (command specific)
  4664. // - [Text]
  4665. // - [Toplevel] (widget specific)
  4666. func Background(val any) Opt {
  4667. return rawOption(fmt.Sprintf(`-background %s`, optionString(val)))
  4668. }
  4669. // Background — Get the configured option value.
  4670. //
  4671. // Known uses:
  4672. // - [Button]
  4673. // - [Canvas]
  4674. // - [Checkbutton]
  4675. // - [Entry]
  4676. // - [Frame] (widget specific)
  4677. // - [Label]
  4678. // - [Labelframe] (widget specific)
  4679. // - [Listbox]
  4680. // - [Menu]
  4681. // - [Menubutton]
  4682. // - [Message]
  4683. // - [Panedwindow]
  4684. // - [Radiobutton]
  4685. // - [Scale]
  4686. // - [Scrollbar]
  4687. // - [Spinbox]
  4688. // - [TLabel] (widget specific)
  4689. // - [Text]
  4690. // - [Toplevel] (widget specific)
  4691. func (w *Window) Background() string {
  4692. return evalErr(fmt.Sprintf(`%s cget -background`, w))
  4693. }
  4694. // Backgroundimage option.
  4695. //
  4696. // Known uses:
  4697. // - [Frame] (widget specific)
  4698. // - [Toplevel] (widget specific)
  4699. func Backgroundimage(val any) Opt {
  4700. return rawOption(fmt.Sprintf(`-backgroundimage %s`, optionString(val)))
  4701. }
  4702. // Backgroundimage — Get the configured option value.
  4703. //
  4704. // Known uses:
  4705. // - [Frame] (widget specific)
  4706. // - [Toplevel] (widget specific)
  4707. func (w *Window) Backgroundimage() string {
  4708. return evalErr(fmt.Sprintf(`%s cget -backgroundimage`, w))
  4709. }
  4710. // Before option.
  4711. //
  4712. // Known uses:
  4713. // - [Pack] (command specific)
  4714. func Before(val any) Opt {
  4715. return rawOption(fmt.Sprintf(`-before %s`, optionString(val)))
  4716. }
  4717. // Bgstipple option.
  4718. //
  4719. // Known uses:
  4720. // - [TextWidget.TagConfigure] (command specific)
  4721. func Bgstipple(val any) Opt {
  4722. return rawOption(fmt.Sprintf(`-bgstipple %s`, optionString(val)))
  4723. }
  4724. // Bigincrement option.
  4725. //
  4726. // Known uses:
  4727. // - [Scale] (widget specific)
  4728. func Bigincrement(val any) Opt {
  4729. return rawOption(fmt.Sprintf(`-bigincrement %s`, optionString(val)))
  4730. }
  4731. // Bigincrement — Get the configured option value.
  4732. //
  4733. // Known uses:
  4734. // - [Scale] (widget specific)
  4735. func (w *Window) Bigincrement() string {
  4736. return evalErr(fmt.Sprintf(`%s cget -bigincrement`, w))
  4737. }
  4738. // Bitmap option.
  4739. //
  4740. // Specifies a bitmap to display in the widget, in any of the forms
  4741. // acceptable to Tk_GetBitmap.
  4742. // The exact way in which the bitmap is displayed may be affected by
  4743. // other options such as -anchor or -justify.
  4744. // Typically, if this option is specified then it overrides other
  4745. // options that specify a textual value to display in the widget
  4746. // but this is controlled by the -compound option;
  4747. // the -bitmap option may be reset to an empty string to re-enable
  4748. // a text display.
  4749. // In widgets that support both -bitmap and -image options,
  4750. // -image will usually override -bitmap.
  4751. //
  4752. // Known uses:
  4753. // - [Button]
  4754. // - [Checkbutton]
  4755. // - [Label]
  4756. // - [MenuWidget.AddCascade] (command specific)
  4757. // - [MenuWidget.AddCommand] (command specific)
  4758. // - [MenuWidget.AddSeparator] (command specific)
  4759. // - [Menubutton]
  4760. // - [Radiobutton]
  4761. func Bitmap(val any) Opt {
  4762. return rawOption(fmt.Sprintf(`-bitmap %s`, optionString(val)))
  4763. }
  4764. // Bitmap — Get the configured option value.
  4765. //
  4766. // Known uses:
  4767. // - [Button]
  4768. // - [Checkbutton]
  4769. // - [Label]
  4770. // - [Menubutton]
  4771. // - [Radiobutton]
  4772. func (w *Window) Bitmap() string {
  4773. return evalErr(fmt.Sprintf(`%s cget -bitmap`, w))
  4774. }
  4775. // Blockcursor option.
  4776. //
  4777. // Known uses:
  4778. // - [Text] (widget specific)
  4779. func Blockcursor(val any) Opt {
  4780. return rawOption(fmt.Sprintf(`-blockcursor %s`, optionString(val)))
  4781. }
  4782. // Blockcursor — Get the configured option value.
  4783. //
  4784. // Known uses:
  4785. // - [Text] (widget specific)
  4786. func (w *Window) Blockcursor() string {
  4787. return evalErr(fmt.Sprintf(`%s cget -blockcursor`, w))
  4788. }
  4789. // Bordermode option.
  4790. //
  4791. // Known uses:
  4792. // - [Place] (command specific)
  4793. func Bordermode(val any) Opt {
  4794. return rawOption(fmt.Sprintf(`-bordermode %s`, optionString(val)))
  4795. }
  4796. // Borderwidth option.
  4797. //
  4798. // Specifies a non-negative value indicating the width
  4799. // of the 3-D border to draw around the outside of the widget (if such a
  4800. // border is being drawn; the -relief option typically determines
  4801. // this). The value may also be used when drawing 3-D effects in the
  4802. // interior of the widget.
  4803. // The value may have any of the forms acceptable to Tk_GetPixels.
  4804. //
  4805. // Known uses:
  4806. // - [Button]
  4807. // - [Canvas]
  4808. // - [Checkbutton]
  4809. // - [Entry]
  4810. // - [Frame]
  4811. // - [Label]
  4812. // - [Labelframe]
  4813. // - [Listbox]
  4814. // - [Menu]
  4815. // - [Menubutton]
  4816. // - [Message]
  4817. // - [Panedwindow]
  4818. // - [Radiobutton]
  4819. // - [Scale]
  4820. // - [Scrollbar]
  4821. // - [Spinbox]
  4822. // - [TFrame] (widget specific)
  4823. // - [TextWidget.TagConfigure] (command specific)
  4824. // - [Text]
  4825. // - [Toplevel]
  4826. func Borderwidth(val any) Opt {
  4827. return rawOption(fmt.Sprintf(`-borderwidth %s`, optionString(val)))
  4828. }
  4829. // Borderwidth — Get the configured option value.
  4830. //
  4831. // Known uses:
  4832. // - [Button]
  4833. // - [Canvas]
  4834. // - [Checkbutton]
  4835. // - [Entry]
  4836. // - [Frame]
  4837. // - [Label]
  4838. // - [Labelframe]
  4839. // - [Listbox]
  4840. // - [Menu]
  4841. // - [Menubutton]
  4842. // - [Message]
  4843. // - [Panedwindow]
  4844. // - [Radiobutton]
  4845. // - [Scale]
  4846. // - [Scrollbar]
  4847. // - [Spinbox]
  4848. // - [TFrame] (widget specific)
  4849. // - [Text]
  4850. // - [Toplevel]
  4851. func (w *Window) Borderwidth() string {
  4852. return evalErr(fmt.Sprintf(`%s cget -borderwidth`, w))
  4853. }
  4854. // Buttonbackground option.
  4855. //
  4856. // Known uses:
  4857. // - [Spinbox] (widget specific)
  4858. func Buttonbackground(val any) Opt {
  4859. return rawOption(fmt.Sprintf(`-buttonbackground %s`, optionString(val)))
  4860. }
  4861. // Buttonbackground — Get the configured option value.
  4862. //
  4863. // Known uses:
  4864. // - [Spinbox] (widget specific)
  4865. func (w *Window) Buttonbackground() string {
  4866. return evalErr(fmt.Sprintf(`%s cget -buttonbackground`, w))
  4867. }
  4868. // Buttoncursor option.
  4869. //
  4870. // Known uses:
  4871. // - [Spinbox] (widget specific)
  4872. func Buttoncursor(val any) Opt {
  4873. return rawOption(fmt.Sprintf(`-buttoncursor %s`, optionString(val)))
  4874. }
  4875. // Buttoncursor — Get the configured option value.
  4876. //
  4877. // Known uses:
  4878. // - [Spinbox] (widget specific)
  4879. func (w *Window) Buttoncursor() string {
  4880. return evalErr(fmt.Sprintf(`%s cget -buttoncursor`, w))
  4881. }
  4882. // Buttondownrelief option.
  4883. //
  4884. // Known uses:
  4885. // - [Spinbox] (widget specific)
  4886. func Buttondownrelief(val any) Opt {
  4887. return rawOption(fmt.Sprintf(`-buttondownrelief %s`, optionString(val)))
  4888. }
  4889. // Buttondownrelief — Get the configured option value.
  4890. //
  4891. // Known uses:
  4892. // - [Spinbox] (widget specific)
  4893. func (w *Window) Buttondownrelief() string {
  4894. return evalErr(fmt.Sprintf(`%s cget -buttondownrelief`, w))
  4895. }
  4896. // Buttonuprelief option.
  4897. //
  4898. // Known uses:
  4899. // - [Spinbox] (widget specific)
  4900. func Buttonuprelief(val any) Opt {
  4901. return rawOption(fmt.Sprintf(`-buttonuprelief %s`, optionString(val)))
  4902. }
  4903. // Buttonuprelief — Get the configured option value.
  4904. //
  4905. // Known uses:
  4906. // - [Spinbox] (widget specific)
  4907. func (w *Window) Buttonuprelief() string {
  4908. return evalErr(fmt.Sprintf(`%s cget -buttonuprelief`, w))
  4909. }
  4910. // Class option.
  4911. //
  4912. // Specifies the window class.
  4913. // The class is used when querying the option database
  4914. // for the window's other options, to determine the default
  4915. // bindtags for the window, and to select the widget's default
  4916. // layout and style.
  4917. // This is a read-only option:
  4918. // it may only be specified when the window is created,
  4919. // and may not be changed with the configure widget command.
  4920. //
  4921. // Known uses:
  4922. // - [Frame] (widget specific)
  4923. // - [Labelframe] (widget specific)
  4924. // - [TButton]
  4925. // - [TCheckbutton]
  4926. // - [TCombobox]
  4927. // - [TEntry]
  4928. // - [TFrame]
  4929. // - [TLabel]
  4930. // - [TLabelframe]
  4931. // - [TMenubutton]
  4932. // - [TNotebook]
  4933. // - [TPanedwindow]
  4934. // - [TProgressbar]
  4935. // - [TRadiobutton]
  4936. // - [TScale]
  4937. // - [TScrollbar]
  4938. // - [TSeparator]
  4939. // - [TSizegrip]
  4940. // - [TSpinbox]
  4941. // - [TTreeview]
  4942. // - [Toplevel] (widget specific)
  4943. func Class(val any) Opt {
  4944. return rawOption(fmt.Sprintf(`-class %s`, optionString(val)))
  4945. }
  4946. // Class — Get the configured option value.
  4947. //
  4948. // Known uses:
  4949. // - [Frame] (widget specific)
  4950. // - [Labelframe] (widget specific)
  4951. // - [TButton]
  4952. // - [TCheckbutton]
  4953. // - [TCombobox]
  4954. // - [TEntry]
  4955. // - [TFrame]
  4956. // - [TLabel]
  4957. // - [TLabelframe]
  4958. // - [TMenubutton]
  4959. // - [TNotebook]
  4960. // - [TPanedwindow]
  4961. // - [TProgressbar]
  4962. // - [TRadiobutton]
  4963. // - [TScale]
  4964. // - [TScrollbar]
  4965. // - [TSeparator]
  4966. // - [TSizegrip]
  4967. // - [TSpinbox]
  4968. // - [TTreeview]
  4969. // - [Toplevel] (widget specific)
  4970. func (w *Window) Class() string {
  4971. return evalErr(fmt.Sprintf(`%s cget -class`, w))
  4972. }
  4973. // Closeenough option.
  4974. //
  4975. // Known uses:
  4976. // - [Canvas] (widget specific)
  4977. func Closeenough(val any) Opt {
  4978. return rawOption(fmt.Sprintf(`-closeenough %s`, optionString(val)))
  4979. }
  4980. // Closeenough — Get the configured option value.
  4981. //
  4982. // Known uses:
  4983. // - [Canvas] (widget specific)
  4984. func (w *Window) Closeenough() string {
  4985. return evalErr(fmt.Sprintf(`%s cget -closeenough`, w))
  4986. }
  4987. // Colormap option.
  4988. //
  4989. // Known uses:
  4990. // - [Frame] (widget specific)
  4991. // - [Labelframe] (widget specific)
  4992. // - [Toplevel] (widget specific)
  4993. func Colormap(val any) Opt {
  4994. return rawOption(fmt.Sprintf(`-colormap %s`, optionString(val)))
  4995. }
  4996. // Colormap — Get the configured option value.
  4997. //
  4998. // Known uses:
  4999. // - [Frame] (widget specific)
  5000. // - [Labelframe] (widget specific)
  5001. // - [Toplevel] (widget specific)
  5002. func (w *Window) Colormap() string {
  5003. return evalErr(fmt.Sprintf(`%s cget -colormap`, w))
  5004. }
  5005. // Column option.
  5006. //
  5007. // Known uses:
  5008. // - [Grid] (command specific)
  5009. func Column(val any) Opt {
  5010. return rawOption(fmt.Sprintf(`-column %s`, optionString(val)))
  5011. }
  5012. // Columnbreak option.
  5013. //
  5014. // Known uses:
  5015. // - [MenuWidget.AddCascade] (command specific)
  5016. // - [MenuWidget.AddCommand] (command specific)
  5017. // - [MenuWidget.AddSeparator] (command specific)
  5018. func Columnbreak(val any) Opt {
  5019. return rawOption(fmt.Sprintf(`-columnbreak %s`, optionString(val)))
  5020. }
  5021. // Columns option.
  5022. //
  5023. // Known uses:
  5024. // - [TTreeview] (widget specific)
  5025. func Columns(val any) Opt {
  5026. return rawOption(fmt.Sprintf(`-columns %s`, optionString(val)))
  5027. }
  5028. // Columns — Get the configured option value.
  5029. //
  5030. // Known uses:
  5031. // - [TTreeview] (widget specific)
  5032. func (w *Window) Columns() string {
  5033. return evalErr(fmt.Sprintf(`%s cget -columns`, w))
  5034. }
  5035. // Columnspan option.
  5036. //
  5037. // Known uses:
  5038. // - [Grid] (command specific)
  5039. func Columnspan(val any) Opt {
  5040. return rawOption(fmt.Sprintf(`-columnspan %s`, optionString(val)))
  5041. }
  5042. // Command option.
  5043. //
  5044. // See also [Event handlers].
  5045. //
  5046. // Known uses:
  5047. // - [Button] (widget specific)
  5048. // - [Checkbutton] (widget specific)
  5049. // - [Fontchooser] (command specific)
  5050. // - [MenuWidget.AddCascade] (command specific)
  5051. // - [MenuWidget.AddCommand] (command specific)
  5052. // - [MenuWidget.AddSeparator] (command specific)
  5053. // - [MessageBox] (command specific)
  5054. // - [Radiobutton] (widget specific)
  5055. // - [Scale] (widget specific)
  5056. // - [Scrollbar] (widget specific)
  5057. // - [Spinbox] (widget specific)
  5058. // - [TButton] (widget specific)
  5059. // - [TCheckbutton] (widget specific)
  5060. // - [TRadiobutton] (widget specific)
  5061. // - [TScale] (widget specific)
  5062. // - [TScrollbar] (widget specific)
  5063. // - [TSpinbox] (widget specific)
  5064. //
  5065. // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
  5066. func Command(handler any) Opt {
  5067. return newEventHandler("-command", handler)
  5068. }
  5069. // Compound option.
  5070. //
  5071. // Specifies if the widget should display text and bitmaps/images at the
  5072. // same time, and if so, where the bitmap/image should be placed relative
  5073. // to the text. Must be one of the values none, bottom,
  5074. // top, left, right, or center. For example, the
  5075. // (default) value none specifies that the bitmap or image should
  5076. // (if defined) be displayed instead of the text, the value left
  5077. // specifies that the bitmap or image should be displayed to the left of
  5078. // the text, and the value center specifies that the bitmap or
  5079. // image should be displayed on top of the text.
  5080. //
  5081. // Known uses:
  5082. // - [Button]
  5083. // - [Checkbutton]
  5084. // - [Label]
  5085. // - [MenuWidget.AddCascade] (command specific)
  5086. // - [MenuWidget.AddCommand] (command specific)
  5087. // - [MenuWidget.AddSeparator] (command specific)
  5088. // - [Menubutton]
  5089. // - [Radiobutton]
  5090. // - [TButton]
  5091. // - [TCheckbutton]
  5092. // - [TLabel]
  5093. // - [TMenubutton]
  5094. // - [TRadiobutton]
  5095. func Compound(val any) Opt {
  5096. return rawOption(fmt.Sprintf(`-compound %s`, optionString(val)))
  5097. }
  5098. // Compound — Get the configured option value.
  5099. //
  5100. // Known uses:
  5101. // - [Button]
  5102. // - [Checkbutton]
  5103. // - [Label]
  5104. // - [Menubutton]
  5105. // - [Radiobutton]
  5106. // - [TButton]
  5107. // - [TCheckbutton]
  5108. // - [TLabel]
  5109. // - [TMenubutton]
  5110. // - [TRadiobutton]
  5111. func (w *Window) Compound() string {
  5112. return evalErr(fmt.Sprintf(`%s cget -compound`, w))
  5113. }
  5114. // Confine option.
  5115. //
  5116. // Known uses:
  5117. // - [Canvas] (widget specific)
  5118. func Confine(val any) Opt {
  5119. return rawOption(fmt.Sprintf(`-confine %s`, optionString(val)))
  5120. }
  5121. // Confine — Get the configured option value.
  5122. //
  5123. // Known uses:
  5124. // - [Canvas] (widget specific)
  5125. func (w *Window) Confine() string {
  5126. return evalErr(fmt.Sprintf(`%s cget -confine`, w))
  5127. }
  5128. // Confirmoverwrite option.
  5129. //
  5130. // Known uses:
  5131. // - [GetSaveFile] (command specific)
  5132. func Confirmoverwrite(val any) Opt {
  5133. return rawOption(fmt.Sprintf(`-confirmoverwrite %s`, optionString(val)))
  5134. }
  5135. // Container option.
  5136. //
  5137. // Known uses:
  5138. // - [Frame] (widget specific)
  5139. // - [Toplevel] (widget specific)
  5140. func Container(val any) Opt {
  5141. return rawOption(fmt.Sprintf(`-container %s`, optionString(val)))
  5142. }
  5143. // Container — Get the configured option value.
  5144. //
  5145. // Known uses:
  5146. // - [Frame] (widget specific)
  5147. // - [Toplevel] (widget specific)
  5148. func (w *Window) Container() string {
  5149. return evalErr(fmt.Sprintf(`%s cget -container`, w))
  5150. }
  5151. // Cursor option.
  5152. //
  5153. // Specifies the mouse cursor to be used for the widget.
  5154. // The value may have any of the forms acceptable to Tk_GetCursor.
  5155. // In addition, if an empty string is specified, it indicates that the
  5156. // widget should defer to its parent for cursor specification.
  5157. //
  5158. // Known uses:
  5159. // - [Button]
  5160. // - [Canvas]
  5161. // - [Checkbutton]
  5162. // - [Entry]
  5163. // - [Frame]
  5164. // - [Label]
  5165. // - [Labelframe]
  5166. // - [Listbox]
  5167. // - [Menu]
  5168. // - [Menubutton]
  5169. // - [Message]
  5170. // - [Panedwindow]
  5171. // - [Radiobutton]
  5172. // - [Scale]
  5173. // - [Scrollbar]
  5174. // - [Spinbox]
  5175. // - [TButton]
  5176. // - [TCheckbutton]
  5177. // - [TCombobox]
  5178. // - [TEntry]
  5179. // - [TFrame]
  5180. // - [TLabel]
  5181. // - [TLabelframe]
  5182. // - [TMenubutton]
  5183. // - [TNotebook]
  5184. // - [TPanedwindow]
  5185. // - [TProgressbar]
  5186. // - [TRadiobutton]
  5187. // - [TScale]
  5188. // - [TScrollbar]
  5189. // - [TSeparator]
  5190. // - [TSizegrip]
  5191. // - [TSpinbox]
  5192. // - [TTreeview]
  5193. // - [Text]
  5194. // - [Toplevel]
  5195. // - [Window.Busy] (command specific)
  5196. func Cursor(val any) Opt {
  5197. return rawOption(fmt.Sprintf(`-cursor %s`, optionString(val)))
  5198. }
  5199. // Cursor — Get the configured option value.
  5200. //
  5201. // Known uses:
  5202. // - [Button]
  5203. // - [Canvas]
  5204. // - [Checkbutton]
  5205. // - [Entry]
  5206. // - [Frame]
  5207. // - [Label]
  5208. // - [Labelframe]
  5209. // - [Listbox]
  5210. // - [Menu]
  5211. // - [Menubutton]
  5212. // - [Message]
  5213. // - [Panedwindow]
  5214. // - [Radiobutton]
  5215. // - [Scale]
  5216. // - [Scrollbar]
  5217. // - [Spinbox]
  5218. // - [TButton]
  5219. // - [TCheckbutton]
  5220. // - [TCombobox]
  5221. // - [TEntry]
  5222. // - [TFrame]
  5223. // - [TLabel]
  5224. // - [TLabelframe]
  5225. // - [TMenubutton]
  5226. // - [TNotebook]
  5227. // - [TPanedwindow]
  5228. // - [TProgressbar]
  5229. // - [TRadiobutton]
  5230. // - [TScale]
  5231. // - [TScrollbar]
  5232. // - [TSeparator]
  5233. // - [TSizegrip]
  5234. // - [TSpinbox]
  5235. // - [TTreeview]
  5236. // - [Text]
  5237. // - [Toplevel]
  5238. func (w *Window) Cursor() string {
  5239. return evalErr(fmt.Sprintf(`%s cget -cursor`, w))
  5240. }
  5241. // Default option.
  5242. //
  5243. // Known uses:
  5244. // - [Button] (widget specific)
  5245. // - [MessageBox] (command specific)
  5246. // - [TButton] (widget specific)
  5247. func Default(val any) Opt {
  5248. return rawOption(fmt.Sprintf(`-default %s`, optionString(val)))
  5249. }
  5250. // Default — Get the configured option value.
  5251. //
  5252. // Known uses:
  5253. // - [Button] (widget specific)
  5254. // - [TButton] (widget specific)
  5255. func (w *Window) Default() string {
  5256. return evalErr(fmt.Sprintf(`%s cget -default`, w))
  5257. }
  5258. // Defaultextension option.
  5259. //
  5260. // Known uses:
  5261. // - [GetOpenFile] (command specific)
  5262. // - [GetSaveFile] (command specific)
  5263. func Defaultextension(val any) Opt {
  5264. return rawOption(fmt.Sprintf(`-defaultextension %s`, optionString(val)))
  5265. }
  5266. // Detail option.
  5267. //
  5268. // Known uses:
  5269. // - [MessageBox] (command specific)
  5270. func Detail(val any) Opt {
  5271. return rawOption(fmt.Sprintf(`-detail %s`, optionString(val)))
  5272. }
  5273. // Digits option.
  5274. //
  5275. // Known uses:
  5276. // - [Scale] (widget specific)
  5277. func Digits(val any) Opt {
  5278. return rawOption(fmt.Sprintf(`-digits %s`, optionString(val)))
  5279. }
  5280. // Digits — Get the configured option value.
  5281. //
  5282. // Known uses:
  5283. // - [Scale] (widget specific)
  5284. func (w *Window) Digits() string {
  5285. return evalErr(fmt.Sprintf(`%s cget -digits`, w))
  5286. }
  5287. // Direction option.
  5288. //
  5289. // Known uses:
  5290. // - [Menubutton] (widget specific)
  5291. // - [TMenubutton] (widget specific)
  5292. func Direction(val any) Opt {
  5293. return rawOption(fmt.Sprintf(`-direction %s`, optionString(val)))
  5294. }
  5295. // Direction — Get the configured option value.
  5296. //
  5297. // Known uses:
  5298. // - [Menubutton] (widget specific)
  5299. // - [TMenubutton] (widget specific)
  5300. func (w *Window) Direction() string {
  5301. return evalErr(fmt.Sprintf(`%s cget -direction`, w))
  5302. }
  5303. // Disabledbackground option.
  5304. //
  5305. // Known uses:
  5306. // - [Entry] (widget specific)
  5307. // - [Spinbox] (widget specific)
  5308. func Disabledbackground(val any) Opt {
  5309. return rawOption(fmt.Sprintf(`-disabledbackground %s`, optionString(val)))
  5310. }
  5311. // Disabledbackground — Get the configured option value.
  5312. //
  5313. // Known uses:
  5314. // - [Entry] (widget specific)
  5315. // - [Spinbox] (widget specific)
  5316. func (w *Window) Disabledbackground() string {
  5317. return evalErr(fmt.Sprintf(`%s cget -disabledbackground`, w))
  5318. }
  5319. // Disabledforeground option.
  5320. //
  5321. // Specifies foreground color to use when drawing a disabled element.
  5322. // If the option is specified as an empty string (which is typically the
  5323. // case on monochrome displays), disabled elements are drawn with the
  5324. // normal foreground color but they are dimmed by drawing them
  5325. // with a stippled fill pattern.
  5326. //
  5327. // Known uses:
  5328. // - [Button]
  5329. // - [Checkbutton]
  5330. // - [Entry] (widget specific)
  5331. // - [Label]
  5332. // - [Listbox]
  5333. // - [Menu]
  5334. // - [Menubutton]
  5335. // - [Radiobutton]
  5336. // - [Spinbox] (widget specific)
  5337. func Disabledforeground(val any) Opt {
  5338. return rawOption(fmt.Sprintf(`-disabledforeground %s`, optionString(val)))
  5339. }
  5340. // Disabledforeground — Get the configured option value.
  5341. //
  5342. // Known uses:
  5343. // - [Button]
  5344. // - [Checkbutton]
  5345. // - [Entry] (widget specific)
  5346. // - [Label]
  5347. // - [Listbox]
  5348. // - [Menu]
  5349. // - [Menubutton]
  5350. // - [Radiobutton]
  5351. // - [Spinbox] (widget specific)
  5352. func (w *Window) Disabledforeground() string {
  5353. return evalErr(fmt.Sprintf(`%s cget -disabledforeground`, w))
  5354. }
  5355. // Displaycolumns option.
  5356. //
  5357. // Known uses:
  5358. // - [TTreeview] (widget specific)
  5359. func Displaycolumns(val any) Opt {
  5360. return rawOption(fmt.Sprintf(`-displaycolumns %s`, optionString(val)))
  5361. }
  5362. // Displaycolumns — Get the configured option value.
  5363. //
  5364. // Known uses:
  5365. // - [TTreeview] (widget specific)
  5366. func (w *Window) Displaycolumns() string {
  5367. return evalErr(fmt.Sprintf(`%s cget -displaycolumns`, w))
  5368. }
  5369. // Displayof option.
  5370. //
  5371. // Known uses:
  5372. // - [Bell] (command specific)
  5373. // - [ClipboardAppend] (command specific)
  5374. // - [ClipboardClear] (command specific)
  5375. // - [ClipboardGet] (command specific)
  5376. // - [Focus] (command specific)
  5377. // - [FontFamilies] (command specific)
  5378. func Displayof(val any) Opt {
  5379. return rawOption(fmt.Sprintf(`-displayof %s`, optionString(val)))
  5380. }
  5381. // Elementborderwidth option.
  5382. //
  5383. // Known uses:
  5384. // - [Scrollbar] (widget specific)
  5385. func Elementborderwidth(val any) Opt {
  5386. return rawOption(fmt.Sprintf(`-elementborderwidth %s`, optionString(val)))
  5387. }
  5388. // Elementborderwidth — Get the configured option value.
  5389. //
  5390. // Known uses:
  5391. // - [Scrollbar] (widget specific)
  5392. func (w *Window) Elementborderwidth() string {
  5393. return evalErr(fmt.Sprintf(`%s cget -elementborderwidth`, w))
  5394. }
  5395. // Elide option.
  5396. //
  5397. // Known uses:
  5398. // - [TextWidget.TagConfigure] (command specific)
  5399. func Elide(val any) Opt {
  5400. return rawOption(fmt.Sprintf(`-elide %s`, optionString(val)))
  5401. }
  5402. // Endline option.
  5403. //
  5404. // Known uses:
  5405. // - [Text] (widget specific)
  5406. func Endline(val any) Opt {
  5407. return rawOption(fmt.Sprintf(`-endline %s`, optionString(val)))
  5408. }
  5409. // Endline — Get the configured option value.
  5410. //
  5411. // Known uses:
  5412. // - [Text] (widget specific)
  5413. func (w *Window) Endline() string {
  5414. return evalErr(fmt.Sprintf(`%s cget -endline`, w))
  5415. }
  5416. // Expand option.
  5417. //
  5418. // Known uses:
  5419. // - [Pack] (command specific)
  5420. func Expand(val any) Opt {
  5421. return rawOption(fmt.Sprintf(`-expand %s`, optionString(val)))
  5422. }
  5423. // Exportselection option.
  5424. //
  5425. // Specifies whether or not a selection in the widget should also be
  5426. // the X selection.
  5427. // The value may have any of the forms accepted by Tcl_GetBoolean,
  5428. // such as true, false, 0, 1, yes, or no.
  5429. // If the selection is exported, then selecting in the widget deselects
  5430. // the current X selection, selecting outside the widget deselects any
  5431. // widget selection, and the widget will respond to selection retrieval
  5432. // requests when it has a selection. The default is usually for widgets
  5433. // to export selections.
  5434. //
  5435. // Known uses:
  5436. // - [Entry]
  5437. // - [Listbox]
  5438. // - [Spinbox]
  5439. // - [TCombobox] (widget specific)
  5440. // - [TEntry] (widget specific)
  5441. // - [Text]
  5442. func Exportselection(val any) Opt {
  5443. return rawOption(fmt.Sprintf(`-exportselection %s`, optionString(val)))
  5444. }
  5445. // Exportselection — Get the configured option value.
  5446. //
  5447. // Known uses:
  5448. // - [Entry]
  5449. // - [Listbox]
  5450. // - [Spinbox]
  5451. // - [TCombobox] (widget specific)
  5452. // - [TEntry] (widget specific)
  5453. // - [Text]
  5454. func (w *Window) Exportselection() string {
  5455. return evalErr(fmt.Sprintf(`%s cget -exportselection`, w))
  5456. }
  5457. // Family option.
  5458. //
  5459. // Known uses:
  5460. // - [NewFont] (command specific)
  5461. func Family(val any) Opt {
  5462. return rawOption(fmt.Sprintf(`-family %s`, optionString(val)))
  5463. }
  5464. // Fgstipple option.
  5465. //
  5466. // Known uses:
  5467. // - [TextWidget.TagConfigure] (command specific)
  5468. func Fgstipple(val any) Opt {
  5469. return rawOption(fmt.Sprintf(`-fgstipple %s`, optionString(val)))
  5470. }
  5471. // File option.
  5472. //
  5473. // Known uses:
  5474. // - [NewBitmap] (command specific)
  5475. // - [NewPhoto] (command specific)
  5476. func File(val any) Opt {
  5477. return rawOption(fmt.Sprintf(`-file %s`, optionString(val)))
  5478. }
  5479. // Filetypes option.
  5480. //
  5481. // Known uses:
  5482. // - [GetOpenFile] (command specific)
  5483. // - [GetSaveFile] (command specific)
  5484. func Filetypes(val any) Opt {
  5485. return rawOption(fmt.Sprintf(`-filetypes %s`, optionString(val)))
  5486. }
  5487. // Fill option.
  5488. //
  5489. // Known uses:
  5490. // - [Pack] (command specific)
  5491. func Fill(val any) Opt {
  5492. return rawOption(fmt.Sprintf(`-fill %s`, optionString(val)))
  5493. }
  5494. // Force option.
  5495. //
  5496. // Known uses:
  5497. // - [Focus] (command specific)
  5498. func Force(val any) Opt {
  5499. return rawOption(fmt.Sprintf(`-force %s`, optionString(val)))
  5500. }
  5501. // Foreground option.
  5502. //
  5503. // Specifies the normal foreground color to use when displaying the widget.
  5504. //
  5505. // Known uses:
  5506. // - [Button]
  5507. // - [Checkbutton]
  5508. // - [Entry]
  5509. // - [Label]
  5510. // - [Labelframe]
  5511. // - [Listbox]
  5512. // - [MenuWidget.AddCascade] (command specific)
  5513. // - [MenuWidget.AddCommand] (command specific)
  5514. // - [MenuWidget.AddSeparator] (command specific)
  5515. // - [Menu]
  5516. // - [Menubutton]
  5517. // - [Message]
  5518. // - [NewBitmap] (command specific)
  5519. // - [Radiobutton]
  5520. // - [Scale]
  5521. // - [Spinbox]
  5522. // - [TEntry]
  5523. // - [TLabel]
  5524. // - [TProgressbar]
  5525. // - [TextWidget.TagConfigure] (command specific)
  5526. // - [Text]
  5527. func Foreground(val any) Opt {
  5528. return rawOption(fmt.Sprintf(`-foreground %s`, optionString(val)))
  5529. }
  5530. // Foreground — Get the configured option value.
  5531. //
  5532. // Known uses:
  5533. // - [Button]
  5534. // - [Checkbutton]
  5535. // - [Entry]
  5536. // - [Label]
  5537. // - [Labelframe]
  5538. // - [Listbox]
  5539. // - [Menu]
  5540. // - [Menubutton]
  5541. // - [Message]
  5542. // - [Radiobutton]
  5543. // - [Scale]
  5544. // - [Spinbox]
  5545. // - [TEntry]
  5546. // - [TLabel]
  5547. // - [TProgressbar]
  5548. // - [Text]
  5549. func (w *Window) Foreground() string {
  5550. return evalErr(fmt.Sprintf(`%s cget -foreground`, w))
  5551. }
  5552. // Format option.
  5553. //
  5554. // Known uses:
  5555. // - [ClipboardAppend] (command specific)
  5556. // - [NewPhoto] (command specific)
  5557. // - [Spinbox] (widget specific)
  5558. // - [TSpinbox] (widget specific)
  5559. func Format(val any) Opt {
  5560. return rawOption(fmt.Sprintf(`-format %s`, optionString(val)))
  5561. }
  5562. // Format — Get the configured option value.
  5563. //
  5564. // Known uses:
  5565. // - [Spinbox] (widget specific)
  5566. // - [TSpinbox] (widget specific)
  5567. func (w *Window) Format() string {
  5568. return evalErr(fmt.Sprintf(`%s cget -format`, w))
  5569. }
  5570. // Gamma option.
  5571. //
  5572. // Known uses:
  5573. // - [NewPhoto] (command specific)
  5574. func Gamma(val any) Opt {
  5575. return rawOption(fmt.Sprintf(`-gamma %s`, optionString(val)))
  5576. }
  5577. // Handlepad option.
  5578. //
  5579. // Known uses:
  5580. // - [Panedwindow] (widget specific)
  5581. func Handlepad(val any) Opt {
  5582. return rawOption(fmt.Sprintf(`-handlepad %s`, optionString(val)))
  5583. }
  5584. // Handlepad — Get the configured option value.
  5585. //
  5586. // Known uses:
  5587. // - [Panedwindow] (widget specific)
  5588. func (w *Window) Handlepad() string {
  5589. return evalErr(fmt.Sprintf(`%s cget -handlepad`, w))
  5590. }
  5591. // Handlesize option.
  5592. //
  5593. // Known uses:
  5594. // - [Panedwindow] (widget specific)
  5595. func Handlesize(val any) Opt {
  5596. return rawOption(fmt.Sprintf(`-handlesize %s`, optionString(val)))
  5597. }
  5598. // Handlesize — Get the configured option value.
  5599. //
  5600. // Known uses:
  5601. // - [Panedwindow] (widget specific)
  5602. func (w *Window) Handlesize() string {
  5603. return evalErr(fmt.Sprintf(`%s cget -handlesize`, w))
  5604. }
  5605. // Height option.
  5606. //
  5607. // Known uses:
  5608. // - [Button] (widget specific)
  5609. // - [Canvas] (widget specific)
  5610. // - [Checkbutton] (widget specific)
  5611. // - [Frame] (widget specific)
  5612. // - [Label] (widget specific)
  5613. // - [Labelframe] (widget specific)
  5614. // - [Listbox] (widget specific)
  5615. // - [Menubutton] (widget specific)
  5616. // - [NewPhoto] (command specific)
  5617. // - [Panedwindow] (widget specific)
  5618. // - [Place] (command specific)
  5619. // - [Radiobutton] (widget specific)
  5620. // - [TCombobox] (widget specific)
  5621. // - [TFrame] (widget specific)
  5622. // - [TLabelframe] (widget specific)
  5623. // - [TNotebook] (widget specific)
  5624. // - [TPanedwindow] (widget specific)
  5625. // - [TTreeview] (widget specific)
  5626. // - [Text] (widget specific)
  5627. // - [Toplevel] (widget specific)
  5628. func Height(val any) Opt {
  5629. return rawOption(fmt.Sprintf(`-height %s`, optionString(val)))
  5630. }
  5631. // Height — Get the configured option value.
  5632. //
  5633. // Known uses:
  5634. // - [Button] (widget specific)
  5635. // - [Canvas] (widget specific)
  5636. // - [Checkbutton] (widget specific)
  5637. // - [Frame] (widget specific)
  5638. // - [Label] (widget specific)
  5639. // - [Labelframe] (widget specific)
  5640. // - [Listbox] (widget specific)
  5641. // - [Menubutton] (widget specific)
  5642. // - [Panedwindow] (widget specific)
  5643. // - [Radiobutton] (widget specific)
  5644. // - [TCombobox] (widget specific)
  5645. // - [TFrame] (widget specific)
  5646. // - [TLabelframe] (widget specific)
  5647. // - [TNotebook] (widget specific)
  5648. // - [TPanedwindow] (widget specific)
  5649. // - [TTreeview] (widget specific)
  5650. // - [Text] (widget specific)
  5651. // - [Toplevel] (widget specific)
  5652. func (w *Window) Height() string {
  5653. return evalErr(fmt.Sprintf(`%s cget -height`, w))
  5654. }
  5655. // Hidemargin option.
  5656. //
  5657. // Known uses:
  5658. // - [MenuWidget.AddCascade] (command specific)
  5659. // - [MenuWidget.AddCommand] (command specific)
  5660. // - [MenuWidget.AddSeparator] (command specific)
  5661. func Hidemargin(val any) Opt {
  5662. return rawOption(fmt.Sprintf(`-hidemargin %s`, optionString(val)))
  5663. }
  5664. // Highlightbackground option.
  5665. //
  5666. // Specifies the color to display in the traversal highlight region when
  5667. // the widget does not have the input focus.
  5668. //
  5669. // Known uses:
  5670. // - [Button]
  5671. // - [Canvas]
  5672. // - [Checkbutton]
  5673. // - [Entry]
  5674. // - [Frame]
  5675. // - [Label]
  5676. // - [Labelframe]
  5677. // - [Listbox]
  5678. // - [Menubutton]
  5679. // - [Message]
  5680. // - [Radiobutton]
  5681. // - [Scale]
  5682. // - [Scrollbar]
  5683. // - [Spinbox]
  5684. // - [Text]
  5685. // - [Toplevel]
  5686. func Highlightbackground(val any) Opt {
  5687. return rawOption(fmt.Sprintf(`-highlightbackground %s`, optionString(val)))
  5688. }
  5689. // Highlightbackground — Get the configured option value.
  5690. //
  5691. // Known uses:
  5692. // - [Button]
  5693. // - [Canvas]
  5694. // - [Checkbutton]
  5695. // - [Entry]
  5696. // - [Frame]
  5697. // - [Label]
  5698. // - [Labelframe]
  5699. // - [Listbox]
  5700. // - [Menubutton]
  5701. // - [Message]
  5702. // - [Radiobutton]
  5703. // - [Scale]
  5704. // - [Scrollbar]
  5705. // - [Spinbox]
  5706. // - [Text]
  5707. // - [Toplevel]
  5708. func (w *Window) Highlightbackground() string {
  5709. return evalErr(fmt.Sprintf(`%s cget -highlightbackground`, w))
  5710. }
  5711. // Highlightcolor option.
  5712. //
  5713. // Specifies the color to use for the traversal highlight rectangle that is
  5714. // drawn around the widget when it has the input focus.
  5715. //
  5716. // Known uses:
  5717. // - [Button]
  5718. // - [Canvas]
  5719. // - [Checkbutton]
  5720. // - [Entry]
  5721. // - [Frame]
  5722. // - [Label]
  5723. // - [Labelframe]
  5724. // - [Listbox]
  5725. // - [Menubutton]
  5726. // - [Message]
  5727. // - [Radiobutton]
  5728. // - [Scale]
  5729. // - [Scrollbar]
  5730. // - [Spinbox]
  5731. // - [Text]
  5732. // - [Toplevel]
  5733. func Highlightcolor(val any) Opt {
  5734. return rawOption(fmt.Sprintf(`-highlightcolor %s`, optionString(val)))
  5735. }
  5736. // Highlightcolor — Get the configured option value.
  5737. //
  5738. // Known uses:
  5739. // - [Button]
  5740. // - [Canvas]
  5741. // - [Checkbutton]
  5742. // - [Entry]
  5743. // - [Frame]
  5744. // - [Label]
  5745. // - [Labelframe]
  5746. // - [Listbox]
  5747. // - [Menubutton]
  5748. // - [Message]
  5749. // - [Radiobutton]
  5750. // - [Scale]
  5751. // - [Scrollbar]
  5752. // - [Spinbox]
  5753. // - [Text]
  5754. // - [Toplevel]
  5755. func (w *Window) Highlightcolor() string {
  5756. return evalErr(fmt.Sprintf(`%s cget -highlightcolor`, w))
  5757. }
  5758. // Highlightthickness option.
  5759. //
  5760. // Specifies a non-negative value indicating the width of the highlight
  5761. // rectangle to draw around the outside of the widget when it has the
  5762. // input focus.
  5763. // The value may have any of the forms acceptable to Tk_GetPixels.
  5764. // If the value is zero, no focus highlight is drawn around the widget.
  5765. //
  5766. // Known uses:
  5767. // - [Button]
  5768. // - [Canvas]
  5769. // - [Checkbutton]
  5770. // - [Entry]
  5771. // - [Frame]
  5772. // - [Label]
  5773. // - [Labelframe]
  5774. // - [Listbox]
  5775. // - [Menubutton]
  5776. // - [Message]
  5777. // - [Radiobutton]
  5778. // - [Scale]
  5779. // - [Scrollbar]
  5780. // - [Spinbox]
  5781. // - [Text]
  5782. // - [Toplevel]
  5783. func Highlightthickness(val any) Opt {
  5784. return rawOption(fmt.Sprintf(`-highlightthickness %s`, optionString(val)))
  5785. }
  5786. // Highlightthickness — Get the configured option value.
  5787. //
  5788. // Known uses:
  5789. // - [Button]
  5790. // - [Canvas]
  5791. // - [Checkbutton]
  5792. // - [Entry]
  5793. // - [Frame]
  5794. // - [Label]
  5795. // - [Labelframe]
  5796. // - [Listbox]
  5797. // - [Menubutton]
  5798. // - [Message]
  5799. // - [Radiobutton]
  5800. // - [Scale]
  5801. // - [Scrollbar]
  5802. // - [Spinbox]
  5803. // - [Text]
  5804. // - [Toplevel]
  5805. func (w *Window) Highlightthickness() string {
  5806. return evalErr(fmt.Sprintf(`%s cget -highlightthickness`, w))
  5807. }
  5808. // Icon option.
  5809. //
  5810. // Known uses:
  5811. // - [MessageBox] (command specific)
  5812. func Icon(val any) Opt {
  5813. return rawOption(fmt.Sprintf(`-icon %s`, optionString(val)))
  5814. }
  5815. // Image option.
  5816. //
  5817. // Specifies an image to display in the widget, which must have been
  5818. // created with the image create command.
  5819. // Typically, if the -image option is specified then it overrides other
  5820. // options that specify a bitmap or textual value to display in the
  5821. // widget, though this is controlled by the -compound option;
  5822. // the -image option may be reset to an empty string to re-enable
  5823. // a bitmap or text display.
  5824. //
  5825. // Known uses:
  5826. // - [Button]
  5827. // - [Checkbutton]
  5828. // - [Label]
  5829. // - [MenuWidget.AddCascade] (command specific)
  5830. // - [MenuWidget.AddCommand] (command specific)
  5831. // - [MenuWidget.AddSeparator] (command specific)
  5832. // - [Menubutton]
  5833. // - [Radiobutton]
  5834. // - [TButton]
  5835. // - [TCheckbutton]
  5836. // - [TLabel]
  5837. // - [TMenubutton]
  5838. // - [TRadiobutton]
  5839. func Image(val any) Opt {
  5840. return rawOption(fmt.Sprintf(`-image %s`, optionString(val)))
  5841. }
  5842. // Image — Get the configured option value.
  5843. //
  5844. // Known uses:
  5845. // - [Button]
  5846. // - [Checkbutton]
  5847. // - [Label]
  5848. // - [Menubutton]
  5849. // - [Radiobutton]
  5850. // - [TButton]
  5851. // - [TCheckbutton]
  5852. // - [TLabel]
  5853. // - [TMenubutton]
  5854. // - [TRadiobutton]
  5855. func (w *Window) Image() string {
  5856. return evalErr(fmt.Sprintf(`%s cget -image`, w))
  5857. }
  5858. // In option.
  5859. //
  5860. // Known uses:
  5861. // - [Grid] (command specific)
  5862. // - [Pack] (command specific)
  5863. // - [Place] (command specific)
  5864. func In(val any) Opt {
  5865. return rawOption(fmt.Sprintf(`-in %s`, optionString(val)))
  5866. }
  5867. // Inactiveselectbackground option.
  5868. //
  5869. // Known uses:
  5870. // - [Text] (widget specific)
  5871. func Inactiveselectbackground(val any) Opt {
  5872. return rawOption(fmt.Sprintf(`-inactiveselectbackground %s`, optionString(val)))
  5873. }
  5874. // Inactiveselectbackground — Get the configured option value.
  5875. //
  5876. // Known uses:
  5877. // - [Text] (widget specific)
  5878. func (w *Window) Inactiveselectbackground() string {
  5879. return evalErr(fmt.Sprintf(`%s cget -inactiveselectbackground`, w))
  5880. }
  5881. // Increment option.
  5882. //
  5883. // Known uses:
  5884. // - [Spinbox] (widget specific)
  5885. // - [TSpinbox] (widget specific)
  5886. func Increment(val any) Opt {
  5887. return rawOption(fmt.Sprintf(`-increment %s`, optionString(val)))
  5888. }
  5889. // Increment — Get the configured option value.
  5890. //
  5891. // Known uses:
  5892. // - [Spinbox] (widget specific)
  5893. // - [TSpinbox] (widget specific)
  5894. func (w *Window) Increment() string {
  5895. return evalErr(fmt.Sprintf(`%s cget -increment`, w))
  5896. }
  5897. // Indicatoron option.
  5898. //
  5899. // Known uses:
  5900. // - [Checkbutton] (widget specific)
  5901. // - [MenuWidget.AddCascade] (command specific)
  5902. // - [MenuWidget.AddCommand] (command specific)
  5903. // - [MenuWidget.AddSeparator] (command specific)
  5904. // - [Menubutton] (widget specific)
  5905. // - [Radiobutton] (widget specific)
  5906. func Indicatoron(val any) Opt {
  5907. return rawOption(fmt.Sprintf(`-indicatoron %s`, optionString(val)))
  5908. }
  5909. // Indicatoron — Get the configured option value.
  5910. //
  5911. // Known uses:
  5912. // - [Checkbutton] (widget specific)
  5913. // - [Menubutton] (widget specific)
  5914. // - [Radiobutton] (widget specific)
  5915. func (w *Window) Indicatoron() string {
  5916. return evalErr(fmt.Sprintf(`%s cget -indicatoron`, w))
  5917. }
  5918. // Initialcolor option.
  5919. //
  5920. // Known uses:
  5921. // - [ChooseColor] (command specific)
  5922. func Initialcolor(val any) Opt {
  5923. return rawOption(fmt.Sprintf(`-initialcolor %s`, optionString(val)))
  5924. }
  5925. // Initialdir option.
  5926. //
  5927. // Known uses:
  5928. // - [ChooseDirectory] (command specific)
  5929. // - [GetOpenFile] (command specific)
  5930. // - [GetSaveFile] (command specific)
  5931. func Initialdir(val any) Opt {
  5932. return rawOption(fmt.Sprintf(`-initialdir %s`, optionString(val)))
  5933. }
  5934. // Initialfile option.
  5935. //
  5936. // Known uses:
  5937. // - [GetOpenFile] (command specific)
  5938. // - [GetSaveFile] (command specific)
  5939. func Initialfile(val any) Opt {
  5940. return rawOption(fmt.Sprintf(`-initialfile %s`, optionString(val)))
  5941. }
  5942. // Insertbackground option.
  5943. //
  5944. // Specifies the color to use as background in the area covered by the
  5945. // insertion cursor. This color will normally override either the normal
  5946. // background for the widget (or the selection background if the insertion
  5947. // cursor happens to fall in the selection).
  5948. //
  5949. // Known uses:
  5950. // - [Canvas]
  5951. // - [Entry]
  5952. // - [Spinbox]
  5953. // - [Text]
  5954. func Insertbackground(val any) Opt {
  5955. return rawOption(fmt.Sprintf(`-insertbackground %s`, optionString(val)))
  5956. }
  5957. // Insertbackground — Get the configured option value.
  5958. //
  5959. // Known uses:
  5960. // - [Canvas]
  5961. // - [Entry]
  5962. // - [Spinbox]
  5963. // - [Text]
  5964. func (w *Window) Insertbackground() string {
  5965. return evalErr(fmt.Sprintf(`%s cget -insertbackground`, w))
  5966. }
  5967. // Insertborderwidth option.
  5968. //
  5969. // Specifies a non-negative value indicating the width
  5970. // of the 3-D border to draw around the insertion cursor.
  5971. // The value may have any of the forms acceptable to Tk_GetPixels.
  5972. //
  5973. // Known uses:
  5974. // - [Canvas]
  5975. // - [Entry]
  5976. // - [Spinbox]
  5977. // - [Text]
  5978. func Insertborderwidth(val any) Opt {
  5979. return rawOption(fmt.Sprintf(`-insertborderwidth %s`, optionString(val)))
  5980. }
  5981. // Insertborderwidth — Get the configured option value.
  5982. //
  5983. // Known uses:
  5984. // - [Canvas]
  5985. // - [Entry]
  5986. // - [Spinbox]
  5987. // - [Text]
  5988. func (w *Window) Insertborderwidth() string {
  5989. return evalErr(fmt.Sprintf(`%s cget -insertborderwidth`, w))
  5990. }
  5991. // Insertofftime option.
  5992. //
  5993. // Specifies a non-negative integer value indicating the number of
  5994. // milliseconds the insertion cursor should remain
  5995. // in each blink cycle.
  5996. // If this option is zero then the cursor does not blink: it is on
  5997. // all the time.
  5998. //
  5999. // Known uses:
  6000. // - [Canvas]
  6001. // - [Entry]
  6002. // - [Spinbox]
  6003. // - [Text]
  6004. func Insertofftime(val any) Opt {
  6005. return rawOption(fmt.Sprintf(`-insertofftime %s`, optionString(val)))
  6006. }
  6007. // Insertofftime — Get the configured option value.
  6008. //
  6009. // Known uses:
  6010. // - [Canvas]
  6011. // - [Entry]
  6012. // - [Spinbox]
  6013. // - [Text]
  6014. func (w *Window) Insertofftime() string {
  6015. return evalErr(fmt.Sprintf(`%s cget -insertofftime`, w))
  6016. }
  6017. // Insertontime option.
  6018. //
  6019. // Specifies a non-negative integer value indicating the number of
  6020. // milliseconds the insertion cursor should remain
  6021. // in each blink cycle.
  6022. //
  6023. // Known uses:
  6024. // - [Canvas]
  6025. // - [Entry]
  6026. // - [Spinbox]
  6027. // - [Text]
  6028. func Insertontime(val any) Opt {
  6029. return rawOption(fmt.Sprintf(`-insertontime %s`, optionString(val)))
  6030. }
  6031. // Insertontime — Get the configured option value.
  6032. //
  6033. // Known uses:
  6034. // - [Canvas]
  6035. // - [Entry]
  6036. // - [Spinbox]
  6037. // - [Text]
  6038. func (w *Window) Insertontime() string {
  6039. return evalErr(fmt.Sprintf(`%s cget -insertontime`, w))
  6040. }
  6041. // Insertunfocussed option.
  6042. //
  6043. // Known uses:
  6044. // - [Text] (widget specific)
  6045. func Insertunfocussed(val any) Opt {
  6046. return rawOption(fmt.Sprintf(`-insertunfocussed %s`, optionString(val)))
  6047. }
  6048. // Insertunfocussed — Get the configured option value.
  6049. //
  6050. // Known uses:
  6051. // - [Text] (widget specific)
  6052. func (w *Window) Insertunfocussed() string {
  6053. return evalErr(fmt.Sprintf(`%s cget -insertunfocussed`, w))
  6054. }
  6055. // Insertwidth option.
  6056. //
  6057. // Specifies a non-negative value indicating the total width of the insertion cursor.
  6058. // The value may have any of the forms acceptable to Tk_GetPixels.
  6059. // If a border has been specified for the insertion
  6060. // cursor (using the -insertborderwidth option), the border
  6061. // will be drawn inside the width specified by the -insertwidth
  6062. // option.
  6063. //
  6064. // Known uses:
  6065. // - [Canvas]
  6066. // - [Entry]
  6067. // - [Spinbox]
  6068. // - [Text]
  6069. func Insertwidth(val any) Opt {
  6070. return rawOption(fmt.Sprintf(`-insertwidth %s`, optionString(val)))
  6071. }
  6072. // Insertwidth — Get the configured option value.
  6073. //
  6074. // Known uses:
  6075. // - [Canvas]
  6076. // - [Entry]
  6077. // - [Spinbox]
  6078. // - [Text]
  6079. func (w *Window) Insertwidth() string {
  6080. return evalErr(fmt.Sprintf(`%s cget -insertwidth`, w))
  6081. }
  6082. // Invalidcommand option.
  6083. //
  6084. // See also [Event handlers].
  6085. //
  6086. // Known uses:
  6087. // - [Entry] (widget specific)
  6088. // - [Spinbox] (widget specific)
  6089. // - [TEntry] (widget specific)
  6090. //
  6091. // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
  6092. func Invalidcommand(handler any) Opt {
  6093. return newEventHandler("-invalidcommand", handler)
  6094. }
  6095. // Ipadx option.
  6096. //
  6097. // Known uses:
  6098. // - [Grid] (command specific)
  6099. // - [Pack] (command specific)
  6100. func Ipadx(val any) Opt {
  6101. return rawOption(fmt.Sprintf(`-ipadx %s`, optionString(val)))
  6102. }
  6103. // Ipady option.
  6104. //
  6105. // Known uses:
  6106. // - [Grid] (command specific)
  6107. // - [Pack] (command specific)
  6108. func Ipady(val any) Opt {
  6109. return rawOption(fmt.Sprintf(`-ipady %s`, optionString(val)))
  6110. }
  6111. // Jump option.
  6112. //
  6113. // For widgets with a slider that can be dragged to adjust a value,
  6114. // such as scrollbars, this option determines when
  6115. // notifications are made about changes in the value.
  6116. // The option's value must be a boolean of the form accepted by
  6117. // Tcl_GetBoolean.
  6118. // If the value is false, updates are made continuously as the
  6119. // slider is dragged.
  6120. // If the value is true, updates are delayed until the mouse button
  6121. // is released to end the drag; at that point a single notification
  6122. // is made (the value
  6123. // rather than changing smoothly).
  6124. //
  6125. // Known uses:
  6126. // - [Scrollbar]
  6127. func Jump(val any) Opt {
  6128. return rawOption(fmt.Sprintf(`-jump %s`, optionString(val)))
  6129. }
  6130. // Jump — Get the configured option value.
  6131. //
  6132. // Known uses:
  6133. // - [Scrollbar]
  6134. func (w *Window) Jump() string {
  6135. return evalErr(fmt.Sprintf(`%s cget -jump`, w))
  6136. }
  6137. // Justify option.
  6138. //
  6139. // When there are multiple lines of text displayed in a widget, this
  6140. // option determines how the lines line up with each other.
  6141. // Must be one of left, center, or right.
  6142. // Left means that the lines' left edges all line up, center
  6143. // means that the lines' centers are aligned, and right means
  6144. // that the lines' right edges line up.
  6145. //
  6146. // Known uses:
  6147. // - [Button]
  6148. // - [Checkbutton]
  6149. // - [Entry]
  6150. // - [Label]
  6151. // - [Listbox]
  6152. // - [Menubutton]
  6153. // - [Message] (widget specific)
  6154. // - [Radiobutton]
  6155. // - [Spinbox]
  6156. // - [TButton]
  6157. // - [TCombobox] (widget specific)
  6158. // - [TEntry] (widget specific)
  6159. // - [TLabel]
  6160. // - [TProgressbar]
  6161. // - [TextWidget.TagConfigure] (command specific)
  6162. func Justify(val any) Opt {
  6163. return rawOption(fmt.Sprintf(`-justify %s`, optionString(val)))
  6164. }
  6165. // Justify — Get the configured option value.
  6166. //
  6167. // Known uses:
  6168. // - [Button]
  6169. // - [Checkbutton]
  6170. // - [Entry]
  6171. // - [Label]
  6172. // - [Listbox]
  6173. // - [Menubutton]
  6174. // - [Message] (widget specific)
  6175. // - [Radiobutton]
  6176. // - [Spinbox]
  6177. // - [TButton]
  6178. // - [TCombobox] (widget specific)
  6179. // - [TEntry] (widget specific)
  6180. // - [TLabel]
  6181. // - [TProgressbar]
  6182. func (w *Window) Justify() string {
  6183. return evalErr(fmt.Sprintf(`%s cget -justify`, w))
  6184. }
  6185. // Lbl option.
  6186. //
  6187. // Known uses:
  6188. // - [MenuWidget.AddCascade] (command specific)
  6189. // - [MenuWidget.AddCommand] (command specific)
  6190. // - [MenuWidget.AddSeparator] (command specific)
  6191. // - [Scale] (widget specific)
  6192. func Lbl(val any) Opt {
  6193. return rawOption(fmt.Sprintf(`-label %s`, optionString(val)))
  6194. }
  6195. // Lbl — Get the configured option value.
  6196. //
  6197. // Known uses:
  6198. // - [Scale] (widget specific)
  6199. func (w *Window) Lbl() string {
  6200. return evalErr(fmt.Sprintf(`%s cget -label`, w))
  6201. }
  6202. // Labelanchor option.
  6203. //
  6204. // Known uses:
  6205. // - [Labelframe] (widget specific)
  6206. // - [TLabelframe] (widget specific)
  6207. func Labelanchor(val any) Opt {
  6208. return rawOption(fmt.Sprintf(`-labelanchor %s`, optionString(val)))
  6209. }
  6210. // Labelanchor — Get the configured option value.
  6211. //
  6212. // Known uses:
  6213. // - [Labelframe] (widget specific)
  6214. // - [TLabelframe] (widget specific)
  6215. func (w *Window) Labelanchor() string {
  6216. return evalErr(fmt.Sprintf(`%s cget -labelanchor`, w))
  6217. }
  6218. // Labelwidget option.
  6219. //
  6220. // Known uses:
  6221. // - [Labelframe] (widget specific)
  6222. // - [TLabelframe] (widget specific)
  6223. func Labelwidget(val any) Opt {
  6224. return rawOption(fmt.Sprintf(`-labelwidget %s`, optionString(val)))
  6225. }
  6226. // Labelwidget — Get the configured option value.
  6227. //
  6228. // Known uses:
  6229. // - [Labelframe] (widget specific)
  6230. // - [TLabelframe] (widget specific)
  6231. func (w *Window) Labelwidget() string {
  6232. return evalErr(fmt.Sprintf(`%s cget -labelwidget`, w))
  6233. }
  6234. // Lastfor option.
  6235. //
  6236. // Known uses:
  6237. // - [Focus] (command specific)
  6238. func Lastfor(val any) Opt {
  6239. return rawOption(fmt.Sprintf(`-lastfor %s`, optionString(val)))
  6240. }
  6241. // Length option.
  6242. //
  6243. // Known uses:
  6244. // - [Scale] (widget specific)
  6245. // - [TProgressbar] (widget specific)
  6246. // - [TScale] (widget specific)
  6247. func Length(val any) Opt {
  6248. return rawOption(fmt.Sprintf(`-length %s`, optionString(val)))
  6249. }
  6250. // Length — Get the configured option value.
  6251. //
  6252. // Known uses:
  6253. // - [Scale] (widget specific)
  6254. // - [TProgressbar] (widget specific)
  6255. // - [TScale] (widget specific)
  6256. func (w *Window) Length() string {
  6257. return evalErr(fmt.Sprintf(`%s cget -length`, w))
  6258. }
  6259. // Listvariable option.
  6260. //
  6261. // Known uses:
  6262. // - [Listbox] (widget specific)
  6263. func Listvariable(val any) Opt {
  6264. return rawOption(fmt.Sprintf(`-listvariable %s`, optionString(val)))
  6265. }
  6266. // Listvariable — Get the configured option value.
  6267. //
  6268. // Known uses:
  6269. // - [Listbox] (widget specific)
  6270. func (w *Window) Listvariable() string {
  6271. return evalErr(fmt.Sprintf(`%s cget -listvariable`, w))
  6272. }
  6273. // Lmargin1 option.
  6274. //
  6275. // Known uses:
  6276. // - [TextWidget.TagConfigure] (command specific)
  6277. func Lmargin1(val any) Opt {
  6278. return rawOption(fmt.Sprintf(`-lmargin1 %s`, optionString(val)))
  6279. }
  6280. // Lmargin2 option.
  6281. //
  6282. // Known uses:
  6283. // - [TextWidget.TagConfigure] (command specific)
  6284. func Lmargin2(val any) Opt {
  6285. return rawOption(fmt.Sprintf(`-lmargin2 %s`, optionString(val)))
  6286. }
  6287. // Lmargincolor option.
  6288. //
  6289. // Known uses:
  6290. // - [TextWidget.TagConfigure] (command specific)
  6291. func Lmargincolor(val any) Opt {
  6292. return rawOption(fmt.Sprintf(`-lmargincolor %s`, optionString(val)))
  6293. }
  6294. // Maskdata option.
  6295. //
  6296. // Known uses:
  6297. // - [NewBitmap] (command specific)
  6298. func Maskdata(val any) Opt {
  6299. return rawOption(fmt.Sprintf(`-maskdata %s`, optionString(val)))
  6300. }
  6301. // Maskfile option.
  6302. //
  6303. // Known uses:
  6304. // - [NewBitmap] (command specific)
  6305. func Maskfile(val any) Opt {
  6306. return rawOption(fmt.Sprintf(`-maskfile %s`, optionString(val)))
  6307. }
  6308. // Maximum option.
  6309. //
  6310. // Known uses:
  6311. // - [TProgressbar] (widget specific)
  6312. func Maximum(val any) Opt {
  6313. return rawOption(fmt.Sprintf(`-maximum %s`, optionString(val)))
  6314. }
  6315. // Maximum — Get the configured option value.
  6316. //
  6317. // Known uses:
  6318. // - [TProgressbar] (widget specific)
  6319. func (w *Window) Maximum() string {
  6320. return evalErr(fmt.Sprintf(`%s cget -maximum`, w))
  6321. }
  6322. // Maxundo option.
  6323. //
  6324. // Known uses:
  6325. // - [Text] (widget specific)
  6326. func Maxundo(val any) Opt {
  6327. return rawOption(fmt.Sprintf(`-maxundo %s`, optionString(val)))
  6328. }
  6329. // Maxundo — Get the configured option value.
  6330. //
  6331. // Known uses:
  6332. // - [Text] (widget specific)
  6333. func (w *Window) Maxundo() string {
  6334. return evalErr(fmt.Sprintf(`%s cget -maxundo`, w))
  6335. }
  6336. // Mnu option.
  6337. //
  6338. // Known uses:
  6339. // - [MenuWidget.AddCascade] (command specific)
  6340. // - [MenuWidget.AddCommand] (command specific)
  6341. // - [MenuWidget.AddSeparator] (command specific)
  6342. // - [Menubutton] (widget specific)
  6343. // - [TMenubutton] (widget specific)
  6344. // - [Toplevel] (widget specific)
  6345. func Mnu(val any) Opt {
  6346. return rawOption(fmt.Sprintf(`-menu %s`, optionString(val)))
  6347. }
  6348. // Mnu — Get the configured option value.
  6349. //
  6350. // Known uses:
  6351. // - [Menubutton] (widget specific)
  6352. // - [TMenubutton] (widget specific)
  6353. // - [Toplevel] (widget specific)
  6354. func (w *Window) Mnu() string {
  6355. return evalErr(fmt.Sprintf(`%s cget -menu`, w))
  6356. }
  6357. // Msg option.
  6358. //
  6359. // Known uses:
  6360. // - [ChooseDirectory] (command specific)
  6361. // - [MessageBox] (command specific)
  6362. func Msg(val any) Opt {
  6363. return rawOption(fmt.Sprintf(`-message %s`, optionString(val)))
  6364. }
  6365. // Metadata option.
  6366. //
  6367. // Known uses:
  6368. // - [NewPhoto] (command specific)
  6369. func Metadata(val any) Opt {
  6370. return rawOption(fmt.Sprintf(`-metadata %s`, optionString(val)))
  6371. }
  6372. // Mode option.
  6373. //
  6374. // Known uses:
  6375. // - [TProgressbar] (widget specific)
  6376. func Mode(val any) Opt {
  6377. return rawOption(fmt.Sprintf(`-mode %s`, optionString(val)))
  6378. }
  6379. // Mode — Get the configured option value.
  6380. //
  6381. // Known uses:
  6382. // - [TProgressbar] (widget specific)
  6383. func (w *Window) Mode() string {
  6384. return evalErr(fmt.Sprintf(`%s cget -mode`, w))
  6385. }
  6386. // Multiple option.
  6387. //
  6388. // Known uses:
  6389. // - [GetOpenFile] (command specific)
  6390. func Multiple(val any) Opt {
  6391. return rawOption(fmt.Sprintf(`-multiple %s`, optionString(val)))
  6392. }
  6393. // Mustexist option.
  6394. //
  6395. // Known uses:
  6396. // - [ChooseDirectory] (command specific)
  6397. func Mustexist(val any) Opt {
  6398. return rawOption(fmt.Sprintf(`-mustexist %s`, optionString(val)))
  6399. }
  6400. // Nice option.
  6401. //
  6402. // Known uses:
  6403. // - [Bell] (command specific)
  6404. func Nice(val any) Opt {
  6405. return rawOption(fmt.Sprintf(`-nice %s`, optionString(val)))
  6406. }
  6407. // Offrelief option.
  6408. //
  6409. // Known uses:
  6410. // - [Checkbutton] (widget specific)
  6411. // - [Radiobutton] (widget specific)
  6412. func Offrelief(val any) Opt {
  6413. return rawOption(fmt.Sprintf(`-offrelief %s`, optionString(val)))
  6414. }
  6415. // Offrelief — Get the configured option value.
  6416. //
  6417. // Known uses:
  6418. // - [Checkbutton] (widget specific)
  6419. // - [Radiobutton] (widget specific)
  6420. func (w *Window) Offrelief() string {
  6421. return evalErr(fmt.Sprintf(`%s cget -offrelief`, w))
  6422. }
  6423. // Offset option.
  6424. //
  6425. // Known uses:
  6426. // - [TextWidget.TagConfigure] (command specific)
  6427. func Offset(val any) Opt {
  6428. return rawOption(fmt.Sprintf(`-offset %s`, optionString(val)))
  6429. }
  6430. // Offvalue option.
  6431. //
  6432. // Known uses:
  6433. // - [Checkbutton] (widget specific)
  6434. // - [MenuWidget.AddCascade] (command specific)
  6435. // - [MenuWidget.AddCommand] (command specific)
  6436. // - [MenuWidget.AddSeparator] (command specific)
  6437. // - [TCheckbutton] (widget specific)
  6438. func Offvalue(val any) Opt {
  6439. return rawOption(fmt.Sprintf(`-offvalue %s`, optionString(val)))
  6440. }
  6441. // Offvalue — Get the configured option value.
  6442. //
  6443. // Known uses:
  6444. // - [Checkbutton] (widget specific)
  6445. // - [TCheckbutton] (widget specific)
  6446. func (w *Window) Offvalue() string {
  6447. return evalErr(fmt.Sprintf(`%s cget -offvalue`, w))
  6448. }
  6449. // Onvalue option.
  6450. //
  6451. // Known uses:
  6452. // - [Checkbutton] (widget specific)
  6453. // - [MenuWidget.AddCascade] (command specific)
  6454. // - [MenuWidget.AddCommand] (command specific)
  6455. // - [MenuWidget.AddSeparator] (command specific)
  6456. // - [TCheckbutton] (widget specific)
  6457. func Onvalue(val any) Opt {
  6458. return rawOption(fmt.Sprintf(`-onvalue %s`, optionString(val)))
  6459. }
  6460. // Onvalue — Get the configured option value.
  6461. //
  6462. // Known uses:
  6463. // - [Checkbutton] (widget specific)
  6464. // - [TCheckbutton] (widget specific)
  6465. func (w *Window) Onvalue() string {
  6466. return evalErr(fmt.Sprintf(`%s cget -onvalue`, w))
  6467. }
  6468. // Opaqueresize option.
  6469. //
  6470. // Known uses:
  6471. // - [Panedwindow] (widget specific)
  6472. func Opaqueresize(val any) Opt {
  6473. return rawOption(fmt.Sprintf(`-opaqueresize %s`, optionString(val)))
  6474. }
  6475. // Opaqueresize — Get the configured option value.
  6476. //
  6477. // Known uses:
  6478. // - [Panedwindow] (widget specific)
  6479. func (w *Window) Opaqueresize() string {
  6480. return evalErr(fmt.Sprintf(`%s cget -opaqueresize`, w))
  6481. }
  6482. // Orient option.
  6483. //
  6484. // For widgets that can lay themselves out with either a horizontal
  6485. // or vertical orientation, such as scrollbars, this option specifies
  6486. // which orientation should be used. Must be either horizontal
  6487. // or vertical or an abbreviation of one of these.
  6488. //
  6489. // Known uses:
  6490. // - [Panedwindow]
  6491. // - [Scale]
  6492. // - [Scrollbar]
  6493. // - [TPanedwindow] (widget specific)
  6494. // - [TProgressbar] (widget specific)
  6495. // - [TScale] (widget specific)
  6496. // - [TScrollbar] (widget specific)
  6497. // - [TSeparator] (widget specific)
  6498. func Orient(val any) Opt {
  6499. return rawOption(fmt.Sprintf(`-orient %s`, optionString(val)))
  6500. }
  6501. // Orient — Get the configured option value.
  6502. //
  6503. // Known uses:
  6504. // - [Panedwindow]
  6505. // - [Scale]
  6506. // - [Scrollbar]
  6507. // - [TPanedwindow] (widget specific)
  6508. // - [TProgressbar] (widget specific)
  6509. // - [TScale] (widget specific)
  6510. // - [TScrollbar] (widget specific)
  6511. // - [TSeparator] (widget specific)
  6512. func (w *Window) Orient() string {
  6513. return evalErr(fmt.Sprintf(`%s cget -orient`, w))
  6514. }
  6515. // Overrelief option.
  6516. //
  6517. // Known uses:
  6518. // - [Button] (widget specific)
  6519. // - [Checkbutton] (widget specific)
  6520. // - [Radiobutton] (widget specific)
  6521. func Overrelief(val any) Opt {
  6522. return rawOption(fmt.Sprintf(`-overrelief %s`, optionString(val)))
  6523. }
  6524. // Overrelief — Get the configured option value.
  6525. //
  6526. // Known uses:
  6527. // - [Button] (widget specific)
  6528. // - [Checkbutton] (widget specific)
  6529. // - [Radiobutton] (widget specific)
  6530. func (w *Window) Overrelief() string {
  6531. return evalErr(fmt.Sprintf(`%s cget -overrelief`, w))
  6532. }
  6533. // Overstrike option.
  6534. //
  6535. // Known uses:
  6536. // - [NewFont] (command specific)
  6537. // - [TextWidget.TagConfigure] (command specific)
  6538. func Overstrike(val any) Opt {
  6539. return rawOption(fmt.Sprintf(`-overstrike %s`, optionString(val)))
  6540. }
  6541. // Overstrikefg option.
  6542. //
  6543. // Known uses:
  6544. // - [TextWidget.TagConfigure] (command specific)
  6545. func Overstrikefg(val any) Opt {
  6546. return rawOption(fmt.Sprintf(`-overstrikefg %s`, optionString(val)))
  6547. }
  6548. // Padding option.
  6549. //
  6550. // Specifies the internal padding for the widget.
  6551. // The padding is a list of up to four length specifications
  6552. // left top right bottom.
  6553. // If fewer than four elements are specified,
  6554. // bottom defaults to top,
  6555. // right defaults to left, and
  6556. // top defaults to left.
  6557. // In other words, a list of three numbers specify the left, vertical, and right
  6558. // padding; a list of two numbers specify the horizontal and the vertical padding;
  6559. // a single number specifies the same padding all the way around the widget.
  6560. //
  6561. // Known uses:
  6562. // - [TFrame]
  6563. // - [TLabel]
  6564. // - [TLabelframe]
  6565. // - [TNotebook] (widget specific)
  6566. // - [TTreeview]
  6567. func Padding(val any) Opt {
  6568. return rawOption(fmt.Sprintf(`-padding %s`, optionString(val)))
  6569. }
  6570. // Padding — Get the configured option value.
  6571. //
  6572. // Known uses:
  6573. // - [TFrame]
  6574. // - [TLabel]
  6575. // - [TLabelframe]
  6576. // - [TNotebook] (widget specific)
  6577. // - [TTreeview]
  6578. func (w *Window) Padding() string {
  6579. return evalErr(fmt.Sprintf(`%s cget -padding`, w))
  6580. }
  6581. // Padx option.
  6582. //
  6583. // Specifies a non-negative value indicating how much extra space
  6584. // to request for the widget in the X-direction.
  6585. // The value may have any of the forms acceptable to Tk_GetPixels.
  6586. // When computing how large a window it needs, the widget will
  6587. // add this amount to the width it would normally need (as determined
  6588. // by the width of the things displayed in the widget); if the geometry
  6589. // manager can satisfy this request, the widget will end up with extra
  6590. // internal space to the left and/or right of what it displays inside.
  6591. // Most widgets only use this option for padding text: if they are
  6592. // displaying a bitmap or image, then they usually ignore padding
  6593. // options.
  6594. //
  6595. // Known uses:
  6596. // - [Button]
  6597. // - [Checkbutton]
  6598. // - [Frame]
  6599. // - [Grid] (command specific)
  6600. // - [Label]
  6601. // - [Labelframe]
  6602. // - [Menubutton]
  6603. // - [Message]
  6604. // - [Pack] (command specific)
  6605. // - [Radiobutton]
  6606. // - [Text]
  6607. // - [Toplevel]
  6608. func Padx(val any) Opt {
  6609. return rawOption(fmt.Sprintf(`-padx %s`, optionString(val)))
  6610. }
  6611. // Padx — Get the configured option value.
  6612. //
  6613. // Known uses:
  6614. // - [Button]
  6615. // - [Checkbutton]
  6616. // - [Frame]
  6617. // - [Label]
  6618. // - [Labelframe]
  6619. // - [Menubutton]
  6620. // - [Message]
  6621. // - [Radiobutton]
  6622. // - [Text]
  6623. // - [Toplevel]
  6624. func (w *Window) Padx() string {
  6625. return evalErr(fmt.Sprintf(`%s cget -padx`, w))
  6626. }
  6627. // Pady option.
  6628. //
  6629. // Specifies a non-negative value indicating how much extra space
  6630. // to request for the widget in the Y-direction.
  6631. // The value may have any of the forms acceptable to Tk_GetPixels.
  6632. // When computing how large a window it needs, the widget will add
  6633. // this amount to the height it would normally need (as determined by
  6634. // the height of the things displayed in the widget); if the geometry
  6635. // manager can satisfy this request, the widget will end up with extra
  6636. // internal space above and/or below what it displays inside.
  6637. // Most widgets only use this option for padding text: if they are
  6638. // displaying a bitmap or image, then they usually ignore padding
  6639. // options.
  6640. //
  6641. // Known uses:
  6642. // - [Button]
  6643. // - [Checkbutton]
  6644. // - [Frame]
  6645. // - [Grid] (command specific)
  6646. // - [Label]
  6647. // - [Labelframe]
  6648. // - [Menubutton]
  6649. // - [Message]
  6650. // - [Pack] (command specific)
  6651. // - [Radiobutton]
  6652. // - [Text]
  6653. // - [Toplevel]
  6654. func Pady(val any) Opt {
  6655. return rawOption(fmt.Sprintf(`-pady %s`, optionString(val)))
  6656. }
  6657. // Pady — Get the configured option value.
  6658. //
  6659. // Known uses:
  6660. // - [Button]
  6661. // - [Checkbutton]
  6662. // - [Frame]
  6663. // - [Label]
  6664. // - [Labelframe]
  6665. // - [Menubutton]
  6666. // - [Message]
  6667. // - [Radiobutton]
  6668. // - [Text]
  6669. // - [Toplevel]
  6670. func (w *Window) Pady() string {
  6671. return evalErr(fmt.Sprintf(`%s cget -pady`, w))
  6672. }
  6673. // Palette option.
  6674. //
  6675. // Known uses:
  6676. // - [NewPhoto] (command specific)
  6677. func Palette(val any) Opt {
  6678. return rawOption(fmt.Sprintf(`-palette %s`, optionString(val)))
  6679. }
  6680. // Parent option.
  6681. //
  6682. // Known uses:
  6683. // - [ChooseColor] (command specific)
  6684. // - [ChooseDirectory] (command specific)
  6685. // - [Fontchooser] (command specific)
  6686. // - [GetOpenFile] (command specific)
  6687. // - [GetSaveFile] (command specific)
  6688. // - [MessageBox] (command specific)
  6689. func Parent(val any) Opt {
  6690. return rawOption(fmt.Sprintf(`-parent %s`, optionString(val)))
  6691. }
  6692. // Phase option.
  6693. //
  6694. // Known uses:
  6695. // - [TProgressbar] (widget specific)
  6696. func Phase(val any) Opt {
  6697. return rawOption(fmt.Sprintf(`-phase %s`, optionString(val)))
  6698. }
  6699. // Phase — Get the configured option value.
  6700. //
  6701. // Known uses:
  6702. // - [TProgressbar] (widget specific)
  6703. func (w *Window) Phase() string {
  6704. return evalErr(fmt.Sprintf(`%s cget -phase`, w))
  6705. }
  6706. // Placeholder option.
  6707. //
  6708. // Specifies a help text string to display if no text is otherwise displayed,
  6709. // that is when the widget is empty. The placeholder text is displayed using
  6710. // the values of the -font and -justify options.
  6711. //
  6712. // Known uses:
  6713. // - [Entry]
  6714. // - [Spinbox]
  6715. // - [TCombobox]
  6716. // - [TEntry]
  6717. // - [TSpinbox]
  6718. func Placeholder(val any) Opt {
  6719. return rawOption(fmt.Sprintf(`-placeholder %s`, optionString(val)))
  6720. }
  6721. // Placeholder — Get the configured option value.
  6722. //
  6723. // Known uses:
  6724. // - [Entry]
  6725. // - [Spinbox]
  6726. // - [TCombobox]
  6727. // - [TEntry]
  6728. // - [TSpinbox]
  6729. func (w *Window) Placeholder() string {
  6730. return evalErr(fmt.Sprintf(`%s cget -placeholder`, w))
  6731. }
  6732. // Placeholderforeground option.
  6733. //
  6734. // Specifies the foreground color to use when the placeholder text is
  6735. // displayed. The default color is platform-specific.
  6736. //
  6737. // Known uses:
  6738. // - [Entry]
  6739. // - [Spinbox]
  6740. // - [TCombobox]
  6741. // - [TEntry]
  6742. // - [TSpinbox]
  6743. func Placeholderforeground(val any) Opt {
  6744. return rawOption(fmt.Sprintf(`-placeholderforeground %s`, optionString(val)))
  6745. }
  6746. // Placeholderforeground — Get the configured option value.
  6747. //
  6748. // Known uses:
  6749. // - [Entry]
  6750. // - [Spinbox]
  6751. // - [TCombobox]
  6752. // - [TEntry]
  6753. // - [TSpinbox]
  6754. func (w *Window) Placeholderforeground() string {
  6755. return evalErr(fmt.Sprintf(`%s cget -placeholderforeground`, w))
  6756. }
  6757. // Postcommand option.
  6758. //
  6759. // See also [Event handlers].
  6760. //
  6761. // Known uses:
  6762. // - [Menu] (widget specific)
  6763. // - [TCombobox] (widget specific)
  6764. //
  6765. // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
  6766. func Postcommand(handler any) Opt {
  6767. return newEventHandler("-postcommand", handler)
  6768. }
  6769. // Proxybackground option.
  6770. //
  6771. // Known uses:
  6772. // - [Panedwindow] (widget specific)
  6773. func Proxybackground(val any) Opt {
  6774. return rawOption(fmt.Sprintf(`-proxybackground %s`, optionString(val)))
  6775. }
  6776. // Proxybackground — Get the configured option value.
  6777. //
  6778. // Known uses:
  6779. // - [Panedwindow] (widget specific)
  6780. func (w *Window) Proxybackground() string {
  6781. return evalErr(fmt.Sprintf(`%s cget -proxybackground`, w))
  6782. }
  6783. // Proxyborderwidth option.
  6784. //
  6785. // Known uses:
  6786. // - [Panedwindow] (widget specific)
  6787. func Proxyborderwidth(val any) Opt {
  6788. return rawOption(fmt.Sprintf(`-proxyborderwidth %s`, optionString(val)))
  6789. }
  6790. // Proxyborderwidth — Get the configured option value.
  6791. //
  6792. // Known uses:
  6793. // - [Panedwindow] (widget specific)
  6794. func (w *Window) Proxyborderwidth() string {
  6795. return evalErr(fmt.Sprintf(`%s cget -proxyborderwidth`, w))
  6796. }
  6797. // Proxyrelief option.
  6798. //
  6799. // Known uses:
  6800. // - [Panedwindow] (widget specific)
  6801. func Proxyrelief(val any) Opt {
  6802. return rawOption(fmt.Sprintf(`-proxyrelief %s`, optionString(val)))
  6803. }
  6804. // Proxyrelief — Get the configured option value.
  6805. //
  6806. // Known uses:
  6807. // - [Panedwindow] (widget specific)
  6808. func (w *Window) Proxyrelief() string {
  6809. return evalErr(fmt.Sprintf(`%s cget -proxyrelief`, w))
  6810. }
  6811. // Readonlybackground option.
  6812. //
  6813. // Known uses:
  6814. // - [Entry] (widget specific)
  6815. // - [Spinbox] (widget specific)
  6816. func Readonlybackground(val any) Opt {
  6817. return rawOption(fmt.Sprintf(`-readonlybackground %s`, optionString(val)))
  6818. }
  6819. // Readonlybackground — Get the configured option value.
  6820. //
  6821. // Known uses:
  6822. // - [Entry] (widget specific)
  6823. // - [Spinbox] (widget specific)
  6824. func (w *Window) Readonlybackground() string {
  6825. return evalErr(fmt.Sprintf(`%s cget -readonlybackground`, w))
  6826. }
  6827. // Relheight option.
  6828. //
  6829. // Known uses:
  6830. // - [Place] (command specific)
  6831. func Relheight(val any) Opt {
  6832. return rawOption(fmt.Sprintf(`-relheight %s`, optionString(val)))
  6833. }
  6834. // Relief option.
  6835. //
  6836. // Specifies the 3-D effect desired for the widget. Acceptable
  6837. // values are raised, sunken, flat, ridge,
  6838. // solid, and groove.
  6839. // The value
  6840. // indicates how the interior of the widget should appear relative
  6841. // to its exterior; for example, raised means the interior of
  6842. // the widget should appear to protrude from the screen, relative to
  6843. // the exterior of the widget.
  6844. //
  6845. // Known uses:
  6846. // - [Button]
  6847. // - [Canvas]
  6848. // - [Checkbutton]
  6849. // - [Entry]
  6850. // - [Frame]
  6851. // - [Label]
  6852. // - [Labelframe]
  6853. // - [Listbox]
  6854. // - [Menu]
  6855. // - [Menubutton]
  6856. // - [Message]
  6857. // - [Panedwindow]
  6858. // - [Radiobutton]
  6859. // - [Scale]
  6860. // - [Scrollbar]
  6861. // - [Spinbox]
  6862. // - [TFrame] (widget specific)
  6863. // - [TLabel] (widget specific)
  6864. // - [TextWidget.TagConfigure] (command specific)
  6865. // - [Text]
  6866. // - [Toplevel]
  6867. func Relief(val any) Opt {
  6868. return rawOption(fmt.Sprintf(`-relief %s`, optionString(val)))
  6869. }
  6870. // Relief — Get the configured option value.
  6871. //
  6872. // Known uses:
  6873. // - [Button]
  6874. // - [Canvas]
  6875. // - [Checkbutton]
  6876. // - [Entry]
  6877. // - [Frame]
  6878. // - [Label]
  6879. // - [Labelframe]
  6880. // - [Listbox]
  6881. // - [Menu]
  6882. // - [Menubutton]
  6883. // - [Message]
  6884. // - [Panedwindow]
  6885. // - [Radiobutton]
  6886. // - [Scale]
  6887. // - [Scrollbar]
  6888. // - [Spinbox]
  6889. // - [TFrame] (widget specific)
  6890. // - [TLabel] (widget specific)
  6891. // - [Text]
  6892. // - [Toplevel]
  6893. func (w *Window) Relief() string {
  6894. return evalErr(fmt.Sprintf(`%s cget -relief`, w))
  6895. }
  6896. // Relwidth option.
  6897. //
  6898. // Known uses:
  6899. // - [Place] (command specific)
  6900. func Relwidth(val any) Opt {
  6901. return rawOption(fmt.Sprintf(`-relwidth %s`, optionString(val)))
  6902. }
  6903. // Relx option.
  6904. //
  6905. // Known uses:
  6906. // - [Place] (command specific)
  6907. func Relx(val any) Opt {
  6908. return rawOption(fmt.Sprintf(`-relx %s`, optionString(val)))
  6909. }
  6910. // Rely option.
  6911. //
  6912. // Known uses:
  6913. // - [Place] (command specific)
  6914. func Rely(val any) Opt {
  6915. return rawOption(fmt.Sprintf(`-rely %s`, optionString(val)))
  6916. }
  6917. // Repeatdelay option.
  6918. //
  6919. // Specifies the number of milliseconds a button or key must be held
  6920. // down before it begins to auto-repeat. Used, for example, on the
  6921. // up- and down-arrows in scrollbars.
  6922. //
  6923. // Known uses:
  6924. // - [Button]
  6925. // - [Scale]
  6926. // - [Scrollbar]
  6927. // - [Spinbox]
  6928. func Repeatdelay(val any) Opt {
  6929. return rawOption(fmt.Sprintf(`-repeatdelay %s`, optionString(val)))
  6930. }
  6931. // Repeatdelay — Get the configured option value.
  6932. //
  6933. // Known uses:
  6934. // - [Button]
  6935. // - [Scale]
  6936. // - [Scrollbar]
  6937. // - [Spinbox]
  6938. func (w *Window) Repeatdelay() string {
  6939. return evalErr(fmt.Sprintf(`%s cget -repeatdelay`, w))
  6940. }
  6941. // Repeatinterval option.
  6942. //
  6943. // Used in conjunction with -repeatdelay: once auto-repeat
  6944. // begins, this option determines the number of milliseconds between
  6945. // auto-repeats.
  6946. //
  6947. // Known uses:
  6948. // - [Button]
  6949. // - [Scale]
  6950. // - [Scrollbar]
  6951. // - [Spinbox]
  6952. func Repeatinterval(val any) Opt {
  6953. return rawOption(fmt.Sprintf(`-repeatinterval %s`, optionString(val)))
  6954. }
  6955. // Repeatinterval — Get the configured option value.
  6956. //
  6957. // Known uses:
  6958. // - [Button]
  6959. // - [Scale]
  6960. // - [Scrollbar]
  6961. // - [Spinbox]
  6962. func (w *Window) Repeatinterval() string {
  6963. return evalErr(fmt.Sprintf(`%s cget -repeatinterval`, w))
  6964. }
  6965. // Resolution option.
  6966. //
  6967. // Known uses:
  6968. // - [Scale] (widget specific)
  6969. func Resolution(val any) Opt {
  6970. return rawOption(fmt.Sprintf(`-resolution %s`, optionString(val)))
  6971. }
  6972. // Resolution — Get the configured option value.
  6973. //
  6974. // Known uses:
  6975. // - [Scale] (widget specific)
  6976. func (w *Window) Resolution() string {
  6977. return evalErr(fmt.Sprintf(`%s cget -resolution`, w))
  6978. }
  6979. // Rmargin option.
  6980. //
  6981. // Known uses:
  6982. // - [TextWidget.TagConfigure] (command specific)
  6983. func Rmargin(val any) Opt {
  6984. return rawOption(fmt.Sprintf(`-rmargin %s`, optionString(val)))
  6985. }
  6986. // Rmargincolor option.
  6987. //
  6988. // Known uses:
  6989. // - [TextWidget.TagConfigure] (command specific)
  6990. func Rmargincolor(val any) Opt {
  6991. return rawOption(fmt.Sprintf(`-rmargincolor %s`, optionString(val)))
  6992. }
  6993. // Row option.
  6994. //
  6995. // Known uses:
  6996. // - [Grid] (command specific)
  6997. func Row(val any) Opt {
  6998. return rawOption(fmt.Sprintf(`-row %s`, optionString(val)))
  6999. }
  7000. // Rowspan option.
  7001. //
  7002. // Known uses:
  7003. // - [Grid] (command specific)
  7004. func Rowspan(val any) Opt {
  7005. return rawOption(fmt.Sprintf(`-rowspan %s`, optionString(val)))
  7006. }
  7007. // Sashcursor option.
  7008. //
  7009. // Known uses:
  7010. // - [Panedwindow] (widget specific)
  7011. func Sashcursor(val any) Opt {
  7012. return rawOption(fmt.Sprintf(`-sashcursor %s`, optionString(val)))
  7013. }
  7014. // Sashcursor — Get the configured option value.
  7015. //
  7016. // Known uses:
  7017. // - [Panedwindow] (widget specific)
  7018. func (w *Window) Sashcursor() string {
  7019. return evalErr(fmt.Sprintf(`%s cget -sashcursor`, w))
  7020. }
  7021. // Sashpad option.
  7022. //
  7023. // Known uses:
  7024. // - [Panedwindow] (widget specific)
  7025. func Sashpad(val any) Opt {
  7026. return rawOption(fmt.Sprintf(`-sashpad %s`, optionString(val)))
  7027. }
  7028. // Sashpad — Get the configured option value.
  7029. //
  7030. // Known uses:
  7031. // - [Panedwindow] (widget specific)
  7032. func (w *Window) Sashpad() string {
  7033. return evalErr(fmt.Sprintf(`%s cget -sashpad`, w))
  7034. }
  7035. // Sashrelief option.
  7036. //
  7037. // Known uses:
  7038. // - [Panedwindow] (widget specific)
  7039. func Sashrelief(val any) Opt {
  7040. return rawOption(fmt.Sprintf(`-sashrelief %s`, optionString(val)))
  7041. }
  7042. // Sashrelief — Get the configured option value.
  7043. //
  7044. // Known uses:
  7045. // - [Panedwindow] (widget specific)
  7046. func (w *Window) Sashrelief() string {
  7047. return evalErr(fmt.Sprintf(`%s cget -sashrelief`, w))
  7048. }
  7049. // Sashwidth option.
  7050. //
  7051. // Known uses:
  7052. // - [Panedwindow] (widget specific)
  7053. func Sashwidth(val any) Opt {
  7054. return rawOption(fmt.Sprintf(`-sashwidth %s`, optionString(val)))
  7055. }
  7056. // Sashwidth — Get the configured option value.
  7057. //
  7058. // Known uses:
  7059. // - [Panedwindow] (widget specific)
  7060. func (w *Window) Sashwidth() string {
  7061. return evalErr(fmt.Sprintf(`%s cget -sashwidth`, w))
  7062. }
  7063. // Screen option.
  7064. //
  7065. // Known uses:
  7066. // - [Toplevel] (widget specific)
  7067. func Screen(val any) Opt {
  7068. return rawOption(fmt.Sprintf(`-screen %s`, optionString(val)))
  7069. }
  7070. // Screen — Get the configured option value.
  7071. //
  7072. // Known uses:
  7073. // - [Toplevel] (widget specific)
  7074. func (w *Window) Screen() string {
  7075. return evalErr(fmt.Sprintf(`%s cget -screen`, w))
  7076. }
  7077. // Scrollregion option.
  7078. //
  7079. // Known uses:
  7080. // - [Canvas] (widget specific)
  7081. func Scrollregion(val any) Opt {
  7082. return rawOption(fmt.Sprintf(`-scrollregion %s`, optionString(val)))
  7083. }
  7084. // Scrollregion — Get the configured option value.
  7085. //
  7086. // Known uses:
  7087. // - [Canvas] (widget specific)
  7088. func (w *Window) Scrollregion() string {
  7089. return evalErr(fmt.Sprintf(`%s cget -scrollregion`, w))
  7090. }
  7091. // Selectbackground option.
  7092. //
  7093. // Specifies the background color to use when displaying selected
  7094. // items.
  7095. //
  7096. // Known uses:
  7097. // - [Canvas]
  7098. // - [Entry]
  7099. // - [Listbox]
  7100. // - [Spinbox]
  7101. // - [TextWidget.TagConfigure] (command specific)
  7102. // - [Text]
  7103. func Selectbackground(val any) Opt {
  7104. return rawOption(fmt.Sprintf(`-selectbackground %s`, optionString(val)))
  7105. }
  7106. // Selectbackground — Get the configured option value.
  7107. //
  7108. // Known uses:
  7109. // - [Canvas]
  7110. // - [Entry]
  7111. // - [Listbox]
  7112. // - [Spinbox]
  7113. // - [Text]
  7114. func (w *Window) Selectbackground() string {
  7115. return evalErr(fmt.Sprintf(`%s cget -selectbackground`, w))
  7116. }
  7117. // Selectborderwidth option.
  7118. //
  7119. // Specifies a non-negative value indicating the width
  7120. // of the 3-D border to draw around selected items.
  7121. // The value may have any of the forms acceptable to Tk_GetPixels.
  7122. //
  7123. // Known uses:
  7124. // - [Canvas]
  7125. // - [Entry]
  7126. // - [Listbox]
  7127. // - [Spinbox]
  7128. // - [Text]
  7129. func Selectborderwidth(val any) Opt {
  7130. return rawOption(fmt.Sprintf(`-selectborderwidth %s`, optionString(val)))
  7131. }
  7132. // Selectborderwidth — Get the configured option value.
  7133. //
  7134. // Known uses:
  7135. // - [Canvas]
  7136. // - [Entry]
  7137. // - [Listbox]
  7138. // - [Spinbox]
  7139. // - [Text]
  7140. func (w *Window) Selectborderwidth() string {
  7141. return evalErr(fmt.Sprintf(`%s cget -selectborderwidth`, w))
  7142. }
  7143. // Selectcolor option.
  7144. //
  7145. // Known uses:
  7146. // - [Checkbutton] (widget specific)
  7147. // - [MenuWidget.AddCascade] (command specific)
  7148. // - [MenuWidget.AddCommand] (command specific)
  7149. // - [MenuWidget.AddSeparator] (command specific)
  7150. // - [Menu] (widget specific)
  7151. // - [Radiobutton] (widget specific)
  7152. func Selectcolor(val any) Opt {
  7153. return rawOption(fmt.Sprintf(`-selectcolor %s`, optionString(val)))
  7154. }
  7155. // Selectcolor — Get the configured option value.
  7156. //
  7157. // Known uses:
  7158. // - [Checkbutton] (widget specific)
  7159. // - [Menu] (widget specific)
  7160. // - [Radiobutton] (widget specific)
  7161. func (w *Window) Selectcolor() string {
  7162. return evalErr(fmt.Sprintf(`%s cget -selectcolor`, w))
  7163. }
  7164. // Selectforeground option.
  7165. //
  7166. // Specifies the foreground color to use when displaying selected
  7167. // items.
  7168. //
  7169. // Known uses:
  7170. // - [Canvas]
  7171. // - [Entry]
  7172. // - [Listbox]
  7173. // - [Spinbox]
  7174. // - [TextWidget.TagConfigure] (command specific)
  7175. // - [Text]
  7176. func Selectforeground(val any) Opt {
  7177. return rawOption(fmt.Sprintf(`-selectforeground %s`, optionString(val)))
  7178. }
  7179. // Selectforeground — Get the configured option value.
  7180. //
  7181. // Known uses:
  7182. // - [Canvas]
  7183. // - [Entry]
  7184. // - [Listbox]
  7185. // - [Spinbox]
  7186. // - [Text]
  7187. func (w *Window) Selectforeground() string {
  7188. return evalErr(fmt.Sprintf(`%s cget -selectforeground`, w))
  7189. }
  7190. // Selectimage option.
  7191. //
  7192. // Known uses:
  7193. // - [Checkbutton] (widget specific)
  7194. // - [MenuWidget.AddCascade] (command specific)
  7195. // - [MenuWidget.AddCommand] (command specific)
  7196. // - [MenuWidget.AddSeparator] (command specific)
  7197. // - [Radiobutton] (widget specific)
  7198. func Selectimage(val any) Opt {
  7199. return rawOption(fmt.Sprintf(`-selectimage %s`, optionString(val)))
  7200. }
  7201. // Selectimage — Get the configured option value.
  7202. //
  7203. // Known uses:
  7204. // - [Checkbutton] (widget specific)
  7205. // - [Radiobutton] (widget specific)
  7206. func (w *Window) Selectimage() string {
  7207. return evalErr(fmt.Sprintf(`%s cget -selectimage`, w))
  7208. }
  7209. // Selectmode option.
  7210. //
  7211. // Known uses:
  7212. // - [Listbox] (widget specific)
  7213. // - [TTreeview] (widget specific)
  7214. func Selectmode(val any) Opt {
  7215. return rawOption(fmt.Sprintf(`-selectmode %s`, optionString(val)))
  7216. }
  7217. // Selectmode — Get the configured option value.
  7218. //
  7219. // Known uses:
  7220. // - [Listbox] (widget specific)
  7221. // - [TTreeview] (widget specific)
  7222. func (w *Window) Selectmode() string {
  7223. return evalErr(fmt.Sprintf(`%s cget -selectmode`, w))
  7224. }
  7225. // Selecttype option.
  7226. //
  7227. // Known uses:
  7228. // - [TTreeview] (widget specific)
  7229. func Selecttype(val any) Opt {
  7230. return rawOption(fmt.Sprintf(`-selecttype %s`, optionString(val)))
  7231. }
  7232. // Selecttype — Get the configured option value.
  7233. //
  7234. // Known uses:
  7235. // - [TTreeview] (widget specific)
  7236. func (w *Window) Selecttype() string {
  7237. return evalErr(fmt.Sprintf(`%s cget -selecttype`, w))
  7238. }
  7239. // Setgrid option.
  7240. //
  7241. // Specifies a boolean value that determines whether this widget controls the
  7242. // resizing grid for its top-level window.
  7243. // This option is typically used in text widgets, where the information
  7244. // in the widget has a natural size (the size of a character) and it makes
  7245. // sense for the window's dimensions to be integral numbers of these units.
  7246. // These natural window sizes form a grid.
  7247. // If the -setgrid option is set to true then the widget will
  7248. // communicate with the window manager so that when the user interactively
  7249. // resizes the top-level window that contains the widget, the dimensions of
  7250. // the window will be displayed to the user in grid units and the window
  7251. // size will be constrained to integral numbers of grid units.
  7252. // See the section GRIDDED GEOMETRY MANAGEMENT in the wm manual
  7253. // entry for more details.
  7254. //
  7255. // Known uses:
  7256. // - [Listbox]
  7257. // - [Text]
  7258. func Setgrid(val any) Opt {
  7259. return rawOption(fmt.Sprintf(`-setgrid %s`, optionString(val)))
  7260. }
  7261. // Setgrid — Get the configured option value.
  7262. //
  7263. // Known uses:
  7264. // - [Listbox]
  7265. // - [Text]
  7266. func (w *Window) Setgrid() string {
  7267. return evalErr(fmt.Sprintf(`%s cget -setgrid`, w))
  7268. }
  7269. // Show option.
  7270. //
  7271. // Known uses:
  7272. // - [Entry] (widget specific)
  7273. // - [TEntry] (widget specific)
  7274. // - [TTreeview] (widget specific)
  7275. func Show(val any) Opt {
  7276. return rawOption(fmt.Sprintf(`-show %s`, optionString(val)))
  7277. }
  7278. // Show — Get the configured option value.
  7279. //
  7280. // Known uses:
  7281. // - [Entry] (widget specific)
  7282. // - [TEntry] (widget specific)
  7283. // - [TTreeview] (widget specific)
  7284. func (w *Window) Show() string {
  7285. return evalErr(fmt.Sprintf(`%s cget -show`, w))
  7286. }
  7287. // Showhandle option.
  7288. //
  7289. // Known uses:
  7290. // - [Panedwindow] (widget specific)
  7291. func Showhandle(val any) Opt {
  7292. return rawOption(fmt.Sprintf(`-showhandle %s`, optionString(val)))
  7293. }
  7294. // Showhandle — Get the configured option value.
  7295. //
  7296. // Known uses:
  7297. // - [Panedwindow] (widget specific)
  7298. func (w *Window) Showhandle() string {
  7299. return evalErr(fmt.Sprintf(`%s cget -showhandle`, w))
  7300. }
  7301. // Showvalue option.
  7302. //
  7303. // Known uses:
  7304. // - [Scale] (widget specific)
  7305. func Showvalue(val any) Opt {
  7306. return rawOption(fmt.Sprintf(`-showvalue %s`, optionString(val)))
  7307. }
  7308. // Showvalue — Get the configured option value.
  7309. //
  7310. // Known uses:
  7311. // - [Scale] (widget specific)
  7312. func (w *Window) Showvalue() string {
  7313. return evalErr(fmt.Sprintf(`%s cget -showvalue`, w))
  7314. }
  7315. // Side option.
  7316. //
  7317. // Known uses:
  7318. // - [Pack] (command specific)
  7319. func Side(val any) Opt {
  7320. return rawOption(fmt.Sprintf(`-side %s`, optionString(val)))
  7321. }
  7322. // Size option.
  7323. //
  7324. // Known uses:
  7325. // - [NewFont] (command specific)
  7326. func Size(val any) Opt {
  7327. return rawOption(fmt.Sprintf(`-size %s`, optionString(val)))
  7328. }
  7329. // Slant option.
  7330. //
  7331. // Known uses:
  7332. // - [NewFont] (command specific)
  7333. func Slant(val any) Opt {
  7334. return rawOption(fmt.Sprintf(`-slant %s`, optionString(val)))
  7335. }
  7336. // Sliderlength option.
  7337. //
  7338. // Known uses:
  7339. // - [Scale] (widget specific)
  7340. func Sliderlength(val any) Opt {
  7341. return rawOption(fmt.Sprintf(`-sliderlength %s`, optionString(val)))
  7342. }
  7343. // Sliderlength — Get the configured option value.
  7344. //
  7345. // Known uses:
  7346. // - [Scale] (widget specific)
  7347. func (w *Window) Sliderlength() string {
  7348. return evalErr(fmt.Sprintf(`%s cget -sliderlength`, w))
  7349. }
  7350. // Sliderrelief option.
  7351. //
  7352. // Known uses:
  7353. // - [Scale] (widget specific)
  7354. func Sliderrelief(val any) Opt {
  7355. return rawOption(fmt.Sprintf(`-sliderrelief %s`, optionString(val)))
  7356. }
  7357. // Sliderrelief — Get the configured option value.
  7358. //
  7359. // Known uses:
  7360. // - [Scale] (widget specific)
  7361. func (w *Window) Sliderrelief() string {
  7362. return evalErr(fmt.Sprintf(`%s cget -sliderrelief`, w))
  7363. }
  7364. // Spacing1 option.
  7365. //
  7366. // Known uses:
  7367. // - [TextWidget.TagConfigure] (command specific)
  7368. // - [Text] (widget specific)
  7369. func Spacing1(val any) Opt {
  7370. return rawOption(fmt.Sprintf(`-spacing1 %s`, optionString(val)))
  7371. }
  7372. // Spacing1 — Get the configured option value.
  7373. //
  7374. // Known uses:
  7375. // - [Text] (widget specific)
  7376. func (w *Window) Spacing1() string {
  7377. return evalErr(fmt.Sprintf(`%s cget -spacing1`, w))
  7378. }
  7379. // Spacing2 option.
  7380. //
  7381. // Known uses:
  7382. // - [TextWidget.TagConfigure] (command specific)
  7383. // - [Text] (widget specific)
  7384. func Spacing2(val any) Opt {
  7385. return rawOption(fmt.Sprintf(`-spacing2 %s`, optionString(val)))
  7386. }
  7387. // Spacing2 — Get the configured option value.
  7388. //
  7389. // Known uses:
  7390. // - [Text] (widget specific)
  7391. func (w *Window) Spacing2() string {
  7392. return evalErr(fmt.Sprintf(`%s cget -spacing2`, w))
  7393. }
  7394. // Spacing3 option.
  7395. //
  7396. // Known uses:
  7397. // - [TextWidget.TagConfigure] (command specific)
  7398. // - [Text] (widget specific)
  7399. func Spacing3(val any) Opt {
  7400. return rawOption(fmt.Sprintf(`-spacing3 %s`, optionString(val)))
  7401. }
  7402. // Spacing3 — Get the configured option value.
  7403. //
  7404. // Known uses:
  7405. // - [Text] (widget specific)
  7406. func (w *Window) Spacing3() string {
  7407. return evalErr(fmt.Sprintf(`%s cget -spacing3`, w))
  7408. }
  7409. // Startline option.
  7410. //
  7411. // Known uses:
  7412. // - [Text] (widget specific)
  7413. func Startline(val any) Opt {
  7414. return rawOption(fmt.Sprintf(`-startline %s`, optionString(val)))
  7415. }
  7416. // Startline — Get the configured option value.
  7417. //
  7418. // Known uses:
  7419. // - [Text] (widget specific)
  7420. func (w *Window) Startline() string {
  7421. return evalErr(fmt.Sprintf(`%s cget -startline`, w))
  7422. }
  7423. // State option.
  7424. //
  7425. // May be set to normal or disabled
  7426. // to control the disabled state bit.
  7427. // This is a write-only option:
  7428. // setting it changes the widget state,
  7429. // but the state widget command
  7430. // does not affect the -state option.
  7431. //
  7432. // Known uses:
  7433. // - [Button] (widget specific)
  7434. // - [Canvas] (widget specific)
  7435. // - [Checkbutton] (widget specific)
  7436. // - [Entry] (widget specific)
  7437. // - [Label] (widget specific)
  7438. // - [Listbox] (widget specific)
  7439. // - [MenuWidget.AddCascade] (command specific)
  7440. // - [MenuWidget.AddCommand] (command specific)
  7441. // - [MenuWidget.AddSeparator] (command specific)
  7442. // - [Menubutton] (widget specific)
  7443. // - [Radiobutton] (widget specific)
  7444. // - [Scale] (widget specific)
  7445. // - [Spinbox] (widget specific)
  7446. // - [TButton]
  7447. // - [TCheckbutton]
  7448. // - [TCombobox] (widget specific)
  7449. // - [TEntry] (widget specific)
  7450. // - [TLabel]
  7451. // - [TMenubutton]
  7452. // - [TRadiobutton]
  7453. // - [TSpinbox]
  7454. // - [Text] (widget specific)
  7455. func State(val any) Opt {
  7456. return rawOption(fmt.Sprintf(`-state %s`, optionString(val)))
  7457. }
  7458. // State — Get the configured option value.
  7459. //
  7460. // Known uses:
  7461. // - [Button] (widget specific)
  7462. // - [Canvas] (widget specific)
  7463. // - [Checkbutton] (widget specific)
  7464. // - [Entry] (widget specific)
  7465. // - [Label] (widget specific)
  7466. // - [Listbox] (widget specific)
  7467. // - [Menubutton] (widget specific)
  7468. // - [Radiobutton] (widget specific)
  7469. // - [Scale] (widget specific)
  7470. // - [Spinbox] (widget specific)
  7471. // - [TButton]
  7472. // - [TCheckbutton]
  7473. // - [TCombobox] (widget specific)
  7474. // - [TEntry] (widget specific)
  7475. // - [TLabel]
  7476. // - [TMenubutton]
  7477. // - [TRadiobutton]
  7478. // - [TSpinbox]
  7479. // - [Text] (widget specific)
  7480. func (w *Window) State() string {
  7481. return evalErr(fmt.Sprintf(`%s cget -state`, w))
  7482. }
  7483. // Sticky option.
  7484. //
  7485. // Known uses:
  7486. // - [Grid] (command specific)
  7487. func Sticky(val any) Opt {
  7488. return rawOption(fmt.Sprintf(`-sticky %s`, optionString(val)))
  7489. }
  7490. // Striped option.
  7491. //
  7492. // Known uses:
  7493. // - [TTreeview] (widget specific)
  7494. func Striped(val any) Opt {
  7495. return rawOption(fmt.Sprintf(`-striped %s`, optionString(val)))
  7496. }
  7497. // Striped — Get the configured option value.
  7498. //
  7499. // Known uses:
  7500. // - [TTreeview] (widget specific)
  7501. func (w *Window) Striped() string {
  7502. return evalErr(fmt.Sprintf(`%s cget -striped`, w))
  7503. }
  7504. // Style option.
  7505. //
  7506. // May be used to specify a custom widget style.
  7507. //
  7508. // Known uses:
  7509. // - [TButton]
  7510. // - [TCheckbutton]
  7511. // - [TCombobox]
  7512. // - [TEntry]
  7513. // - [TFrame]
  7514. // - [TLabel]
  7515. // - [TLabelframe]
  7516. // - [TMenubutton]
  7517. // - [TNotebook]
  7518. // - [TPanedwindow]
  7519. // - [TProgressbar]
  7520. // - [TRadiobutton]
  7521. // - [TScale]
  7522. // - [TScrollbar]
  7523. // - [TSeparator]
  7524. // - [TSizegrip]
  7525. // - [TSpinbox]
  7526. // - [TTreeview]
  7527. func Style(val any) Opt {
  7528. return rawOption(fmt.Sprintf(`-style %s`, optionString(val)))
  7529. }
  7530. // Style — Get the configured option value.
  7531. //
  7532. // Known uses:
  7533. // - [TButton]
  7534. // - [TCheckbutton]
  7535. // - [TCombobox]
  7536. // - [TEntry]
  7537. // - [TFrame]
  7538. // - [TLabel]
  7539. // - [TLabelframe]
  7540. // - [TMenubutton]
  7541. // - [TNotebook]
  7542. // - [TPanedwindow]
  7543. // - [TProgressbar]
  7544. // - [TRadiobutton]
  7545. // - [TScale]
  7546. // - [TScrollbar]
  7547. // - [TSeparator]
  7548. // - [TSizegrip]
  7549. // - [TSpinbox]
  7550. // - [TTreeview]
  7551. func (w *Window) Style() string {
  7552. return evalErr(fmt.Sprintf(`%s cget -style`, w))
  7553. }
  7554. // Tabs option.
  7555. //
  7556. // Known uses:
  7557. // - [TextWidget.TagConfigure] (command specific)
  7558. // - [Text] (widget specific)
  7559. func Tabs(val any) Opt {
  7560. return rawOption(fmt.Sprintf(`-tabs %s`, optionString(val)))
  7561. }
  7562. // Tabs — Get the configured option value.
  7563. //
  7564. // Known uses:
  7565. // - [Text] (widget specific)
  7566. func (w *Window) Tabs() string {
  7567. return evalErr(fmt.Sprintf(`%s cget -tabs`, w))
  7568. }
  7569. // Tabstyle option.
  7570. //
  7571. // Known uses:
  7572. // - [TextWidget.TagConfigure] (command specific)
  7573. // - [Text] (widget specific)
  7574. func Tabstyle(val any) Opt {
  7575. return rawOption(fmt.Sprintf(`-tabstyle %s`, optionString(val)))
  7576. }
  7577. // Tabstyle — Get the configured option value.
  7578. //
  7579. // Known uses:
  7580. // - [Text] (widget specific)
  7581. func (w *Window) Tabstyle() string {
  7582. return evalErr(fmt.Sprintf(`%s cget -tabstyle`, w))
  7583. }
  7584. // Takefocus option.
  7585. //
  7586. // Determines whether the window accepts the focus during keyboard
  7587. // traversal (e.g., Tab and Shift-Tab).
  7588. // Before setting the focus to a window, the traversal scripts
  7589. // consult the value of the -takefocus option.
  7590. // A value of 0 means that the window should be skipped entirely
  7591. // during keyboard traversal.
  7592. // 1 means that the window should receive the input
  7593. // focus as long as it is viewable (it and all of its ancestors are mapped).
  7594. // An empty value for the option means that the traversal scripts make
  7595. // the decision about whether or not to focus on the window: the current
  7596. // algorithm is to skip the window if it is
  7597. // disabled, if it has no key bindings, or if it is not viewable.
  7598. // If the value has any other form, then the traversal scripts take
  7599. // the value, append the name of the window to it (with a separator space),
  7600. // and evaluate the resulting string as a Tcl script.
  7601. // The script must return 0, 1, or an empty string: a
  7602. // 0 or 1 value specifies whether the window will receive
  7603. // the input focus, and an empty string results in the default decision
  7604. // described above.
  7605. // Note that this interpretation of the option is defined entirely by
  7606. // the Tcl scripts that implement traversal: the widget implementations
  7607. // ignore the option entirely, so you can change its meaning if you
  7608. // redefine the keyboard traversal scripts.
  7609. //
  7610. // Known uses:
  7611. // - [Button]
  7612. // - [Canvas]
  7613. // - [Checkbutton]
  7614. // - [Entry]
  7615. // - [Frame]
  7616. // - [Label]
  7617. // - [Labelframe]
  7618. // - [Listbox]
  7619. // - [Menu]
  7620. // - [Menubutton]
  7621. // - [Message]
  7622. // - [Radiobutton]
  7623. // - [Scale]
  7624. // - [Scrollbar]
  7625. // - [Spinbox]
  7626. // - [TButton]
  7627. // - [TCheckbutton]
  7628. // - [TCombobox]
  7629. // - [TEntry]
  7630. // - [TFrame]
  7631. // - [TLabel]
  7632. // - [TLabelframe]
  7633. // - [TMenubutton]
  7634. // - [TNotebook]
  7635. // - [TPanedwindow]
  7636. // - [TProgressbar]
  7637. // - [TRadiobutton]
  7638. // - [TScale]
  7639. // - [TScrollbar]
  7640. // - [TSeparator]
  7641. // - [TSizegrip]
  7642. // - [TSpinbox]
  7643. // - [TTreeview]
  7644. // - [Text]
  7645. // - [Toplevel]
  7646. func Takefocus(val any) Opt {
  7647. return rawOption(fmt.Sprintf(`-takefocus %s`, optionString(val)))
  7648. }
  7649. // Takefocus — Get the configured option value.
  7650. //
  7651. // Known uses:
  7652. // - [Button]
  7653. // - [Canvas]
  7654. // - [Checkbutton]
  7655. // - [Entry]
  7656. // - [Frame]
  7657. // - [Label]
  7658. // - [Labelframe]
  7659. // - [Listbox]
  7660. // - [Menu]
  7661. // - [Menubutton]
  7662. // - [Message]
  7663. // - [Radiobutton]
  7664. // - [Scale]
  7665. // - [Scrollbar]
  7666. // - [Spinbox]
  7667. // - [TButton]
  7668. // - [TCheckbutton]
  7669. // - [TCombobox]
  7670. // - [TEntry]
  7671. // - [TFrame]
  7672. // - [TLabel]
  7673. // - [TLabelframe]
  7674. // - [TMenubutton]
  7675. // - [TNotebook]
  7676. // - [TPanedwindow]
  7677. // - [TProgressbar]
  7678. // - [TRadiobutton]
  7679. // - [TScale]
  7680. // - [TScrollbar]
  7681. // - [TSeparator]
  7682. // - [TSizegrip]
  7683. // - [TSpinbox]
  7684. // - [TTreeview]
  7685. // - [Text]
  7686. // - [Toplevel]
  7687. func (w *Window) Takefocus() string {
  7688. return evalErr(fmt.Sprintf(`%s cget -takefocus`, w))
  7689. }
  7690. // Tearoff option.
  7691. //
  7692. // Known uses:
  7693. // - [Menu] (widget specific)
  7694. func Tearoff(val any) Opt {
  7695. return rawOption(fmt.Sprintf(`-tearoff %s`, optionString(val)))
  7696. }
  7697. // Tearoff — Get the configured option value.
  7698. //
  7699. // Known uses:
  7700. // - [Menu] (widget specific)
  7701. func (w *Window) Tearoff() string {
  7702. return evalErr(fmt.Sprintf(`%s cget -tearoff`, w))
  7703. }
  7704. // Tearoffcommand option.
  7705. //
  7706. // See also [Event handlers].
  7707. //
  7708. // Known uses:
  7709. // - [Menu] (widget specific)
  7710. //
  7711. // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
  7712. func Tearoffcommand(handler any) Opt {
  7713. return newEventHandler("-tearoffcommand", handler)
  7714. }
  7715. // Txt option.
  7716. //
  7717. // Specifies a string to be displayed inside the widget. The way in which
  7718. // the string is displayed depends on the particular widget and may be
  7719. // determined by other options, such as -anchor or -justify.
  7720. //
  7721. // Known uses:
  7722. // - [Button]
  7723. // - [Checkbutton]
  7724. // - [Label]
  7725. // - [Labelframe]
  7726. // - [Menubutton]
  7727. // - [Message]
  7728. // - [Radiobutton]
  7729. // - [TButton]
  7730. // - [TCheckbutton]
  7731. // - [TLabel]
  7732. // - [TLabelframe] (widget specific)
  7733. // - [TMenubutton]
  7734. // - [TProgressbar]
  7735. // - [TRadiobutton]
  7736. func Txt(val any) Opt {
  7737. return rawOption(fmt.Sprintf(`-text %s`, optionString(val)))
  7738. }
  7739. // Txt — Get the configured option value.
  7740. //
  7741. // Known uses:
  7742. // - [Button]
  7743. // - [Checkbutton]
  7744. // - [Label]
  7745. // - [Labelframe]
  7746. // - [Menubutton]
  7747. // - [Message]
  7748. // - [Radiobutton]
  7749. // - [TButton]
  7750. // - [TCheckbutton]
  7751. // - [TLabel]
  7752. // - [TLabelframe] (widget specific)
  7753. // - [TMenubutton]
  7754. // - [TProgressbar]
  7755. // - [TRadiobutton]
  7756. func (w *Window) Txt() string {
  7757. return evalErr(fmt.Sprintf(`%s cget -text`, w))
  7758. }
  7759. // Tickinterval option.
  7760. //
  7761. // Known uses:
  7762. // - [Scale] (widget specific)
  7763. func Tickinterval(val any) Opt {
  7764. return rawOption(fmt.Sprintf(`-tickinterval %s`, optionString(val)))
  7765. }
  7766. // Tickinterval — Get the configured option value.
  7767. //
  7768. // Known uses:
  7769. // - [Scale] (widget specific)
  7770. func (w *Window) Tickinterval() string {
  7771. return evalErr(fmt.Sprintf(`%s cget -tickinterval`, w))
  7772. }
  7773. // Tile option.
  7774. //
  7775. // Known uses:
  7776. // - [Frame] (widget specific)
  7777. // - [Toplevel] (widget specific)
  7778. func Tile(val any) Opt {
  7779. return rawOption(fmt.Sprintf(`-tile %s`, optionString(val)))
  7780. }
  7781. // Tile — Get the configured option value.
  7782. //
  7783. // Known uses:
  7784. // - [Frame] (widget specific)
  7785. // - [Toplevel] (widget specific)
  7786. func (w *Window) Tile() string {
  7787. return evalErr(fmt.Sprintf(`%s cget -tile`, w))
  7788. }
  7789. // Title option.
  7790. //
  7791. // Known uses:
  7792. // - [ChooseColor] (command specific)
  7793. // - [ChooseDirectory] (command specific)
  7794. // - [Fontchooser] (command specific)
  7795. // - [GetOpenFile] (command specific)
  7796. // - [GetSaveFile] (command specific)
  7797. // - [Menu] (widget specific)
  7798. // - [MessageBox] (command specific)
  7799. func Title(val any) Opt {
  7800. return rawOption(fmt.Sprintf(`-title %s`, optionString(val)))
  7801. }
  7802. // Title — Get the configured option value.
  7803. //
  7804. // Known uses:
  7805. // - [Menu] (widget specific)
  7806. func (w *Window) Title() string {
  7807. return evalErr(fmt.Sprintf(`%s cget -title`, w))
  7808. }
  7809. // Titlecolumns option.
  7810. //
  7811. // Known uses:
  7812. // - [TTreeview] (widget specific)
  7813. func Titlecolumns(val any) Opt {
  7814. return rawOption(fmt.Sprintf(`-titlecolumns %s`, optionString(val)))
  7815. }
  7816. // Titlecolumns — Get the configured option value.
  7817. //
  7818. // Known uses:
  7819. // - [TTreeview] (widget specific)
  7820. func (w *Window) Titlecolumns() string {
  7821. return evalErr(fmt.Sprintf(`%s cget -titlecolumns`, w))
  7822. }
  7823. // Titleitems option.
  7824. //
  7825. // Known uses:
  7826. // - [TTreeview] (widget specific)
  7827. func Titleitems(val any) Opt {
  7828. return rawOption(fmt.Sprintf(`-titleitems %s`, optionString(val)))
  7829. }
  7830. // Titleitems — Get the configured option value.
  7831. //
  7832. // Known uses:
  7833. // - [TTreeview] (widget specific)
  7834. func (w *Window) Titleitems() string {
  7835. return evalErr(fmt.Sprintf(`%s cget -titleitems`, w))
  7836. }
  7837. // Tristateimage option.
  7838. //
  7839. // Known uses:
  7840. // - [Checkbutton] (widget specific)
  7841. // - [Radiobutton] (widget specific)
  7842. func Tristateimage(val any) Opt {
  7843. return rawOption(fmt.Sprintf(`-tristateimage %s`, optionString(val)))
  7844. }
  7845. // Tristateimage — Get the configured option value.
  7846. //
  7847. // Known uses:
  7848. // - [Checkbutton] (widget specific)
  7849. // - [Radiobutton] (widget specific)
  7850. func (w *Window) Tristateimage() string {
  7851. return evalErr(fmt.Sprintf(`%s cget -tristateimage`, w))
  7852. }
  7853. // Tristatevalue option.
  7854. //
  7855. // Known uses:
  7856. // - [Checkbutton] (widget specific)
  7857. // - [Radiobutton] (widget specific)
  7858. func Tristatevalue(val any) Opt {
  7859. return rawOption(fmt.Sprintf(`-tristatevalue %s`, optionString(val)))
  7860. }
  7861. // Tristatevalue — Get the configured option value.
  7862. //
  7863. // Known uses:
  7864. // - [Checkbutton] (widget specific)
  7865. // - [Radiobutton] (widget specific)
  7866. func (w *Window) Tristatevalue() string {
  7867. return evalErr(fmt.Sprintf(`%s cget -tristatevalue`, w))
  7868. }
  7869. // Troughcolor option.
  7870. //
  7871. // Specifies the color to use for the rectangular trough areas
  7872. // in widgets such as scrollbars and scales. This option is ignored for
  7873. // scrollbars on Windows (native widget does not recognize this option).
  7874. //
  7875. // Known uses:
  7876. // - [Scale]
  7877. // - [Scrollbar]
  7878. func Troughcolor(val any) Opt {
  7879. return rawOption(fmt.Sprintf(`-troughcolor %s`, optionString(val)))
  7880. }
  7881. // Troughcolor — Get the configured option value.
  7882. //
  7883. // Known uses:
  7884. // - [Scale]
  7885. // - [Scrollbar]
  7886. func (w *Window) Troughcolor() string {
  7887. return evalErr(fmt.Sprintf(`%s cget -troughcolor`, w))
  7888. }
  7889. // Underline option.
  7890. //
  7891. // Specifies the integer index of a character to underline in the widget.
  7892. // This option is used by the default bindings to implement keyboard
  7893. // traversal for menu buttons and menu entries.
  7894. // 0 corresponds to the first character of the text displayed in the
  7895. // widget, 1 to the next character, and so on. end corresponds to the
  7896. // last character, end-1 to the before last character, and so on.
  7897. //
  7898. // Known uses:
  7899. // - [Button]
  7900. // - [Checkbutton]
  7901. // - [Label]
  7902. // - [MenuWidget.AddCascade] (command specific)
  7903. // - [MenuWidget.AddCommand] (command specific)
  7904. // - [MenuWidget.AddSeparator] (command specific)
  7905. // - [Menubutton]
  7906. // - [NewFont] (command specific)
  7907. // - [Radiobutton]
  7908. // - [TButton]
  7909. // - [TCheckbutton]
  7910. // - [TLabel]
  7911. // - [TLabelframe] (widget specific)
  7912. // - [TMenubutton]
  7913. // - [TRadiobutton]
  7914. // - [TextWidget.TagConfigure] (command specific)
  7915. func Underline(val any) Opt {
  7916. return rawOption(fmt.Sprintf(`-underline %s`, optionString(val)))
  7917. }
  7918. // Underline — Get the configured option value.
  7919. //
  7920. // Known uses:
  7921. // - [Button]
  7922. // - [Checkbutton]
  7923. // - [Label]
  7924. // - [Menubutton]
  7925. // - [Radiobutton]
  7926. // - [TButton]
  7927. // - [TCheckbutton]
  7928. // - [TLabel]
  7929. // - [TLabelframe] (widget specific)
  7930. // - [TMenubutton]
  7931. // - [TRadiobutton]
  7932. func (w *Window) Underline() string {
  7933. return evalErr(fmt.Sprintf(`%s cget -underline`, w))
  7934. }
  7935. // Underlinefg option.
  7936. //
  7937. // Known uses:
  7938. // - [TextWidget.TagConfigure] (command specific)
  7939. func Underlinefg(val any) Opt {
  7940. return rawOption(fmt.Sprintf(`-underlinefg %s`, optionString(val)))
  7941. }
  7942. // Undo option.
  7943. //
  7944. // Known uses:
  7945. // - [Text] (widget specific)
  7946. func Undo(val any) Opt {
  7947. return rawOption(fmt.Sprintf(`-undo %s`, optionString(val)))
  7948. }
  7949. // Undo — Get the configured option value.
  7950. //
  7951. // Known uses:
  7952. // - [Text] (widget specific)
  7953. func (w *Window) Undo() string {
  7954. return evalErr(fmt.Sprintf(`%s cget -undo`, w))
  7955. }
  7956. // Use option.
  7957. //
  7958. // Known uses:
  7959. // - [Toplevel] (widget specific)
  7960. func Use(val any) Opt {
  7961. return rawOption(fmt.Sprintf(`-use %s`, optionString(val)))
  7962. }
  7963. // Use — Get the configured option value.
  7964. //
  7965. // Known uses:
  7966. // - [Toplevel] (widget specific)
  7967. func (w *Window) Use() string {
  7968. return evalErr(fmt.Sprintf(`%s cget -use`, w))
  7969. }
  7970. // Validate option.
  7971. //
  7972. // Known uses:
  7973. // - [Entry] (widget specific)
  7974. // - [Spinbox] (widget specific)
  7975. // - [TEntry] (widget specific)
  7976. // - [TSpinbox]
  7977. func Validate(val any) Opt {
  7978. return rawOption(fmt.Sprintf(`-validate %s`, optionString(val)))
  7979. }
  7980. // Validate — Get the configured option value.
  7981. //
  7982. // Known uses:
  7983. // - [Entry] (widget specific)
  7984. // - [Spinbox] (widget specific)
  7985. // - [TEntry] (widget specific)
  7986. // - [TSpinbox]
  7987. func (w *Window) Validate() string {
  7988. return evalErr(fmt.Sprintf(`%s cget -validate`, w))
  7989. }
  7990. // Validatecommand option.
  7991. //
  7992. // See also [Event handlers].
  7993. //
  7994. // Known uses:
  7995. // - [Entry] (widget specific)
  7996. // - [Spinbox] (widget specific)
  7997. // - [TEntry] (widget specific)
  7998. // - [TSpinbox]
  7999. //
  8000. // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
  8001. func Validatecommand(handler any) Opt {
  8002. return newEventHandler("-validatecommand", handler)
  8003. }
  8004. // Value option.
  8005. //
  8006. // Known uses:
  8007. // - [MenuWidget.AddCascade] (command specific)
  8008. // - [MenuWidget.AddCommand] (command specific)
  8009. // - [MenuWidget.AddSeparator] (command specific)
  8010. // - [Radiobutton] (widget specific)
  8011. // - [TProgressbar] (widget specific)
  8012. // - [TRadiobutton] (widget specific)
  8013. // - [TScale] (widget specific)
  8014. func Value(val any) Opt {
  8015. return rawOption(fmt.Sprintf(`-value %s`, optionString(val)))
  8016. }
  8017. // Value — Get the configured option value.
  8018. //
  8019. // Known uses:
  8020. // - [Radiobutton] (widget specific)
  8021. // - [TProgressbar] (widget specific)
  8022. // - [TRadiobutton] (widget specific)
  8023. // - [TScale] (widget specific)
  8024. func (w *Window) Value() string {
  8025. return evalErr(fmt.Sprintf(`%s cget -value`, w))
  8026. }
  8027. // Visual option.
  8028. //
  8029. // Known uses:
  8030. // - [Frame] (widget specific)
  8031. // - [Labelframe] (widget specific)
  8032. // - [Toplevel] (widget specific)
  8033. func Visual(val any) Opt {
  8034. return rawOption(fmt.Sprintf(`-visual %s`, optionString(val)))
  8035. }
  8036. // Visual — Get the configured option value.
  8037. //
  8038. // Known uses:
  8039. // - [Frame] (widget specific)
  8040. // - [Labelframe] (widget specific)
  8041. // - [Toplevel] (widget specific)
  8042. func (w *Window) Visual() string {
  8043. return evalErr(fmt.Sprintf(`%s cget -visual`, w))
  8044. }
  8045. // Weight option.
  8046. //
  8047. // Known uses:
  8048. // - [NewFont] (command specific)
  8049. func Weight(val any) Opt {
  8050. return rawOption(fmt.Sprintf(`-weight %s`, optionString(val)))
  8051. }
  8052. // Width option.
  8053. //
  8054. // If greater than zero, specifies how much space, in character widths,
  8055. // to allocate for the text label.
  8056. // If less than zero, specifies a minimum width.
  8057. // If zero or unspecified, the natural width of the text label is used.
  8058. // Note that some themes may specify a non-zero -width
  8059. // in the style.
  8060. //
  8061. // Known uses:
  8062. // - [Button] (widget specific)
  8063. // - [Canvas] (widget specific)
  8064. // - [Checkbutton] (widget specific)
  8065. // - [Entry] (widget specific)
  8066. // - [Frame] (widget specific)
  8067. // - [Label] (widget specific)
  8068. // - [Labelframe] (widget specific)
  8069. // - [Listbox] (widget specific)
  8070. // - [Menubutton] (widget specific)
  8071. // - [Message] (widget specific)
  8072. // - [NewPhoto] (command specific)
  8073. // - [Panedwindow] (widget specific)
  8074. // - [Place] (command specific)
  8075. // - [Radiobutton] (widget specific)
  8076. // - [Scale] (widget specific)
  8077. // - [Scrollbar] (widget specific)
  8078. // - [Spinbox] (widget specific)
  8079. // - [TButton]
  8080. // - [TCheckbutton]
  8081. // - [TCombobox] (widget specific)
  8082. // - [TEntry] (widget specific)
  8083. // - [TFrame] (widget specific)
  8084. // - [TLabel]
  8085. // - [TLabelframe] (widget specific)
  8086. // - [TMenubutton]
  8087. // - [TNotebook] (widget specific)
  8088. // - [TPanedwindow] (widget specific)
  8089. // - [TRadiobutton]
  8090. // - [Text] (widget specific)
  8091. // - [Toplevel] (widget specific)
  8092. func Width(val any) Opt {
  8093. return rawOption(fmt.Sprintf(`-width %s`, optionString(val)))
  8094. }
  8095. // Width — Get the configured option value.
  8096. //
  8097. // Known uses:
  8098. // - [Button] (widget specific)
  8099. // - [Canvas] (widget specific)
  8100. // - [Checkbutton] (widget specific)
  8101. // - [Entry] (widget specific)
  8102. // - [Frame] (widget specific)
  8103. // - [Label] (widget specific)
  8104. // - [Labelframe] (widget specific)
  8105. // - [Listbox] (widget specific)
  8106. // - [Menubutton] (widget specific)
  8107. // - [Message] (widget specific)
  8108. // - [Panedwindow] (widget specific)
  8109. // - [Radiobutton] (widget specific)
  8110. // - [Scale] (widget specific)
  8111. // - [Scrollbar] (widget specific)
  8112. // - [Spinbox] (widget specific)
  8113. // - [TButton]
  8114. // - [TCheckbutton]
  8115. // - [TCombobox] (widget specific)
  8116. // - [TEntry] (widget specific)
  8117. // - [TFrame] (widget specific)
  8118. // - [TLabel]
  8119. // - [TLabelframe] (widget specific)
  8120. // - [TMenubutton]
  8121. // - [TNotebook] (widget specific)
  8122. // - [TPanedwindow] (widget specific)
  8123. // - [TRadiobutton]
  8124. // - [Text] (widget specific)
  8125. // - [Toplevel] (widget specific)
  8126. func (w *Window) Width() string {
  8127. return evalErr(fmt.Sprintf(`%s cget -width`, w))
  8128. }
  8129. // Wrap option.
  8130. //
  8131. // Known uses:
  8132. // - [Spinbox] (widget specific)
  8133. // - [TSpinbox] (widget specific)
  8134. // - [TextWidget.TagConfigure] (command specific)
  8135. // - [Text] (widget specific)
  8136. func Wrap(val any) Opt {
  8137. return rawOption(fmt.Sprintf(`-wrap %s`, optionString(val)))
  8138. }
  8139. // Wrap — Get the configured option value.
  8140. //
  8141. // Known uses:
  8142. // - [Spinbox] (widget specific)
  8143. // - [TSpinbox] (widget specific)
  8144. // - [Text] (widget specific)
  8145. func (w *Window) Wrap() string {
  8146. return evalErr(fmt.Sprintf(`%s cget -wrap`, w))
  8147. }
  8148. // Wraplength option.
  8149. //
  8150. // For widgets that can perform word-wrapping, this option specifies
  8151. // the maximum line length.
  8152. // Lines that would exceed this length are wrapped onto the next line,
  8153. // so that no line is longer than the specified length.
  8154. // The value may be specified in any of the standard forms for
  8155. // screen distances.
  8156. // If this value is negative or zero then no wrapping is done: lines
  8157. // will break only at newline characters in the text.
  8158. //
  8159. // Known uses:
  8160. // - [Button]
  8161. // - [Checkbutton]
  8162. // - [Label]
  8163. // - [Menubutton]
  8164. // - [Radiobutton]
  8165. // - [TLabel]
  8166. // - [TLabel] (widget specific)
  8167. // - [TProgressbar]
  8168. func Wraplength(val any) Opt {
  8169. return rawOption(fmt.Sprintf(`-wraplength %s`, optionString(val)))
  8170. }
  8171. // Wraplength — Get the configured option value.
  8172. //
  8173. // Known uses:
  8174. // - [Button]
  8175. // - [Checkbutton]
  8176. // - [Label]
  8177. // - [Menubutton]
  8178. // - [Radiobutton]
  8179. // - [TLabel]
  8180. // - [TLabel] (widget specific)
  8181. // - [TProgressbar]
  8182. func (w *Window) Wraplength() string {
  8183. return evalErr(fmt.Sprintf(`%s cget -wraplength`, w))
  8184. }
  8185. // X option.
  8186. //
  8187. // Known uses:
  8188. // - [Place] (command specific)
  8189. func X(val any) Opt {
  8190. return rawOption(fmt.Sprintf(`-x %s`, optionString(val)))
  8191. }
  8192. // Xscrollcommand option.
  8193. //
  8194. // See also [Event handlers].
  8195. //
  8196. // Specifies the prefix for a command used to communicate with horizontal
  8197. // scrollbars.
  8198. // When the view in the widget's window changes (or
  8199. // whenever anything else occurs that could change the display in a
  8200. // scrollbar, such as a change in the total size of the widget's
  8201. // contents), the widget will
  8202. // generate a Tcl command by concatenating the scroll command and
  8203. // two numbers.
  8204. // Each of the numbers is a fraction between 0 and 1, which indicates
  8205. // a position in the document. 0 indicates the beginning of the document,
  8206. // 1 indicates the end, .333 indicates a position one third the way through
  8207. // the document, and so on.
  8208. // The first fraction indicates the first information in the document
  8209. // that is visible in the window, and the second fraction indicates
  8210. // the information just after the last portion that is visible.
  8211. // The command is
  8212. // then passed to the Tcl interpreter for execution. Typically the
  8213. // -xscrollcommand option consists of the path name of a scrollbar
  8214. // widget followed by
  8215. // e.g.
  8216. // this will cause
  8217. // the scrollbar to be updated whenever the view in the window changes.
  8218. // If this option is not specified, then no command will be executed.
  8219. //
  8220. // Known uses:
  8221. // - [Canvas]
  8222. // - [Entry]
  8223. // - [Listbox]
  8224. // - [Spinbox]
  8225. // - [TEntry]
  8226. // - [TSpinbox]
  8227. // - [TTreeview]
  8228. // - [Text]
  8229. //
  8230. // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
  8231. func Xscrollcommand(handler any) Opt {
  8232. return newEventHandler("-xscrollcommand", handler)
  8233. }
  8234. // Xscrollincrement option.
  8235. //
  8236. // Known uses:
  8237. // - [Canvas] (widget specific)
  8238. func Xscrollincrement(val any) Opt {
  8239. return rawOption(fmt.Sprintf(`-xscrollincrement %s`, optionString(val)))
  8240. }
  8241. // Xscrollincrement — Get the configured option value.
  8242. //
  8243. // Known uses:
  8244. // - [Canvas] (widget specific)
  8245. func (w *Window) Xscrollincrement() string {
  8246. return evalErr(fmt.Sprintf(`%s cget -xscrollincrement`, w))
  8247. }
  8248. // Y option.
  8249. //
  8250. // Known uses:
  8251. // - [Place] (command specific)
  8252. func Y(val any) Opt {
  8253. return rawOption(fmt.Sprintf(`-y %s`, optionString(val)))
  8254. }
  8255. // Yscrollcommand option.
  8256. //
  8257. // See also [Event handlers].
  8258. //
  8259. // Specifies the prefix for a command used to communicate with vertical
  8260. // scrollbars. This option is treated in the same way as the
  8261. // -xscrollcommand option, except that it is used for vertical
  8262. // scrollbars and is provided by widgets that support vertical scrolling.
  8263. // See the description of -xscrollcommand for details
  8264. // on how this option is used.
  8265. //
  8266. // Known uses:
  8267. // - [Canvas]
  8268. // - [Listbox]
  8269. // - [TTreeview]
  8270. // - [Text]
  8271. //
  8272. // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
  8273. func Yscrollcommand(handler any) Opt {
  8274. return newEventHandler("-yscrollcommand", handler)
  8275. }
  8276. // Yscrollincrement option.
  8277. //
  8278. // Known uses:
  8279. // - [Canvas] (widget specific)
  8280. func Yscrollincrement(val any) Opt {
  8281. return rawOption(fmt.Sprintf(`-yscrollincrement %s`, optionString(val)))
  8282. }
  8283. // Yscrollincrement — Get the configured option value.
  8284. //
  8285. // Known uses:
  8286. // - [Canvas] (widget specific)
  8287. func (w *Window) Yscrollincrement() string {
  8288. return evalErr(fmt.Sprintf(`%s cget -yscrollincrement`, w))
  8289. }