| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735 |
- // Code generated by generator.go, DO NOT EDIT.
- package tk9_0 // import "modernc.org/tk9.0"
- import "fmt"
- // Button — Create and manipulate 'button' action widgets
- //
- // # Description
- //
- // The button command creates a new window (given by the
- // pathName argument) and makes it into a button widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the button such as its colors, font,
- // text, and initial relief. The button command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A button is a widget that displays a textual string, bitmap or image.
- // If text is displayed, it must all be in a single font, but it
- // can occupy multiple lines on the screen (if it contains newlines
- // or if wrapping occurs because of the -wraplength option) and
- // one of the characters may optionally be underlined using the
- // It can display itself in either of three different ways, according
- // to
- // the -state option;
- // it can be made to appear raised, sunken, or flat;
- // and it can be made to flash. When a user invokes the
- // button (by pressing mouse button 1 with the cursor over the
- // button), then the Tcl command specified in the -command
- // option is invoked.
- //
- // Use [Window.Button] to create a Button with a particular parent.
- //
- // More information might be available at the [Tcl/Tk button] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Activeforeground]
- // - [Anchor]
- // - [Background]
- // - [Bitmap]
- // - [Borderwidth]
- // - [Compound]
- // - [Cursor]
- // - [Disabledforeground]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Image]
- // - [Justify]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Repeatdelay]
- // - [Repeatinterval]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Wraplength]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // Specifies a Tcl command to associate with the button. This command
- // is typically invoked when mouse button 1 is released over the button
- // window.
- //
- // [Default]
- //
- // Specifies one of three states for the default ring: normal,
- // active, or disabled. In active state, the button is drawn
- // with the platform specific appearance for a default button. In normal
- // state, the button is drawn with the platform specific appearance for a
- // non-default button, leaving enough space to draw the default button
- // appearance. The normal and active states will result in buttons of
- // the same size. In disabled state, the button is drawn with the
- // non-default button appearance without leaving space for the default
- // appearance. The disabled state may result in a smaller button than
- // the active state.
- //
- // [Height]
- //
- // Specifies a desired height for the button.
- // If an image or bitmap is being displayed in the button then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in lines of text.
- // If this option is not specified, the button's desired height is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Overrelief]
- //
- // Specifies an alternative relief for the button, to be used when the
- // mouse cursor is over the widget. This option can be used to make
- // toolbar buttons, by configuring -relief flat -overrelief
- // raised. If the value of this option is the empty string, then no
- // alternative relief is used when the mouse cursor is over the button.
- // The empty string is the default value.
- //
- // [State]
- //
- // Specifies one of three states for the button: normal, active,
- // or disabled. In normal state the button is displayed using the
- // -foreground and -background options. The active state is
- // typically used when the pointer is over the button. In active state
- // the button is displayed using the -activeforeground and
- // -activebackground options. Disabled state means that the button
- // should be insensitive: the default bindings will refuse to activate
- // the widget and will ignore mouse button presses.
- // In this state the -disabledforeground and
- // -background options determine how the button is displayed.
- //
- // [Width]
- //
- // Specifies a desired width for the button.
- // If an image or bitmap is being displayed in the button then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels).
- // For a text button (no image or with -compound none) then the width
- // specifies how much space in characters to allocate for the text label.
- // If the width is negative then this specifies a minimum width.
- // If this option is not specified, the button's desired width is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Tcl/Tk button]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/button.html
- func Button(options ...Opt) *ButtonWidget {
- return App.Button(options...)
- }
- // Button — Create and manipulate 'button' action widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Button]
- func (w *Window) Button(options ...Opt) *ButtonWidget {
- return &ButtonWidget{w.newChild("button", options...)}
- }
- // ButtonWidget represents the Tcl/Tk button widget/window
- type ButtonWidget struct {
- *Window
- }
- // Canvas — Create and manipulate 'canvas' hypergraphics drawing surface widgets
- //
- // Use [Window.Canvas] to create a Canvas with a particular parent.
- //
- // More information might be available at the [Tcl/Tk canvas] page.
- //
- // # Standard options
- //
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Insertbackground]
- // - [Insertborderwidth]
- // - [Insertofftime]
- // - [Insertontime]
- // - [Insertwidth]
- // - [Relief]
- // - [Selectbackground]
- // - [Selectborderwidth]
- // - [Selectforeground]
- // - [Takefocus]
- // - [Xscrollcommand]
- // - [Yscrollcommand]
- //
- // # Widget specific options
- //
- // [Closeenough]
- //
- // Specifies a floating-point value indicating how close the mouse cursor
- // must be to an item before it is considered to be
- // the item. Defaults to 1.0.
- //
- // [Confine]
- //
- // Specifies a boolean value that indicates whether or not it should be
- // allowable to set the canvas's view outside the region defined by the
- // scrollRegion argument.
- // Defaults to true, which means that the view will
- // be constrained within the scroll region.
- //
- // [Height]
- //
- // Specifies a desired window height that the canvas widget should request from
- // its geometry manager. The value may be specified in any
- // of the forms described in the COORDINATES section below.
- //
- // [Scrollregion]
- //
- // Specifies a list with four coordinates describing the left, top, right, and
- // bottom coordinates of a rectangular region.
- // This region is used for scrolling purposes and is considered to be
- // the boundary of the information in the canvas.
- // Each of the coordinates may be specified
- // in any of the forms given in the COORDINATES section below.
- //
- // [State]
- //
- // Modifies the default state of the canvas where state may be set to
- // one of: normal, disabled, or hidden. Individual canvas
- // objects all have their own state option which may override the default
- // state. Many options can take separate specifications such that the
- // appearance of the item can be different in different situations. The
- // options that start with active control the appearance when the mouse
- // pointer is over it, while the option starting with disabled controls
- // the appearance when the state is disabled. Canvas items which are
- // disabled will not react to canvas bindings.
- //
- // [Width]
- //
- // Specifies a desired window width that the canvas widget should request from
- // its geometry manager. The value may be specified in any
- // of the forms described in the COORDINATES section below.
- //
- // [Xscrollincrement]
- //
- // Specifies an increment for horizontal scrolling, in any of the usual forms
- // permitted for screen distances. If the value of this option is greater
- // than zero, the horizontal view in the window will be constrained so that
- // the canvas x coordinate at the left edge of the window is always an even
- // multiple of xScrollIncrement; furthermore, the units for scrolling
- // (e.g., the change in view when the left and right arrows of a scrollbar
- // are selected) will also be xScrollIncrement. If the value of
- // this option is negative or zero, then horizontal scrolling
- // is unconstrained.
- //
- // [Yscrollincrement]
- //
- // Specifies an increment for vertical scrolling, in any of the usual forms
- // permitted for screen distances. If the value of this option is greater
- // than zero, the vertical view in the window will be constrained so that
- // the canvas y coordinate at the top edge of the window is always an even
- // multiple of yScrollIncrement; furthermore, the units for scrolling
- // (e.g., the change in view when the top and bottom arrows of a scrollbar
- // are selected) will also be yScrollIncrement. If the value of
- // this option is negative or zero, then vertical scrolling
- // is unconstrained.
- //
- // [Tcl/Tk canvas]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/canvas.html
- func Canvas(options ...Opt) *CanvasWidget {
- return App.Canvas(options...)
- }
- // Canvas — Create and manipulate 'canvas' hypergraphics drawing surface widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Canvas]
- func (w *Window) Canvas(options ...Opt) *CanvasWidget {
- return &CanvasWidget{w.newChild("canvas", options...)}
- }
- // CanvasWidget represents the Tcl/Tk canvas widget/window
- type CanvasWidget struct {
- *Window
- }
- // Checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
- //
- // # Description
- //
- // The checkbutton command creates a new window (given by the
- // pathName argument) and makes it into a checkbutton widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the checkbutton such as its colors, font,
- // text, and initial relief. The checkbutton command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A checkbutton is a widget
- // that displays a textual string, bitmap or image
- // and a square called an indicator.
- // If text is displayed, it must all be in a single font, but it
- // can occupy multiple lines on the screen (if it contains newlines
- // or if wrapping occurs because of the -wraplength option) and
- // one of the characters may optionally be underlined using the
- // A checkbutton has
- // all of the behavior of a simple button, including the
- // following: it can display itself in either of three different
- // ways, according to the -state option;
- // it can be made to appear
- // raised, sunken, or flat; it can be made to flash; and it invokes
- // a Tcl command whenever mouse button 1 is clicked over the
- // checkbutton.
- //
- // In addition, checkbuttons can be selected.
- // If a checkbutton is selected then the indicator is normally
- // drawn with a selected appearance, and
- // a Tcl variable associated with the checkbutton is set to a particular
- // value (normally 1).
- // The indicator is drawn with a check mark inside.
- // If the checkbutton is not selected, then the indicator is drawn with a
- // deselected appearance, and the associated variable is
- // set to a different value (typically 0).
- // The indicator is drawn without a check mark inside. In the special case
- // where the variable (if specified) has a value that matches the tristatevalue,
- // the indicator is drawn with a tri-state appearance and is in the tri-state
- // mode indicating mixed or multiple values. (This is used when the check
- // box represents the state of multiple items.)
- // The indicator is drawn in a platform dependent manner. Under Unix and
- // Windows, the background interior of the box is
- // grayed .
- // Under Mac, the indicator is drawn with a dash mark inside.
- // By default, the name of the variable associated with a checkbutton is the
- // same as the name used to create the checkbutton.
- // The variable name, and the
- // on ,
- // off
- // and
- // tristate
- // values stored in it, may be modified with options on the command line
- // or in the option database.
- // Configuration options may also be used to modify the way the
- // indicator is displayed (or whether it is displayed at all).
- // By default a checkbutton is configured to select and deselect
- // itself on alternate button clicks.
- // In addition, each checkbutton monitors its associated variable and
- // automatically selects and deselects itself when the variables value
- // changes to and from the button's
- // on ,
- // off
- // and
- // tristate
- // values.
- //
- // Use [Window.Checkbutton] to create a Checkbutton with a particular parent.
- //
- // More information might be available at the [Tcl/Tk checkbutton] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Activeforeground]
- // - [Anchor]
- // - [Background]
- // - [Bitmap]
- // - [Borderwidth]
- // - [Compound]
- // - [Cursor]
- // - [Disabledforeground]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Image]
- // - [Justify]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Wraplength]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // Specifies a Tcl command to associate with the button. This command
- // is typically invoked when mouse button 1 is released over the button
- // window. The button's global variable (-variable option) will
- // be updated before the command is invoked.
- //
- // [Height]
- //
- // Specifies a desired height for the button.
- // If an image or bitmap is being displayed in the button then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in lines of text.
- // If this option is not specified, the button's desired height is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Indicatoron]
- //
- // Specifies whether or not the indicator should be drawn. Must be a
- // proper boolean value. If false, the -relief option is
- // ignored and the widget's relief is always sunken if the widget is
- // selected and raised otherwise.
- //
- // [Offrelief]
- //
- // Specifies the relief for the checkbutton when the indicator is not drawn and
- // the checkbutton is off. The default value is
- // By setting this option to
- // and setting -indicatoron to false and -overrelief to
- // the effect is achieved
- // of having a flat button that raises on mouse-over and which is
- // depressed when activated. This is the behavior typically exhibited by
- // the Bold, Italic, and Underline checkbuttons on the toolbar of a
- // word-processor, for example.
- //
- // [Offvalue]
- //
- // Specifies value to store in the button's associated variable whenever
- // this button is deselected. Defaults to
- //
- // [Onvalue]
- //
- // Specifies value to store in the button's associated variable whenever
- // this button is selected. Defaults to
- //
- // [Overrelief]
- //
- // Specifies an alternative relief for the checkbutton, to be used when the
- // mouse cursor is over the widget. This option can be used to make
- // toolbar buttons, by configuring -relief flat -overrelief
- // raised. If the value of this option is the empty string, then no
- // alternative relief is used when the mouse cursor is over the checkbutton.
- // The empty string is the default value.
- //
- // [Selectcolor]
- //
- // Specifies a background color to use when the button is selected.
- // If indicatorOn is true then the color is used as the background for
- // the indicator regardless of the select state.
- // If indicatorOn is false, this color is used as the background
- // for the entire widget, in place of background or activeBackground,
- // whenever the widget is selected.
- // If specified as an empty string then no special color is used for
- // displaying when the widget is selected.
- //
- // [Selectimage]
- //
- // Specifies an image to display (in place of the -image option)
- // when the checkbutton is selected.
- // This option is ignored unless the -image option has been
- // specified.
- //
- // [State]
- //
- // Specifies one of three states for the checkbutton: normal, active,
- // or disabled. In normal state the checkbutton is displayed using the
- // -foreground and -background options. The active state is
- // typically used when the pointer is over the checkbutton. In active state
- // the checkbutton is displayed using the -activeforeground and
- // -activebackground options. Disabled state means that the checkbutton
- // should be insensitive: the default bindings will refuse to activate
- // the widget and will ignore mouse button presses.
- // In this state the -disabledforeground and
- // -background options determine how the checkbutton is displayed.
- //
- // [Tristateimage]
- //
- // Specifies an image to display (in place of the -image option)
- // when the checkbutton is in tri-state mode.
- // This option is ignored unless the -image option has been
- // specified.
- //
- // [Tristatevalue]
- //
- // Specifies the value that causes the checkbutton to display the multi-value
- // selection, also known as the tri-state mode. Defaults to
- //
- // [Variable]
- //
- // Specifies the name of a global variable to set to indicate whether
- // or not this button is selected. Defaults to the name of the
- // button within its parent (i.e. the last element of the button
- // window's path name).
- //
- // [Width]
- //
- // Specifies a desired width for the button.
- // If an image or bitmap is being displayed in the button then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in characters.
- // If this option is not specified, the button's desired width is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Tcl/Tk checkbutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/checkbutton.html
- func Checkbutton(options ...Opt) *CheckbuttonWidget {
- return App.Checkbutton(options...)
- }
- // Checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Checkbutton]
- func (w *Window) Checkbutton(options ...Opt) *CheckbuttonWidget {
- return &CheckbuttonWidget{w.newChild("checkbutton", options...)}
- }
- // CheckbuttonWidget represents the Tcl/Tk checkbutton widget/window
- type CheckbuttonWidget struct {
- *Window
- }
- // Entry — Create and manipulate 'entry' one-line text entry widgets
- //
- // # Description
- //
- // The entry command creates a new window (given by the
- // pathName argument) and makes it into an entry widget.
- // Additional options, described above, may be specified on the
- // command line or in the option database
- // to configure aspects of the entry such as its colors, font,
- // and relief. The entry command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // An entry is a widget that displays a one-line text string and
- // allows that string to be edited using widget commands described below, which
- // are typically bound to keystrokes and mouse actions.
- // When first created, an entry's string is empty.
- // A portion of the entry may be selected as described below.
- // If an entry is exporting its selection (see the -exportselection
- // option), then it will observe the standard X11 protocols for handling the
- // selection; entry selections are available as type STRING.
- // Entries also observe the standard Tk rules for dealing with the
- // input focus. When an entry has the input focus it displays an
- // insertion cursor to indicate where new characters will be
- // inserted.
- //
- // Entries are capable of displaying strings that are too long to
- // fit entirely within the widget's window. In this case, only a
- // portion of the string will be displayed; commands described below
- // may be used to change the view in the window. Entries use
- // the standard -xscrollcommand mechanism for interacting with
- // scrollbars (see the description of the -xscrollcommand option
- // for details). They also support scanning, as described below.
- //
- // Use [Window.Entry] to create a Entry with a particular parent.
- //
- // More information might be available at the [Tcl/Tk entry] page.
- //
- // # Standard options
- //
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Exportselection]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Insertbackground]
- // - [Insertborderwidth]
- // - [Insertofftime]
- // - [Insertontime]
- // - [Insertwidth]
- // - [Justify]
- // - [Placeholder]
- // - [Placeholderforeground]
- // - [Relief]
- // - [Selectbackground]
- // - [Selectborderwidth]
- // - [Selectforeground]
- // - [Takefocus]
- // - [Textvariable]
- // - [Xscrollcommand]
- //
- // # Widget specific options
- //
- // [Disabledbackground]
- //
- // Specifies the background color to use when the entry is disabled. If
- // this option is the empty string, the normal background color is used.
- //
- // [Disabledforeground]
- //
- // Specifies the foreground color to use when the entry is disabled. If
- // this option is the empty string, the normal foreground color is used.
- //
- // [Invalidcommand]
- //
- // Specifies a script to eval when -validatecommand returns 0.
- // Setting it to {} disables this feature (the default). The best use
- // of this option is to set it to bell. See VALIDATION
- // below for more information.
- //
- // [Readonlybackground]
- //
- // Specifies the background color to use when the entry is readonly. If
- // this option is the empty string, the normal background color is used.
- //
- // [Show]
- //
- // If this option is specified, then the true contents of the entry
- // are not displayed in the window.
- // Instead, each character in the entry's value will be displayed as
- // the first character in the value of this option, such as
- // This is useful, for example, if the entry is to be used to enter
- // a password.
- // If characters in the entry are selected and copied elsewhere, the
- // information copied will be what is displayed, not the true contents
- // of the entry.
- //
- // [State]
- //
- // Specifies one of three states for the entry: normal,
- // disabled, or readonly. If the entry is readonly, then the
- // value may not be changed using widget commands and no insertion cursor
- // will be displayed, even if the input focus is in the widget; the
- // contents of the widget may still be selected. If the entry is
- // disabled, the value may not be changed, no insertion cursor will be
- // displayed, the contents will not be selectable, and the entry may
- // be displayed in a different color, depending on the values of the
- // -disabledforeground and -disabledbackground options.
- //
- // [Validate]
- //
- // Specifies the mode in which validation should operate: none,
- // focus, focusin, focusout, key, or all.
- // It defaults to none. When you want validation, you must explicitly
- // state which mode you wish to use. See VALIDATION below for more.
- //
- // [Validatecommand]
- //
- // Specifies a script to eval when you want to validate the input into
- // the entry widget. Setting it to {} disables this feature (the default).
- // This command must return a valid Tcl boolean value. If it returns 0 (or
- // the valid Tcl boolean equivalent) then it means you reject the new edition
- // and it will not occur and the -invalidcommand will be evaluated if it
- // is set. If it returns 1, then the new edition occurs.
- // See VALIDATION below for more information.
- //
- // [Width]
- //
- // Specifies an integer value indicating the desired width of the entry window,
- // in average-size characters of the widget's font.
- // If the value is negative or zero, the widget picks a
- // size just large enough to hold its current text.
- //
- // [Tcl/Tk entry]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/entry.html
- func Entry(options ...Opt) *EntryWidget {
- return App.Entry(options...)
- }
- // Entry — Create and manipulate 'entry' one-line text entry widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Entry]
- func (w *Window) Entry(options ...Opt) *EntryWidget {
- return &EntryWidget{w.newChild("entry", options...)}
- }
- // EntryWidget represents the Tcl/Tk entry widget/window
- type EntryWidget struct {
- *Window
- }
- // Frame — Create and manipulate 'frame' simple container widgets
- //
- // # Description
- //
- // The frame command creates a new window (given by the
- // pathName argument) and makes it into a frame widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the frame such as its background color
- // and relief. The frame command returns the
- // path name of the new window.
- //
- // A frame is a simple widget. Its primary purpose is to act as a
- // spacer or container for complex window layouts. The only features
- // of a frame are its background and an optional 3-D border to make the
- // frame appear raised or sunken.
- //
- // Use [Window.Frame] to create a Frame with a particular parent.
- //
- // More information might be available at the [Tcl/Tk frame] page.
- //
- // # Standard options
- //
- // - [Borderwidth]
- // - [Cursor]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Background]
- //
- // This option is the same as the standard -background option
- // except that its value may also be specified as an empty string.
- // In this case, the widget will display no background or border, and
- // no colors will be consumed from its colormap for its background
- // and border.
- // An empty background will disable drawing the background image.
- //
- // [Backgroundimage]
- //
- // This specifies an image to display on the frame's background within
- // the border of the frame (i.e., the image will be clipped by the
- // frame's highlight ring and border, if either are present); subwidgets
- // of the frame will be drawn on top. The image must have been created
- // with the image create command. If specified as the empty string,
- // no image will be displayed.
- //
- // [Class]
- //
- // Specifies a class for the window.
- // This class will be used when querying the option database for
- // the window's other options, and it will also be used later for
- // other purposes such as bindings.
- // The -class option may not be changed with the configure
- // widget command.
- //
- // [Colormap]
- //
- // Specifies a colormap to use for the window.
- // The value may be either new, in which case a new colormap is
- // created for the window and its children, or the name of another
- // window (which must be on the same screen and have the same visual
- // as pathName), in which case the new window will use the colormap
- // from the specified window.
- // If the -colormap option is not specified, the new window
- // uses the same colormap as its parent.
- // This option may not be changed with the configure
- // widget command.
- //
- // [Container]
- //
- // The value must be a boolean. If true, it means that this window will
- // be used as a container in which some other application will be embedded
- // (for example, a Tk toplevel can be embedded using the -use option).
- // The window will support the appropriate window manager protocols for
- // things like geometry requests. The window should not have any
- // children of its own in this application.
- // This option may not be changed with the configure
- // widget command.
- // Note that -borderwidth, -padx and -pady are ignored when
- // configured as a container since a container has no border.
- //
- // [Height]
- //
- // Specifies the desired height for the window in any of the forms
- // acceptable to Tk_GetPixels. If this option is negative or
- // zero then the window will not request any size at all. Note that this
- // sets the total height of the frame, any -borderwidth or similar is
- // not added. Normally -height should not be used if a propagating
- // geometry manager, such as grid or pack, is used within the
- // frame since the geometry manager will override the height of the frame.
- //
- // [Tile]
- //
- // This specifies how to draw the background image (see
- // -backgroundimage) on the frame.
- // If true (according to Tcl_GetBoolean), the image will be tiled
- // to fill the whole frame, with the origin of the first copy of the
- // image being the top left of the interior of the frame.
- // If false (the default), the image will be centered within the frame.
- //
- // [Visual]
- //
- // Specifies visual information for the new window in any of the
- // forms accepted by Tk_GetVisual.
- // If this option is not specified, the new window will use the same
- // visual as its parent.
- // The -visual option may not be modified with the configure
- // widget command.
- //
- // [Width]
- //
- // Specifies the desired width for the window in any of the forms
- // acceptable to Tk_GetPixels. If this option is negative or
- // zero then the window will not request any size at all. Note that this
- // sets the total width of the frame, any -borderwidth or similar is
- // not added. Normally -width should not be used if a propagating
- // geometry manager, such as grid or pack, is used within the
- // frame since the geometry manager will override the width of the frame.
- //
- // [Tcl/Tk frame]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/frame.html
- func Frame(options ...Opt) *FrameWidget {
- return App.Frame(options...)
- }
- // Frame — Create and manipulate 'frame' simple container widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Frame]
- func (w *Window) Frame(options ...Opt) *FrameWidget {
- return &FrameWidget{w.newChild("frame", options...)}
- }
- // FrameWidget represents the Tcl/Tk frame widget/window
- type FrameWidget struct {
- *Window
- }
- // Label — Create and manipulate 'label' non-interactive text or image widgets
- //
- // # Description
- //
- // The label command creates a new window (given by the
- // pathName argument) and makes it into a label widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the label such as its colors, font,
- // text, and initial relief. The label command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A label is a widget that displays a textual string, bitmap or image.
- // If text is displayed, it must all be in a single font, but it
- // can occupy multiple lines on the screen (if it contains newlines
- // or if wrapping occurs because of the -wraplength option) and
- // one of the characters may optionally be underlined using the
- // The label can be manipulated in a few simple ways, such as
- // changing its relief or text, using the commands described below.
- //
- // Use [Window.Label] to create a Label with a particular parent.
- //
- // More information might be available at the [Tcl/Tk label] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Activeforeground]
- // - [Anchor]
- // - [Background]
- // - [Bitmap]
- // - [Borderwidth]
- // - [Compound]
- // - [Cursor]
- // - [Disabledforeground]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Image]
- // - [Justify]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Wraplength]
- //
- // # Widget specific options
- //
- // [Height]
- //
- // Specifies a desired height for the label.
- // If an image or bitmap is being displayed in the label then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in lines of text.
- // If this option is not specified, the label's desired height is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [State]
- //
- // Specifies one of three states for the label: normal, active,
- // or disabled. In normal state the button is displayed using the
- // -foreground and -background options. In active state
- // the label is displayed using the -activeforeground and
- // -activebackground options. In the disabled state the
- // -disabledforeground and -background options determine how
- // the button is displayed.
- //
- // [Width]
- //
- // Specifies a desired width for the label.
- // If an image or bitmap is being displayed in the label then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in characters.
- // If this option is not specified, the label's desired width is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Tcl/Tk label]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/label.html
- func Label(options ...Opt) *LabelWidget {
- return App.Label(options...)
- }
- // Label — Create and manipulate 'label' non-interactive text or image widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Label]
- func (w *Window) Label(options ...Opt) *LabelWidget {
- return &LabelWidget{w.newChild("label", options...)}
- }
- // LabelWidget represents the Tcl/Tk label widget/window
- type LabelWidget struct {
- *Window
- }
- // Labelframe — Create and manipulate 'labelframe' labelled container widgets
- //
- // # Description
- //
- // The labelframe command creates a new window (given by the
- // pathName argument) and makes it into a labelframe widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the labelframe such as its background color
- // and relief. The labelframe command returns the
- // path name of the new window.
- //
- // A labelframe is a simple widget. Its primary purpose is to act as a
- // spacer or container for complex window layouts. It has the features
- // of a frame plus the ability to display a label.
- //
- // Use [Window.Labelframe] to create a Labelframe with a particular parent.
- //
- // More information might be available at the [Tcl/Tk labelframe] page.
- //
- // # Standard options
- //
- // - [Borderwidth]
- // - [Cursor]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- // - [Txt]
- //
- // # Widget specific options
- //
- // [Background]
- //
- // This option is the same as the standard -background option
- // except that its value may also be specified as an empty string.
- // In this case, the widget will display no background or border, and
- // no colors will be consumed from its colormap for its background
- // and border.
- //
- // [Class]
- //
- // Specifies a class for the window.
- // This class will be used when querying the option database for
- // the window's other options, and it will also be used later for
- // other purposes such as bindings.
- // The -class option may not be changed with the configure
- // widget command.
- //
- // [Colormap]
- //
- // Specifies a colormap to use for the window.
- // The value may be either new, in which case a new colormap is
- // created for the window and its children, or the name of another
- // window (which must be on the same screen and have the same visual
- // as pathName), in which case the new window will use the colormap
- // from the specified window.
- // If the -colormap option is not specified, the new window
- // uses the same colormap as its parent.
- // This option may not be changed with the configure
- // widget command.
- //
- // [Height]
- //
- // Specifies the desired height for the window in any of the forms
- // acceptable to Tk_GetPixels.
- // If this option is negative or zero then the window will
- // not request any size at all.
- //
- // [Labelanchor]
- //
- // Specifies where to place the label. A label is only displayed if the
- // -text option is not the empty string.
- // Valid values for this option are (listing them clockwise)
- // nw, n, ne, en, e, es,
- // se, s,sw, ws, w and wn.
- // The default value is nw.
- //
- // [Labelwidget]
- //
- // Specifies a widget to use as label. This overrides any -text
- // option. The widget must exist before being used as -labelwidget
- // and if it is not a descendant of this window, it will be raised
- // above it in the stacking order.
- //
- // [Visual]
- //
- // Specifies visual information for the new window in any of the
- // forms accepted by Tk_GetVisual.
- // If this option is not specified, the new window will use the same
- // visual as its parent.
- // The -visual option may not be modified with the configure
- // widget command.
- //
- // [Width]
- //
- // Specifies the desired width for the window in any of the forms
- // acceptable to Tk_GetPixels.
- // If this option is negative or zero then the window will
- // not request any size at all.
- //
- // [Tcl/Tk labelframe]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/labelframe.html
- func Labelframe(options ...Opt) *LabelframeWidget {
- return App.Labelframe(options...)
- }
- // Labelframe — Create and manipulate 'labelframe' labelled container widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Labelframe]
- func (w *Window) Labelframe(options ...Opt) *LabelframeWidget {
- return &LabelframeWidget{w.newChild("labelframe", options...)}
- }
- // LabelframeWidget represents the Tcl/Tk labelframe widget/window
- type LabelframeWidget struct {
- *Window
- }
- // Listbox — Create and manipulate 'listbox' item list widgets
- //
- // # Description
- //
- // The listbox command creates a new window (given by the
- // pathName argument) and makes it into a listbox widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the listbox such as its colors, font,
- // text, and relief. The listbox command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A listbox is a widget that displays a list of strings, one per line.
- // When first created, a new listbox has no elements.
- // Elements may be added or deleted using widget commands described
- // below. In addition, one or more elements may be selected as described
- // below.
- // If a listbox is exporting its selection (see -exportselection
- // option), then it will observe the standard X11 protocols
- // for handling the selection.
- // Listbox selections are available as type STRING;
- // the value of the selection will be the text of the selected elements, with
- // newlines separating the elements.
- //
- // It is not necessary for all the elements to be
- // displayed in the listbox window at once; commands described below
- // may be used to change the view in the window. Listboxes allow
- // scrolling in both directions using the standard -xscrollcommand
- // and -yscrollcommand options.
- // They also support scanning, as described below.
- //
- // Use [Window.Listbox] to create a Listbox with a particular parent.
- //
- // More information might be available at the [Tcl/Tk listbox] page.
- //
- // # Standard options
- //
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Disabledforeground]
- // - [Exportselection]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Justify]
- // - [Relief]
- // - [Selectbackground]
- // - [Selectborderwidth]
- // - [Selectforeground]
- // - [Setgrid]
- // - [Takefocus]
- // - [Xscrollcommand]
- // - [Yscrollcommand]
- //
- // # Widget specific options
- //
- // [Activestyle]
- //
- // Specifies the style in which to draw the active element. This must be
- // one of dotbox (show a focus ring around the active element),
- // none (no special indication of active element) or
- // underline (underline the active element).
- // The default is underline on Windows, and dotbox elsewhere.
- //
- // [Height]
- //
- // Specifies the desired height for the window, in lines.
- // If zero or less, then the desired height for the window is made just
- // large enough to hold all the elements in the listbox.
- //
- // [Listvariable]
- //
- // Specifies the name of a global variable. The value of the variable is a list to
- // be displayed inside the widget; if the variable value changes then the
- // widget will automatically update itself to reflect the new value. Attempts
- // to assign a variable with an invalid list value to -listvariable
- // will cause an error. Attempts to unset a variable in use as a
- // -listvariable will fail but will not generate an error.
- //
- // [Selectmode]
- //
- // Specifies one of several styles for manipulating the selection.
- // The value of the option may be arbitrary, but the default bindings
- // expect it to be either single, browse, multiple,
- // or extended; the default value is browse.
- //
- // [State]
- //
- // Specifies one of two states for the listbox: normal or disabled.
- // If the listbox is disabled then items may not be inserted or deleted,
- // items are drawn in the -disabledforeground color, and selection
- // cannot be modified and is not shown (though selection information is retained).
- //
- // [Width]
- //
- // Specifies the desired width for the window in characters.
- // If the font does not have a uniform width then the width of the character
- // is used in translating from character units to screen units.
- // If zero or less, then the desired width for the window is made just
- // large enough to hold all the elements in the listbox.
- //
- // [Tcl/Tk listbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/listbox.html
- func Listbox(options ...Opt) *ListboxWidget {
- return App.Listbox(options...)
- }
- // Listbox — Create and manipulate 'listbox' item list widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Listbox]
- func (w *Window) Listbox(options ...Opt) *ListboxWidget {
- return &ListboxWidget{w.newChild("listbox", options...)}
- }
- // ListboxWidget represents the Tcl/Tk listbox widget/window
- type ListboxWidget struct {
- *Window
- }
- // Menu — Create and manipulate 'menu' widgets and menubars
- //
- // Use [Window.Menu] to create a Menu with a particular parent.
- //
- // More information might be available at the [Tcl/Tk menu] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Activeborderwidth]
- // - [Activeforeground]
- // - [Activerelief]
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Disabledforeground]
- // - [Foreground]
- // - [Relief]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Postcommand]
- //
- // If this option is specified then it provides a Tcl command to execute
- // each time the menu is posted. The command is invoked by the post
- // widget command before posting the menu. Note that in Tk 8.0 on Macintosh
- // and Windows, all post-commands in a system of menus are executed before any
- // of those menus are posted.
- // This is due to the limitations in the individual platforms' menu managers.
- //
- // [Selectcolor]
- //
- // For menu entries that are check buttons or radio buttons, this option
- // specifies the color to display in the indicator when the check button
- // or radio button is selected.
- //
- // [Tearoff]
- //
- // This option must have a proper boolean value (default is false),
- // which specifies whether or not the menu should include a tear-off
- // entry at the top. If so, it will exist as entry 0 of the menu and
- // the other entries will number starting at 1. The default menu
- // bindings arrange for the menu to be torn off when the tear-off entry
- // is invoked.
- // This option is ignored under Aqua/macOS, where menus cannot
- // be torn off.
- //
- // [Tearoffcommand]
- //
- // If this option has a non-empty value, then it specifies a Tcl command
- // to invoke whenever the menu is torn off. The actual command will
- // consist of the value of this option, followed by a space, followed
- // by the name of the menu window, followed by a space, followed by
- // the name of the name of the torn off menu window. For example, if
- // the option's value is
- // and menu .x.y is torn off to
- // create a new menu .x.tearoff1, then the command
- // will be invoked.
- // This option is ignored under Aqua/macOS, where menus cannot
- // be torn off.
- //
- // [Title]
- //
- // The string will be used to title the window created when this menu is
- // torn off. If the title is NULL, then the window will have the title
- // of the menubutton or the text of the cascade item from which this menu
- // was invoked.
- //
- // [Type]
- //
- // This option can be one of menubar, tearoff, or
- // normal, and is set when the menu is created. While the string
- // returned by the configuration database will change if this option is
- // changed, this does not affect the menu widget's behavior. This is used
- // by the cloning mechanism and is not normally set outside of the Tk
- // library.
- //
- // [Tcl/Tk menu]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/menu.html
- func Menu(options ...Opt) *MenuWidget {
- return App.Menu(options...)
- }
- // Menu — Create and manipulate 'menu' widgets and menubars
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Menu]
- func (w *Window) Menu(options ...Opt) *MenuWidget {
- return &MenuWidget{w.newChild("menu", options...)}
- }
- // MenuWidget represents the Tcl/Tk menu widget/window
- type MenuWidget struct {
- *Window
- }
- // Menubutton — Create and manipulate 'menubutton' pop-up menu indicator widgets
- //
- // Use [Window.Menubutton] to create a Menubutton with a particular parent.
- //
- // More information might be available at the [Tcl/Tk menubutton] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Activeforeground]
- // - [Anchor]
- // - [Background]
- // - [Bitmap]
- // - [Borderwidth]
- // - [Compound]
- // - [Cursor]
- // - [Disabledforeground]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Image]
- // - [Justify]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Wraplength]
- //
- // # Widget specific options
- //
- // [Direction]
- //
- // Specifies where the menu is going to be popup up. above tries to
- // pop the menu above the menubutton. below tries to pop the menu
- // below the menubutton. left tries to pop the menu to the left of
- // the menubutton. right tries to pop the menu to the right of the
- // menu button. flush pops the menu directly over the menubutton.
- // In the case of above or below, the direction will be
- // reversed if the menu would show offscreen.
- //
- // [Height]
- //
- // Specifies a desired height for the menubutton.
- // If an image or bitmap is being displayed in the menubutton then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in lines of text.
- // If this option is not specified, the menubutton's desired height is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Indicatoron]
- //
- // The value must be a proper boolean value. If it is true then
- // a small indicator rectangle will be displayed on the right side
- // of the menubutton and the default menu bindings will treat this
- // as an option menubutton. If false then no indicator will be
- // displayed.
- //
- // [Mnu]
- //
- // Specifies the path name of the menu associated with this menubutton.
- // The menu must be a child of the menubutton.
- //
- // [State]
- //
- // Specifies one of three states for the menubutton: normal, active,
- // or disabled. In normal state the menubutton is displayed using the
- // foreground and background options. The active state is
- // typically used when the pointer is over the menubutton. In active state
- // the menubutton is displayed using the -activeforeground and
- // -activebackground options. Disabled state means that the menubutton
- // should be insensitive: the default bindings will refuse to activate
- // the widget and will ignore mouse button presses.
- // In this state the -disabledforeground and
- // -background options determine how the button is displayed.
- //
- // [Width]
- //
- // Specifies a desired width for the menubutton.
- // If an image or bitmap is being displayed in the menubutton then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in characters.
- // If this option is not specified, the menubutton's desired width is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Tcl/Tk menubutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/menubutton.html
- func Menubutton(options ...Opt) *MenubuttonWidget {
- return App.Menubutton(options...)
- }
- // Menubutton — Create and manipulate 'menubutton' pop-up menu indicator widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Menubutton]
- func (w *Window) Menubutton(options ...Opt) *MenubuttonWidget {
- return &MenubuttonWidget{w.newChild("menubutton", options...)}
- }
- // MenubuttonWidget represents the Tcl/Tk menubutton widget/window
- type MenubuttonWidget struct {
- *Window
- }
- // Message — Create and manipulate 'message' non-interactive text widgets
- //
- // # Description
- //
- // The message command creates a new window (given by the
- // pathName argument) and makes it into a message widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the message such as its colors, font,
- // text, and initial relief. The message command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A message is a widget that displays a textual string. A message
- // widget has three special features that differentiate it from a
- // label widget. First, it breaks up
- // its string into lines in order to produce a given aspect ratio
- // for the window. The line breaks are chosen at word boundaries
- // wherever possible (if not even a single word would fit on a
- // line, then the word will be split across lines). Newline characters
- // in the string will force line breaks; they can be used, for example,
- // to leave blank lines in the display.
- //
- // The second feature of a message widget is justification. The text
- // may be displayed left-justified (each line starts at the left side of
- // the window), centered on a line-by-line basis, or right-justified
- // (each line ends at the right side of the window).
- //
- // The third feature of a message widget is that it handles control
- // characters and non-printing characters specially. Tab characters
- // are replaced with enough blank space to line up on the next
- // 8-character boundary. Newlines cause line breaks. Other control
- // characters (ASCII code less than 0x20) and characters not defined
- // in the font are displayed as a four-character sequence \exhh where
- // hh is the two-digit hexadecimal number corresponding to
- // the character. In the unusual case where the font does not contain
- // all of the characters in
- // 0123456789abcdef\ex
- // then control characters and undefined characters are not displayed at all.
- //
- // Use [Window.Message] to create a Message with a particular parent.
- //
- // More information might be available at the [Tcl/Tk message] page.
- //
- // # Standard options
- //
- // - [Anchor]
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- //
- // # Widget specific options
- //
- // [Aspect]
- //
- // Specifies a non-negative integer value indicating desired
- // aspect ratio for the text. The aspect ratio is specified as
- // 100*width/height. 100 means the text should
- // be as wide as it is tall, 200 means the text should
- // be twice as wide as it is tall, 50 means the text should
- // be twice as tall as it is wide, and so on.
- // Used to choose line length for text if -width option
- // is not specified.
- // Defaults to 150.
- //
- // [Justify]
- //
- // Specifies how to justify lines of text.
- // Must be one of left, center, or right. Defaults
- // to left.
- // This option works together with the -anchor, -aspect,
- // -padx, -pady, and -width options to provide a variety
- // of arrangements of the text within the window.
- // The -aspect and -width options determine the amount of
- // screen space needed to display the text.
- // The -anchor, -padx, and -pady options determine where this
- // rectangular area is displayed within the widget's window, and the
- // -justify option determines how each line is displayed within that
- // rectangular region.
- // For example, suppose -anchor is e and -justify is
- // left, and that the message window is much larger than needed
- // for the text.
- // The text will be displayed so that the left edges of all the lines
- // line up and the right edge of the longest line is -padx from
- // the right side of the window; the entire text block will be centered
- // in the vertical span of the window.
- //
- // [Width]
- //
- // Specifies the length of lines in the window.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- // If this option has a value greater than zero then the -aspect
- // option is ignored and the -width option determines the line
- // length.
- // If this option value is negative or zero, then
- // the -aspect option determines the line length.
- //
- // [Tcl/Tk message]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/message.html
- func Message(options ...Opt) *MessageWidget {
- return App.Message(options...)
- }
- // Message — Create and manipulate 'message' non-interactive text widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Message]
- func (w *Window) Message(options ...Opt) *MessageWidget {
- return &MessageWidget{w.newChild("message", options...)}
- }
- // MessageWidget represents the Tcl/Tk message widget/window
- type MessageWidget struct {
- *Window
- }
- // Panedwindow — Create and manipulate 'panedwindow' split container widgets
- //
- // # Description
- //
- // The panedwindow command creates a new window (given by the
- // pathName argument) and makes it into a panedwindow widget.
- // Additional options, described above, may be specified on the command
- // line or in the option database to configure aspects of the panedwindow
- // such as its default background color and relief. The
- // panedwindow command returns the path name of the new window.
- //
- // A panedwindow widget contains any number of panes, arranged
- // horizontally or vertically, according to the value of the
- // panes is separated by a moveable (via mouse movements) sash. Moving a
- // sash causes the widgets on either side of the sash to be resized.
- //
- // Use [Window.Panedwindow] to create a Panedwindow with a particular parent.
- //
- // More information might be available at the [Tcl/Tk panedwindow] page.
- //
- // # Standard options
- //
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Orient]
- // - [Relief]
- //
- // # Widget specific options
- //
- // [Handlepad]
- //
- // When sash handles are drawn, specifies the distance from the top or
- // left end of the sash (depending on the orientation of the widget) at
- // which to draw the handle. May be any value accepted by Tk_GetPixels.
- //
- // [Handlesize]
- //
- // Specifies the side length of a sash handle. Handles are always
- // drawn as squares. May be any value accepted by Tk_GetPixels.
- //
- // [Height]
- //
- // Specifies a desired height for the overall panedwindow widget. May be any
- // value accepted by Tk_GetPixels. If an empty string, the widget will be
- // made high enough to allow all contained widgets to have their natural height.
- //
- // [Opaqueresize]
- //
- // Specifies whether panes should be resized as a sash is moved (true),
- // or if resizing should be deferred until the sash is placed (false).
- // In the latter case, a
- // version of the sash is displayed during the resizing to show where the
- // panes will be resized to when releasing the mouse button. This
- // version of the sash is the proxy. It's rendering can be configured
- // using the -proxybackground, -proxyborderwidth and
- // -proxyrelief options.
- //
- // [Proxybackground]
- //
- // Background color to use when drawing the proxy. If an empty string, the
- // value of the -background option will be used.
- //
- // [Proxyborderwidth]
- //
- // Specifies the borderwidth of the proxy. May be any value accepted by
- // Tk_GetPixels.
- //
- // [Proxyrelief]
- //
- // Relief to use when drawing the proxy. May be any of the standard Tk
- // relief values. If an empty string, the value of the -sashrelief
- // option will be used.
- //
- // [Sashcursor]
- //
- // Mouse cursor to use when over a sash. If null,
- // sb_h_double_arrow will be used for horizontal panedwindows, and
- // sb_v_double_arrow will be used for vertical panedwindows.
- //
- // [Sashpad]
- //
- // Specifies the amount of padding to leave of each side of a sash. May
- // be any value accepted by Tk_GetPixels.
- //
- // [Sashrelief]
- //
- // Relief to use when drawing a sash. May be any of the standard Tk
- // relief values.
- //
- // [Sashwidth]
- //
- // Specifies the width of each sash. May be any value accepted by
- // Tk_GetPixels.
- //
- // [Showhandle]
- //
- // Specifies whether sash handles should be shown. May be any valid Tcl
- // boolean value.
- //
- // [Width]
- //
- // Specifies a desired width for the overall panedwindow widget. May be any
- // value accepted by Tk_GetPixels. If an empty string, the widget will be
- // made wide enough to allow all contained widgets to have their natural width.
- //
- // [Tcl/Tk panedwindow]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/panedwindow.html
- func Panedwindow(options ...Opt) *PanedwindowWidget {
- return App.Panedwindow(options...)
- }
- // Panedwindow — Create and manipulate 'panedwindow' split container widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Panedwindow]
- func (w *Window) Panedwindow(options ...Opt) *PanedwindowWidget {
- return &PanedwindowWidget{w.newChild("panedwindow", options...)}
- }
- // PanedwindowWidget represents the Tcl/Tk panedwindow widget/window
- type PanedwindowWidget struct {
- *Window
- }
- // Radiobutton — Create and manipulate 'radiobutton' pick-one widgets
- //
- // # Description
- //
- // The radiobutton command creates a new window (given by the
- // pathName argument) and makes it into a radiobutton widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the radiobutton such as its colors, font,
- // text, and initial relief. The radiobutton command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A radiobutton is a widget that displays a textual string, bitmap or image
- // and a diamond or circle called an indicator.
- // If text is displayed, it must all be in a single font, but it
- // can occupy multiple lines on the screen (if it contains newlines
- // or if wrapping occurs because of the -wraplength option) and
- // one of the characters may optionally be underlined using the
- // all of the behavior of a simple button: it can display itself in either
- // of three different ways, according to the -state option;
- // it can be made to appear
- // raised, sunken, or flat; it can be made to flash; and it invokes
- // a Tcl command whenever mouse button 1 is clicked over the
- // check button.
- //
- // In addition, radiobuttons can be selected.
- // If a radiobutton is selected, the indicator is normally
- // drawn with a selected appearance, and
- // a Tcl variable associated with the radiobutton is set to a particular
- // value (normally 1).
- // Under Unix, the indicator is drawn with a sunken relief and a special
- // color. Under Windows, the indicator is drawn with a round mark inside.
- // If the radiobutton is not selected, then the indicator is drawn with a
- // deselected appearance, and the associated variable is
- // set to a different value (typically 0).
- // The indicator is drawn without a round mark inside.
- // Typically, several radiobuttons share a single variable and the
- // value of the variable indicates which radiobutton is to be selected.
- // When a radiobutton is selected it sets the value of the variable to
- // indicate that fact; each radiobutton also monitors the value of
- // the variable and automatically selects and deselects itself when the
- // variable's value changes.
- // If the variable's value matches the -tristatevalue, then the radiobutton
- // is drawn using the tri-state mode. This mode is used to indicate mixed or
- // multiple values. (This is used when the radiobutton represents the state
- // of multiple items.)
- // By default the variable selectedButton
- // is used; its contents give the name of the button that is
- // selected, or the empty string if no button associated with that
- // variable is selected.
- // The name of the variable for a radiobutton,
- // plus the variable to be stored into it, may be modified with options
- // on the command line or in the option database.
- // Configuration options may also be used to modify the way the
- // indicator is displayed (or whether it is displayed at all).
- // By default a radiobutton is configured to select itself on button clicks.
- //
- // Use [Window.Radiobutton] to create a Radiobutton with a particular parent.
- //
- // More information might be available at the [Tcl/Tk radiobutton] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Activeforeground]
- // - [Anchor]
- // - [Background]
- // - [Bitmap]
- // - [Borderwidth]
- // - [Compound]
- // - [Cursor]
- // - [Disabledforeground]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Image]
- // - [Justify]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Wraplength]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // Specifies a Tcl command to associate with the button. This command
- // is typically invoked when mouse button 1 is released over the button
- // window. The button's global variable (-variable option) will
- // be updated before the command is invoked.
- //
- // [Height]
- //
- // Specifies a desired height for the button.
- // If an image or bitmap is being displayed in the button then the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in lines of text.
- // If this option is not specified, the button's desired height is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Indicatoron]
- //
- // Specifies whether or not the indicator should be drawn. Must be a
- // proper boolean value. If false, the -relief option is
- // ignored and the widget's relief is always sunken if the widget is
- // selected and raised otherwise.
- //
- // [Offrelief]
- //
- // Specifies the relief for the checkbutton when the indicator is not drawn and
- // the checkbutton is off. The default value is
- // By setting this option to
- // and setting -indicatoron to false and -overrelief to
- // the effect is achieved
- // of having a flat button that raises on mouse-over and which is
- // depressed when activated. This is the behavior typically exhibited by
- // the Align-Left, Align-Right, and Center radiobuttons on the toolbar of a
- // word-processor, for example.
- //
- // [Overrelief]
- //
- // Specifies an alternative relief for the radiobutton, to be used when the
- // mouse cursor is over the widget. This option can be used to make
- // toolbar buttons, by configuring -relief flat -overrelief
- // raised. If the value of this option is the empty string, then no
- // alternative relief is used when the mouse cursor is over the radiobutton.
- // The empty string is the default value.
- //
- // [Selectcolor]
- //
- // Specifies a background color to use when the button is selected.
- // If indicatorOn is true then the color is used as the background for
- // the indicator regardless of the select state.
- // If -indicatoron is false, this color is used as the background for the
- // entire widget, in place of -background or -activeBackground,
- // whenever the widget is selected.
- // If specified as an empty string then no special color is used for
- // displaying when the widget is selected.
- //
- // [Selectimage]
- //
- // Specifies an image to display (in place of the -image option)
- // when the radiobutton is selected.
- // This option is ignored unless the -image option has been
- // specified.
- //
- // [State]
- //
- // Specifies one of three states for the radiobutton: normal, active,
- // or disabled. In normal state the radiobutton is displayed using the
- // -foreground and -background options. The active state is
- // typically used when the pointer is over the radiobutton. In active state
- // the radiobutton is displayed using the -activeforeground and
- // -activebackground options. Disabled state means that the radiobutton
- // should be insensitive: the default bindings will refuse to activate
- // the widget and will ignore mouse button presses.
- // In this state the -disabledforeground and
- // -background options determine how the radiobutton is displayed.
- //
- // [Tristateimage]
- //
- // Specifies an image to display (in place of the -image option)
- // when the radiobutton is selected.
- // This option is ignored unless the -image option has been
- // specified.
- //
- // [Tristatevalue]
- //
- // Specifies the value that causes the radiobutton to display the multi-value
- // selection, also known as the tri-state mode. Defaults to
- //
- // [Value]
- //
- // Specifies value to store in the button's associated variable whenever
- // this button is selected.
- //
- // [Variable]
- //
- // Specifies the name of a global variable to set whenever this button is
- // selected. Changes in this variable also cause the button to select
- // or deselect itself.
- // Defaults to the value selectedButton.
- //
- // [Width]
- //
- // Specifies a desired width for the button.
- // If an image or bitmap is being displayed in the button, the value is in
- // screen units (i.e. any of the forms acceptable to Tk_GetPixels);
- // for text it is in characters.
- // If this option is not specified, the button's desired width is computed
- // from the size of the image or bitmap or text being displayed in it.
- //
- // [Tcl/Tk radiobutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/radiobutton.html
- func Radiobutton(options ...Opt) *RadiobuttonWidget {
- return App.Radiobutton(options...)
- }
- // Radiobutton — Create and manipulate 'radiobutton' pick-one widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Radiobutton]
- func (w *Window) Radiobutton(options ...Opt) *RadiobuttonWidget {
- return &RadiobuttonWidget{w.newChild("radiobutton", options...)}
- }
- // RadiobuttonWidget represents the Tcl/Tk radiobutton widget/window
- type RadiobuttonWidget struct {
- *Window
- }
- // Scale — Create and manipulate 'scale' value-controlled slider widgets
- //
- // # Description
- //
- // The scale command creates a new window (given by the
- // pathName argument) and makes it into a scale widget.
- // Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the scale such as its colors, orientation,
- // and relief. The scale command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A scale is a widget that displays a rectangular trough and a
- // small slider. The trough corresponds to a range
- // of real values (determined by the -from, -to, and
- // and the position of the slider selects a particular real value.
- // The slider's position (and hence the scale's value) may be adjusted
- // with the mouse or keyboard as described in the BINDINGS
- // section below. Whenever the scale's value is changed, a Tcl
- // command is invoked (using the -command option) to notify
- // other interested widgets of the change.
- // In addition, the value
- // of the scale can be linked to a Tcl variable (using the -variable
- // option), so that changes in either are reflected in the other.
- //
- // Three annotations may be displayed in a scale widget: a label
- // appearing at the top right of the widget (top left for horizontal
- // scales), a number displayed just to the left of the slider
- // (just above the slider for horizontal scales), and a collection
- // of numerical tick marks just to the left of the current value
- // (just below the trough for horizontal scales). Each of these three
- // annotations may be enabled or disabled using the
- // configuration options.
- //
- // Use [Window.Scale] to create a Scale with a particular parent.
- //
- // More information might be available at the [Tcl/Tk scale] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Orient]
- // - [Relief]
- // - [Repeatdelay]
- // - [Repeatinterval]
- // - [Takefocus]
- // - [Troughcolor]
- //
- // # Widget specific options
- //
- // [Bigincrement]
- //
- // Some interactions with the scale cause its value to change by
- // increments; this option specifies the size of the
- // large increments. If specified as 0, the large increments default
- // to 1/10 the range of the scale.
- //
- // [Command]
- //
- // Specifies the prefix of a Tcl command to invoke whenever the scale's
- // value is changed via a widget command.
- // The actual command consists
- // of this option followed by a space and a real number indicating the
- // new value of the scale.
- //
- // [Digits]
- //
- // An integer specifying how many significant digits should be retained
- // when converting the value of the scale to a string.
- // If the number is negative or zero, then the scale picks
- // the smallest value that guarantees that every possible slider
- // position prints as a different string.
- //
- // [From]
- //
- // A real value corresponding to the left or top end of the scale.
- //
- // [Lbl]
- //
- // A string to display as a label for the scale. For
- // vertical scales the label is displayed just to the right of the
- // top end of the scale. For horizontal scales the label is displayed
- // just above the left end of the scale. If the option is specified
- // as an empty string, no label is displayed.
- //
- // [Length]
- //
- // Specifies the desired long dimension of the scale in screen units
- // (i.e. any of the forms acceptable to Tk_GetPixels).
- // For vertical scales this is the scale's height; for horizontal scales
- // it is the scale's width.
- //
- // [Resolution]
- //
- // A real value specifying the resolution for the scale.
- // If this value is greater than zero then the scale's value will always be
- // rounded to an even multiple of this value, as will
- // the endpoints of the scale. If the value is negative then no
- // rounding occurs. Defaults to 1 (i.e., the value will be integral).
- //
- // [Showvalue]
- //
- // Specifies a boolean value indicating whether or not the current
- // value of the scale is to be displayed.
- //
- // [Sliderlength]
- //
- // Specifies the size of the slider, measured in screen units along the slider's
- // long dimension. The value may be specified in any of the forms acceptable
- // to Tk_GetPixels.
- //
- // [Sliderrelief]
- //
- // Specifies the relief to use when drawing the slider, such as raised
- // or sunken.
- //
- // [State]
- //
- // Specifies one of three states for the scale: normal,
- // active, or disabled.
- // If the scale is disabled then the value may not be changed and the scale
- // will not activate.
- // If the scale is active, the slider is displayed using the color
- // specified by the -activebackground option.
- //
- // [Tickinterval]
- //
- // Must be a real value.
- // Determines the spacing between numerical
- // tick marks displayed below or to the left of the slider. The values will all
- // be displayed with the same number of decimal places, which will be enough to
- // ensure they are all accurate to within 20% of a tick interval.
- // If 0, no tick marks will be displayed.
- //
- // [To]
- //
- // Specifies a real value corresponding
- // to the right or bottom end of the scale.
- // This value may be either less than or greater than the -from option.
- //
- // [Variable]
- //
- // Specifies the name of a global variable to link to the scale. Whenever the
- // value of the variable changes, the scale will update to reflect this
- // value.
- // Whenever the scale is manipulated interactively, the variable
- // will be modified to reflect the scale's new value.
- //
- // [Width]
- //
- // Specifies the desired narrow dimension of the scale in screen units
- // (i.e. any of the forms acceptable to Tk_GetPixels).
- // For vertical scales this is the scale's width; for horizontal scales
- // this is the scale's height.
- //
- // [Tcl/Tk scale]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/scale.html
- func Scale(options ...Opt) *ScaleWidget {
- return App.Scale(options...)
- }
- // Scale — Create and manipulate 'scale' value-controlled slider widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Scale]
- func (w *Window) Scale(options ...Opt) *ScaleWidget {
- return &ScaleWidget{w.newChild("scale", options...)}
- }
- // ScaleWidget represents the Tcl/Tk scale widget/window
- type ScaleWidget struct {
- *Window
- }
- // Scrollbar — Create and manipulate 'scrollbar' scrolling control and indicator widgets
- //
- // # Description
- //
- // The scrollbar command creates a new window (given by the
- // pathName argument) and makes it into a scrollbar widget.
- // Additional options, described above, may be specified on the command
- // line or in the option database to configure aspects of the scrollbar
- // such as its colors, orientation, and relief.
- // The scrollbar command returns its pathName argument.
- // At the time this command is invoked, there must not exist a window
- // named pathName, but pathName's parent must exist.
- //
- // A scrollbar is a widget that displays two arrows, one at each end of
- // the scrollbar, and a slider in the middle portion of the
- // scrollbar.
- // It provides information about what is visible in an associated window
- // that displays a document of some sort (such as a file being edited or
- // a drawing).
- // The position and size of the slider indicate which portion of the
- // document is visible in the associated window. For example, if the
- // slider in a vertical scrollbar covers the top third of the area
- // between the two arrows, it means that the associated window displays
- // the top third of its document.
- //
- // Scrollbars can be used to adjust the view in the associated window
- // by clicking or dragging with the mouse. See the BINDINGS section
- // below for details.
- //
- // Use [Window.Scrollbar] to create a Scrollbar with a particular parent.
- //
- // More information might be available at the [Tcl/Tk scrollbar] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Jump]
- // - [Orient]
- // - [Relief]
- // - [Repeatdelay]
- // - [Repeatinterval]
- // - [Takefocus]
- // - [Troughcolor]
- //
- // # Widget specific options
- //
- // [Activerelief]
- //
- // Specifies the relief to use when displaying the element that is
- // active, if any.
- // Elements other than the active element are always displayed with
- // a raised relief.
- //
- // [Command]
- //
- // Specifies the prefix of a Tcl command to invoke to change the view
- // in the widget associated with the scrollbar. When a user requests
- // a view change by manipulating the scrollbar, a Tcl command is
- // invoked. The actual command consists of this option followed by
- // additional information as described later. This option almost always has
- // a value such as .t xview or .t yview, consisting of the
- // name of a widget and either xview (if the scrollbar is for
- // horizontal scrolling) or yview (for vertical scrolling).
- // All scrollable widgets have xview and yview commands
- // that take exactly the additional arguments appended by the scrollbar
- // as described in SCROLLING COMMANDS below.
- //
- // [Elementborderwidth]
- //
- // Specifies the width of borders drawn around the internal elements
- // of the scrollbar (the two arrows and the slider). The value may
- // have any of the forms acceptable to Tk_GetPixels.
- // If this value is the empty string (the default), the value of
- // the -borderwidth option is used in its place.
- //
- // [Width]
- //
- // Specifies the desired narrow dimension of the scrollbar window,
- // not including 3-D border, if any. For vertical
- // scrollbars this will be the width and for horizontal scrollbars
- // this will be the height.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- //
- // [Tcl/Tk scrollbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/scrollbar.html
- func Scrollbar(options ...Opt) *ScrollbarWidget {
- return App.Scrollbar(options...)
- }
- // Scrollbar — Create and manipulate 'scrollbar' scrolling control and indicator widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Scrollbar]
- func (w *Window) Scrollbar(options ...Opt) *ScrollbarWidget {
- return &ScrollbarWidget{w.newChild("scrollbar", options...)}
- }
- // ScrollbarWidget represents the Tcl/Tk scrollbar widget/window
- type ScrollbarWidget struct {
- *Window
- }
- // Spinbox — Create and manipulate 'spinbox' value spinner widgets
- //
- // # Description
- //
- // The spinbox command creates a new window (given by the
- // pathName argument) and makes it into a spinbox widget.
- // Additional options, described above, may be specified on the
- // command line or in the option database
- // to configure aspects of the spinbox such as its colors, font,
- // and relief. The spinbox command returns its
- // pathName argument. At the time this command is invoked,
- // there must not exist a window named pathName, but
- // pathName's parent must exist.
- //
- // A spinbox is an extended entry widget that allows he user
- // to move, or spin, through a fixed set of ascending or descending values
- // such as times or dates in addition to editing the value as in an
- // entry. When first created, a spinbox's string is empty.
- // A portion of the spinbox may be selected as described below.
- // If a spinbox is exporting its selection (see the -exportselection
- // option), then it will observe the standard protocols for handling the
- // selection; spinbox selections are available as type STRING.
- // Spinboxes also observe the standard Tk rules for dealing with the
- // input focus. When a spinbox has the input focus it displays an
- // insertion cursor to indicate where new characters will be
- // inserted.
- //
- // Spinboxes are capable of displaying strings that are too long to
- // fit entirely within the widget's window. In this case, only a
- // portion of the string will be displayed; commands described below
- // may be used to change the view in the window. Spinboxes use
- // the standard -xscrollcommand mechanism for interacting with
- // scrollbars (see the description of the -xscrollcommand option
- // for details). They also support scanning, as described below.
- //
- // Use [Window.Spinbox] to create a Spinbox with a particular parent.
- //
- // More information might be available at the [Tcl/Tk spinbox] page.
- //
- // # Standard options
- //
- // - [Activebackground]
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Exportselection]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Insertbackground]
- // - [Insertborderwidth]
- // - [Insertofftime]
- // - [Insertontime]
- // - [Insertwidth]
- // - [Justify]
- // - [Placeholder]
- // - [Placeholderforeground]
- // - [Relief]
- // - [Repeatdelay]
- // - [Repeatinterval]
- // - [Selectbackground]
- // - [Selectborderwidth]
- // - [Selectforeground]
- // - [Takefocus]
- // - [Textvariable]
- // - [Xscrollcommand]
- //
- // # Widget specific options
- //
- // [Buttonbackground]
- //
- // The background color to be used for the spin buttons.
- //
- // [Buttoncursor]
- //
- // The cursor to be used when over the spin buttons. If this is empty
- // (the default), a default cursor will be used.
- //
- // [Buttondownrelief]
- //
- // The relief to be used for the upper spin button.
- //
- // [Buttonuprelief]
- //
- // The relief to be used for the lower spin button.
- //
- // [Command]
- //
- // Specifies a Tcl command to invoke whenever a spinbutton is invoked.
- // The command recognizes several percent substitutions: %W for
- // the widget path, %s for the current value of the widget, and
- // %d for the direction of the button pressed (up or down).
- //
- // [Disabledbackground]
- //
- // Specifies the background color to use when the spinbox is disabled. If
- // this option is the empty string, the normal background color is used.
- //
- // [Disabledforeground]
- //
- // Specifies the foreground color to use when the spinbox is disabled. If
- // this option is the empty string, the normal foreground color is used.
- //
- // [Format]
- //
- // Specifies an alternate format to use when setting the string value
- // when using the -from and -to range.
- // This must be a format specifier of the form %<pad>.<pad>f,
- // as it will format a floating-point number.
- //
- // [From]
- //
- // A floating-point value corresponding to the lowest value for a spinbox, to
- // be used in conjunction with -to and -increment. When all
- // are specified correctly, the spinbox will use these values to control its
- // contents. If this value is greater than the -to option, then
- // -from and -to values are automatically swapped.
- // If -values is specified, it supersedes this option.
- //
- // [Invalidcommand]
- //
- // Specifies a script to eval when -validatecommand returns 0. Setting
- // it to an empty string disables this feature (the default). The best use of
- // this option is to set it to bell. See VALIDATION below for
- // more information.
- //
- // [Increment]
- //
- // A floating-point value specifying the increment. When used with
- // -from and -to, the value in the widget will be adjusted by
- // -increment when a spin button is pressed (up adds the value,
- // down subtracts the value).
- //
- // [Readonlybackground]
- //
- // Specifies the background color to use when the spinbox is readonly. If
- // this option is the empty string, the normal background color is used.
- //
- // [State]
- //
- // Specifies one of three states for the spinbox: normal,
- // disabled, or readonly. If the spinbox is readonly, then the
- // value may not be changed using widget commands and no insertion cursor
- // will be displayed, even if the input focus is in the widget; the
- // contents of the widget may still be selected. If the spinbox is
- // disabled, the value may not be changed, no insertion cursor will be
- // displayed, the contents will not be selectable, and the spinbox may
- // be displayed in a different color, depending on the values of the
- // -disabledforeground and -disabledbackground options.
- //
- // [To]
- //
- // A floating-point value corresponding to the highest value for the spinbox,
- // to be used in conjunction with -from and -increment. When
- // all are specified correctly, the spinbox will use these values to control
- // its contents. If this value is less than the -from option, then
- // -from and -to values are automatically swapped.
- // If -values is specified, it supersedes this option.
- //
- // [Validate]
- //
- // Specifies the mode in which validation should operate: none,
- // focus, focusin, focusout, key, or all.
- // It defaults to none. When you want validation, you must explicitly
- // state which mode you wish to use. See VALIDATION below for more.
- //
- // [Validatecommand]
- //
- // Specifies a script to evaluate when you want to validate the input in the
- // widget. Setting it to an empty string disables this feature (the default).
- // Validation occurs according to the value of -validate.
- // This command must return a valid Tcl boolean value. If it returns 0 (or
- // the valid Tcl boolean equivalent) then the value of the widget will not
- // change and the -invalidcommand will be evaluated if it is set. If it
- // returns 1, then value will be changed.
- // See VALIDATION below for more information.
- //
- // [Values]
- //
- // Must be a proper list value. If specified, the spinbox will use these
- // values as to control its contents, starting with the first value. This
- // option has precedence over the -from and -to range.
- //
- // [Width]
- //
- // Specifies an integer value indicating the desired width of the spinbox window,
- // in average-size characters of the widget's font.
- // If the value is negative or zero, the widget picks a
- // size just large enough to hold its current text.
- //
- // [Wrap]
- //
- // Must be a proper boolean value. If on, the spinbox will wrap around the
- // values of data in the widget.
- //
- // [Tcl/Tk spinbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/spinbox.html
- func Spinbox(options ...Opt) *SpinboxWidget {
- return App.Spinbox(options...)
- }
- // Spinbox — Create and manipulate 'spinbox' value spinner widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Spinbox]
- func (w *Window) Spinbox(options ...Opt) *SpinboxWidget {
- return &SpinboxWidget{w.newChild("spinbox", options...)}
- }
- // SpinboxWidget represents the Tcl/Tk spinbox widget/window
- type SpinboxWidget struct {
- *Window
- }
- // Text — Create and manipulate 'text' hypertext editing widgets
- //
- // # Description
- //
- // The text command creates a new window (given by the pathName
- // argument) and makes it into a text widget. Additional options, described
- // above, may be specified on the command line or in the option database to
- // configure aspects of the text such as its default background color and relief.
- // The text command returns the path name of the new window.
- //
- // A text widget displays one or more lines of text and allows that text to be
- // edited. Text widgets support four different kinds of annotations on the text,
- // called tags, marks, embedded windows or embedded images. Tags allow different
- // portions of the text to be displayed with different fonts and colors. In
- // addition, Tcl commands can be associated with tags so that scripts are invoked
- // when particular actions such as keystrokes and mouse button presses occur in
- // particular ranges of the text. See TAGS below for more details.
- //
- // The second form of annotation consists of floating markers in the text called
- // marks .
- // Marks are used to keep track of various interesting positions in the text as
- // it is edited. See MARKS below for more details.
- //
- // The third form of annotation allows arbitrary windows to be embedded in a text
- // widget. See EMBEDDED WINDOWS below for more details.
- //
- // The fourth form of annotation allows Tk images to be embedded in a text
- // widget. See EMBEDDED IMAGES below for more details.
- //
- // The text widget also has a built-in undo/redo mechanism. See
- // THE UNDO MECHANISM below for more details.
- //
- // The text widget allows for the creation of peer widgets. These are other text
- // widgets which share the same underlying data (text, marks, tags, images, etc).
- // See PEER WIDGETS below for more details.
- //
- // Use [Window.Text] to create a Text with a particular parent.
- //
- // More information might be available at the [Tcl/Tk text] page.
- //
- // # Standard options
- //
- // - [Background]
- // - [Borderwidth]
- // - [Cursor]
- // - [Exportselection]
- // - [Foreground]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Insertbackground]
- // - [Insertborderwidth]
- // - [Insertofftime]
- // - [Insertontime]
- // - [Insertwidth]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Selectbackground]
- // - [Selectborderwidth]
- // - [Selectforeground]
- // - [Setgrid]
- // - [Takefocus]
- // - [Xscrollcommand]
- // - [Yscrollcommand]
- //
- // # Widget specific options
- //
- // [Autoseparators]
- //
- // Specifies a boolean that says whether separators are automatically inserted in
- // the undo stack. Only meaningful when the -undo option is true.
- //
- // [Blockcursor]
- //
- // Specifies a boolean that says whether the blinking insertion cursor should be
- // drawn as a character-sized rectangular block. If false (the default) a thin
- // vertical line is used for the insertion cursor.
- //
- // [Endline]
- //
- // Specifies an integer line index representing the line of the underlying
- // textual data store that should be just after the last line contained in
- // the widget. This allows a text widget to reflect only a portion of a
- // larger piece of text. Instead of an integer, the empty string can be
- // provided to this configuration option, which will configure the widget
- // to end at the very last line in the textual data store.
- //
- // [Height]
- //
- // Specifies the desired height for the window, in units of characters in the
- // font given by the -font option. Must be at least one.
- //
- // [Inactiveselectbackground]
- //
- // Specifies the colour to use for the selection (the sel tag) when the
- // window does not have the input focus. If empty, {}, then no selection is
- // shown when the window does not have the focus.
- //
- // [Insertunfocussed]
- //
- // Specifies how to display the insertion cursor when the widget does not have
- // the focus. Must be none (the default) which means to not display the
- // cursor, hollow which means to display a hollow box, or solid which
- // means to display a solid box. Note that hollow and solid will
- // appear very similar when the -blockcursor option is false.
- //
- // [Maxundo]
- //
- // Specifies the maximum number of compound undo actions on the undo stack. A
- // zero or a negative value imply an unlimited undo stack.
- //
- // [Spacing1]
- //
- // Requests additional space above each text line in the widget, using any of the
- // standard forms for screen distances. If a line wraps, this option only applies
- // to the first line on the display. This option may be overridden with
- // -spacing1 options in tags.
- //
- // [Spacing2]
- //
- // For lines that wrap (so that they cover more than one line on the display)
- // this option specifies additional space to provide between the display lines
- // that represent a single line of text. The value may have any of the standard
- // forms for screen distances. This option may be overridden with
- // -spacing2 options in tags.
- //
- // [Spacing3]
- //
- // Requests additional space below each text line in the widget, using any of the
- // standard forms for screen distances. If a line wraps, this option only applies
- // to the last line on the display. This option may be overridden with
- // -spacing3 options in tags.
- //
- // [Startline]
- //
- // Specifies an integer line index representing the first line of the underlying
- // textual data store that should be contained in the widget. This allows a text
- // widget to reflect only a portion of a larger piece of text. Instead of an
- // integer, the empty string can be provided to this configuration option, which
- // will configure the widget to start at the very first line in the textual data
- // store.
- //
- // [State]
- //
- // Specifies one of two states for the text: normal or disabled. If
- // the text is disabled then characters may not be inserted or deleted and no
- // insertion cursor will be displayed, even if the input focus is in the widget.
- //
- // [Tabs]
- //
- // Specifies a set of tab stops for the window. The option's value consists of a
- // list of screen distances giving the positions of the tab stops, each of which
- // is a distance relative to the left edge of the widget (excluding borders,
- // padding, etc). Each position may optionally be followed in the next list
- // element by one of the keywords left, right, center, or
- // numeric, which specifies how to justify text relative to the tab stop.
- // Left is the default; it causes the text following the tab character to
- // be positioned with its left edge at the tab position. Right means that
- // the right edge of the text following the tab character is positioned at the
- // tab position, and center means that the text is centered at the tab
- // position. Numeric means that the decimal point in the text is positioned
- // at the tab position; if there is no decimal point then the least significant
- // digit of the number is positioned just to the left of the tab position; if
- // there is no number in the text then the text is right-justified at the tab
- // position. For example,
- // creates three tab stops at two-centimeter intervals; the first two use left
- // justification and the third uses center justification.
- //
- // [Tabstyle]
- //
- // Specifies how to interpret the relationship between tab stops on a line and
- // tabs in the text of that line. The value must be tabular (the default)
- // or wordprocessor. Note that tabs are interpreted as they are encountered
- // in the text. If the tab style is tabular then the n'th tab
- // character in the line's text will be associated with the n'th tab stop
- // defined for that line. If the tab character's x coordinate falls to the right
- // of the n'th tab stop, then a gap of a single space will be inserted as a
- // fallback. If the tab style is wordprocessor then any tab character being
- // laid out will use (and be defined by) the first tab stop to the right of the
- // preceding characters already laid out on that line. The value of the
- // -tabstyle option may be overridden by -tabstyle options in tags.
- //
- // [Undo]
- //
- // Specifies a boolean that says whether the undo mechanism is active or not.
- //
- // [Width]
- //
- // Specifies the desired width for the window in units of characters in the font
- // given by the -font option. If the font does not have a uniform width
- // then the width of the character
- // is used in translating from character units to screen units.
- //
- // [Wrap]
- //
- // Specifies how to handle lines in the text that are too long to be displayed in
- // a single line of the text's window. The value must be none or char
- // or word. A wrap mode of none means that each line of text appears
- // as exactly one line on the screen; extra characters that do not fit on the
- // screen are not displayed. In the other modes each line of text will be broken
- // up into several screen lines if necessary to keep all the characters visible.
- // In char mode a screen line break may occur after any character; in
- // word mode a line break will only be made at word boundaries.
- //
- // [Tcl/Tk text]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/text.html
- func Text(options ...Opt) *TextWidget {
- return App.Text(options...)
- }
- // Text — Create and manipulate 'text' hypertext editing widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Text]
- func (w *Window) Text(options ...Opt) *TextWidget {
- return &TextWidget{w.newChild("text", options...)}
- }
- // TextWidget represents the Tcl/Tk text widget/window
- type TextWidget struct {
- *Window
- }
- // Toplevel — Create and manipulate 'toplevel' main and popup window widgets
- //
- // # Description
- //
- // The toplevel command creates a new toplevel widget (given
- // by the pathName argument). Additional
- // options, described above, may be specified on the command line
- // or in the option database
- // to configure aspects of the toplevel such as its background color
- // and relief. The toplevel command returns the
- // path name of the new window.
- //
- // A toplevel is similar to a frame except that it is created as a
- // top-level window: its X parent is the root window of a screen
- // rather than the logical parent from its Tk path name. The primary
- // purpose of a toplevel is to serve as a container for dialog boxes
- // and other collections of widgets. The only visible features
- // of a toplevel are its background and an optional 3-D border
- // to make the toplevel appear raised or sunken.
- //
- // Use [Window.Toplevel] to create a Toplevel with a particular parent.
- //
- // More information might be available at the [Tcl/Tk toplevel] page.
- //
- // # Standard options
- //
- // - [Borderwidth]
- // - [Cursor]
- // - [Highlightbackground]
- // - [Highlightcolor]
- // - [Highlightthickness]
- // - [Padx]
- // - [Pady]
- // - [Relief]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Background]
- //
- // This option is the same as the standard -background option
- // except that its value may also be specified as an empty string.
- // In this case, the widget will display no background or border, and
- // no colors will be consumed from its colormap for its background
- // and border.
- // An empty background will disable drawing the background image.
- //
- // [Backgroundimage]
- //
- // This specifies an image to display on the toplevel's background within
- // the border of the toplevel (i.e., the image will be clipped by the
- // toplevel's highlight ring and border, if either are present) on top of
- // the background;
- // subwidgets of the toplevel will be drawn on top. The image must have
- // been created with the image create command. If specified as the
- // empty string, no image will be displayed.
- //
- // [Class]
- //
- // Specifies a class for the window.
- // This class will be used when querying the option database for
- // the window's other options, and it will also be used later for
- // other purposes such as bindings. Some window managers display the
- // class name for windows in their dock while some others display the
- // window title.
- // The -class option may not be changed with the configure
- // widget command.
- //
- // [Colormap]
- //
- // Specifies a colormap to use for the window.
- // The value may be either new, in which case a new colormap is
- // created for the window and its children, or the name of another
- // window (which must be on the same screen and have the same visual
- // as pathName), in which case the new window will use the colormap
- // from the specified window.
- // If the -colormap option is not specified, the new window
- // uses the default colormap of its screen.
- // This option may not be changed with the configure
- // widget command.
- //
- // [Container]
- //
- // The value must be a boolean. If true, it means that this window will
- // be used as a container in which some other application will be embedded
- // (for example, a Tk toplevel can be embedded using the -use option).
- // The window will support the appropriate window manager protocols for
- // things like geometry requests. The window should not have any
- // children of its own in this application.
- // This option may not be changed with the configure
- // widget command.
- //
- // [Height]
- //
- // Specifies the desired height for the window in any of the forms
- // acceptable to Tk_GetPixels.
- // If this option is negative or zero then the window will
- // not request any size at all.
- //
- // [Mnu]
- //
- // Specifies a menu widget to be used as a menubar. On the Macintosh, the
- // menubar will be displayed across the top of the main monitor. On
- // Microsoft Windows and all UNIX platforms, the menu will appear across
- // the toplevel window as part of the window dressing maintained by the
- // window manager.
- //
- // [Screen]
- //
- // Specifies the screen on which to place the new window.
- // Any valid screen name may be used, even one associated with a
- // different display.
- // Defaults to the same screen as its parent.
- // This option is special in that it may not be specified via the option
- // database, and it may not be modified with the configure
- // widget command.
- //
- // [Tile]
- //
- // This specifies how to draw the background image (see
- // -backgroundimage) on the toplevel.
- // If true (according to Tcl_GetBoolean), the image will be tiled
- // to fill the whole toplevel, with the origin of the first copy of the
- // image being the top left of the interior of the toplevel.
- // If false (the default), the image will be centered within the toplevel.
- //
- // [Use]
- //
- // This option is used for embedding. If the value is not an empty string,
- // it must be the window identifier of a container window, specified as
- // a hexadecimal string like the ones returned by the winfo id
- // command. The toplevel widget will be created as a child of the given
- // container instead of the root window for the screen. If the container
- // window is in a Tk application, it must be a frame or toplevel widget for
- // which the -container option was specified.
- // This option may not be changed with the configure
- // widget command.
- //
- // [Visual]
- //
- // Specifies visual information for the new window in any of the
- // forms accepted by Tk_GetVisual.
- // If this option is not specified, the new window will use the default
- // visual for its screen.
- // The -visual option may not be modified with the configure
- // widget command.
- //
- // [Width]
- //
- // Specifies the desired width for the window in any of the forms
- // acceptable to Tk_GetPixels.
- // If this option is negative or zero then the window will
- // not request any size at all.
- //
- // [Tcl/Tk toplevel]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/toplevel.html
- func Toplevel(options ...Opt) *ToplevelWidget {
- return App.Toplevel(options...)
- }
- // Toplevel — Create and manipulate 'toplevel' main and popup window widgets
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [Toplevel]
- func (w *Window) Toplevel(options ...Opt) *ToplevelWidget {
- return &ToplevelWidget{w.newChild("toplevel", options...)}
- }
- // ToplevelWidget represents the Tcl/Tk toplevel widget/window
- type ToplevelWidget struct {
- *Window
- }
- // TButton — Widget that issues a command when pressed
- //
- // # Description
- //
- // A ttk::button widget displays a textual label and/or image,
- // and evaluates a command when pressed.
- //
- // Use [Window.TButton] to create a TButton with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_button] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Compound]
- // - [Cursor]
- // - [Image]
- // - [Justify]
- // - [State]
- // - [Style]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Width]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // A script to evaluate when the widget is invoked.
- //
- // [Default]
- //
- // May be set to one of normal, active, or disabled.
- // In a dialog box, one button may be designated the
- // button (meaning, roughly,
- // active indicates that this is currently the default button;
- // normal means that it may become the default button, and
- // disabled means that it is not defaultable.
- // The default is normal.
- //
- // # Standard styles
- //
- // Ttk::button widgets support the Toolbutton style in all standard
- // themes, which is useful for creating widgets for toolbars.
- //
- // In the Aqua theme there are several other styles which can be used to
- // produce replicas of many of the different button types that are
- // discussed in Apple's Human Interface Guidelines. These include
- // DisclosureButton, DisclosureTriangle, HelpButton,
- // ImageButton, InlineButton, GradientButton,
- // RoundedRectButton, and RecessedButton.
- //
- // # Styling options
- //
- // The class name for a ttk::button is TButton.
- //
- // Dynamic states: active, disabled, pressed, readonly.
- //
- // TButton styling options configurable with ttk::style
- // are:
- // - [Anchor] anchor
- // - [Background] color
- // - [Bordercolor] color
- // - [Compound] compound
- // - [Darkcolor] color
- // - [Foreground] color
- // - [Font] font
- // - [Highlightcolor] color
- // - [Highlightthickness] amount
- // - [Lightcolor] color
- // - [Padding] padding
- // - [Relief] relief
- // - [Shiftrelief] amount
- // - [Width] amount
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_button]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_button.html
- func TButton(options ...Opt) *TButtonWidget {
- return App.TButton(options...)
- }
- // TButton — Widget that issues a command when pressed
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TButton]
- func (w *Window) TButton(options ...Opt) *TButtonWidget {
- return &TButtonWidget{w.newChild("ttk::button", options...)}
- }
- // TButtonWidget represents the Tcl/Tk ttk_button widget/window
- type TButtonWidget struct {
- *Window
- }
- // TCheckbutton — On/off widget
- //
- // # Description
- //
- // A ttk::checkbutton widget is used to show or change a setting.
- // It has two states, selected and deselected.
- // The state of the checkbutton may be linked to a Tcl variable.
- //
- // Use [Window.TCheckbutton] to create a TCheckbutton with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_checkbutton] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Compound]
- // - [Cursor]
- // - [Image]
- // - [State]
- // - [Style]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Width]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // A Tcl script to execute whenever the widget is invoked.
- //
- // [Offvalue]
- //
- // The value to store in the associated -variable
- // when the widget is deselected. Defaults to 0.
- //
- // [Onvalue]
- //
- // The value to store in the associated -variable
- // when the widget is selected. Defaults to 1.
- //
- // [Variable]
- //
- // The name of a global variable whose value is linked to the widget.
- // Defaults to the widget pathname if not specified.
- //
- // # Standard styles
- //
- // Ttk::checkbutton widgets support the Toolbutton style in all
- // standard themes, which is useful for creating widgets for toolbars.
- //
- // # Styling options
- //
- // The class name for a ttk::checkbutton is TCheckbutton.
- //
- // Dynamic states: active, alternate, disabled,
- // pressed, selected, readonly.
- //
- // TCheckbutton styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Compound] compound
- // - [Foreground] color
- // - [Indicatorbackground] color
- // - [Indicatorcolor] color
- // - [Indicatormargin] padding
- // - [Indicatorrelief] relief
- // - [Padding] padding
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_checkbutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_checkbutton.html
- func TCheckbutton(options ...Opt) *TCheckbuttonWidget {
- return App.TCheckbutton(options...)
- }
- // TCheckbutton — On/off widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TCheckbutton]
- func (w *Window) TCheckbutton(options ...Opt) *TCheckbuttonWidget {
- return &TCheckbuttonWidget{w.newChild("ttk::checkbutton", options...)}
- }
- // TCheckbuttonWidget represents the Tcl/Tk ttk_checkbutton widget/window
- type TCheckbuttonWidget struct {
- *Window
- }
- // TCombobox — Text field with popdown selection list
- //
- // # Description
- //
- // A ttk::combobox combines a text field with a pop-down list of values;
- // the user may select the value of the text field from among the
- // values in the list.
- //
- // Use [Window.TCombobox] to create a TCombobox with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_combobox] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Placeholder]
- // - [Placeholderforeground]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Exportselection]
- //
- // Boolean value.
- // If set, the widget selection is linked to the X selection.
- //
- // [Justify]
- //
- // Specifies how the text is aligned within the widget.
- // Must be one of left, center, or right.
- //
- // [Height]
- //
- // Specifies the height of the pop-down listbox, in rows.
- //
- // [Postcommand]
- //
- // A Tcl script to evaluate immediately before displaying the listbox.
- // The -postcommand script may specify the -values to display.
- //
- // [State]
- //
- // One of normal, readonly, or disabled.
- // In the readonly state,
- // the value may not be edited directly, and
- // the user can only select one of the -values from the
- // dropdown list.
- // In the normal state,
- // the text field is directly editable.
- // In the disabled state, no interaction is possible.
- //
- // [Textvariable]
- //
- // Specifies the name of a global variable whose value is linked
- // to the widget value.
- // Whenever the variable changes value the widget value is updated,
- // and vice versa.
- //
- // [Values]
- //
- // Specifies the list of values to display in the drop-down listbox.
- //
- // [Width]
- //
- // Specifies an integer value indicating the desired width of the entry window,
- // in average-size characters of the widget's font.
- //
- // # Styling options
- //
- // The class name for a ttk::combobox is TCombobox.
- // The ttk::combobox uses the entry and
- // listbox widgets internally.
- // The listbox frame has a class name of ComboboxPopdownFrame.
- //
- // Dynamic states: disabled, focus, pressed, readonly.
- //
- // TCombobox styling options configurable with ttk::style
- // are:
- // - [Arrowcolor] color
- // - [Arrowsize] amount
- // - [Background] color
- // - [Bordercolor] color
- // - [Darkcolor] color
- // - [Focusfill] color
- // - [Foreground] color
- // - [Fieldbackground] color
- // - [Insertcolor] color
- // - [Insertwidth] amount
- // - [Lightcolor] color
- // - [Padding] padding
- // - [Placeholderforeground] color
- // - [Postoffset] padding
- // - [Selectbackground] color
- // - [Selectforeground] color
- //
- // The ttk::combobox popdown listbox cannot be configured using
- // ttk::style nor via the widget configure command. The listbox
- // can be configured using the option database.
- //
- // option add *TCombobox*Listbox.background color
- // option add *TCombobox*Listbox.font font
- // option add *TCombobox*Listbox.foreground color
- // option add *TCombobox*Listbox.selectBackground color
- // option add *TCombobox*Listbox.selectForeground color
- //
- // To configure a specific listbox (subject to future change):
- //
- // ComboboxPopdownFrame
- // styling options configurable with ttk::style
- // are:
- // - [Borderwidth] amount
- // - [Relief] relief
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_combobox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_combobox.html
- func TCombobox(options ...Opt) *TComboboxWidget {
- return App.TCombobox(options...)
- }
- // TCombobox — Text field with popdown selection list
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TCombobox]
- func (w *Window) TCombobox(options ...Opt) *TComboboxWidget {
- return &TComboboxWidget{w.newChild("ttk::combobox", options...)}
- }
- // TComboboxWidget represents the Tcl/Tk ttk_combobox widget/window
- type TComboboxWidget struct {
- *Window
- }
- // TEntry — Editable text field widget
- //
- // # Description
- //
- // An ttk::entry widget displays a one-line text string and
- // allows that string to be edited by the user.
- // The value of the string may be linked to a Tcl variable
- // with the -textvariable option.
- // Entry widgets support horizontal scrolling with the
- // standard -xscrollcommand option and xview widget command.
- //
- // Use [Window.TEntry] to create a TEntry with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_entry] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Foreground]
- // - [Placeholder]
- // - [Placeholderforeground]
- // - [Style]
- // - [Takefocus]
- // - [Xscrollcommand]
- //
- // # Widget specific options
- //
- // [Exportselection]
- //
- // A boolean value specifying whether or not
- // a selection in the widget should be linked to the X selection.
- // If the selection is exported, then selecting in the widget deselects
- // the current X selection, selecting outside the widget deselects any
- // widget selection, and the widget will respond to selection retrieval
- // requests when it has a selection.
- //
- // [Invalidcommand]
- //
- // A script template to evaluate whenever the -validatecommand returns 0.
- // See VALIDATION below for more information.
- //
- // [Justify]
- //
- // Specifies how the text is aligned within the entry widget.
- // One of left, center, or right.
- //
- // [Show]
- //
- // If this option is specified, then the true contents of the entry
- // are not displayed in the window.
- // Instead, each character in the entry's value will be displayed as
- // the first character in the value of this option, such as
- // or a bullet.
- // This is useful, for example, if the entry is to be used to enter
- // a password.
- // If characters in the entry are selected and copied elsewhere, the
- // information copied will be what is displayed, not the true contents
- // of the entry.
- //
- // [State]
- //
- // Compatibility option; see ttk::widget(n) for details.
- // Specifies one of three states for the entry,
- // normal, disabled, or readonly.
- // See WIDGET STATES, below.
- //
- // [Textvariable]
- //
- // Specifies the name of a global variable whose value is linked
- // to the entry widget's contents.
- // Whenever the variable changes value, the widget's contents are updated,
- // and vice versa.
- //
- // [Validate]
- //
- // Specifies the mode in which validation should operate:
- // none, focus, focusin, focusout, key, or all.
- // Default is none, meaning that validation is disabled.
- // See VALIDATION below.
- //
- // [Validatecommand]
- //
- // A script template to evaluate whenever validation is triggered.
- // If set to the empty string (the default), validation is disabled.
- // The script must return a boolean value.
- // See VALIDATION below.
- //
- // [Width]
- //
- // Specifies an integer value indicating the desired width of the entry window,
- // in average-size characters of the widget's font.
- //
- // # Styling options
- //
- // The class name for a ttk::entry is TEntry.
- //
- // Dynamic states: disabled, focus, readonly.
- //
- // TEntry styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Bordercolor] color
- // - [Darkcolor] color
- // - [Fieldbackground] color
- // - [Foreground] color
- // - [Insertcolor] color
- // - [Insertwidth] amount
- // - [Lightcolor] color
- // - [Padding] padding
- // - [Placeholderforeground] color
- // - [Relief] relief
- // - [Selectbackground] color
- // - [Selectborderwidth] amount
- // - [Selectforeground] color
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_entry]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_entry.html
- func TEntry(options ...Opt) *TEntryWidget {
- return App.TEntry(options...)
- }
- // TEntry — Editable text field widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TEntry]
- func (w *Window) TEntry(options ...Opt) *TEntryWidget {
- return &TEntryWidget{w.newChild("ttk::entry", options...)}
- }
- // TEntryWidget represents the Tcl/Tk ttk_entry widget/window
- type TEntryWidget struct {
- *Window
- }
- // TFrame — Simple container widget
- //
- // # Description
- //
- // A ttk::frame widget is a container, used to group other widgets
- // together.
- //
- // Use [Window.TFrame] to create a TFrame with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_frame] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Padding]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Borderwidth]
- //
- // The desired width of the widget border. Defaults to 0.
- // May be ignored depending on the theme used.
- //
- // [Relief]
- //
- // One of the standard Tk border styles:
- // flat, groove, raised, ridge,
- // solid, or sunken.
- // Defaults to flat.
- //
- // [Width]
- //
- // If specified, the widget's requested width in pixels.
- //
- // [Height]
- //
- // If specified, the widget's requested height in pixels.
- //
- // # Styling options
- //
- // The class name for a ttk::frame is TFrame.
- //
- // TFrame styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Relief] relief
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_frame]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_frame.html
- func TFrame(options ...Opt) *TFrameWidget {
- return App.TFrame(options...)
- }
- // TFrame — Simple container widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TFrame]
- func (w *Window) TFrame(options ...Opt) *TFrameWidget {
- return &TFrameWidget{w.newChild("ttk::frame", options...)}
- }
- // TFrameWidget represents the Tcl/Tk ttk_frame widget/window
- type TFrameWidget struct {
- *Window
- }
- // TLabel — Display a text string and/or image
- //
- // # Description
- //
- // A ttk::label widget displays a textual label and/or image.
- // The label may be linked to a Tcl variable
- // to automatically change the displayed text.
- //
- // Use [Window.TLabel] to create a TLabel with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_label] page.
- //
- // # Standard options
- //
- // - [Anchor]
- // - [Class]
- // - [Compound]
- // - [Cursor]
- // - [Foreground]
- // - [Image]
- // - [Justify]
- // - [Padding]
- // - [State]
- // - [Style]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Width]
- // - [Wraplength]
- //
- // # Widget specific options
- //
- // [Background]
- //
- // The widget's background color.
- // If unspecified, the theme default is used.
- //
- // [Relief]
- //
- // Specifies the 3-D effect desired for the widget border.
- // Valid values are
- // flat, groove, raised, ridge, solid,
- // and sunken.
- //
- // [Wraplength]
- //
- // Specifies the maximum line length (in pixels).
- // If this option is negative or zero,
- // then automatic wrapping is not performed; otherwise
- // the text is split into lines such that no line is longer
- // than the specified value.
- //
- // # Styling options
- //
- // The class name for a ttk::label is TLabel.
- //
- // Dynamic states: disabled, readonly.
- //
- // TLabel styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Compound] compound
- // - [Foreground] color
- // - [Font] font
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_label]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_label.html
- func TLabel(options ...Opt) *TLabelWidget {
- return App.TLabel(options...)
- }
- // TLabel — Display a text string and/or image
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TLabel]
- func (w *Window) TLabel(options ...Opt) *TLabelWidget {
- return &TLabelWidget{w.newChild("ttk::label", options...)}
- }
- // TLabelWidget represents the Tcl/Tk ttk_label widget/window
- type TLabelWidget struct {
- *Window
- }
- // TLabelframe — Container widget with optional label
- //
- // # Description
- //
- // A ttk::labelframe widget is a container used to group other widgets
- // together. It has an optional label, which may be a plain text string or
- // another widget.
- //
- // Use [Window.TLabelframe] to create a TLabelframe with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_labelframe] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Padding]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Height]
- //
- // If specified, the widget's requested height in pixels.
- // (See ttk::frame(n) for further notes on -width and
- // -height).
- //
- // [Labelanchor]
- //
- // Specifies where to place the label.
- // Allowed values are (clockwise from the top upper left corner):
- // nw, n, ne, en, e, es,
- // se, s,sw, ws, w and wn.
- // The default value is theme-dependent.
- //
- // [Labelwidget]
- //
- // The name of a widget to use for the label.
- // If set, overrides the -text option.
- // The -labelwidget must be a child of the labelframe widget
- // or one of the labelframe's ancestors, and must belong to the
- // same top-level widget as the labelframe.
- //
- // [Txt]
- //
- // Specifies the text of the label.
- //
- // [Underline]
- //
- // If set, specifies the integer index (0-based) of a character to
- // underline in the text string.
- // The underlined character is used for mnemonic activation.
- // Mnemonic activation for a ttk::labelframe
- // sets the keyboard focus to the first child of the ttk::labelframe widget.
- //
- // [Width]
- //
- // If specified, the widget's requested width in pixels.
- //
- // # Styling options
- //
- // The class name for a ttk::labelframe is TLabelframe.
- // The text label
- // has a class of TLabelframe.Label.
- //
- // Dynamic states: disabled, readonly.
- //
- // TLabelframe styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Bordercolor] color
- // - [Borderwidth] amount
- // - [Darkcolor] color
- // - [Labelmargins] amount
- // - [Labeloutside] boolean
- // - [Lightcolor] color
- // - [Relief] relief
- //
- // TLabelframe.Label styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Font] font
- // - [Foreground] color
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_labelframe]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_labelframe.html
- func TLabelframe(options ...Opt) *TLabelframeWidget {
- return App.TLabelframe(options...)
- }
- // TLabelframe — Container widget with optional label
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TLabelframe]
- func (w *Window) TLabelframe(options ...Opt) *TLabelframeWidget {
- return &TLabelframeWidget{w.newChild("ttk::labelframe", options...)}
- }
- // TLabelframeWidget represents the Tcl/Tk ttk_labelframe widget/window
- type TLabelframeWidget struct {
- *Window
- }
- // TMenubutton — Widget that pops down a menu when pressed
- //
- // # Description
- //
- // A ttk::menubutton widget displays a textual label and/or image,
- // and displays a menu when pressed.
- //
- // Use [Window.TMenubutton] to create a TMenubutton with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_menubutton] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Compound]
- // - [Cursor]
- // - [Image]
- // - [State]
- // - [Style]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Width]
- //
- // # Widget specific options
- //
- // [Direction]
- //
- // Specifies where the menu is to be popped up relative
- // to the menubutton.
- // One of: above, below, left, right,
- // or flush. The default is below.
- // flush pops the menu up directly over the menubutton.
- //
- // [Mnu]
- //
- // Specifies the path name of the menu associated with the menubutton.
- // To be on the safe side, the menu ought to be a direct child of the
- // menubutton.
- //
- // # Standard styles
- //
- // Ttk::menubutton widgets support the Toolbutton style in all
- // standard themes, which is useful for creating widgets for toolbars.
- //
- // # Styling options
- //
- // The class name for a ttk::menubutton is TMenubutton.
- //
- // Dynamic states: active, disabled, readonly.
- //
- // TMenubutton styling options configurable with ttk::style
- // are:
- // - [Arrowsize] amount
- // - [Background] color
- // - [Compound] compound
- // - [Foreground] color
- // - [Font] font
- // - [Padding] padding
- // - [Relief] relief
- // - [Width] amount
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_menubutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_menubutton.html
- func TMenubutton(options ...Opt) *TMenubuttonWidget {
- return App.TMenubutton(options...)
- }
- // TMenubutton — Widget that pops down a menu when pressed
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TMenubutton]
- func (w *Window) TMenubutton(options ...Opt) *TMenubuttonWidget {
- return &TMenubuttonWidget{w.newChild("ttk::menubutton", options...)}
- }
- // TMenubuttonWidget represents the Tcl/Tk ttk_menubutton widget/window
- type TMenubuttonWidget struct {
- *Window
- }
- // TNotebook — Multi-paned container widget
- //
- // # Description
- //
- // A ttk::notebook widget manages a collection of windows
- // and displays a single one at a time.
- // Each content window is associated with a tab,
- // which the user may select to change the currently-displayed window.
- //
- // Use [Window.TNotebook] to create a TNotebook with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_notebook] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Height]
- //
- // If present and greater than zero,
- // specifies the desired height of the pane area
- // (not including internal padding or tabs).
- // Otherwise, the maximum height of all panes is used.
- //
- // [Padding]
- //
- // Specifies the amount of extra space to add around the outside
- // of the notebook.
- // The padding is a list of up to four length specifications
- // left top right bottom.
- // If fewer than four elements are specified,
- // bottom defaults to top,
- // right defaults to left, and
- // top defaults to left.
- // In other words, a list of three numbers specify the left, vertical, and right
- // padding; a list of two numbers specify the horizontal and the vertical padding;
- // a single number specifies the same padding all the way around the widget.
- //
- // [Width]
- //
- // If present and greater than zero,
- // specifies the desired width of the pane area
- // (not including internal padding).
- // Otherwise, the maximum width of all panes is used.
- //
- // # Styling options
- //
- // The class name for a ttk::notebook is TNotebook. The tab has
- // a class name of TNotebook.Tab
- //
- // Dynamic states: active, disabled, selected.
- //
- // TNotebook styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Bordercolor] color
- // - [Darkcolor] color
- // - [Foreground] color
- // - [Lightcolor] color
- // - [Padding] padding
- // - [Tabmargins] padding
- // - [Tabposition] position
- //
- // TNotebook.Tab styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Bordercolor] color
- // - [Compound] compound
- // - [Expand] padding
- // - [Font] font
- // - [Foreground] color
- // - [Padding] padding
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_notebook]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_notebook.html
- func TNotebook(options ...Opt) *TNotebookWidget {
- return App.TNotebook(options...)
- }
- // TNotebook — Multi-paned container widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TNotebook]
- func (w *Window) TNotebook(options ...Opt) *TNotebookWidget {
- return &TNotebookWidget{w.newChild("ttk::notebook", options...)}
- }
- // TNotebookWidget represents the Tcl/Tk ttk_notebook widget/window
- type TNotebookWidget struct {
- *Window
- }
- // TPanedwindow — Multi-pane container window
- //
- // # Description
- //
- // A ttk::panedwindow widget displays a number of subwindows,
- // stacked either vertically or horizontally.
- // The user may adjust the relative sizes of the subwindows
- // by dragging the sash between panes.
- //
- // Use [Window.TPanedwindow] to create a TPanedwindow with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_panedwindow] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Orient]
- //
- // Specifies the orientation of the window.
- // If vertical, subpanes are stacked top-to-bottom;
- // if horizontal, subpanes are stacked left-to-right.
- //
- // [Width]
- //
- // If present and greater than zero,
- // specifies the desired width of the widget in pixels.
- // Otherwise, the requested width is determined by the width
- // of the managed windows.
- //
- // [Height]
- //
- // If present and greater than zero,
- // specifies the desired height of the widget in pixels.
- // Otherwise, the requested height is determined by the height
- // of the managed windows.
- //
- // # Styling options
- //
- // The class name for a ttk::panedwindow is TPanedwindow. The
- // sash has a class name of Sash.
- //
- // TPanedwindow styling options configurable with ttk::style
- // are:
- // - [Background] color
- //
- // Sash styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Bordercolor] color
- // - [Gripsize] size (number of screen units)
- // - [Handlepad] amount
- // - [Handlesize] amount
- // - [Lightcolor] color
- // - [Sashpad] amount
- // - [Sashrelief] relief
- // - [Sashthickness] amount
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_panedwindow]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_panedwindow.html
- func TPanedwindow(options ...Opt) *TPanedwindowWidget {
- return App.TPanedwindow(options...)
- }
- // TPanedwindow — Multi-pane container window
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TPanedwindow]
- func (w *Window) TPanedwindow(options ...Opt) *TPanedwindowWidget {
- return &TPanedwindowWidget{w.newChild("ttk::panedwindow", options...)}
- }
- // TPanedwindowWidget represents the Tcl/Tk ttk_panedwindow widget/window
- type TPanedwindowWidget struct {
- *Window
- }
- // TProgressbar — Provide progress feedback
- //
- // # Description
- //
- // A ttk::progressbar widget shows the status of a long-running
- // operation. They can operate in two modes: determinate mode shows the
- // amount completed relative to the total amount of work to be done, and
- // indeterminate mode provides an animated display to let the user know
- // that something is happening.
- //
- // If the value of -orient is horizontal a text string can be
- // displayed inside the progressbar. This string can be configured using
- // the -anchor, -font, -foreground, -justify,
- // is vertical then these options are ignored.
- //
- // Use [Window.TProgressbar] to create a TProgressbar with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_progressbar] page.
- //
- // # Standard options
- //
- // - [Anchor]
- // - [Class]
- // - [Cursor]
- // - [Foreground]
- // - [Justify]
- // - [Style]
- // - [Takefocus]
- // - [Txt]
- // - [Wraplength]
- //
- // # Widget specific options
- //
- // [Length]
- //
- // Specifies the length of the long axis of the progress bar
- // (width if horizontal, height if vertical). The value may have any of the forms
- // acceptable to Tk_GetPixels.
- //
- // [Maximum]
- //
- // A floating point number specifying the maximum -value.
- // Defaults to 100.
- //
- // [Mode]
- //
- // One of determinate or indeterminate.
- //
- // [Orient]
- //
- // One of horizontal or vertical.
- // Specifies the orientation of the progress bar.
- //
- // [Phase]
- //
- // Read-only option.
- // The widget periodically increments the value of this option
- // whenever the -value is greater than 0 and,
- // in determinate mode, less than -maximum.
- // This option may be used by the current theme
- // to provide additional animation effects.
- //
- // [Value]
- //
- // The current value of the progress bar.
- // In determinate mode, this represents the amount of work completed.
- // In indeterminate mode, it is interpreted modulo -maximum;
- // that is, the progress bar completes one
- // when the -value increases by -maximum.
- // If -variable is set to an existing variable, specifying -value
- // has no effect (the variable value takes precedence).
- //
- // [Variable]
- //
- // The name of a global Tcl variable which is linked to the -value.
- // If specified to an existing variable, the -value of the progress bar is
- // automatically set to the value of the variable whenever
- // the latter is modified.
- //
- // # Styling options
- //
- // The class name for a ttk::progressbar is TProgressbar.
- //
- // TProgressbar styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Bordercolor] color
- // - [Darkcolor] color
- // - [Lightcolor] color
- // - [Maxphase]
- // - [Period]
- // - [Troughcolor] color
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_progressbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_progressbar.html
- func TProgressbar(options ...Opt) *TProgressbarWidget {
- return App.TProgressbar(options...)
- }
- // TProgressbar — Provide progress feedback
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TProgressbar]
- func (w *Window) TProgressbar(options ...Opt) *TProgressbarWidget {
- return &TProgressbarWidget{w.newChild("ttk::progressbar", options...)}
- }
- // TProgressbarWidget represents the Tcl/Tk ttk_progressbar widget/window
- type TProgressbarWidget struct {
- *Window
- }
- // TRadiobutton — Mutually exclusive option widget
- //
- // # Description
- //
- // ttk::radiobutton widgets are used in groups to show or change
- // a set of mutually-exclusive options.
- // Radiobuttons are linked to a Tcl variable,
- // and have an associated value; when a radiobutton is clicked,
- // it sets the variable to its associated value.
- //
- // Use [Window.TRadiobutton] to create a TRadiobutton with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_radiobutton] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Compound]
- // - [Cursor]
- // - [Image]
- // - [State]
- // - [Style]
- // - [Takefocus]
- // - [Textvariable]
- // - [Txt]
- // - [Underline]
- // - [Width]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // A Tcl script to evaluate whenever the widget is invoked.
- //
- // [Value]
- //
- // The value to store in the associated -variable
- // when the widget is selected.
- //
- // [Variable]
- //
- // The name of a global variable whose value is linked to the widget.
- // Default value is ::selectedButton.
- //
- // # Standard styles
- //
- // Ttk::radiobutton widgets support the Toolbutton style in all
- // standard themes, which is useful for creating widgets for toolbars.
- //
- // # Styling options
- //
- // The class name for a ttk::radiobutton is TRadiobutton.
- //
- // Dynamic states: active, alternate, disabled,
- // pressed, readonly, selected.
- //
- // TRadiobutton styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Compound] compound
- // - [Foreground] color
- // - [Indicatorbackground] color
- // - [Indicatorcolor] color
- // - [Indicatormargin] padding
- // - [Indicatorrelief] relief
- // - [Padding] padding
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_radiobutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_radiobutton.html
- func TRadiobutton(options ...Opt) *TRadiobuttonWidget {
- return App.TRadiobutton(options...)
- }
- // TRadiobutton — Mutually exclusive option widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TRadiobutton]
- func (w *Window) TRadiobutton(options ...Opt) *TRadiobuttonWidget {
- return &TRadiobuttonWidget{w.newChild("ttk::radiobutton", options...)}
- }
- // TRadiobuttonWidget represents the Tcl/Tk ttk_radiobutton widget/window
- type TRadiobuttonWidget struct {
- *Window
- }
- // TScale — Create and manipulate a scale widget
- //
- // # Description
- //
- // A ttk::scale widget is typically used to control the numeric value of a
- // linked variable that varies uniformly over some range. A scale displays a
- // slider that can be moved along over a trough, with the relative
- // position of the slider over the trough indicating the value of the variable.
- //
- // Use [Window.TScale] to create a TScale with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_scale] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // Specifies the prefix of a Tcl command to invoke whenever the scale's value is
- // changed via a widget command. The actual command consists of this option
- // followed by a space and a real number indicating the new value of the scale.
- //
- // [From]
- //
- // A real value corresponding to the left or top end of the scale.
- //
- // [Length]
- //
- // Specifies the desired long dimension of the scale in screen units (i.e. any of
- // the forms acceptable to Tk_GetPixels). For vertical scales this is the
- // scale's height; for horizontal scales it is the scale's width.
- //
- // [Orient]
- //
- // Specifies which orientation whether the widget should be laid out horizontally
- // or vertically. Must be either horizontal or vertical or an
- // abbreviation of one of these.
- //
- // [To]
- //
- // Specifies a real value corresponding to the right or bottom end of the scale.
- // This value may be either less than or greater than the -from option.
- //
- // [Value]
- //
- // Specifies the current floating-point value of the variable.
- // If -variable is set to an existing variable, specifying -value
- // has no effect (the variable value takes precedence).
- //
- // [Variable]
- //
- // Specifies the name of a global variable to link to the scale. Whenever the
- // value of the variable changes, the scale will update to reflect this value.
- // Whenever the scale is manipulated interactively, the variable will be modified
- // to reflect the scale's new value.
- //
- // # Styling options
- //
- // The class name for a ttk::scale is TScale.
- //
- // Dynamic states: active.
- //
- // TScale styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Borderwidth] amount
- // - [Darkcolor] color
- // - [Groovewidth] amount
- // - [Lightcolor] color
- // - [Sliderwidth] amount
- // - [Troughcolor] color
- // - [Troughrelief] relief
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_scale]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_scale.html
- func TScale(options ...Opt) *TScaleWidget {
- return App.TScale(options...)
- }
- // TScale — Create and manipulate a scale widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TScale]
- func (w *Window) TScale(options ...Opt) *TScaleWidget {
- return &TScaleWidget{w.newChild("ttk::scale", options...)}
- }
- // TScaleWidget represents the Tcl/Tk ttk_scale widget/window
- type TScaleWidget struct {
- *Window
- }
- // TScrollbar — Control the viewport of a scrollable widget
- //
- // # Description
- //
- // ttk::scrollbar widgets are typically linked to an associated window
- // that displays a document of some sort, such as a file being edited or a
- // drawing.
- // A scrollbar displays a thumb in the middle portion of the scrollbar,
- // whose position and size provides information about the portion of the
- // document visible in the associated window.
- // The thumb may be dragged by the user to control the visible region.
- // Depending on the theme, two or more arrow buttons may also be present;
- // these are used to scroll the visible region in discrete units.
- //
- // Use [Window.TScrollbar] to create a TScrollbar with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_scrollbar] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // A Tcl script prefix to evaluate
- // to change the view in the widget associated with the scrollbar.
- // Additional arguments are appended to the value of this option,
- // as described in SCROLLING COMMANDS below,
- // whenever the user requests a view change by manipulating the scrollbar.
- //
- // [Orient]
- //
- // One of horizontal or vertical.
- // Specifies the orientation of the scrollbar.
- //
- // # Styling options
- //
- // The class name for a ttk::scrollbar is TScrollbar.
- //
- // Dynamic states: active, disabled.
- //
- // TScrollbar (or more specifically Vertical.TScrollbar and
- // Horizontal.TScrollbar) styling options that are configurable with
- // ttk::style are:
- // - [Arrowcolor] color
- // - [Arrowsize] amount
- // - [Background] color
- // - [Bordercolor] color
- // - [Darkcolor] color (color of the dark part of the 3D relief)
- // - [Foreground] color
- // - [Gripsize] size (number of screen units)
- // - [Lightcolor] color (color of the light part of the 3D relief)
- // - [Troughcolor] color
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_scrollbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_scrollbar.html
- func TScrollbar(options ...Opt) *TScrollbarWidget {
- return App.TScrollbar(options...)
- }
- // TScrollbar — Control the viewport of a scrollable widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TScrollbar]
- func (w *Window) TScrollbar(options ...Opt) *TScrollbarWidget {
- return &TScrollbarWidget{w.newChild("ttk::scrollbar", options...)}
- }
- // TScrollbarWidget represents the Tcl/Tk ttk_scrollbar widget/window
- type TScrollbarWidget struct {
- *Window
- }
- // TSeparator — Separator bar
- //
- // # Description
- //
- // A ttk::separator widget displays a horizontal or vertical separator
- // bar.
- //
- // Use [Window.TSeparator] to create a TSeparator with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_separator] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Style]
- // - [Takefocus]
- //
- // # Widget specific options
- //
- // [Orient]
- //
- // One of horizontal or vertical.
- // Specifies the orientation of the separator.
- //
- // # Styling options
- //
- // The class name for a ttk::separator is TSeparator.
- //
- // TSeparator styling options configurable with ttk::style
- // are:
- // - [Background] color
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_separator]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_separator.html
- func TSeparator(options ...Opt) *TSeparatorWidget {
- return App.TSeparator(options...)
- }
- // TSeparator — Separator bar
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TSeparator]
- func (w *Window) TSeparator(options ...Opt) *TSeparatorWidget {
- return &TSeparatorWidget{w.newChild("ttk::separator", options...)}
- }
- // TSeparatorWidget represents the Tcl/Tk ttk_separator widget/window
- type TSeparatorWidget struct {
- *Window
- }
- // TSizegrip — Bottom-right corner resize widget
- //
- // # Description
- //
- // A ttk::sizegrip widget (also known as a grow box)
- // allows the user to resize the containing toplevel window
- // by pressing and dragging the grip.
- //
- // Use [Window.TSizegrip] to create a TSizegrip with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_sizegrip] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Style]
- // - [Takefocus]
- //
- // # Styling options
- //
- // The class name for a ttk::sizegrip is TSizegrip.
- //
- // TSizegrip styling options configurable with ttk::style
- // are:
- // - [Background] color
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_sizegrip]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_sizegrip.html
- func TSizegrip(options ...Opt) *TSizegripWidget {
- return App.TSizegrip(options...)
- }
- // TSizegrip — Bottom-right corner resize widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TSizegrip]
- func (w *Window) TSizegrip(options ...Opt) *TSizegripWidget {
- return &TSizegripWidget{w.newChild("ttk::sizegrip", options...)}
- }
- // TSizegripWidget represents the Tcl/Tk ttk_sizegrip widget/window
- type TSizegripWidget struct {
- *Window
- }
- // TSpinbox — Selecting text field widget
- //
- // # Description
- //
- // A ttk::spinbox widget is a ttk::entry widget with built-in
- // up and down buttons that are used to either modify a numeric value or
- // to select among a set of values. The widget implements all the features
- // of the ttk::entry widget including support of the
- // to a Tcl variable.
- //
- // Use [Window.TSpinbox] to create a TSpinbox with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_spinbox] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Placeholder]
- // - [Placeholderforeground]
- // - [State]
- // - [Style]
- // - [Takefocus]
- // - [Validate]
- // - [Validatecommand]
- // - [Xscrollcommand]
- //
- // # Widget specific options
- //
- // [Command]
- //
- // Specifies a Tcl command to be invoked whenever a spinbutton is invoked.
- //
- // [Format]
- //
- // Specifies an alternate format to use when setting the string value
- // when using the -from and -to range.
- // This must be a format specifier of the form %<pad>.<pad>f,
- // as it will format a floating-point number.
- //
- // [From]
- //
- // A floating-point value specifying the lowest value for the spinbox. This is
- // used in conjunction with -to and -increment to set a numerical
- // range.
- //
- // [Increment]
- //
- // A floating-point value specifying the change in value to be applied each
- // time one of the widget spin buttons is pressed. The up button applies a
- // positive increment, the down button applies a negative increment.
- //
- // [To]
- //
- // A floating-point value specifying the highest permissible value for the
- // widget. See also -from and -increment.
- // range.
- //
- // [Values]
- //
- // This must be a Tcl list of values. If this option is set then this will
- // override any range set using the -from, -to and
- // -increment options. The widget will instead use the values
- // specified beginning with the first value.
- //
- // [Wrap]
- //
- // Must be a proper boolean value. If on, the spinbox will wrap around the
- // values of data in the widget.
- //
- // # Styling options
- //
- // The class name for a ttk::spinbox is TSpinbox.
- //
- // Dynamic states: active, disabled, focus, readonly.
- //
- // TSpinbox styling options configurable with ttk::style
- // are:
- // - [Arrowcolor] color
- // - [Arrowsize] amount
- // - [Background] color
- // - [Bordercolor] color
- // - [Darkcolor] color
- // - [Fieldbackground] color
- // - [Foreground] color
- // - [Insertcolor] color
- // - [Insertwidth] amount
- // - [Lightcolor] color
- // - [Padding] padding
- // - [Placeholderforeground] color
- // - [Selectbackground] color
- // - [Selectforeground] color
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_spinbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_spinbox.html
- func TSpinbox(options ...Opt) *TSpinboxWidget {
- return App.TSpinbox(options...)
- }
- // TSpinbox — Selecting text field widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TSpinbox]
- func (w *Window) TSpinbox(options ...Opt) *TSpinboxWidget {
- return &TSpinboxWidget{w.newChild("ttk::spinbox", options...)}
- }
- // TSpinboxWidget represents the Tcl/Tk ttk_spinbox widget/window
- type TSpinboxWidget struct {
- *Window
- }
- // TTreeview — Hierarchical multicolumn data display widget
- //
- // # Description
- //
- // The ttk::treeview widget displays a hierarchical collection of items.
- // Each item has a textual label, an optional image,
- // and an optional list of data values.
- // The data values are displayed in successive columns after
- // the tree label.
- //
- // The order in which data values are displayed may be controlled
- // by setting the -displaycolumns widget option.
- // The tree widget can also display column headings.
- // Columns may be accessed by number or by symbolic names
- // listed in the -columns widget option;
- // see COLUMN IDENTIFIERS.
- //
- // Each item is identified by a unique name.
- // The widget will generate item IDs if they are not supplied by the caller.
- // There is a distinguished root item, named {}.
- // The root item itself is not displayed;
- // its children appear at the top level of the hierarchy.
- //
- // Each item also has a list of tags,
- // which can be used to associate event bindings with individual items
- // and control the appearance of the item.
- //
- // Treeview widgets support horizontal and vertical scrolling with the
- // standard -[xy]scrollcommand options
- // and [xy]view widget commands.
- //
- // Use [Window.TTreeview] to create a TTreeview with a particular parent.
- //
- // More information might be available at the [Tcl/Tk ttk_treeview] page.
- //
- // # Standard options
- //
- // - [Class]
- // - [Cursor]
- // - [Padding]
- // - [Style]
- // - [Takefocus]
- // - [Xscrollcommand]
- // - [Yscrollcommand]
- //
- // # Widget specific options
- //
- // [Columns]
- //
- // A list of column identifiers,
- // specifying the number of columns and their names.
- //
- // [Displaycolumns]
- //
- // A list of column identifiers
- // (either symbolic names or integer indices)
- // specifying which data columns are displayed
- // and the order in which they appear,
- // or the string #all.
- // If set to #all (the default),
- // all columns are shown in the order given.
- //
- // [Height]
- //
- // Specifies the number of rows which should be visible.
- // Note that
- // the requested width is determined from the sum of the column widths.
- //
- // [Selectmode]
- //
- // Controls how the built-in class bindings manage the selection.
- // One of extended, browse, or none.
- //
- // [Selecttype]
- //
- // Controls how the built-in class bindings manage the selection.
- // One of item or cell.
- //
- // [Show]
- //
- // A list containing zero or more of the following values, specifying
- // which elements of the tree to display.
- //
- // [Striped]
- //
- // Boolean specifying zebra striped item coloring.
- // Note that
- // striped items uses the -stripedbackground option if set by the theme or
- // a tag. If not supported by the current theme, it will not show.
- //
- // [Titlecolumns]
- //
- // Number of display columns at the left that should not be scrolled. The tree
- // column counts, even if -show tree is not specified. Thus for value N of
- // this option, column #N is the first one that is scrollable. Default is 0.
- //
- // [Titleitems]
- //
- // Number of items at the top that should not be vertically scrolled. Default is 0.
- //
- // # Styling options
- //
- // The class name for a ttk::treeview is Treeview.
- // The treeview header class name is Heading.
- // The treeview item class name is Item.
- // The treeview cell class name is Cell.
- //
- // Dynamic states: disabled, selected.
- //
- // Treeview styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Fieldbackground] color
- // - [Font] font
- // - [Foreground] color
- // - [Indent] amount
- // - [Columnseparatorwidth] amount
- // - [Rowheight] amount
- // - [Stripedbackground] color
- //
- // Heading styling options configurable with ttk::style
- // are:
- // - [Background] color
- // - [Font] font
- // - [Relief] relief
- //
- // Item styling options configurable with ttk::style
- // are:
- // - [Foreground] color
- // - [Indicatormargins] padding
- // - [Indicatorsize] amount
- // - [Padding] padding
- //
- // Cell styling options configurable with ttk::style
- // are:
- // - [Padding] padding
- //
- // Some options are only available for specific themes.
- //
- // See the ttk::style manual page for information on how to configure
- // ttk styles.
- //
- // [Tcl/Tk ttk_treeview]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_treeview.html
- func TTreeview(options ...Opt) *TTreeviewWidget {
- return App.TTreeview(options...)
- }
- // TTreeview — Hierarchical multicolumn data display widget
- //
- // The resulting [Window] is a child of 'w'
- //
- // For details please see [TTreeview]
- func (w *Window) TTreeview(options ...Opt) *TTreeviewWidget {
- return &TTreeviewWidget{w.newChild("ttk::treeview", options...)}
- }
- // TTreeviewWidget represents the Tcl/Tk ttk_treeview widget/window
- type TTreeviewWidget struct {
- *Window
- }
- // Accelerator option.
- //
- // Known uses:
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- func Accelerator(val any) Opt {
- return rawOption(fmt.Sprintf(`-accelerator %s`, optionString(val)))
- }
- // Activebackground option.
- //
- // Specifies background color to use when drawing active elements.
- // An element (a widget or portion of a widget) is active if the
- // mouse cursor is positioned over the element and pressing a mouse button
- // will cause some action to occur.
- // If strict Motif compliance has been requested by setting the
- // tk_strictMotif variable, this option will normally be
- // ignored; the normal background color will be used instead.
- // For some elements on Windows and Macintosh systems, the active color
- // will only be used while mouse button 1 is pressed over the element.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menu]
- // - [Menubutton]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- func Activebackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-activebackground %s`, optionString(val)))
- }
- // Activebackground — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menu]
- // - [Menubutton]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- func (w *Window) Activebackground() string {
- return evalErr(fmt.Sprintf(`%s cget -activebackground`, w))
- }
- // Activeborderwidth option.
- //
- // Specifies a non-negative value indicating
- // the width of the 3-D border drawn around active elements. See above for
- // definition of active elements.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- // This option is typically only available in widgets displaying more
- // than one element at a time (e.g. menus but not buttons).
- //
- // Known uses:
- // - [Menu]
- func Activeborderwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-activeborderwidth %s`, optionString(val)))
- }
- // Activeborderwidth — Get the configured option value.
- //
- // Known uses:
- // - [Menu]
- func (w *Window) Activeborderwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -activeborderwidth`, w))
- }
- // Activeforeground option.
- //
- // Specifies foreground color to use when drawing active elements.
- // See above for definition of active elements.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menu]
- // - [Menubutton]
- // - [Radiobutton]
- func Activeforeground(val any) Opt {
- return rawOption(fmt.Sprintf(`-activeforeground %s`, optionString(val)))
- }
- // Activeforeground — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menu]
- // - [Menubutton]
- // - [Radiobutton]
- func (w *Window) Activeforeground() string {
- return evalErr(fmt.Sprintf(`%s cget -activeforeground`, w))
- }
- // Activerelief option.
- //
- // Specifies the 3-D effect desired for the active item of the widget.
- // See the -relief option for details.
- //
- // Known uses:
- // - [Menu]
- // - [Scrollbar] (widget specific)
- func Activerelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-activerelief %s`, optionString(val)))
- }
- // Activerelief — Get the configured option value.
- //
- // Known uses:
- // - [Menu]
- // - [Scrollbar] (widget specific)
- func (w *Window) Activerelief() string {
- return evalErr(fmt.Sprintf(`%s cget -activerelief`, w))
- }
- // Activestyle option.
- //
- // Known uses:
- // - [Listbox] (widget specific)
- func Activestyle(val any) Opt {
- return rawOption(fmt.Sprintf(`-activestyle %s`, optionString(val)))
- }
- // Activestyle — Get the configured option value.
- //
- // Known uses:
- // - [Listbox] (widget specific)
- func (w *Window) Activestyle() string {
- return evalErr(fmt.Sprintf(`%s cget -activestyle`, w))
- }
- // After option.
- //
- // Known uses:
- // - [Pack] (command specific)
- func After(val any) Opt {
- return rawOption(fmt.Sprintf(`-after %s`, optionString(val)))
- }
- // Anchor option.
- //
- // Specifies how the information in a widget (e.g. text or a bitmap)
- // is to be displayed in the widget.
- // Must be one of the values n, ne, e, se,
- // s, sw, w, nw, or center.
- // For example, nw means display the information such that its
- // top-left corner is at the top-left corner of the widget.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Message]
- // - [Pack] (command specific)
- // - [Place] (command specific)
- // - [Radiobutton]
- // - [TLabel]
- // - [TProgressbar]
- func Anchor(val any) Opt {
- return rawOption(fmt.Sprintf(`-anchor %s`, optionString(val)))
- }
- // Anchor — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [TLabel]
- // - [TProgressbar]
- func (w *Window) Anchor() string {
- return evalErr(fmt.Sprintf(`%s cget -anchor`, w))
- }
- // Aspect option.
- //
- // Known uses:
- // - [Message] (widget specific)
- func Aspect(val any) Opt {
- return rawOption(fmt.Sprintf(`-aspect %s`, optionString(val)))
- }
- // Aspect — Get the configured option value.
- //
- // Known uses:
- // - [Message] (widget specific)
- func (w *Window) Aspect() string {
- return evalErr(fmt.Sprintf(`%s cget -aspect`, w))
- }
- // Autoseparators option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Autoseparators(val any) Opt {
- return rawOption(fmt.Sprintf(`-autoseparators %s`, optionString(val)))
- }
- // Autoseparators — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Autoseparators() string {
- return evalErr(fmt.Sprintf(`%s cget -autoseparators`, w))
- }
- // Background option.
- //
- // Specifies the normal background color to use when displaying the
- // widget.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame] (widget specific)
- // - [Label]
- // - [Labelframe] (widget specific)
- // - [Listbox]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [NewBitmap] (command specific)
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TLabel] (widget specific)
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text]
- // - [Toplevel] (widget specific)
- func Background(val any) Opt {
- return rawOption(fmt.Sprintf(`-background %s`, optionString(val)))
- }
- // Background — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame] (widget specific)
- // - [Label]
- // - [Labelframe] (widget specific)
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TLabel] (widget specific)
- // - [Text]
- // - [Toplevel] (widget specific)
- func (w *Window) Background() string {
- return evalErr(fmt.Sprintf(`%s cget -background`, w))
- }
- // Backgroundimage option.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Toplevel] (widget specific)
- func Backgroundimage(val any) Opt {
- return rawOption(fmt.Sprintf(`-backgroundimage %s`, optionString(val)))
- }
- // Backgroundimage — Get the configured option value.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Backgroundimage() string {
- return evalErr(fmt.Sprintf(`%s cget -backgroundimage`, w))
- }
- // Before option.
- //
- // Known uses:
- // - [Pack] (command specific)
- func Before(val any) Opt {
- return rawOption(fmt.Sprintf(`-before %s`, optionString(val)))
- }
- // Bgstipple option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Bgstipple(val any) Opt {
- return rawOption(fmt.Sprintf(`-bgstipple %s`, optionString(val)))
- }
- // Bigincrement option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func Bigincrement(val any) Opt {
- return rawOption(fmt.Sprintf(`-bigincrement %s`, optionString(val)))
- }
- // Bigincrement — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Bigincrement() string {
- return evalErr(fmt.Sprintf(`%s cget -bigincrement`, w))
- }
- // Bitmap option.
- //
- // Specifies a bitmap to display in the widget, in any of the forms
- // acceptable to Tk_GetBitmap.
- // The exact way in which the bitmap is displayed may be affected by
- // other options such as -anchor or -justify.
- // Typically, if this option is specified then it overrides other
- // options that specify a textual value to display in the widget
- // but this is controlled by the -compound option;
- // the -bitmap option may be reset to an empty string to re-enable
- // a text display.
- // In widgets that support both -bitmap and -image options,
- // -image will usually override -bitmap.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menubutton]
- // - [Radiobutton]
- func Bitmap(val any) Opt {
- return rawOption(fmt.Sprintf(`-bitmap %s`, optionString(val)))
- }
- // Bitmap — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Radiobutton]
- func (w *Window) Bitmap() string {
- return evalErr(fmt.Sprintf(`%s cget -bitmap`, w))
- }
- // Blockcursor option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Blockcursor(val any) Opt {
- return rawOption(fmt.Sprintf(`-blockcursor %s`, optionString(val)))
- }
- // Blockcursor — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Blockcursor() string {
- return evalErr(fmt.Sprintf(`%s cget -blockcursor`, w))
- }
- // Bordermode option.
- //
- // Known uses:
- // - [Place] (command specific)
- func Bordermode(val any) Opt {
- return rawOption(fmt.Sprintf(`-bordermode %s`, optionString(val)))
- }
- // Borderwidth option.
- //
- // Specifies a non-negative value indicating the width
- // of the 3-D border to draw around the outside of the widget (if such a
- // border is being drawn; the -relief option typically determines
- // this). The value may also be used when drawing 3-D effects in the
- // interior of the widget.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TFrame] (widget specific)
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text]
- // - [Toplevel]
- func Borderwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-borderwidth %s`, optionString(val)))
- }
- // Borderwidth — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TFrame] (widget specific)
- // - [Text]
- // - [Toplevel]
- func (w *Window) Borderwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -borderwidth`, w))
- }
- // Buttonbackground option.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func Buttonbackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-buttonbackground %s`, optionString(val)))
- }
- // Buttonbackground — Get the configured option value.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func (w *Window) Buttonbackground() string {
- return evalErr(fmt.Sprintf(`%s cget -buttonbackground`, w))
- }
- // Buttoncursor option.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func Buttoncursor(val any) Opt {
- return rawOption(fmt.Sprintf(`-buttoncursor %s`, optionString(val)))
- }
- // Buttoncursor — Get the configured option value.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func (w *Window) Buttoncursor() string {
- return evalErr(fmt.Sprintf(`%s cget -buttoncursor`, w))
- }
- // Buttondownrelief option.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func Buttondownrelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-buttondownrelief %s`, optionString(val)))
- }
- // Buttondownrelief — Get the configured option value.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func (w *Window) Buttondownrelief() string {
- return evalErr(fmt.Sprintf(`%s cget -buttondownrelief`, w))
- }
- // Buttonuprelief option.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func Buttonuprelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-buttonuprelief %s`, optionString(val)))
- }
- // Buttonuprelief — Get the configured option value.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- func (w *Window) Buttonuprelief() string {
- return evalErr(fmt.Sprintf(`%s cget -buttonuprelief`, w))
- }
- // Class option.
- //
- // Specifies the window class.
- // The class is used when querying the option database
- // for the window's other options, to determine the default
- // bindtags for the window, and to select the widget's default
- // layout and style.
- // This is a read-only option:
- // it may only be specified when the window is created,
- // and may not be changed with the configure widget command.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Labelframe] (widget specific)
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- // - [Toplevel] (widget specific)
- func Class(val any) Opt {
- return rawOption(fmt.Sprintf(`-class %s`, optionString(val)))
- }
- // Class — Get the configured option value.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Labelframe] (widget specific)
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- // - [Toplevel] (widget specific)
- func (w *Window) Class() string {
- return evalErr(fmt.Sprintf(`%s cget -class`, w))
- }
- // Closeenough option.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func Closeenough(val any) Opt {
- return rawOption(fmt.Sprintf(`-closeenough %s`, optionString(val)))
- }
- // Closeenough — Get the configured option value.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func (w *Window) Closeenough() string {
- return evalErr(fmt.Sprintf(`%s cget -closeenough`, w))
- }
- // Colormap option.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Toplevel] (widget specific)
- func Colormap(val any) Opt {
- return rawOption(fmt.Sprintf(`-colormap %s`, optionString(val)))
- }
- // Colormap — Get the configured option value.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Colormap() string {
- return evalErr(fmt.Sprintf(`%s cget -colormap`, w))
- }
- // Column option.
- //
- // Known uses:
- // - [Grid] (command specific)
- func Column(val any) Opt {
- return rawOption(fmt.Sprintf(`-column %s`, optionString(val)))
- }
- // Columnbreak option.
- //
- // Known uses:
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- func Columnbreak(val any) Opt {
- return rawOption(fmt.Sprintf(`-columnbreak %s`, optionString(val)))
- }
- // Columns option.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func Columns(val any) Opt {
- return rawOption(fmt.Sprintf(`-columns %s`, optionString(val)))
- }
- // Columns — Get the configured option value.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func (w *Window) Columns() string {
- return evalErr(fmt.Sprintf(`%s cget -columns`, w))
- }
- // Columnspan option.
- //
- // Known uses:
- // - [Grid] (command specific)
- func Columnspan(val any) Opt {
- return rawOption(fmt.Sprintf(`-columnspan %s`, optionString(val)))
- }
- // Command option.
- //
- // See also [Event handlers].
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Fontchooser] (command specific)
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [MessageBox] (command specific)
- // - [Radiobutton] (widget specific)
- // - [Scale] (widget specific)
- // - [Scrollbar] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TButton] (widget specific)
- // - [TCheckbutton] (widget specific)
- // - [TRadiobutton] (widget specific)
- // - [TScale] (widget specific)
- // - [TScrollbar] (widget specific)
- // - [TSpinbox] (widget specific)
- //
- // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
- func Command(handler any) Opt {
- return newEventHandler("-command", handler)
- }
- // Compound option.
- //
- // Specifies if the widget should display text and bitmaps/images at the
- // same time, and if so, where the bitmap/image should be placed relative
- // to the text. Must be one of the values none, bottom,
- // top, left, right, or center. For example, the
- // (default) value none specifies that the bitmap or image should
- // (if defined) be displayed instead of the text, the value left
- // specifies that the bitmap or image should be displayed to the left of
- // the text, and the value center specifies that the bitmap or
- // image should be displayed on top of the text.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menubutton]
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TMenubutton]
- // - [TRadiobutton]
- func Compound(val any) Opt {
- return rawOption(fmt.Sprintf(`-compound %s`, optionString(val)))
- }
- // Compound — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TMenubutton]
- // - [TRadiobutton]
- func (w *Window) Compound() string {
- return evalErr(fmt.Sprintf(`%s cget -compound`, w))
- }
- // Confine option.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func Confine(val any) Opt {
- return rawOption(fmt.Sprintf(`-confine %s`, optionString(val)))
- }
- // Confine — Get the configured option value.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func (w *Window) Confine() string {
- return evalErr(fmt.Sprintf(`%s cget -confine`, w))
- }
- // Confirmoverwrite option.
- //
- // Known uses:
- // - [GetSaveFile] (command specific)
- func Confirmoverwrite(val any) Opt {
- return rawOption(fmt.Sprintf(`-confirmoverwrite %s`, optionString(val)))
- }
- // Container option.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Toplevel] (widget specific)
- func Container(val any) Opt {
- return rawOption(fmt.Sprintf(`-container %s`, optionString(val)))
- }
- // Container — Get the configured option value.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Container() string {
- return evalErr(fmt.Sprintf(`%s cget -container`, w))
- }
- // Cursor option.
- //
- // Specifies the mouse cursor to be used for the widget.
- // The value may have any of the forms acceptable to Tk_GetCursor.
- // In addition, if an empty string is specified, it indicates that the
- // widget should defer to its parent for cursor specification.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- // - [Text]
- // - [Toplevel]
- // - [Window.Busy] (command specific)
- func Cursor(val any) Opt {
- return rawOption(fmt.Sprintf(`-cursor %s`, optionString(val)))
- }
- // Cursor — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- // - [Text]
- // - [Toplevel]
- func (w *Window) Cursor() string {
- return evalErr(fmt.Sprintf(`%s cget -cursor`, w))
- }
- // Default option.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [MessageBox] (command specific)
- // - [TButton] (widget specific)
- func Default(val any) Opt {
- return rawOption(fmt.Sprintf(`-default %s`, optionString(val)))
- }
- // Default — Get the configured option value.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [TButton] (widget specific)
- func (w *Window) Default() string {
- return evalErr(fmt.Sprintf(`%s cget -default`, w))
- }
- // Defaultextension option.
- //
- // Known uses:
- // - [GetOpenFile] (command specific)
- // - [GetSaveFile] (command specific)
- func Defaultextension(val any) Opt {
- return rawOption(fmt.Sprintf(`-defaultextension %s`, optionString(val)))
- }
- // Detail option.
- //
- // Known uses:
- // - [MessageBox] (command specific)
- func Detail(val any) Opt {
- return rawOption(fmt.Sprintf(`-detail %s`, optionString(val)))
- }
- // Digits option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func Digits(val any) Opt {
- return rawOption(fmt.Sprintf(`-digits %s`, optionString(val)))
- }
- // Digits — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Digits() string {
- return evalErr(fmt.Sprintf(`%s cget -digits`, w))
- }
- // Direction option.
- //
- // Known uses:
- // - [Menubutton] (widget specific)
- // - [TMenubutton] (widget specific)
- func Direction(val any) Opt {
- return rawOption(fmt.Sprintf(`-direction %s`, optionString(val)))
- }
- // Direction — Get the configured option value.
- //
- // Known uses:
- // - [Menubutton] (widget specific)
- // - [TMenubutton] (widget specific)
- func (w *Window) Direction() string {
- return evalErr(fmt.Sprintf(`%s cget -direction`, w))
- }
- // Disabledbackground option.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- func Disabledbackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-disabledbackground %s`, optionString(val)))
- }
- // Disabledbackground — Get the configured option value.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- func (w *Window) Disabledbackground() string {
- return evalErr(fmt.Sprintf(`%s cget -disabledbackground`, w))
- }
- // Disabledforeground option.
- //
- // Specifies foreground color to use when drawing a disabled element.
- // If the option is specified as an empty string (which is typically the
- // case on monochrome displays), disabled elements are drawn with the
- // normal foreground color but they are dimmed by drawing them
- // with a stippled fill pattern.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Entry] (widget specific)
- // - [Label]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Radiobutton]
- // - [Spinbox] (widget specific)
- func Disabledforeground(val any) Opt {
- return rawOption(fmt.Sprintf(`-disabledforeground %s`, optionString(val)))
- }
- // Disabledforeground — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Entry] (widget specific)
- // - [Label]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Radiobutton]
- // - [Spinbox] (widget specific)
- func (w *Window) Disabledforeground() string {
- return evalErr(fmt.Sprintf(`%s cget -disabledforeground`, w))
- }
- // Displaycolumns option.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func Displaycolumns(val any) Opt {
- return rawOption(fmt.Sprintf(`-displaycolumns %s`, optionString(val)))
- }
- // Displaycolumns — Get the configured option value.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func (w *Window) Displaycolumns() string {
- return evalErr(fmt.Sprintf(`%s cget -displaycolumns`, w))
- }
- // Displayof option.
- //
- // Known uses:
- // - [Bell] (command specific)
- // - [ClipboardAppend] (command specific)
- // - [ClipboardClear] (command specific)
- // - [ClipboardGet] (command specific)
- // - [Focus] (command specific)
- // - [FontFamilies] (command specific)
- func Displayof(val any) Opt {
- return rawOption(fmt.Sprintf(`-displayof %s`, optionString(val)))
- }
- // Elementborderwidth option.
- //
- // Known uses:
- // - [Scrollbar] (widget specific)
- func Elementborderwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-elementborderwidth %s`, optionString(val)))
- }
- // Elementborderwidth — Get the configured option value.
- //
- // Known uses:
- // - [Scrollbar] (widget specific)
- func (w *Window) Elementborderwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -elementborderwidth`, w))
- }
- // Elide option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Elide(val any) Opt {
- return rawOption(fmt.Sprintf(`-elide %s`, optionString(val)))
- }
- // Endline option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Endline(val any) Opt {
- return rawOption(fmt.Sprintf(`-endline %s`, optionString(val)))
- }
- // Endline — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Endline() string {
- return evalErr(fmt.Sprintf(`%s cget -endline`, w))
- }
- // Expand option.
- //
- // Known uses:
- // - [Pack] (command specific)
- func Expand(val any) Opt {
- return rawOption(fmt.Sprintf(`-expand %s`, optionString(val)))
- }
- // Exportselection option.
- //
- // Specifies whether or not a selection in the widget should also be
- // the X selection.
- // The value may have any of the forms accepted by Tcl_GetBoolean,
- // such as true, false, 0, 1, yes, or no.
- // If the selection is exported, then selecting in the widget deselects
- // the current X selection, selecting outside the widget deselects any
- // widget selection, and the widget will respond to selection retrieval
- // requests when it has a selection. The default is usually for widgets
- // to export selections.
- //
- // Known uses:
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [Text]
- func Exportselection(val any) Opt {
- return rawOption(fmt.Sprintf(`-exportselection %s`, optionString(val)))
- }
- // Exportselection — Get the configured option value.
- //
- // Known uses:
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [Text]
- func (w *Window) Exportselection() string {
- return evalErr(fmt.Sprintf(`%s cget -exportselection`, w))
- }
- // Family option.
- //
- // Known uses:
- // - [NewFont] (command specific)
- func Family(val any) Opt {
- return rawOption(fmt.Sprintf(`-family %s`, optionString(val)))
- }
- // Fgstipple option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Fgstipple(val any) Opt {
- return rawOption(fmt.Sprintf(`-fgstipple %s`, optionString(val)))
- }
- // File option.
- //
- // Known uses:
- // - [NewBitmap] (command specific)
- // - [NewPhoto] (command specific)
- func File(val any) Opt {
- return rawOption(fmt.Sprintf(`-file %s`, optionString(val)))
- }
- // Filetypes option.
- //
- // Known uses:
- // - [GetOpenFile] (command specific)
- // - [GetSaveFile] (command specific)
- func Filetypes(val any) Opt {
- return rawOption(fmt.Sprintf(`-filetypes %s`, optionString(val)))
- }
- // Fill option.
- //
- // Known uses:
- // - [Pack] (command specific)
- func Fill(val any) Opt {
- return rawOption(fmt.Sprintf(`-fill %s`, optionString(val)))
- }
- // Force option.
- //
- // Known uses:
- // - [Focus] (command specific)
- func Force(val any) Opt {
- return rawOption(fmt.Sprintf(`-force %s`, optionString(val)))
- }
- // Foreground option.
- //
- // Specifies the normal foreground color to use when displaying the widget.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Entry]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [NewBitmap] (command specific)
- // - [Radiobutton]
- // - [Scale]
- // - [Spinbox]
- // - [TEntry]
- // - [TLabel]
- // - [TProgressbar]
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text]
- func Foreground(val any) Opt {
- return rawOption(fmt.Sprintf(`-foreground %s`, optionString(val)))
- }
- // Foreground — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Entry]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Spinbox]
- // - [TEntry]
- // - [TLabel]
- // - [TProgressbar]
- // - [Text]
- func (w *Window) Foreground() string {
- return evalErr(fmt.Sprintf(`%s cget -foreground`, w))
- }
- // Format option.
- //
- // Known uses:
- // - [ClipboardAppend] (command specific)
- // - [NewPhoto] (command specific)
- // - [Spinbox] (widget specific)
- // - [TSpinbox] (widget specific)
- func Format(val any) Opt {
- return rawOption(fmt.Sprintf(`-format %s`, optionString(val)))
- }
- // Format — Get the configured option value.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- // - [TSpinbox] (widget specific)
- func (w *Window) Format() string {
- return evalErr(fmt.Sprintf(`%s cget -format`, w))
- }
- // Gamma option.
- //
- // Known uses:
- // - [NewPhoto] (command specific)
- func Gamma(val any) Opt {
- return rawOption(fmt.Sprintf(`-gamma %s`, optionString(val)))
- }
- // Handlepad option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Handlepad(val any) Opt {
- return rawOption(fmt.Sprintf(`-handlepad %s`, optionString(val)))
- }
- // Handlepad — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Handlepad() string {
- return evalErr(fmt.Sprintf(`%s cget -handlepad`, w))
- }
- // Handlesize option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Handlesize(val any) Opt {
- return rawOption(fmt.Sprintf(`-handlesize %s`, optionString(val)))
- }
- // Handlesize — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Handlesize() string {
- return evalErr(fmt.Sprintf(`%s cget -handlesize`, w))
- }
- // Height option.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Canvas] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Frame] (widget specific)
- // - [Label] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Listbox] (widget specific)
- // - [Menubutton] (widget specific)
- // - [NewPhoto] (command specific)
- // - [Panedwindow] (widget specific)
- // - [Place] (command specific)
- // - [Radiobutton] (widget specific)
- // - [TCombobox] (widget specific)
- // - [TFrame] (widget specific)
- // - [TLabelframe] (widget specific)
- // - [TNotebook] (widget specific)
- // - [TPanedwindow] (widget specific)
- // - [TTreeview] (widget specific)
- // - [Text] (widget specific)
- // - [Toplevel] (widget specific)
- func Height(val any) Opt {
- return rawOption(fmt.Sprintf(`-height %s`, optionString(val)))
- }
- // Height — Get the configured option value.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Canvas] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Frame] (widget specific)
- // - [Label] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Listbox] (widget specific)
- // - [Menubutton] (widget specific)
- // - [Panedwindow] (widget specific)
- // - [Radiobutton] (widget specific)
- // - [TCombobox] (widget specific)
- // - [TFrame] (widget specific)
- // - [TLabelframe] (widget specific)
- // - [TNotebook] (widget specific)
- // - [TPanedwindow] (widget specific)
- // - [TTreeview] (widget specific)
- // - [Text] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Height() string {
- return evalErr(fmt.Sprintf(`%s cget -height`, w))
- }
- // Hidemargin option.
- //
- // Known uses:
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- func Hidemargin(val any) Opt {
- return rawOption(fmt.Sprintf(`-hidemargin %s`, optionString(val)))
- }
- // Highlightbackground option.
- //
- // Specifies the color to display in the traversal highlight region when
- // the widget does not have the input focus.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [Text]
- // - [Toplevel]
- func Highlightbackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-highlightbackground %s`, optionString(val)))
- }
- // Highlightbackground — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [Text]
- // - [Toplevel]
- func (w *Window) Highlightbackground() string {
- return evalErr(fmt.Sprintf(`%s cget -highlightbackground`, w))
- }
- // Highlightcolor option.
- //
- // Specifies the color to use for the traversal highlight rectangle that is
- // drawn around the widget when it has the input focus.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [Text]
- // - [Toplevel]
- func Highlightcolor(val any) Opt {
- return rawOption(fmt.Sprintf(`-highlightcolor %s`, optionString(val)))
- }
- // Highlightcolor — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [Text]
- // - [Toplevel]
- func (w *Window) Highlightcolor() string {
- return evalErr(fmt.Sprintf(`%s cget -highlightcolor`, w))
- }
- // Highlightthickness option.
- //
- // Specifies a non-negative value indicating the width of the highlight
- // rectangle to draw around the outside of the widget when it has the
- // input focus.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- // If the value is zero, no focus highlight is drawn around the widget.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [Text]
- // - [Toplevel]
- func Highlightthickness(val any) Opt {
- return rawOption(fmt.Sprintf(`-highlightthickness %s`, optionString(val)))
- }
- // Highlightthickness — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [Text]
- // - [Toplevel]
- func (w *Window) Highlightthickness() string {
- return evalErr(fmt.Sprintf(`%s cget -highlightthickness`, w))
- }
- // Icon option.
- //
- // Known uses:
- // - [MessageBox] (command specific)
- func Icon(val any) Opt {
- return rawOption(fmt.Sprintf(`-icon %s`, optionString(val)))
- }
- // Image option.
- //
- // Specifies an image to display in the widget, which must have been
- // created with the image create command.
- // Typically, if the -image option is specified then it overrides other
- // options that specify a bitmap or textual value to display in the
- // widget, though this is controlled by the -compound option;
- // the -image option may be reset to an empty string to re-enable
- // a bitmap or text display.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menubutton]
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TMenubutton]
- // - [TRadiobutton]
- func Image(val any) Opt {
- return rawOption(fmt.Sprintf(`-image %s`, optionString(val)))
- }
- // Image — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TMenubutton]
- // - [TRadiobutton]
- func (w *Window) Image() string {
- return evalErr(fmt.Sprintf(`%s cget -image`, w))
- }
- // In option.
- //
- // Known uses:
- // - [Grid] (command specific)
- // - [Pack] (command specific)
- // - [Place] (command specific)
- func In(val any) Opt {
- return rawOption(fmt.Sprintf(`-in %s`, optionString(val)))
- }
- // Inactiveselectbackground option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Inactiveselectbackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-inactiveselectbackground %s`, optionString(val)))
- }
- // Inactiveselectbackground — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Inactiveselectbackground() string {
- return evalErr(fmt.Sprintf(`%s cget -inactiveselectbackground`, w))
- }
- // Increment option.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- // - [TSpinbox] (widget specific)
- func Increment(val any) Opt {
- return rawOption(fmt.Sprintf(`-increment %s`, optionString(val)))
- }
- // Increment — Get the configured option value.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- // - [TSpinbox] (widget specific)
- func (w *Window) Increment() string {
- return evalErr(fmt.Sprintf(`%s cget -increment`, w))
- }
- // Indicatoron option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menubutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func Indicatoron(val any) Opt {
- return rawOption(fmt.Sprintf(`-indicatoron %s`, optionString(val)))
- }
- // Indicatoron — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Menubutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func (w *Window) Indicatoron() string {
- return evalErr(fmt.Sprintf(`%s cget -indicatoron`, w))
- }
- // Initialcolor option.
- //
- // Known uses:
- // - [ChooseColor] (command specific)
- func Initialcolor(val any) Opt {
- return rawOption(fmt.Sprintf(`-initialcolor %s`, optionString(val)))
- }
- // Initialdir option.
- //
- // Known uses:
- // - [ChooseDirectory] (command specific)
- // - [GetOpenFile] (command specific)
- // - [GetSaveFile] (command specific)
- func Initialdir(val any) Opt {
- return rawOption(fmt.Sprintf(`-initialdir %s`, optionString(val)))
- }
- // Initialfile option.
- //
- // Known uses:
- // - [GetOpenFile] (command specific)
- // - [GetSaveFile] (command specific)
- func Initialfile(val any) Opt {
- return rawOption(fmt.Sprintf(`-initialfile %s`, optionString(val)))
- }
- // Insertbackground option.
- //
- // Specifies the color to use as background in the area covered by the
- // insertion cursor. This color will normally override either the normal
- // background for the widget (or the selection background if the insertion
- // cursor happens to fall in the selection).
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func Insertbackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-insertbackground %s`, optionString(val)))
- }
- // Insertbackground — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Insertbackground() string {
- return evalErr(fmt.Sprintf(`%s cget -insertbackground`, w))
- }
- // Insertborderwidth option.
- //
- // Specifies a non-negative value indicating the width
- // of the 3-D border to draw around the insertion cursor.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func Insertborderwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-insertborderwidth %s`, optionString(val)))
- }
- // Insertborderwidth — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Insertborderwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -insertborderwidth`, w))
- }
- // Insertofftime option.
- //
- // Specifies a non-negative integer value indicating the number of
- // milliseconds the insertion cursor should remain
- // in each blink cycle.
- // If this option is zero then the cursor does not blink: it is on
- // all the time.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func Insertofftime(val any) Opt {
- return rawOption(fmt.Sprintf(`-insertofftime %s`, optionString(val)))
- }
- // Insertofftime — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Insertofftime() string {
- return evalErr(fmt.Sprintf(`%s cget -insertofftime`, w))
- }
- // Insertontime option.
- //
- // Specifies a non-negative integer value indicating the number of
- // milliseconds the insertion cursor should remain
- // in each blink cycle.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func Insertontime(val any) Opt {
- return rawOption(fmt.Sprintf(`-insertontime %s`, optionString(val)))
- }
- // Insertontime — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Insertontime() string {
- return evalErr(fmt.Sprintf(`%s cget -insertontime`, w))
- }
- // Insertunfocussed option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Insertunfocussed(val any) Opt {
- return rawOption(fmt.Sprintf(`-insertunfocussed %s`, optionString(val)))
- }
- // Insertunfocussed — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Insertunfocussed() string {
- return evalErr(fmt.Sprintf(`%s cget -insertunfocussed`, w))
- }
- // Insertwidth option.
- //
- // Specifies a non-negative value indicating the total width of the insertion cursor.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- // If a border has been specified for the insertion
- // cursor (using the -insertborderwidth option), the border
- // will be drawn inside the width specified by the -insertwidth
- // option.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func Insertwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-insertwidth %s`, optionString(val)))
- }
- // Insertwidth — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Insertwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -insertwidth`, w))
- }
- // Invalidcommand option.
- //
- // See also [Event handlers].
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TEntry] (widget specific)
- //
- // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
- func Invalidcommand(handler any) Opt {
- return newEventHandler("-invalidcommand", handler)
- }
- // Ipadx option.
- //
- // Known uses:
- // - [Grid] (command specific)
- // - [Pack] (command specific)
- func Ipadx(val any) Opt {
- return rawOption(fmt.Sprintf(`-ipadx %s`, optionString(val)))
- }
- // Ipady option.
- //
- // Known uses:
- // - [Grid] (command specific)
- // - [Pack] (command specific)
- func Ipady(val any) Opt {
- return rawOption(fmt.Sprintf(`-ipady %s`, optionString(val)))
- }
- // Jump option.
- //
- // For widgets with a slider that can be dragged to adjust a value,
- // such as scrollbars, this option determines when
- // notifications are made about changes in the value.
- // The option's value must be a boolean of the form accepted by
- // Tcl_GetBoolean.
- // If the value is false, updates are made continuously as the
- // slider is dragged.
- // If the value is true, updates are delayed until the mouse button
- // is released to end the drag; at that point a single notification
- // is made (the value
- // rather than changing smoothly).
- //
- // Known uses:
- // - [Scrollbar]
- func Jump(val any) Opt {
- return rawOption(fmt.Sprintf(`-jump %s`, optionString(val)))
- }
- // Jump — Get the configured option value.
- //
- // Known uses:
- // - [Scrollbar]
- func (w *Window) Jump() string {
- return evalErr(fmt.Sprintf(`%s cget -jump`, w))
- }
- // Justify option.
- //
- // When there are multiple lines of text displayed in a widget, this
- // option determines how the lines line up with each other.
- // Must be one of left, center, or right.
- // Left means that the lines' left edges all line up, center
- // means that the lines' centers are aligned, and right means
- // that the lines' right edges line up.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Entry]
- // - [Label]
- // - [Listbox]
- // - [Menubutton]
- // - [Message] (widget specific)
- // - [Radiobutton]
- // - [Spinbox]
- // - [TButton]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TLabel]
- // - [TProgressbar]
- // - [TextWidget.TagConfigure] (command specific)
- func Justify(val any) Opt {
- return rawOption(fmt.Sprintf(`-justify %s`, optionString(val)))
- }
- // Justify — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Entry]
- // - [Label]
- // - [Listbox]
- // - [Menubutton]
- // - [Message] (widget specific)
- // - [Radiobutton]
- // - [Spinbox]
- // - [TButton]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TLabel]
- // - [TProgressbar]
- func (w *Window) Justify() string {
- return evalErr(fmt.Sprintf(`%s cget -justify`, w))
- }
- // Lbl option.
- //
- // Known uses:
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Scale] (widget specific)
- func Lbl(val any) Opt {
- return rawOption(fmt.Sprintf(`-label %s`, optionString(val)))
- }
- // Lbl — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Lbl() string {
- return evalErr(fmt.Sprintf(`%s cget -label`, w))
- }
- // Labelanchor option.
- //
- // Known uses:
- // - [Labelframe] (widget specific)
- // - [TLabelframe] (widget specific)
- func Labelanchor(val any) Opt {
- return rawOption(fmt.Sprintf(`-labelanchor %s`, optionString(val)))
- }
- // Labelanchor — Get the configured option value.
- //
- // Known uses:
- // - [Labelframe] (widget specific)
- // - [TLabelframe] (widget specific)
- func (w *Window) Labelanchor() string {
- return evalErr(fmt.Sprintf(`%s cget -labelanchor`, w))
- }
- // Labelwidget option.
- //
- // Known uses:
- // - [Labelframe] (widget specific)
- // - [TLabelframe] (widget specific)
- func Labelwidget(val any) Opt {
- return rawOption(fmt.Sprintf(`-labelwidget %s`, optionString(val)))
- }
- // Labelwidget — Get the configured option value.
- //
- // Known uses:
- // - [Labelframe] (widget specific)
- // - [TLabelframe] (widget specific)
- func (w *Window) Labelwidget() string {
- return evalErr(fmt.Sprintf(`%s cget -labelwidget`, w))
- }
- // Lastfor option.
- //
- // Known uses:
- // - [Focus] (command specific)
- func Lastfor(val any) Opt {
- return rawOption(fmt.Sprintf(`-lastfor %s`, optionString(val)))
- }
- // Length option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- // - [TProgressbar] (widget specific)
- // - [TScale] (widget specific)
- func Length(val any) Opt {
- return rawOption(fmt.Sprintf(`-length %s`, optionString(val)))
- }
- // Length — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- // - [TProgressbar] (widget specific)
- // - [TScale] (widget specific)
- func (w *Window) Length() string {
- return evalErr(fmt.Sprintf(`%s cget -length`, w))
- }
- // Listvariable option.
- //
- // Known uses:
- // - [Listbox] (widget specific)
- func Listvariable(val any) Opt {
- return rawOption(fmt.Sprintf(`-listvariable %s`, optionString(val)))
- }
- // Listvariable — Get the configured option value.
- //
- // Known uses:
- // - [Listbox] (widget specific)
- func (w *Window) Listvariable() string {
- return evalErr(fmt.Sprintf(`%s cget -listvariable`, w))
- }
- // Lmargin1 option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Lmargin1(val any) Opt {
- return rawOption(fmt.Sprintf(`-lmargin1 %s`, optionString(val)))
- }
- // Lmargin2 option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Lmargin2(val any) Opt {
- return rawOption(fmt.Sprintf(`-lmargin2 %s`, optionString(val)))
- }
- // Lmargincolor option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Lmargincolor(val any) Opt {
- return rawOption(fmt.Sprintf(`-lmargincolor %s`, optionString(val)))
- }
- // Maskdata option.
- //
- // Known uses:
- // - [NewBitmap] (command specific)
- func Maskdata(val any) Opt {
- return rawOption(fmt.Sprintf(`-maskdata %s`, optionString(val)))
- }
- // Maskfile option.
- //
- // Known uses:
- // - [NewBitmap] (command specific)
- func Maskfile(val any) Opt {
- return rawOption(fmt.Sprintf(`-maskfile %s`, optionString(val)))
- }
- // Maximum option.
- //
- // Known uses:
- // - [TProgressbar] (widget specific)
- func Maximum(val any) Opt {
- return rawOption(fmt.Sprintf(`-maximum %s`, optionString(val)))
- }
- // Maximum — Get the configured option value.
- //
- // Known uses:
- // - [TProgressbar] (widget specific)
- func (w *Window) Maximum() string {
- return evalErr(fmt.Sprintf(`%s cget -maximum`, w))
- }
- // Maxundo option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Maxundo(val any) Opt {
- return rawOption(fmt.Sprintf(`-maxundo %s`, optionString(val)))
- }
- // Maxundo — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Maxundo() string {
- return evalErr(fmt.Sprintf(`%s cget -maxundo`, w))
- }
- // Mnu option.
- //
- // Known uses:
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menubutton] (widget specific)
- // - [TMenubutton] (widget specific)
- // - [Toplevel] (widget specific)
- func Mnu(val any) Opt {
- return rawOption(fmt.Sprintf(`-menu %s`, optionString(val)))
- }
- // Mnu — Get the configured option value.
- //
- // Known uses:
- // - [Menubutton] (widget specific)
- // - [TMenubutton] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Mnu() string {
- return evalErr(fmt.Sprintf(`%s cget -menu`, w))
- }
- // Msg option.
- //
- // Known uses:
- // - [ChooseDirectory] (command specific)
- // - [MessageBox] (command specific)
- func Msg(val any) Opt {
- return rawOption(fmt.Sprintf(`-message %s`, optionString(val)))
- }
- // Metadata option.
- //
- // Known uses:
- // - [NewPhoto] (command specific)
- func Metadata(val any) Opt {
- return rawOption(fmt.Sprintf(`-metadata %s`, optionString(val)))
- }
- // Mode option.
- //
- // Known uses:
- // - [TProgressbar] (widget specific)
- func Mode(val any) Opt {
- return rawOption(fmt.Sprintf(`-mode %s`, optionString(val)))
- }
- // Mode — Get the configured option value.
- //
- // Known uses:
- // - [TProgressbar] (widget specific)
- func (w *Window) Mode() string {
- return evalErr(fmt.Sprintf(`%s cget -mode`, w))
- }
- // Multiple option.
- //
- // Known uses:
- // - [GetOpenFile] (command specific)
- func Multiple(val any) Opt {
- return rawOption(fmt.Sprintf(`-multiple %s`, optionString(val)))
- }
- // Mustexist option.
- //
- // Known uses:
- // - [ChooseDirectory] (command specific)
- func Mustexist(val any) Opt {
- return rawOption(fmt.Sprintf(`-mustexist %s`, optionString(val)))
- }
- // Nice option.
- //
- // Known uses:
- // - [Bell] (command specific)
- func Nice(val any) Opt {
- return rawOption(fmt.Sprintf(`-nice %s`, optionString(val)))
- }
- // Offrelief option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func Offrelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-offrelief %s`, optionString(val)))
- }
- // Offrelief — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func (w *Window) Offrelief() string {
- return evalErr(fmt.Sprintf(`%s cget -offrelief`, w))
- }
- // Offset option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Offset(val any) Opt {
- return rawOption(fmt.Sprintf(`-offset %s`, optionString(val)))
- }
- // Offvalue option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [TCheckbutton] (widget specific)
- func Offvalue(val any) Opt {
- return rawOption(fmt.Sprintf(`-offvalue %s`, optionString(val)))
- }
- // Offvalue — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [TCheckbutton] (widget specific)
- func (w *Window) Offvalue() string {
- return evalErr(fmt.Sprintf(`%s cget -offvalue`, w))
- }
- // Onvalue option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [TCheckbutton] (widget specific)
- func Onvalue(val any) Opt {
- return rawOption(fmt.Sprintf(`-onvalue %s`, optionString(val)))
- }
- // Onvalue — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [TCheckbutton] (widget specific)
- func (w *Window) Onvalue() string {
- return evalErr(fmt.Sprintf(`%s cget -onvalue`, w))
- }
- // Opaqueresize option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Opaqueresize(val any) Opt {
- return rawOption(fmt.Sprintf(`-opaqueresize %s`, optionString(val)))
- }
- // Opaqueresize — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Opaqueresize() string {
- return evalErr(fmt.Sprintf(`%s cget -opaqueresize`, w))
- }
- // Orient option.
- //
- // For widgets that can lay themselves out with either a horizontal
- // or vertical orientation, such as scrollbars, this option specifies
- // which orientation should be used. Must be either horizontal
- // or vertical or an abbreviation of one of these.
- //
- // Known uses:
- // - [Panedwindow]
- // - [Scale]
- // - [Scrollbar]
- // - [TPanedwindow] (widget specific)
- // - [TProgressbar] (widget specific)
- // - [TScale] (widget specific)
- // - [TScrollbar] (widget specific)
- // - [TSeparator] (widget specific)
- func Orient(val any) Opt {
- return rawOption(fmt.Sprintf(`-orient %s`, optionString(val)))
- }
- // Orient — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow]
- // - [Scale]
- // - [Scrollbar]
- // - [TPanedwindow] (widget specific)
- // - [TProgressbar] (widget specific)
- // - [TScale] (widget specific)
- // - [TScrollbar] (widget specific)
- // - [TSeparator] (widget specific)
- func (w *Window) Orient() string {
- return evalErr(fmt.Sprintf(`%s cget -orient`, w))
- }
- // Overrelief option.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func Overrelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-overrelief %s`, optionString(val)))
- }
- // Overrelief — Get the configured option value.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func (w *Window) Overrelief() string {
- return evalErr(fmt.Sprintf(`%s cget -overrelief`, w))
- }
- // Overstrike option.
- //
- // Known uses:
- // - [NewFont] (command specific)
- // - [TextWidget.TagConfigure] (command specific)
- func Overstrike(val any) Opt {
- return rawOption(fmt.Sprintf(`-overstrike %s`, optionString(val)))
- }
- // Overstrikefg option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Overstrikefg(val any) Opt {
- return rawOption(fmt.Sprintf(`-overstrikefg %s`, optionString(val)))
- }
- // Padding option.
- //
- // Specifies the internal padding for the widget.
- // The padding is a list of up to four length specifications
- // left top right bottom.
- // If fewer than four elements are specified,
- // bottom defaults to top,
- // right defaults to left, and
- // top defaults to left.
- // In other words, a list of three numbers specify the left, vertical, and right
- // padding; a list of two numbers specify the horizontal and the vertical padding;
- // a single number specifies the same padding all the way around the widget.
- //
- // Known uses:
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TNotebook] (widget specific)
- // - [TTreeview]
- func Padding(val any) Opt {
- return rawOption(fmt.Sprintf(`-padding %s`, optionString(val)))
- }
- // Padding — Get the configured option value.
- //
- // Known uses:
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TNotebook] (widget specific)
- // - [TTreeview]
- func (w *Window) Padding() string {
- return evalErr(fmt.Sprintf(`%s cget -padding`, w))
- }
- // Padx option.
- //
- // Specifies a non-negative value indicating how much extra space
- // to request for the widget in the X-direction.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- // When computing how large a window it needs, the widget will
- // add this amount to the width it would normally need (as determined
- // by the width of the things displayed in the widget); if the geometry
- // manager can satisfy this request, the widget will end up with extra
- // internal space to the left and/or right of what it displays inside.
- // Most widgets only use this option for padding text: if they are
- // displaying a bitmap or image, then they usually ignore padding
- // options.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Frame]
- // - [Grid] (command specific)
- // - [Label]
- // - [Labelframe]
- // - [Menubutton]
- // - [Message]
- // - [Pack] (command specific)
- // - [Radiobutton]
- // - [Text]
- // - [Toplevel]
- func Padx(val any) Opt {
- return rawOption(fmt.Sprintf(`-padx %s`, optionString(val)))
- }
- // Padx — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Text]
- // - [Toplevel]
- func (w *Window) Padx() string {
- return evalErr(fmt.Sprintf(`%s cget -padx`, w))
- }
- // Pady option.
- //
- // Specifies a non-negative value indicating how much extra space
- // to request for the widget in the Y-direction.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- // When computing how large a window it needs, the widget will add
- // this amount to the height it would normally need (as determined by
- // the height of the things displayed in the widget); if the geometry
- // manager can satisfy this request, the widget will end up with extra
- // internal space above and/or below what it displays inside.
- // Most widgets only use this option for padding text: if they are
- // displaying a bitmap or image, then they usually ignore padding
- // options.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Frame]
- // - [Grid] (command specific)
- // - [Label]
- // - [Labelframe]
- // - [Menubutton]
- // - [Message]
- // - [Pack] (command specific)
- // - [Radiobutton]
- // - [Text]
- // - [Toplevel]
- func Pady(val any) Opt {
- return rawOption(fmt.Sprintf(`-pady %s`, optionString(val)))
- }
- // Pady — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Text]
- // - [Toplevel]
- func (w *Window) Pady() string {
- return evalErr(fmt.Sprintf(`%s cget -pady`, w))
- }
- // Palette option.
- //
- // Known uses:
- // - [NewPhoto] (command specific)
- func Palette(val any) Opt {
- return rawOption(fmt.Sprintf(`-palette %s`, optionString(val)))
- }
- // Parent option.
- //
- // Known uses:
- // - [ChooseColor] (command specific)
- // - [ChooseDirectory] (command specific)
- // - [Fontchooser] (command specific)
- // - [GetOpenFile] (command specific)
- // - [GetSaveFile] (command specific)
- // - [MessageBox] (command specific)
- func Parent(val any) Opt {
- return rawOption(fmt.Sprintf(`-parent %s`, optionString(val)))
- }
- // Phase option.
- //
- // Known uses:
- // - [TProgressbar] (widget specific)
- func Phase(val any) Opt {
- return rawOption(fmt.Sprintf(`-phase %s`, optionString(val)))
- }
- // Phase — Get the configured option value.
- //
- // Known uses:
- // - [TProgressbar] (widget specific)
- func (w *Window) Phase() string {
- return evalErr(fmt.Sprintf(`%s cget -phase`, w))
- }
- // Placeholder option.
- //
- // Specifies a help text string to display if no text is otherwise displayed,
- // that is when the widget is empty. The placeholder text is displayed using
- // the values of the -font and -justify options.
- //
- // Known uses:
- // - [Entry]
- // - [Spinbox]
- // - [TCombobox]
- // - [TEntry]
- // - [TSpinbox]
- func Placeholder(val any) Opt {
- return rawOption(fmt.Sprintf(`-placeholder %s`, optionString(val)))
- }
- // Placeholder — Get the configured option value.
- //
- // Known uses:
- // - [Entry]
- // - [Spinbox]
- // - [TCombobox]
- // - [TEntry]
- // - [TSpinbox]
- func (w *Window) Placeholder() string {
- return evalErr(fmt.Sprintf(`%s cget -placeholder`, w))
- }
- // Placeholderforeground option.
- //
- // Specifies the foreground color to use when the placeholder text is
- // displayed. The default color is platform-specific.
- //
- // Known uses:
- // - [Entry]
- // - [Spinbox]
- // - [TCombobox]
- // - [TEntry]
- // - [TSpinbox]
- func Placeholderforeground(val any) Opt {
- return rawOption(fmt.Sprintf(`-placeholderforeground %s`, optionString(val)))
- }
- // Placeholderforeground — Get the configured option value.
- //
- // Known uses:
- // - [Entry]
- // - [Spinbox]
- // - [TCombobox]
- // - [TEntry]
- // - [TSpinbox]
- func (w *Window) Placeholderforeground() string {
- return evalErr(fmt.Sprintf(`%s cget -placeholderforeground`, w))
- }
- // Postcommand option.
- //
- // See also [Event handlers].
- //
- // Known uses:
- // - [Menu] (widget specific)
- // - [TCombobox] (widget specific)
- //
- // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
- func Postcommand(handler any) Opt {
- return newEventHandler("-postcommand", handler)
- }
- // Proxybackground option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Proxybackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-proxybackground %s`, optionString(val)))
- }
- // Proxybackground — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Proxybackground() string {
- return evalErr(fmt.Sprintf(`%s cget -proxybackground`, w))
- }
- // Proxyborderwidth option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Proxyborderwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-proxyborderwidth %s`, optionString(val)))
- }
- // Proxyborderwidth — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Proxyborderwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -proxyborderwidth`, w))
- }
- // Proxyrelief option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Proxyrelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-proxyrelief %s`, optionString(val)))
- }
- // Proxyrelief — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Proxyrelief() string {
- return evalErr(fmt.Sprintf(`%s cget -proxyrelief`, w))
- }
- // Readonlybackground option.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- func Readonlybackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-readonlybackground %s`, optionString(val)))
- }
- // Readonlybackground — Get the configured option value.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- func (w *Window) Readonlybackground() string {
- return evalErr(fmt.Sprintf(`%s cget -readonlybackground`, w))
- }
- // Relheight option.
- //
- // Known uses:
- // - [Place] (command specific)
- func Relheight(val any) Opt {
- return rawOption(fmt.Sprintf(`-relheight %s`, optionString(val)))
- }
- // Relief option.
- //
- // Specifies the 3-D effect desired for the widget. Acceptable
- // values are raised, sunken, flat, ridge,
- // solid, and groove.
- // The value
- // indicates how the interior of the widget should appear relative
- // to its exterior; for example, raised means the interior of
- // the widget should appear to protrude from the screen, relative to
- // the exterior of the widget.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TFrame] (widget specific)
- // - [TLabel] (widget specific)
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text]
- // - [Toplevel]
- func Relief(val any) Opt {
- return rawOption(fmt.Sprintf(`-relief %s`, optionString(val)))
- }
- // Relief — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Panedwindow]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TFrame] (widget specific)
- // - [TLabel] (widget specific)
- // - [Text]
- // - [Toplevel]
- func (w *Window) Relief() string {
- return evalErr(fmt.Sprintf(`%s cget -relief`, w))
- }
- // Relwidth option.
- //
- // Known uses:
- // - [Place] (command specific)
- func Relwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-relwidth %s`, optionString(val)))
- }
- // Relx option.
- //
- // Known uses:
- // - [Place] (command specific)
- func Relx(val any) Opt {
- return rawOption(fmt.Sprintf(`-relx %s`, optionString(val)))
- }
- // Rely option.
- //
- // Known uses:
- // - [Place] (command specific)
- func Rely(val any) Opt {
- return rawOption(fmt.Sprintf(`-rely %s`, optionString(val)))
- }
- // Repeatdelay option.
- //
- // Specifies the number of milliseconds a button or key must be held
- // down before it begins to auto-repeat. Used, for example, on the
- // up- and down-arrows in scrollbars.
- //
- // Known uses:
- // - [Button]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- func Repeatdelay(val any) Opt {
- return rawOption(fmt.Sprintf(`-repeatdelay %s`, optionString(val)))
- }
- // Repeatdelay — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- func (w *Window) Repeatdelay() string {
- return evalErr(fmt.Sprintf(`%s cget -repeatdelay`, w))
- }
- // Repeatinterval option.
- //
- // Used in conjunction with -repeatdelay: once auto-repeat
- // begins, this option determines the number of milliseconds between
- // auto-repeats.
- //
- // Known uses:
- // - [Button]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- func Repeatinterval(val any) Opt {
- return rawOption(fmt.Sprintf(`-repeatinterval %s`, optionString(val)))
- }
- // Repeatinterval — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- func (w *Window) Repeatinterval() string {
- return evalErr(fmt.Sprintf(`%s cget -repeatinterval`, w))
- }
- // Resolution option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func Resolution(val any) Opt {
- return rawOption(fmt.Sprintf(`-resolution %s`, optionString(val)))
- }
- // Resolution — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Resolution() string {
- return evalErr(fmt.Sprintf(`%s cget -resolution`, w))
- }
- // Rmargin option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Rmargin(val any) Opt {
- return rawOption(fmt.Sprintf(`-rmargin %s`, optionString(val)))
- }
- // Rmargincolor option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Rmargincolor(val any) Opt {
- return rawOption(fmt.Sprintf(`-rmargincolor %s`, optionString(val)))
- }
- // Row option.
- //
- // Known uses:
- // - [Grid] (command specific)
- func Row(val any) Opt {
- return rawOption(fmt.Sprintf(`-row %s`, optionString(val)))
- }
- // Rowspan option.
- //
- // Known uses:
- // - [Grid] (command specific)
- func Rowspan(val any) Opt {
- return rawOption(fmt.Sprintf(`-rowspan %s`, optionString(val)))
- }
- // Sashcursor option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Sashcursor(val any) Opt {
- return rawOption(fmt.Sprintf(`-sashcursor %s`, optionString(val)))
- }
- // Sashcursor — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Sashcursor() string {
- return evalErr(fmt.Sprintf(`%s cget -sashcursor`, w))
- }
- // Sashpad option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Sashpad(val any) Opt {
- return rawOption(fmt.Sprintf(`-sashpad %s`, optionString(val)))
- }
- // Sashpad — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Sashpad() string {
- return evalErr(fmt.Sprintf(`%s cget -sashpad`, w))
- }
- // Sashrelief option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Sashrelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-sashrelief %s`, optionString(val)))
- }
- // Sashrelief — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Sashrelief() string {
- return evalErr(fmt.Sprintf(`%s cget -sashrelief`, w))
- }
- // Sashwidth option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Sashwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-sashwidth %s`, optionString(val)))
- }
- // Sashwidth — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Sashwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -sashwidth`, w))
- }
- // Screen option.
- //
- // Known uses:
- // - [Toplevel] (widget specific)
- func Screen(val any) Opt {
- return rawOption(fmt.Sprintf(`-screen %s`, optionString(val)))
- }
- // Screen — Get the configured option value.
- //
- // Known uses:
- // - [Toplevel] (widget specific)
- func (w *Window) Screen() string {
- return evalErr(fmt.Sprintf(`%s cget -screen`, w))
- }
- // Scrollregion option.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func Scrollregion(val any) Opt {
- return rawOption(fmt.Sprintf(`-scrollregion %s`, optionString(val)))
- }
- // Scrollregion — Get the configured option value.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func (w *Window) Scrollregion() string {
- return evalErr(fmt.Sprintf(`%s cget -scrollregion`, w))
- }
- // Selectbackground option.
- //
- // Specifies the background color to use when displaying selected
- // items.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text]
- func Selectbackground(val any) Opt {
- return rawOption(fmt.Sprintf(`-selectbackground %s`, optionString(val)))
- }
- // Selectbackground — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Selectbackground() string {
- return evalErr(fmt.Sprintf(`%s cget -selectbackground`, w))
- }
- // Selectborderwidth option.
- //
- // Specifies a non-negative value indicating the width
- // of the 3-D border to draw around selected items.
- // The value may have any of the forms acceptable to Tk_GetPixels.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [Text]
- func Selectborderwidth(val any) Opt {
- return rawOption(fmt.Sprintf(`-selectborderwidth %s`, optionString(val)))
- }
- // Selectborderwidth — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Selectborderwidth() string {
- return evalErr(fmt.Sprintf(`%s cget -selectborderwidth`, w))
- }
- // Selectcolor option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menu] (widget specific)
- // - [Radiobutton] (widget specific)
- func Selectcolor(val any) Opt {
- return rawOption(fmt.Sprintf(`-selectcolor %s`, optionString(val)))
- }
- // Selectcolor — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Menu] (widget specific)
- // - [Radiobutton] (widget specific)
- func (w *Window) Selectcolor() string {
- return evalErr(fmt.Sprintf(`%s cget -selectcolor`, w))
- }
- // Selectforeground option.
- //
- // Specifies the foreground color to use when displaying selected
- // items.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text]
- func Selectforeground(val any) Opt {
- return rawOption(fmt.Sprintf(`-selectforeground %s`, optionString(val)))
- }
- // Selectforeground — Get the configured option value.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [Text]
- func (w *Window) Selectforeground() string {
- return evalErr(fmt.Sprintf(`%s cget -selectforeground`, w))
- }
- // Selectimage option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Radiobutton] (widget specific)
- func Selectimage(val any) Opt {
- return rawOption(fmt.Sprintf(`-selectimage %s`, optionString(val)))
- }
- // Selectimage — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func (w *Window) Selectimage() string {
- return evalErr(fmt.Sprintf(`%s cget -selectimage`, w))
- }
- // Selectmode option.
- //
- // Known uses:
- // - [Listbox] (widget specific)
- // - [TTreeview] (widget specific)
- func Selectmode(val any) Opt {
- return rawOption(fmt.Sprintf(`-selectmode %s`, optionString(val)))
- }
- // Selectmode — Get the configured option value.
- //
- // Known uses:
- // - [Listbox] (widget specific)
- // - [TTreeview] (widget specific)
- func (w *Window) Selectmode() string {
- return evalErr(fmt.Sprintf(`%s cget -selectmode`, w))
- }
- // Selecttype option.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func Selecttype(val any) Opt {
- return rawOption(fmt.Sprintf(`-selecttype %s`, optionString(val)))
- }
- // Selecttype — Get the configured option value.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func (w *Window) Selecttype() string {
- return evalErr(fmt.Sprintf(`%s cget -selecttype`, w))
- }
- // Setgrid option.
- //
- // Specifies a boolean value that determines whether this widget controls the
- // resizing grid for its top-level window.
- // This option is typically used in text widgets, where the information
- // in the widget has a natural size (the size of a character) and it makes
- // sense for the window's dimensions to be integral numbers of these units.
- // These natural window sizes form a grid.
- // If the -setgrid option is set to true then the widget will
- // communicate with the window manager so that when the user interactively
- // resizes the top-level window that contains the widget, the dimensions of
- // the window will be displayed to the user in grid units and the window
- // size will be constrained to integral numbers of grid units.
- // See the section GRIDDED GEOMETRY MANAGEMENT in the wm manual
- // entry for more details.
- //
- // Known uses:
- // - [Listbox]
- // - [Text]
- func Setgrid(val any) Opt {
- return rawOption(fmt.Sprintf(`-setgrid %s`, optionString(val)))
- }
- // Setgrid — Get the configured option value.
- //
- // Known uses:
- // - [Listbox]
- // - [Text]
- func (w *Window) Setgrid() string {
- return evalErr(fmt.Sprintf(`%s cget -setgrid`, w))
- }
- // Show option.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [TEntry] (widget specific)
- // - [TTreeview] (widget specific)
- func Show(val any) Opt {
- return rawOption(fmt.Sprintf(`-show %s`, optionString(val)))
- }
- // Show — Get the configured option value.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [TEntry] (widget specific)
- // - [TTreeview] (widget specific)
- func (w *Window) Show() string {
- return evalErr(fmt.Sprintf(`%s cget -show`, w))
- }
- // Showhandle option.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func Showhandle(val any) Opt {
- return rawOption(fmt.Sprintf(`-showhandle %s`, optionString(val)))
- }
- // Showhandle — Get the configured option value.
- //
- // Known uses:
- // - [Panedwindow] (widget specific)
- func (w *Window) Showhandle() string {
- return evalErr(fmt.Sprintf(`%s cget -showhandle`, w))
- }
- // Showvalue option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func Showvalue(val any) Opt {
- return rawOption(fmt.Sprintf(`-showvalue %s`, optionString(val)))
- }
- // Showvalue — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Showvalue() string {
- return evalErr(fmt.Sprintf(`%s cget -showvalue`, w))
- }
- // Side option.
- //
- // Known uses:
- // - [Pack] (command specific)
- func Side(val any) Opt {
- return rawOption(fmt.Sprintf(`-side %s`, optionString(val)))
- }
- // Size option.
- //
- // Known uses:
- // - [NewFont] (command specific)
- func Size(val any) Opt {
- return rawOption(fmt.Sprintf(`-size %s`, optionString(val)))
- }
- // Slant option.
- //
- // Known uses:
- // - [NewFont] (command specific)
- func Slant(val any) Opt {
- return rawOption(fmt.Sprintf(`-slant %s`, optionString(val)))
- }
- // Sliderlength option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func Sliderlength(val any) Opt {
- return rawOption(fmt.Sprintf(`-sliderlength %s`, optionString(val)))
- }
- // Sliderlength — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Sliderlength() string {
- return evalErr(fmt.Sprintf(`%s cget -sliderlength`, w))
- }
- // Sliderrelief option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func Sliderrelief(val any) Opt {
- return rawOption(fmt.Sprintf(`-sliderrelief %s`, optionString(val)))
- }
- // Sliderrelief — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Sliderrelief() string {
- return evalErr(fmt.Sprintf(`%s cget -sliderrelief`, w))
- }
- // Spacing1 option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text] (widget specific)
- func Spacing1(val any) Opt {
- return rawOption(fmt.Sprintf(`-spacing1 %s`, optionString(val)))
- }
- // Spacing1 — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Spacing1() string {
- return evalErr(fmt.Sprintf(`%s cget -spacing1`, w))
- }
- // Spacing2 option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text] (widget specific)
- func Spacing2(val any) Opt {
- return rawOption(fmt.Sprintf(`-spacing2 %s`, optionString(val)))
- }
- // Spacing2 — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Spacing2() string {
- return evalErr(fmt.Sprintf(`%s cget -spacing2`, w))
- }
- // Spacing3 option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text] (widget specific)
- func Spacing3(val any) Opt {
- return rawOption(fmt.Sprintf(`-spacing3 %s`, optionString(val)))
- }
- // Spacing3 — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Spacing3() string {
- return evalErr(fmt.Sprintf(`%s cget -spacing3`, w))
- }
- // Startline option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Startline(val any) Opt {
- return rawOption(fmt.Sprintf(`-startline %s`, optionString(val)))
- }
- // Startline — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Startline() string {
- return evalErr(fmt.Sprintf(`%s cget -startline`, w))
- }
- // State option.
- //
- // May be set to normal or disabled
- // to control the disabled state bit.
- // This is a write-only option:
- // setting it changes the widget state,
- // but the state widget command
- // does not affect the -state option.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Canvas] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Entry] (widget specific)
- // - [Label] (widget specific)
- // - [Listbox] (widget specific)
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menubutton] (widget specific)
- // - [Radiobutton] (widget specific)
- // - [Scale] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TLabel]
- // - [TMenubutton]
- // - [TRadiobutton]
- // - [TSpinbox]
- // - [Text] (widget specific)
- func State(val any) Opt {
- return rawOption(fmt.Sprintf(`-state %s`, optionString(val)))
- }
- // State — Get the configured option value.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Canvas] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Entry] (widget specific)
- // - [Label] (widget specific)
- // - [Listbox] (widget specific)
- // - [Menubutton] (widget specific)
- // - [Radiobutton] (widget specific)
- // - [Scale] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TLabel]
- // - [TMenubutton]
- // - [TRadiobutton]
- // - [TSpinbox]
- // - [Text] (widget specific)
- func (w *Window) State() string {
- return evalErr(fmt.Sprintf(`%s cget -state`, w))
- }
- // Sticky option.
- //
- // Known uses:
- // - [Grid] (command specific)
- func Sticky(val any) Opt {
- return rawOption(fmt.Sprintf(`-sticky %s`, optionString(val)))
- }
- // Striped option.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func Striped(val any) Opt {
- return rawOption(fmt.Sprintf(`-striped %s`, optionString(val)))
- }
- // Striped — Get the configured option value.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func (w *Window) Striped() string {
- return evalErr(fmt.Sprintf(`%s cget -striped`, w))
- }
- // Style option.
- //
- // May be used to specify a custom widget style.
- //
- // Known uses:
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- func Style(val any) Opt {
- return rawOption(fmt.Sprintf(`-style %s`, optionString(val)))
- }
- // Style — Get the configured option value.
- //
- // Known uses:
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- func (w *Window) Style() string {
- return evalErr(fmt.Sprintf(`%s cget -style`, w))
- }
- // Tabs option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text] (widget specific)
- func Tabs(val any) Opt {
- return rawOption(fmt.Sprintf(`-tabs %s`, optionString(val)))
- }
- // Tabs — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Tabs() string {
- return evalErr(fmt.Sprintf(`%s cget -tabs`, w))
- }
- // Tabstyle option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text] (widget specific)
- func Tabstyle(val any) Opt {
- return rawOption(fmt.Sprintf(`-tabstyle %s`, optionString(val)))
- }
- // Tabstyle — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Tabstyle() string {
- return evalErr(fmt.Sprintf(`%s cget -tabstyle`, w))
- }
- // Takefocus option.
- //
- // Determines whether the window accepts the focus during keyboard
- // traversal (e.g., Tab and Shift-Tab).
- // Before setting the focus to a window, the traversal scripts
- // consult the value of the -takefocus option.
- // A value of 0 means that the window should be skipped entirely
- // during keyboard traversal.
- // 1 means that the window should receive the input
- // focus as long as it is viewable (it and all of its ancestors are mapped).
- // An empty value for the option means that the traversal scripts make
- // the decision about whether or not to focus on the window: the current
- // algorithm is to skip the window if it is
- // disabled, if it has no key bindings, or if it is not viewable.
- // If the value has any other form, then the traversal scripts take
- // the value, append the name of the window to it (with a separator space),
- // and evaluate the resulting string as a Tcl script.
- // The script must return 0, 1, or an empty string: a
- // 0 or 1 value specifies whether the window will receive
- // the input focus, and an empty string results in the default decision
- // described above.
- // Note that this interpretation of the option is defined entirely by
- // the Tcl scripts that implement traversal: the widget implementations
- // ignore the option entirely, so you can change its meaning if you
- // redefine the keyboard traversal scripts.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- // - [Text]
- // - [Toplevel]
- func Takefocus(val any) Opt {
- return rawOption(fmt.Sprintf(`-takefocus %s`, optionString(val)))
- }
- // Takefocus — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Canvas]
- // - [Checkbutton]
- // - [Entry]
- // - [Frame]
- // - [Label]
- // - [Labelframe]
- // - [Listbox]
- // - [Menu]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [Scale]
- // - [Scrollbar]
- // - [Spinbox]
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox]
- // - [TEntry]
- // - [TFrame]
- // - [TLabel]
- // - [TLabelframe]
- // - [TMenubutton]
- // - [TNotebook]
- // - [TPanedwindow]
- // - [TProgressbar]
- // - [TRadiobutton]
- // - [TScale]
- // - [TScrollbar]
- // - [TSeparator]
- // - [TSizegrip]
- // - [TSpinbox]
- // - [TTreeview]
- // - [Text]
- // - [Toplevel]
- func (w *Window) Takefocus() string {
- return evalErr(fmt.Sprintf(`%s cget -takefocus`, w))
- }
- // Tearoff option.
- //
- // Known uses:
- // - [Menu] (widget specific)
- func Tearoff(val any) Opt {
- return rawOption(fmt.Sprintf(`-tearoff %s`, optionString(val)))
- }
- // Tearoff — Get the configured option value.
- //
- // Known uses:
- // - [Menu] (widget specific)
- func (w *Window) Tearoff() string {
- return evalErr(fmt.Sprintf(`%s cget -tearoff`, w))
- }
- // Tearoffcommand option.
- //
- // See also [Event handlers].
- //
- // Known uses:
- // - [Menu] (widget specific)
- //
- // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
- func Tearoffcommand(handler any) Opt {
- return newEventHandler("-tearoffcommand", handler)
- }
- // Txt option.
- //
- // Specifies a string to be displayed inside the widget. The way in which
- // the string is displayed depends on the particular widget and may be
- // determined by other options, such as -anchor or -justify.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Labelframe]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TLabelframe] (widget specific)
- // - [TMenubutton]
- // - [TProgressbar]
- // - [TRadiobutton]
- func Txt(val any) Opt {
- return rawOption(fmt.Sprintf(`-text %s`, optionString(val)))
- }
- // Txt — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Labelframe]
- // - [Menubutton]
- // - [Message]
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TLabelframe] (widget specific)
- // - [TMenubutton]
- // - [TProgressbar]
- // - [TRadiobutton]
- func (w *Window) Txt() string {
- return evalErr(fmt.Sprintf(`%s cget -text`, w))
- }
- // Tickinterval option.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func Tickinterval(val any) Opt {
- return rawOption(fmt.Sprintf(`-tickinterval %s`, optionString(val)))
- }
- // Tickinterval — Get the configured option value.
- //
- // Known uses:
- // - [Scale] (widget specific)
- func (w *Window) Tickinterval() string {
- return evalErr(fmt.Sprintf(`%s cget -tickinterval`, w))
- }
- // Tile option.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Toplevel] (widget specific)
- func Tile(val any) Opt {
- return rawOption(fmt.Sprintf(`-tile %s`, optionString(val)))
- }
- // Tile — Get the configured option value.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Tile() string {
- return evalErr(fmt.Sprintf(`%s cget -tile`, w))
- }
- // Title option.
- //
- // Known uses:
- // - [ChooseColor] (command specific)
- // - [ChooseDirectory] (command specific)
- // - [Fontchooser] (command specific)
- // - [GetOpenFile] (command specific)
- // - [GetSaveFile] (command specific)
- // - [Menu] (widget specific)
- // - [MessageBox] (command specific)
- func Title(val any) Opt {
- return rawOption(fmt.Sprintf(`-title %s`, optionString(val)))
- }
- // Title — Get the configured option value.
- //
- // Known uses:
- // - [Menu] (widget specific)
- func (w *Window) Title() string {
- return evalErr(fmt.Sprintf(`%s cget -title`, w))
- }
- // Titlecolumns option.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func Titlecolumns(val any) Opt {
- return rawOption(fmt.Sprintf(`-titlecolumns %s`, optionString(val)))
- }
- // Titlecolumns — Get the configured option value.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func (w *Window) Titlecolumns() string {
- return evalErr(fmt.Sprintf(`%s cget -titlecolumns`, w))
- }
- // Titleitems option.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func Titleitems(val any) Opt {
- return rawOption(fmt.Sprintf(`-titleitems %s`, optionString(val)))
- }
- // Titleitems — Get the configured option value.
- //
- // Known uses:
- // - [TTreeview] (widget specific)
- func (w *Window) Titleitems() string {
- return evalErr(fmt.Sprintf(`%s cget -titleitems`, w))
- }
- // Tristateimage option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func Tristateimage(val any) Opt {
- return rawOption(fmt.Sprintf(`-tristateimage %s`, optionString(val)))
- }
- // Tristateimage — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func (w *Window) Tristateimage() string {
- return evalErr(fmt.Sprintf(`%s cget -tristateimage`, w))
- }
- // Tristatevalue option.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func Tristatevalue(val any) Opt {
- return rawOption(fmt.Sprintf(`-tristatevalue %s`, optionString(val)))
- }
- // Tristatevalue — Get the configured option value.
- //
- // Known uses:
- // - [Checkbutton] (widget specific)
- // - [Radiobutton] (widget specific)
- func (w *Window) Tristatevalue() string {
- return evalErr(fmt.Sprintf(`%s cget -tristatevalue`, w))
- }
- // Troughcolor option.
- //
- // Specifies the color to use for the rectangular trough areas
- // in widgets such as scrollbars and scales. This option is ignored for
- // scrollbars on Windows (native widget does not recognize this option).
- //
- // Known uses:
- // - [Scale]
- // - [Scrollbar]
- func Troughcolor(val any) Opt {
- return rawOption(fmt.Sprintf(`-troughcolor %s`, optionString(val)))
- }
- // Troughcolor — Get the configured option value.
- //
- // Known uses:
- // - [Scale]
- // - [Scrollbar]
- func (w *Window) Troughcolor() string {
- return evalErr(fmt.Sprintf(`%s cget -troughcolor`, w))
- }
- // Underline option.
- //
- // Specifies the integer index of a character to underline in the widget.
- // This option is used by the default bindings to implement keyboard
- // traversal for menu buttons and menu entries.
- // 0 corresponds to the first character of the text displayed in the
- // widget, 1 to the next character, and so on. end corresponds to the
- // last character, end-1 to the before last character, and so on.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Menubutton]
- // - [NewFont] (command specific)
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TLabelframe] (widget specific)
- // - [TMenubutton]
- // - [TRadiobutton]
- // - [TextWidget.TagConfigure] (command specific)
- func Underline(val any) Opt {
- return rawOption(fmt.Sprintf(`-underline %s`, optionString(val)))
- }
- // Underline — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Radiobutton]
- // - [TButton]
- // - [TCheckbutton]
- // - [TLabel]
- // - [TLabelframe] (widget specific)
- // - [TMenubutton]
- // - [TRadiobutton]
- func (w *Window) Underline() string {
- return evalErr(fmt.Sprintf(`%s cget -underline`, w))
- }
- // Underlinefg option.
- //
- // Known uses:
- // - [TextWidget.TagConfigure] (command specific)
- func Underlinefg(val any) Opt {
- return rawOption(fmt.Sprintf(`-underlinefg %s`, optionString(val)))
- }
- // Undo option.
- //
- // Known uses:
- // - [Text] (widget specific)
- func Undo(val any) Opt {
- return rawOption(fmt.Sprintf(`-undo %s`, optionString(val)))
- }
- // Undo — Get the configured option value.
- //
- // Known uses:
- // - [Text] (widget specific)
- func (w *Window) Undo() string {
- return evalErr(fmt.Sprintf(`%s cget -undo`, w))
- }
- // Use option.
- //
- // Known uses:
- // - [Toplevel] (widget specific)
- func Use(val any) Opt {
- return rawOption(fmt.Sprintf(`-use %s`, optionString(val)))
- }
- // Use — Get the configured option value.
- //
- // Known uses:
- // - [Toplevel] (widget specific)
- func (w *Window) Use() string {
- return evalErr(fmt.Sprintf(`%s cget -use`, w))
- }
- // Validate option.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TSpinbox]
- func Validate(val any) Opt {
- return rawOption(fmt.Sprintf(`-validate %s`, optionString(val)))
- }
- // Validate — Get the configured option value.
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TSpinbox]
- func (w *Window) Validate() string {
- return evalErr(fmt.Sprintf(`%s cget -validate`, w))
- }
- // Validatecommand option.
- //
- // See also [Event handlers].
- //
- // Known uses:
- // - [Entry] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TSpinbox]
- //
- // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
- func Validatecommand(handler any) Opt {
- return newEventHandler("-validatecommand", handler)
- }
- // Value option.
- //
- // Known uses:
- // - [MenuWidget.AddCascade] (command specific)
- // - [MenuWidget.AddCommand] (command specific)
- // - [MenuWidget.AddSeparator] (command specific)
- // - [Radiobutton] (widget specific)
- // - [TProgressbar] (widget specific)
- // - [TRadiobutton] (widget specific)
- // - [TScale] (widget specific)
- func Value(val any) Opt {
- return rawOption(fmt.Sprintf(`-value %s`, optionString(val)))
- }
- // Value — Get the configured option value.
- //
- // Known uses:
- // - [Radiobutton] (widget specific)
- // - [TProgressbar] (widget specific)
- // - [TRadiobutton] (widget specific)
- // - [TScale] (widget specific)
- func (w *Window) Value() string {
- return evalErr(fmt.Sprintf(`%s cget -value`, w))
- }
- // Visual option.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Toplevel] (widget specific)
- func Visual(val any) Opt {
- return rawOption(fmt.Sprintf(`-visual %s`, optionString(val)))
- }
- // Visual — Get the configured option value.
- //
- // Known uses:
- // - [Frame] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Visual() string {
- return evalErr(fmt.Sprintf(`%s cget -visual`, w))
- }
- // Weight option.
- //
- // Known uses:
- // - [NewFont] (command specific)
- func Weight(val any) Opt {
- return rawOption(fmt.Sprintf(`-weight %s`, optionString(val)))
- }
- // Width option.
- //
- // If greater than zero, specifies how much space, in character widths,
- // to allocate for the text label.
- // If less than zero, specifies a minimum width.
- // If zero or unspecified, the natural width of the text label is used.
- // Note that some themes may specify a non-zero -width
- // in the style.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Canvas] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Entry] (widget specific)
- // - [Frame] (widget specific)
- // - [Label] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Listbox] (widget specific)
- // - [Menubutton] (widget specific)
- // - [Message] (widget specific)
- // - [NewPhoto] (command specific)
- // - [Panedwindow] (widget specific)
- // - [Place] (command specific)
- // - [Radiobutton] (widget specific)
- // - [Scale] (widget specific)
- // - [Scrollbar] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TFrame] (widget specific)
- // - [TLabel]
- // - [TLabelframe] (widget specific)
- // - [TMenubutton]
- // - [TNotebook] (widget specific)
- // - [TPanedwindow] (widget specific)
- // - [TRadiobutton]
- // - [Text] (widget specific)
- // - [Toplevel] (widget specific)
- func Width(val any) Opt {
- return rawOption(fmt.Sprintf(`-width %s`, optionString(val)))
- }
- // Width — Get the configured option value.
- //
- // Known uses:
- // - [Button] (widget specific)
- // - [Canvas] (widget specific)
- // - [Checkbutton] (widget specific)
- // - [Entry] (widget specific)
- // - [Frame] (widget specific)
- // - [Label] (widget specific)
- // - [Labelframe] (widget specific)
- // - [Listbox] (widget specific)
- // - [Menubutton] (widget specific)
- // - [Message] (widget specific)
- // - [Panedwindow] (widget specific)
- // - [Radiobutton] (widget specific)
- // - [Scale] (widget specific)
- // - [Scrollbar] (widget specific)
- // - [Spinbox] (widget specific)
- // - [TButton]
- // - [TCheckbutton]
- // - [TCombobox] (widget specific)
- // - [TEntry] (widget specific)
- // - [TFrame] (widget specific)
- // - [TLabel]
- // - [TLabelframe] (widget specific)
- // - [TMenubutton]
- // - [TNotebook] (widget specific)
- // - [TPanedwindow] (widget specific)
- // - [TRadiobutton]
- // - [Text] (widget specific)
- // - [Toplevel] (widget specific)
- func (w *Window) Width() string {
- return evalErr(fmt.Sprintf(`%s cget -width`, w))
- }
- // Wrap option.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- // - [TSpinbox] (widget specific)
- // - [TextWidget.TagConfigure] (command specific)
- // - [Text] (widget specific)
- func Wrap(val any) Opt {
- return rawOption(fmt.Sprintf(`-wrap %s`, optionString(val)))
- }
- // Wrap — Get the configured option value.
- //
- // Known uses:
- // - [Spinbox] (widget specific)
- // - [TSpinbox] (widget specific)
- // - [Text] (widget specific)
- func (w *Window) Wrap() string {
- return evalErr(fmt.Sprintf(`%s cget -wrap`, w))
- }
- // Wraplength option.
- //
- // For widgets that can perform word-wrapping, this option specifies
- // the maximum line length.
- // Lines that would exceed this length are wrapped onto the next line,
- // so that no line is longer than the specified length.
- // The value may be specified in any of the standard forms for
- // screen distances.
- // If this value is negative or zero then no wrapping is done: lines
- // will break only at newline characters in the text.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Radiobutton]
- // - [TLabel]
- // - [TLabel] (widget specific)
- // - [TProgressbar]
- func Wraplength(val any) Opt {
- return rawOption(fmt.Sprintf(`-wraplength %s`, optionString(val)))
- }
- // Wraplength — Get the configured option value.
- //
- // Known uses:
- // - [Button]
- // - [Checkbutton]
- // - [Label]
- // - [Menubutton]
- // - [Radiobutton]
- // - [TLabel]
- // - [TLabel] (widget specific)
- // - [TProgressbar]
- func (w *Window) Wraplength() string {
- return evalErr(fmt.Sprintf(`%s cget -wraplength`, w))
- }
- // X option.
- //
- // Known uses:
- // - [Place] (command specific)
- func X(val any) Opt {
- return rawOption(fmt.Sprintf(`-x %s`, optionString(val)))
- }
- // Xscrollcommand option.
- //
- // See also [Event handlers].
- //
- // Specifies the prefix for a command used to communicate with horizontal
- // scrollbars.
- // When the view in the widget's window changes (or
- // whenever anything else occurs that could change the display in a
- // scrollbar, such as a change in the total size of the widget's
- // contents), the widget will
- // generate a Tcl command by concatenating the scroll command and
- // two numbers.
- // Each of the numbers is a fraction between 0 and 1, which indicates
- // a position in the document. 0 indicates the beginning of the document,
- // 1 indicates the end, .333 indicates a position one third the way through
- // the document, and so on.
- // The first fraction indicates the first information in the document
- // that is visible in the window, and the second fraction indicates
- // the information just after the last portion that is visible.
- // The command is
- // then passed to the Tcl interpreter for execution. Typically the
- // -xscrollcommand option consists of the path name of a scrollbar
- // widget followed by
- // e.g.
- // this will cause
- // the scrollbar to be updated whenever the view in the window changes.
- // If this option is not specified, then no command will be executed.
- //
- // Known uses:
- // - [Canvas]
- // - [Entry]
- // - [Listbox]
- // - [Spinbox]
- // - [TEntry]
- // - [TSpinbox]
- // - [TTreeview]
- // - [Text]
- //
- // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
- func Xscrollcommand(handler any) Opt {
- return newEventHandler("-xscrollcommand", handler)
- }
- // Xscrollincrement option.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func Xscrollincrement(val any) Opt {
- return rawOption(fmt.Sprintf(`-xscrollincrement %s`, optionString(val)))
- }
- // Xscrollincrement — Get the configured option value.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func (w *Window) Xscrollincrement() string {
- return evalErr(fmt.Sprintf(`%s cget -xscrollincrement`, w))
- }
- // Y option.
- //
- // Known uses:
- // - [Place] (command specific)
- func Y(val any) Opt {
- return rawOption(fmt.Sprintf(`-y %s`, optionString(val)))
- }
- // Yscrollcommand option.
- //
- // See also [Event handlers].
- //
- // Specifies the prefix for a command used to communicate with vertical
- // scrollbars. This option is treated in the same way as the
- // -xscrollcommand option, except that it is used for vertical
- // scrollbars and is provided by widgets that support vertical scrolling.
- // See the description of -xscrollcommand for details
- // on how this option is used.
- //
- // Known uses:
- // - [Canvas]
- // - [Listbox]
- // - [TTreeview]
- // - [Text]
- //
- // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers
- func Yscrollcommand(handler any) Opt {
- return newEventHandler("-yscrollcommand", handler)
- }
- // Yscrollincrement option.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func Yscrollincrement(val any) Opt {
- return rawOption(fmt.Sprintf(`-yscrollincrement %s`, optionString(val)))
- }
- // Yscrollincrement — Get the configured option value.
- //
- // Known uses:
- // - [Canvas] (widget specific)
- func (w *Window) Yscrollincrement() string {
- return evalErr(fmt.Sprintf(`%s cget -yscrollincrement`, w))
- }
|