ControlDefinitions.pas 267 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908
  1. {
  2. File: HIToolbox/ControlDefinitions.h
  3. Contains: Definitions of controls provided by the Control Manager
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 1999-2005 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit ControlDefinitions;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,TextEdit,AXUIElement,AEDataModel,CFBase,Events,Quickdraw,Icons,CFData,CFDictionary,DateTimeUtils,Drag,TextCommon,Appearance,CarbonEvents,Controls,Lists,MacHelp,Menus,CFString;
  92. {$ALIGN MAC68K}
  93. {
  94. * ControlDefinitions.h
  95. *
  96. * Discussion:
  97. * System software supplies a variety of controls for your
  98. * applications to use. They are described herein.
  99. }
  100. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  101. { ¥ Resource Types }
  102. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  103. const
  104. kControlTabListResType = $74616223 (* 'tab#' *); { used for tab control (Appearance 1.0 and later)}
  105. kControlListDescResType = $6C646573 (* 'ldes' *); { used for list box control (Appearance 1.0 and later)}
  106. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  107. { ¥ Check Box Values }
  108. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  109. const
  110. kControlCheckBoxUncheckedValue = 0;
  111. kControlCheckBoxCheckedValue = 1;
  112. kControlCheckBoxMixedValue = 2;
  113. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  114. { ¥ Radio Button Values }
  115. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  116. const
  117. kControlRadioButtonUncheckedValue = 0;
  118. kControlRadioButtonCheckedValue = 1;
  119. kControlRadioButtonMixedValue = 2;
  120. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  121. { ¥ Pop-Up Menu Control Constants }
  122. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  123. { Variant codes for the System 7 pop-up menu}
  124. const
  125. popupFixedWidth = 1 shl 0;
  126. popupVariableWidth = 1 shl 1;
  127. popupUseAddResMenu = 1 shl 2;
  128. popupUseWFont = 1 shl 3;
  129. { Menu label styles for the System 7 pop-up menu}
  130. const
  131. popupTitleBold = 1 shl 8;
  132. popupTitleItalic = 1 shl 9;
  133. popupTitleUnderline = 1 shl 10;
  134. popupTitleOutline = 1 shl 11;
  135. popupTitleShadow = 1 shl 12;
  136. popupTitleCondense = 1 shl 13;
  137. popupTitleExtend = 1 shl 14;
  138. popupTitleNoStyle = 1 shl 15;
  139. { Menu label justifications for the System 7 pop-up menu}
  140. const
  141. popupTitleLeftJust = $00000000;
  142. popupTitleCenterJust = $00000001;
  143. popupTitleRightJust = $000000FF;
  144. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  145. { ¥ Control Definition IDÕs }
  146. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  147. { Standard System 7 procIDs}
  148. const
  149. pushButProc = 0;
  150. checkBoxProc = 1;
  151. radioButProc = 2;
  152. scrollBarProc = 16;
  153. popupMenuProc = 1008;
  154. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  155. { ¥ Control Part Codes }
  156. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  157. const
  158. kControlLabelPart = 1;
  159. kControlMenuPart = 2;
  160. kControlTrianglePart = 4;
  161. kControlEditTextPart = 5; { Appearance 1.0 and later}
  162. kControlPicturePart = 6; { Appearance 1.0 and later}
  163. kControlIconPart = 7; { Appearance 1.0 and later}
  164. kControlClockPart = 8; { Appearance 1.0 and later}
  165. kControlListBoxPart = 24; { Appearance 1.0 and later}
  166. kControlListBoxDoubleClickPart = 25; { Appearance 1.0 and later}
  167. kControlImageWellPart = 26; { Appearance 1.0 and later}
  168. kControlRadioGroupPart = 27; { Appearance 1.0.2 and later}
  169. kControlButtonPart = 10;
  170. kControlCheckBoxPart = 11;
  171. kControlRadioButtonPart = 11;
  172. kControlUpButtonPart = kAppearancePartUpButton;
  173. kControlDownButtonPart = kAppearancePartDownButton;
  174. kControlPageUpPart = kAppearancePartPageUpArea;
  175. kControlPageDownPart = kAppearancePartPageDownArea;
  176. kControlClockHourDayPart = 9; { Appearance 1.1 and later}
  177. kControlClockMinuteMonthPart = 10; { Appearance 1.1 and later}
  178. kControlClockSecondYearPart = 11; { Appearance 1.1 and later}
  179. kControlClockAMPMPart = 12; { Appearance 1.1 and later}
  180. kControlDataBrowserPart = 24; { CarbonLib 1.0 and later}
  181. kControlDataBrowserDraggedPart = 25; { CarbonLib 1.0 and later}
  182. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  183. { ¥ Control Types and IDÕs available only with Appearance 1.0 and later }
  184. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  185. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  186. { ¥ BEVEL BUTTON INTERFACE (CDEF 2) }
  187. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  188. { Bevel buttons allow you to control the content type (pict/icon/etc.), the behavior }
  189. { (pushbutton/toggle/sticky), and the bevel size. You also have the option of }
  190. { attaching a menu to it. When a menu is present, you can specify which way the }
  191. { popup arrow is facing (down or right). }
  192. { This is all made possible by overloading the Min, Max, and Value parameters for the }
  193. { control, as well as adjusting the variant. Here's the breakdown of what goes where: }
  194. { Parameter What Goes Here }
  195. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  196. { Min Hi Byte = Behavior, Lo Byte = content type. }
  197. { Max ResID for resource-based content types. }
  198. { Value MenuID to attach, 0 = no menu, please. }
  199. { The variant is broken down into two halfs. The low 2 bits control the bevel type. }
  200. { Bit 2 controls the popup arrow direction (if a menu is present) and bit 3 controls }
  201. { whether or not to use the control's owning window's font. }
  202. { Constants for all you need to put this together are below. The values for behaviors }
  203. { are set up so that you can simply add them to the content type and pass them into }
  204. { the Min parameter of NewControl. }
  205. { An example call: }
  206. { control = NewControl( window, &bounds, "\p", true, 0, kControlContentIconSuiteRes + }
  207. { kBehaviorToggles, myIconSuiteID, bevelButtonSmallBevelProc, }
  208. { 0L ); }
  209. { Attaching a menu: }
  210. { control = NewControl( window, &bounds, "\p", true, kMyMenuID, }
  211. { kControlContentIconSuiteRes, myIconSuiteID, bevelButtonSmallBevelProc + }
  212. { kBevelButtonMenuOnRight, 0L ); }
  213. { This will attach menu ID kMyMenuID to the button, with the popup arrow facing right.}
  214. { This also puts the menu up to the right of the button. You can also specify that a }
  215. { menu can have multiple items checked at once by adding kBehaviorMultiValueMenus }
  216. { into the Min parameter. If you do use multivalue menus, the GetBevelButtonMenuValue }
  217. { helper function will return the last item chosen from the menu, whether or not it }
  218. { was checked. }
  219. { NOTE: Bevel buttons with menus actually have *two* values. The value of the }
  220. { button (on/off), and the value of the menu. The menu value can be gotten }
  221. { with the GetBevelButtonMenuValue helper function. }
  222. { Handle-based Content }
  223. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  224. { You can create your control and then set the content to an existing handle to an }
  225. { icon suite, etc. using the macros below. Please keep in mind that resource-based }
  226. { content is owned by the control, handle-based content is owned by you. The CDEF will}
  227. { not try to dispose of handle-based content. If you are changing the content type of }
  228. { the button on the fly, you must make sure that if you are replacing a handle- }
  229. { based content with a resource-based content to properly dispose of the handle, }
  230. { else a memory leak will ensue. }
  231. { Textual Content }
  232. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  233. { Please note that if a bevel button gets its textual content from the title }
  234. { of the control. To alter the textual content of a bevel button, use the }
  235. { SetControlTitle[WithCFString] API. }
  236. { Bevel Button Proc IDs }
  237. const
  238. kControlBevelButtonSmallBevelProc = 32;
  239. kControlBevelButtonNormalBevelProc = 33;
  240. kControlBevelButtonLargeBevelProc = 34;
  241. { Add these variant codes to kBevelButtonSmallBevelProc to change the type of button }
  242. const
  243. kControlBevelButtonSmallBevelVariant = 0;
  244. kControlBevelButtonNormalBevelVariant = 1 shl 0;
  245. kControlBevelButtonLargeBevelVariant = 1 shl 1;
  246. kControlBevelButtonMenuOnRightVariant = 1 shl 2;
  247. { Bevel Thicknesses }
  248. type
  249. ControlBevelThickness = UInt16;
  250. const
  251. kControlBevelButtonSmallBevel = 0;
  252. kControlBevelButtonNormalBevel = 1;
  253. kControlBevelButtonLargeBevel = 2;
  254. { Behaviors of bevel buttons. These are set up so you can add }
  255. { them together with the content types. }
  256. const
  257. kControlBehaviorPushbutton = 0;
  258. kControlBehaviorToggles = $0100;
  259. kControlBehaviorSticky = $0200;
  260. kControlBehaviorSingleValueMenu = 0;
  261. kControlBehaviorMultiValueMenu = $4000; { only makes sense when a menu is attached.}
  262. kControlBehaviorOffsetContents = $8000;
  263. { Behaviors for 1.0.1 or later }
  264. const
  265. kControlBehaviorCommandMenu = $2000; { menu holds commands, not choices. Overrides multi-value bit.}
  266. type
  267. ControlBevelButtonBehavior = UInt16;
  268. type
  269. ControlBevelButtonMenuBehavior = UInt16;
  270. { Bevel Button Menu Placements }
  271. type
  272. ControlBevelButtonMenuPlacement = UInt16;
  273. const
  274. kControlBevelButtonMenuOnBottom = 0;
  275. kControlBevelButtonMenuOnRight = 1 shl 2;
  276. { Control Kind Tag }
  277. const
  278. kControlKindBevelButton = $6265766C (* 'bevl' *);
  279. { The HIObject class ID for the HIBevelButton class. }
  280. {$ifc USE_CFSTR_CONSTANT_MACROS}
  281. {$definec kHIBevelButtonClassID CFSTRP('com.apple.HIBevelButton')}
  282. {$endc}
  283. { Creation API: Carbon Only }
  284. {
  285. * CreateBevelButtonControl()
  286. *
  287. * Mac OS X threading:
  288. * Not thread safe
  289. *
  290. * Availability:
  291. * Mac OS X: in version 10.0 and later in Carbon.framework
  292. * CarbonLib: in CarbonLib 1.1 and later
  293. * Non-Carbon CFM: not available
  294. }
  295. function CreateBevelButtonControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; thickness: ControlBevelThickness; behavior: ControlBevelButtonBehavior; info: ControlButtonContentInfoPtr; menuID: SInt16; menuBehavior: ControlBevelButtonMenuBehavior; menuPlacement: ControlBevelButtonMenuPlacement; var outControl: ControlRef ): OSStatus; external name '_CreateBevelButtonControl';
  296. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  297. { Graphic Alignments }
  298. type
  299. ControlButtonGraphicAlignment = SInt16;
  300. const
  301. kControlBevelButtonAlignSysDirection = -1; { only left or right}
  302. kControlBevelButtonAlignCenter = 0;
  303. kControlBevelButtonAlignLeft = 1;
  304. kControlBevelButtonAlignRight = 2;
  305. kControlBevelButtonAlignTop = 3;
  306. kControlBevelButtonAlignBottom = 4;
  307. kControlBevelButtonAlignTopLeft = 5;
  308. kControlBevelButtonAlignBottomLeft = 6;
  309. kControlBevelButtonAlignTopRight = 7;
  310. kControlBevelButtonAlignBottomRight = 8;
  311. { Text Alignments }
  312. type
  313. ControlButtonTextAlignment = SInt16;
  314. const
  315. kControlBevelButtonAlignTextSysDirection = teFlushDefault;
  316. kControlBevelButtonAlignTextCenter = teCenter;
  317. kControlBevelButtonAlignTextFlushRight = teFlushRight;
  318. kControlBevelButtonAlignTextFlushLeft = teFlushLeft;
  319. { Text Placements }
  320. type
  321. ControlButtonTextPlacement = SInt16;
  322. const
  323. kControlBevelButtonPlaceSysDirection = -1; { if graphic on right, then on left}
  324. kControlBevelButtonPlaceNormally = 0;
  325. kControlBevelButtonPlaceToRightOfGraphic = 1;
  326. kControlBevelButtonPlaceToLeftOfGraphic = 2;
  327. kControlBevelButtonPlaceBelowGraphic = 3;
  328. kControlBevelButtonPlaceAboveGraphic = 4;
  329. { Data tags supported by the bevel button controls }
  330. const
  331. kControlBevelButtonContentTag = $636F6E74 (* 'cont' *); { ButtonContentInfo}
  332. kControlBevelButtonTransformTag = $7472616E (* 'tran' *); { IconTransformType}
  333. kControlBevelButtonTextAlignTag = $74616C69 (* 'tali' *); { ButtonTextAlignment}
  334. kControlBevelButtonTextOffsetTag = $746F6666 (* 'toff' *); { SInt16}
  335. kControlBevelButtonGraphicAlignTag = $67616C69 (* 'gali' *); { ButtonGraphicAlignment}
  336. kControlBevelButtonGraphicOffsetTag = $676F6666 (* 'goff' *); { Point}
  337. kControlBevelButtonTextPlaceTag = $74706C63 (* 'tplc' *); { ButtonTextPlacement}
  338. kControlBevelButtonMenuValueTag = $6D76616C (* 'mval' *); { SInt16}
  339. kControlBevelButtonMenuHandleTag = $6D686E64 (* 'mhnd' *); { MenuRef}
  340. kControlBevelButtonMenuRefTag = $6D686E64 (* 'mhnd' *); { MenuRef}
  341. kControlBevelButtonCenterPopupGlyphTag = $70676C63 (* 'pglc' *); { Boolean: true = center, false = bottom right}
  342. { These are tags in 1.0.1 or later }
  343. const
  344. kControlBevelButtonLastMenuTag = $6C6D6E75 (* 'lmnu' *); { SInt16: menuID of last menu item selected from}
  345. kControlBevelButtonMenuDelayTag = $6D646C79 (* 'mdly' *); { SInt32: ticks to delay before menu appears}
  346. { tags available with Appearance 1.1 or later }
  347. const
  348. { Boolean: True = if an icon of the ideal size for}
  349. { the button isn't available, scale a larger or}
  350. { smaller icon to the ideal size. False = don't}
  351. { scale; draw a smaller icon or clip a larger icon.}
  352. { Default is false. Only applies to IconSuites and}
  353. kControlBevelButtonScaleIconTag = $7363616C (* 'scal' *); { IconRefs.}
  354. { tags available in Mac OS X and later }
  355. const
  356. kControlBevelButtonOwnedMenuRefTag = $6F6D7266 (* 'omrf' *); { MenuRef (control will dispose)}
  357. kControlBevelButtonKindTag = $6265626B (* 'bebk' *); { ThemeButtonKind ( kTheme[Small,Medium,Large,Rounded]BevelButton )}
  358. {
  359. * Summary:
  360. * Tags available with Mac OS X 10.3 or later
  361. }
  362. const
  363. {
  364. * Passed data is an Boolean. Gets or sets whether or not the
  365. * associated menu is a multi-value menu or not. True means that the
  366. * menu can have multiple selections.
  367. }
  368. kControlBevelButtonIsMultiValueMenuTag = $6D756C74 (* 'mult' *);
  369. { Helper routines are available only thru the shared library/glue. }
  370. {
  371. * GetBevelButtonMenuValue()
  372. *
  373. * Mac OS X threading:
  374. * Not thread safe
  375. *
  376. * Availability:
  377. * Mac OS X: in version 10.0 and later in Carbon.framework
  378. * CarbonLib: in CarbonLib 1.0 and later
  379. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  380. }
  381. function GetBevelButtonMenuValue( inButton: ControlRef; var outValue: SInt16 ): OSErr; external name '_GetBevelButtonMenuValue';
  382. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  383. {
  384. * SetBevelButtonMenuValue()
  385. *
  386. * Mac OS X threading:
  387. * Not thread safe
  388. *
  389. * Availability:
  390. * Mac OS X: in version 10.0 and later in Carbon.framework
  391. * CarbonLib: in CarbonLib 1.0 and later
  392. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  393. }
  394. function SetBevelButtonMenuValue( inButton: ControlRef; inValue: SInt16 ): OSErr; external name '_SetBevelButtonMenuValue';
  395. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  396. {
  397. * GetBevelButtonMenuHandle()
  398. *
  399. * Mac OS X threading:
  400. * Not thread safe
  401. *
  402. * Availability:
  403. * Mac OS X: in version 10.0 and later in Carbon.framework
  404. * CarbonLib: in CarbonLib 1.0 and later
  405. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  406. }
  407. function GetBevelButtonMenuHandle( inButton: ControlRef; var outHandle: MenuHandle ): OSErr; external name '_GetBevelButtonMenuHandle';
  408. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  409. function GetBevelButtonMenuRef__NAME__GetBevelButtonMenuHandle( possibleWindow: WindowRef ): Boolean; external name '_GetBevelButtonMenuRef__NAME__GetBevelButtonMenuHandle';
  410. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  411. {
  412. * GetBevelButtonContentInfo()
  413. *
  414. * Mac OS X threading:
  415. * Not thread safe
  416. *
  417. * Availability:
  418. * Mac OS X: in version 10.0 and later in Carbon.framework
  419. * CarbonLib: in CarbonLib 1.0 and later
  420. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  421. }
  422. function GetBevelButtonContentInfo( inButton: ControlRef; outContent: ControlButtonContentInfoPtr ): OSErr; external name '_GetBevelButtonContentInfo';
  423. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  424. {
  425. * SetBevelButtonContentInfo()
  426. *
  427. * Mac OS X threading:
  428. * Not thread safe
  429. *
  430. * Availability:
  431. * Mac OS X: in version 10.0 and later in Carbon.framework
  432. * CarbonLib: in CarbonLib 1.0 and later
  433. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  434. }
  435. function SetBevelButtonContentInfo( inButton: ControlRef; inContent: ControlButtonContentInfoPtr ): OSErr; external name '_SetBevelButtonContentInfo';
  436. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  437. {
  438. * SetBevelButtonTransform()
  439. *
  440. * Mac OS X threading:
  441. * Not thread safe
  442. *
  443. * Availability:
  444. * Mac OS X: in version 10.0 and later in Carbon.framework
  445. * CarbonLib: in CarbonLib 1.0 and later
  446. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  447. }
  448. function SetBevelButtonTransform( inButton: ControlRef; transform: IconTransformType ): OSErr; external name '_SetBevelButtonTransform';
  449. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  450. {
  451. * SetBevelButtonGraphicAlignment()
  452. *
  453. * Mac OS X threading:
  454. * Not thread safe
  455. *
  456. * Availability:
  457. * Mac OS X: in version 10.0 and later in Carbon.framework
  458. * CarbonLib: in CarbonLib 1.0 and later
  459. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  460. }
  461. function SetBevelButtonGraphicAlignment( inButton: ControlRef; inAlign: ControlButtonGraphicAlignment; inHOffset: SInt16; inVOffset: SInt16 ): OSErr; external name '_SetBevelButtonGraphicAlignment';
  462. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  463. {
  464. * SetBevelButtonTextAlignment()
  465. *
  466. * Mac OS X threading:
  467. * Not thread safe
  468. *
  469. * Availability:
  470. * Mac OS X: in version 10.0 and later in Carbon.framework
  471. * CarbonLib: in CarbonLib 1.0 and later
  472. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  473. }
  474. function SetBevelButtonTextAlignment( inButton: ControlRef; inAlign: ControlButtonTextAlignment; inHOffset: SInt16 ): OSErr; external name '_SetBevelButtonTextAlignment';
  475. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  476. {
  477. * SetBevelButtonTextPlacement()
  478. *
  479. * Mac OS X threading:
  480. * Not thread safe
  481. *
  482. * Availability:
  483. * Mac OS X: in version 10.0 and later in Carbon.framework
  484. * CarbonLib: in CarbonLib 1.0 and later
  485. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  486. }
  487. function SetBevelButtonTextPlacement( inButton: ControlRef; inWhere: ControlButtonTextPlacement ): OSErr; external name '_SetBevelButtonTextPlacement';
  488. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  489. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  490. { ¥ SLIDER (CDEF 3) }
  491. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  492. { There are several variants that control the behavior of the slider control. Any }
  493. { combination of the following three constants can be added to the basic CDEF ID }
  494. { (kSliderProc). }
  495. { Variants: }
  496. { kSliderLiveFeedback Slider does not use "ghosted" indicator when tracking. }
  497. { ActionProc is called (set via SetControlAction) as the }
  498. { indicator is dragged. The value is updated so that the }
  499. { actionproc can adjust some other property based on the }
  500. { value each time the action proc is called. If no action }
  501. { proc is installed, it reverts to the ghost indicator. }
  502. { kSliderHasTickMarks Slider is drawn with 'tick marks'. The control }
  503. { rectangle must be large enough to accomidate the tick }
  504. { marks. }
  505. { kSliderReverseDirection Slider thumb points in opposite direction than normal. }
  506. { If the slider is vertical, the thumb will point to the }
  507. { left, if the slider is horizontal, the thumb will point }
  508. { upwards. }
  509. { kSliderNonDirectional This option overrides the kSliderReverseDirection and }
  510. { kSliderHasTickMarks variants. It creates an indicator }
  511. { which is rectangular and doesn't point in any direction }
  512. { like the normal indicator does. }
  513. { Mac OS X has a "Scroll to here" option in the General pane of System Preferences }
  514. { which allows users to click in the page up/down regions of a slider and have the }
  515. { thumb/indicator jump directly to the clicked position, which alters the value of }
  516. { the slider and moves any associated content appropriately. As long as the mouse }
  517. { button is held down, the click is treated as though the user had clicked in the }
  518. { thumb/indicator in the first place. }
  519. { If you want the sliders in your application to work with the "Scroll to here" }
  520. { option, you must do the following: }
  521. { 1. Create live-tracking sliders, not sliders that show a "ghost" thumb when you }
  522. { click on it. You can request live-tracking sliders by passing true in the }
  523. { liveTracking parameter to CreateSliderControl. If you create sliders with }
  524. { NewControl, use the kControlSliderLiveFeedback variant. }
  525. { 2. Write an appropriate ControlActionProc and associate it with your slider via }
  526. { the SetControlAction API. This allows your application to update its content }
  527. { appropriately when the live-tracking slider is clicked. }
  528. { 3. When calling HandleControlClick or TrackControl, pass -1 in the action proc }
  529. { parameter. This is a request for the Control Manager to use the action proc you }
  530. { associated with your control in step 2. If you rely on the standard window event }
  531. { handler to do your control tracking, this step is handled for you automatically. }
  532. { Slider proc ID and variants }
  533. const
  534. kControlSliderProc = 48;
  535. kControlSliderLiveFeedback = 1 shl 0;
  536. kControlSliderHasTickMarks = 1 shl 1;
  537. kControlSliderReverseDirection = 1 shl 2;
  538. kControlSliderNonDirectional = 1 shl 3;
  539. { Slider Orientation }
  540. type
  541. ControlSliderOrientation = UInt16;
  542. const
  543. kControlSliderPointsDownOrRight = 0;
  544. kControlSliderPointsUpOrLeft = 1;
  545. kControlSliderDoesNotPoint = 2;
  546. { Control Kind Tag }
  547. const
  548. kControlKindSlider = $736C6472 (* 'sldr' *);
  549. { The HIObject class ID for the HISlider class. }
  550. {$ifc USE_CFSTR_CONSTANT_MACROS}
  551. {$definec kHISliderClassID CFSTRP('com.apple.HISlider')}
  552. {$endc}
  553. { Creation API: Carbon Only }
  554. {
  555. * CreateSliderControl()
  556. *
  557. * Mac OS X threading:
  558. * Not thread safe
  559. *
  560. * Availability:
  561. * Mac OS X: in version 10.0 and later in Carbon.framework
  562. * CarbonLib: in CarbonLib 1.1 and later
  563. * Non-Carbon CFM: not available
  564. }
  565. function CreateSliderControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; orientation: ControlSliderOrientation; numTickMarks: UInt16; liveTracking: Boolean; liveTrackingProc: ControlActionUPP; var outControl: ControlRef ): OSStatus; external name '_CreateSliderControl';
  566. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  567. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  568. { ¥ DISCLOSURE TRIANGLE (CDEF 4) }
  569. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  570. { This control can be used as either left or right facing. It can also handle its own }
  571. { tracking if you wish. This means that when the 'autotoggle' variant is used, if the }
  572. { user clicks the control, it's state will change automatically from open to closed }
  573. { and vice-versa depending on its initial state. After a successful call to Track- }
  574. { Control, you can just check the current value to see what state it was switched to. }
  575. { Triangle proc IDs }
  576. const
  577. kControlTriangleProc = 64;
  578. kControlTriangleLeftFacingProc = 65;
  579. kControlTriangleAutoToggleProc = 66;
  580. kControlTriangleLeftFacingAutoToggleProc = 67;
  581. type
  582. ControlDisclosureTriangleOrientation = UInt16;
  583. const
  584. kControlDisclosureTrianglePointDefault = 0; { points right on a left-to-right script system (Mac OS X and later or CarbonLib 1.5 and later only)}
  585. kControlDisclosureTrianglePointRight = 1;
  586. kControlDisclosureTrianglePointLeft = 2;
  587. { Control Kind Tag }
  588. const
  589. kControlKindDisclosureTriangle = $64697374 (* 'dist' *);
  590. { The HIObject class ID for the HIDisclosureTriangle class. }
  591. {$ifc USE_CFSTR_CONSTANT_MACROS}
  592. {$definec kHIDisclosureTriangleClassID CFSTRP('com.apple.HIDisclosureTriangle')}
  593. {$endc}
  594. {
  595. * CreateDisclosureTriangleControl()
  596. *
  597. * Summary:
  598. * Creates a Disclosure Triangle control at a specific position in
  599. * the specified window.
  600. *
  601. * Discussion:
  602. * Disclosure Triangles are small controls that give the user a way
  603. * to toggle the visibility of information or other user interface.
  604. * When information is in a hidden state, a Disclosure Triangle is
  605. * considered "closed" and should point to the right (or sometimes
  606. * to the left). When the user clicks on it, the Disclosure Triangle
  607. * rotates downwards into the "open" state. The application should
  608. * repond by revealing the appropriate information or interface. On
  609. * Mac OS X, a root control will be created for the window if one
  610. * does not already exist. If a root control exists for the window,
  611. * the Disclosure Triangle control will be embedded into it.
  612. *
  613. * Mac OS X threading:
  614. * Not thread safe
  615. *
  616. * Parameters:
  617. *
  618. * inWindow:
  619. * The WindowRef into which the Disclosure Triangle will be
  620. * created.
  621. *
  622. * inBoundsRect:
  623. * The desired position (in coordinates local to the window's
  624. * port) for the Disclosure Triangle.
  625. *
  626. * inOrientation:
  627. * The direction the Disclosure Triangle should point when it is
  628. * "closed". Passing kControlDisclosureTrianglePointDefault is
  629. * only legal as of Mac OS X and CarbonLib 1.5.
  630. *
  631. * inTitle:
  632. * The title for the Disclosure Triangle. The title will only be
  633. * displayed if the inDrawTitle parameter is true. Title display
  634. * only works on Mac OS X.
  635. *
  636. * inInitialValue:
  637. * The starting value determines whether the Disclosure Triangle
  638. * is initially in its "open" or "closed" state. The value 0
  639. * represents the "closed" state and 1 represents the "open" state.
  640. *
  641. * inDrawTitle:
  642. * A Boolean indicating whether the Disclosure Triangle should
  643. * draw its title next to the widget. Title display only works on
  644. * Mac OS X.
  645. *
  646. * inAutoToggles:
  647. * A Boolean indicating whether the Disclosure Triangle should
  648. * change its own value (from "open" to "closed" and vice-versa)
  649. * automatically when it is clicked on.
  650. *
  651. * outControl:
  652. * On successful output, outControl will contain a reference to
  653. * the Disclosure Triangle control.
  654. *
  655. * Result:
  656. * An OSStatus code indicating success or failure.
  657. *
  658. * Availability:
  659. * Mac OS X: in version 10.0 and later in Carbon.framework
  660. * CarbonLib: in CarbonLib 1.1 and later
  661. * Non-Carbon CFM: not available
  662. }
  663. function CreateDisclosureTriangleControl( inWindow: WindowRef; const (*var*) inBoundsRect: Rect; inOrientation: ControlDisclosureTriangleOrientation; inTitle: CFStringRef; inInitialValue: SInt32; inDrawTitle: Boolean; inAutoToggles: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateDisclosureTriangleControl';
  664. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  665. { Tagged data supported by disclosure triangles }
  666. const
  667. kControlTriangleLastValueTag = $6C617374 (* 'last' *); { SInt16}
  668. { Helper routines are available only thru the shared library/glue. }
  669. {
  670. * SetDisclosureTriangleLastValue()
  671. *
  672. * Mac OS X threading:
  673. * Not thread safe
  674. *
  675. * Availability:
  676. * Mac OS X: in version 10.0 and later in Carbon.framework
  677. * CarbonLib: in CarbonLib 1.0 and later
  678. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  679. }
  680. function SetDisclosureTriangleLastValue( inTabControl: ControlRef; inValue: SInt16 ): OSErr; external name '_SetDisclosureTriangleLastValue';
  681. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  682. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  683. { ¥ PROGRESS INDICATOR (CDEF 5) }
  684. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  685. { This CDEF implements both determinate and indeterminate progress bars. To switch, }
  686. { just use SetControlData to set the indeterminate flag to make it indeterminate. Any }
  687. { animation will automatically be handled by the toolbox on an event timer. }
  688. { We also use this same CDEF for Relevance bars. At this time this control does not }
  689. { idle. }
  690. { Progress Bar proc IDs }
  691. const
  692. kControlProgressBarProc = 80;
  693. kControlRelevanceBarProc = 81;
  694. { Control Kind Tag }
  695. const
  696. kControlKindProgressBar = $70726762 (* 'prgb' *);
  697. kControlKindRelevanceBar = $72656C62 (* 'relb' *);
  698. { The HIObject class ID for the HIProgressBar class. }
  699. {$ifc USE_CFSTR_CONSTANT_MACROS}
  700. {$definec kHIProgressBarClassID CFSTRP('com.apple.HIProgressBar')}
  701. {$endc}
  702. { Creation API: Carbon only }
  703. {
  704. * CreateProgressBarControl()
  705. *
  706. * Mac OS X threading:
  707. * Not thread safe
  708. *
  709. * Availability:
  710. * Mac OS X: in version 10.0 and later in Carbon.framework
  711. * CarbonLib: in CarbonLib 1.1 and later
  712. * Non-Carbon CFM: not available
  713. }
  714. function CreateProgressBarControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; indeterminate: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateProgressBarControl';
  715. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  716. { The HIObject class ID for the HIRelevanceBar class. }
  717. {$ifc USE_CFSTR_CONSTANT_MACROS}
  718. {$definec kHIRelevanceBarClassID CFSTRP('com.apple.HIRelevanceBar')}
  719. {$endc}
  720. {
  721. * CreateRelevanceBarControl()
  722. *
  723. * Mac OS X threading:
  724. * Not thread safe
  725. *
  726. * Availability:
  727. * Mac OS X: in version 10.0 and later in Carbon.framework
  728. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  729. * Non-Carbon CFM: not available
  730. }
  731. function CreateRelevanceBarControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; var outControl: ControlRef ): OSStatus; external name '_CreateRelevanceBarControl';
  732. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  733. { Tagged data supported by progress bars }
  734. const
  735. kControlProgressBarIndeterminateTag = $696E6465 (* 'inde' *); { Boolean}
  736. kControlProgressBarAnimatingTag = $616E696D (* 'anim' *); { Boolean}
  737. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  738. { ¥ LITTLE ARROWS (CDEF 6) }
  739. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  740. { This control implements the little up and down arrows you'd see in the Memory }
  741. { control panel for adjusting the cache size. }
  742. { Little Arrows proc IDs }
  743. const
  744. kControlLittleArrowsProc = 96;
  745. { Control Kind Tag }
  746. const
  747. kControlKindLittleArrows = $6C617272 (* 'larr' *);
  748. {
  749. * Summary:
  750. * Tags available with Mac OS X 10.3 or later
  751. }
  752. const
  753. {
  754. * Passed data is an SInt32. Gets or sets the increment value of the
  755. * control.
  756. }
  757. kControlLittleArrowsIncrementValueTag = $696E6372 (* 'incr' *);
  758. { The HIObject class ID for the HILittleArrows class. }
  759. {$ifc USE_CFSTR_CONSTANT_MACROS}
  760. {$definec kHILittleArrowsClassID CFSTRP('com.apple.HILittleArrows')}
  761. {$endc}
  762. { Creation API: Carbon only }
  763. {
  764. * CreateLittleArrowsControl()
  765. *
  766. * Mac OS X threading:
  767. * Not thread safe
  768. *
  769. * Availability:
  770. * Mac OS X: in version 10.0 and later in Carbon.framework
  771. * CarbonLib: in CarbonLib 1.1 and later
  772. * Non-Carbon CFM: not available
  773. }
  774. function CreateLittleArrowsControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; increment: SInt32; var outControl: ControlRef ): OSStatus; external name '_CreateLittleArrowsControl';
  775. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  776. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  777. { ¥ CHASING ARROWS (CDEF 7) }
  778. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  779. { This control will automatically animate via an event loop timer. }
  780. { Chasing Arrows proc IDs }
  781. const
  782. kControlChasingArrowsProc = 112;
  783. { Control Kind Tag }
  784. const
  785. kControlKindChasingArrows = $63617272 (* 'carr' *);
  786. { The HIObject class ID for the HIChasingArrows class. }
  787. {$ifc USE_CFSTR_CONSTANT_MACROS}
  788. {$definec kHIChasingArrowsClassID CFSTRP('com.apple.HIChasingArrows')}
  789. {$endc}
  790. { Creation API: Carbon only }
  791. {
  792. * CreateChasingArrowsControl()
  793. *
  794. * Mac OS X threading:
  795. * Not thread safe
  796. *
  797. * Availability:
  798. * Mac OS X: in version 10.0 and later in Carbon.framework
  799. * CarbonLib: in CarbonLib 1.1 and later
  800. * Non-Carbon CFM: not available
  801. }
  802. function CreateChasingArrowsControl( window: WindowRef; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreateChasingArrowsControl';
  803. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  804. { Tagged data supported by the Chasing Arrows control }
  805. const
  806. kControlChasingArrowsAnimatingTag = $616E696D (* 'anim' *); { Boolean}
  807. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  808. { ¥ TABS (CDEF 8) }
  809. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  810. { Tabs use an auxiliary resource (tab#) to hold tab information such as the tab name }
  811. { and an icon suite ID for each tab. }
  812. { The ID of the tab# resource that you wish to associate with a tab control should }
  813. { be passed in as the Value parameter of the control. If you are using GetNewControl, }
  814. { then the Value slot in the CNTL resource should have the ID of the 'tab#' resource }
  815. { on creation. }
  816. { Passing zero in for the tab# resource tells the control not to read in a tab# res. }
  817. { You can then use SetControlMaximum to add tabs, followed by a call to SetControlData}
  818. { with the kControlTabInfoTag, passing in a pointer to a ControlTabInfoRec. This sets }
  819. { the name and optionally an icon for a tab. Pass the 1-based tab index as the part }
  820. { code parameter to SetControlData to indicate the tab that you want to modify. }
  821. { Accessibility Notes: Those of you who wish to customize the accessibility }
  822. { information provided for individual tabs of a tabs control -- by handling various }
  823. { kEventClassAccessibility Carbon Events, by calling }
  824. { HIObjectSetAuxiliaryAccessibilityAttribute, etc. -- need to know how to interpret }
  825. { and/or build AXUIElementRefs that represent individual tabs. The AXUIElement }
  826. { representing an individual tab will/must be constructed using the tab control's }
  827. { ControlRef and the UInt64 identifier of the one-based index of the tab the element }
  828. { refers to. As usual, a UInt64 identifier of zero represents the tabs control as a }
  829. { whole. You must neither interpret nor create tab control elements whose identifiers }
  830. { are greater than the count of tabs in the tabs control. }
  831. { Tabs proc IDs }
  832. const
  833. kControlTabLargeProc = 128; { Large tab size, north facing }
  834. kControlTabSmallProc = 129; { Small tab size, north facing }
  835. kControlTabLargeNorthProc = 128; { Large tab size, north facing }
  836. kControlTabSmallNorthProc = 129; { Small tab size, north facing }
  837. kControlTabLargeSouthProc = 130; { Large tab size, south facing }
  838. kControlTabSmallSouthProc = 131; { Small tab size, south facing }
  839. kControlTabLargeEastProc = 132; { Large tab size, east facing }
  840. kControlTabSmallEastProc = 133; { Small tab size, east facing }
  841. kControlTabLargeWestProc = 134; { Large tab size, west facing }
  842. kControlTabSmallWestProc = 135; { Small tab size, west facing }
  843. { Tab Directions }
  844. type
  845. ControlTabDirection = UInt16;
  846. const
  847. kControlTabDirectionNorth = 0;
  848. kControlTabDirectionSouth = 1;
  849. kControlTabDirectionEast = 2;
  850. kControlTabDirectionWest = 3;
  851. { Tab Sizes }
  852. type
  853. ControlTabSize = UInt16;
  854. const
  855. kControlTabSizeLarge = kControlSizeNormal;
  856. kControlTabSizeSmall = kControlSizeSmall;
  857. kControlTabSizeMini = kControlSizeMini;
  858. { Control Tab Entry - used during creation }
  859. { Note that the client is responsible for allocating/providing }
  860. { the ControlButtonContentInfo and string storage for this }
  861. { structure. }
  862. type
  863. ControlTabEntry = record
  864. icon: ControlButtonContentInfoPtr;
  865. name: CFStringRef;
  866. enabled: Boolean;
  867. end;
  868. { Control Kind Tag }
  869. const
  870. kControlKindTabs = $74616273 (* 'tabs' *);
  871. { The HIObject class ID for the HITabbedView class. }
  872. {$ifc USE_CFSTR_CONSTANT_MACROS}
  873. {$definec kHITabbedViewClassID CFSTRP('com.apple.HITabbedView')}
  874. {$endc}
  875. { Creation API: Carbon only }
  876. {
  877. * CreateTabsControl()
  878. *
  879. * Mac OS X threading:
  880. * Not thread safe
  881. *
  882. * Availability:
  883. * Mac OS X: in version 10.0 and later in Carbon.framework
  884. * CarbonLib: in CarbonLib 1.1 and later
  885. * Non-Carbon CFM: not available
  886. }
  887. function CreateTabsControl( window: WindowRef; const (*var*) boundsRect: Rect; size: ControlTabSize; direction: ControlTabDirection; numTabs: UInt16; const (*var*) tabArray: ControlTabEntry; var outControl: ControlRef ): OSStatus; external name '_CreateTabsControl';
  888. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  889. { Tagged data supported by tabs }
  890. const
  891. kControlTabContentRectTag = $72656374 (* 'rect' *); { Rect}
  892. kControlTabEnabledFlagTag = $656E6162 (* 'enab' *); { Boolean}
  893. kControlTabFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
  894. { New tags in 1.0.1 or later }
  895. const
  896. kControlTabInfoTag = $74616269 (* 'tabi' *); { ControlTabInfoRec}
  897. { New tags in X 10.1 or later }
  898. const
  899. kControlTabImageContentTag = $636F6E74 (* 'cont' *); { ControlButtonContentInfo}
  900. const
  901. kControlTabInfoVersionZero = 0; { ControlTabInfoRec}
  902. kControlTabInfoVersionOne = 1; { ControlTabInfoRecV1}
  903. type
  904. ControlTabInfoRecPtr = ^ControlTabInfoRec;
  905. ControlTabInfoRec = record
  906. version: SInt16; { version of this structure.}
  907. iconSuiteID: SInt16; { icon suite to use. Zero indicates no icon}
  908. name: Str255; { name to be displayed on the tab}
  909. end;
  910. type
  911. ControlTabInfoRecV1Ptr = ^ControlTabInfoRecV1;
  912. ControlTabInfoRecV1 = record
  913. version: SInt16; { version of this structure. == kControlTabInfoVersionOne}
  914. iconSuiteID: SInt16; { icon suite to use. Zero indicates no icon}
  915. name: CFStringRef; { name to be displayed on the tab. Will be retained so caller}
  916. { should always release it.}
  917. end;
  918. { Helper routines are available only thru the shared library/glue. }
  919. {
  920. * GetTabContentRect()
  921. *
  922. * Mac OS X threading:
  923. * Not thread safe
  924. *
  925. * Availability:
  926. * Mac OS X: in version 10.0 and later in Carbon.framework
  927. * CarbonLib: in CarbonLib 1.0 and later
  928. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  929. }
  930. function GetTabContentRect( inTabControl: ControlRef; var outContentRect: Rect ): OSErr; external name '_GetTabContentRect';
  931. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  932. {
  933. * SetTabEnabled()
  934. *
  935. * Mac OS X threading:
  936. * Not thread safe
  937. *
  938. * Availability:
  939. * Mac OS X: in version 10.0 and later in Carbon.framework
  940. * CarbonLib: in CarbonLib 1.0 and later
  941. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  942. }
  943. function SetTabEnabled( inTabControl: ControlRef; inTabToHilite: SInt16; inEnabled: Boolean ): OSErr; external name '_SetTabEnabled';
  944. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  945. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  946. { ¥ VISUAL SEPARATOR (CDEF 9) }
  947. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  948. { Separator lines determine their orientation (horizontal or vertical) automatically }
  949. { based on the relative height and width of their contrlRect. }
  950. { Visual separator proc IDs }
  951. const
  952. kControlSeparatorLineProc = 144;
  953. { Control Kind Tag }
  954. const
  955. kControlKindSeparator = $73657061 (* 'sepa' *);
  956. { The HIObject class ID for the HIVisualSeparator class. }
  957. {$ifc USE_CFSTR_CONSTANT_MACROS}
  958. {$definec kHIVisualSeparatorClassID CFSTRP('com.apple.HIVisualSeparator')}
  959. {$endc}
  960. { Creation API: Carbon only }
  961. {
  962. * CreateSeparatorControl()
  963. *
  964. * Mac OS X threading:
  965. * Not thread safe
  966. *
  967. * Availability:
  968. * Mac OS X: in version 10.0 and later in Carbon.framework
  969. * CarbonLib: in CarbonLib 1.1 and later
  970. * Non-Carbon CFM: not available
  971. }
  972. function CreateSeparatorControl( window: WindowRef; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreateSeparatorControl';
  973. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  974. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  975. { ¥ GROUP BOX (CDEF 10) }
  976. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  977. { The group box CDEF can be use in several ways. It can have no title, a text title, }
  978. { a check box as the title, or a popup button as a title. There are two versions of }
  979. { group boxes, primary and secondary, which look slightly different. }
  980. { Group Box proc IDs }
  981. const
  982. kControlGroupBoxTextTitleProc = 160;
  983. kControlGroupBoxCheckBoxProc = 161;
  984. kControlGroupBoxPopupButtonProc = 162;
  985. kControlGroupBoxSecondaryTextTitleProc = 164;
  986. kControlGroupBoxSecondaryCheckBoxProc = 165;
  987. kControlGroupBoxSecondaryPopupButtonProc = 166;
  988. { Control Kind Tag }
  989. const
  990. kControlKindGroupBox = $67727062 (* 'grpb' *);
  991. kControlKindCheckGroupBox = $63677270 (* 'cgrp' *);
  992. kControlKindPopupGroupBox = $70677270 (* 'pgrp' *);
  993. { The HIObject class ID for the HIGroupBox class. }
  994. {$ifc USE_CFSTR_CONSTANT_MACROS}
  995. {$definec kHIGroupBoxClassID CFSTRP('com.apple.HIGroupBox')}
  996. {$endc}
  997. { The HIObject class ID for the HICheckBoxGroup class. }
  998. {$ifc USE_CFSTR_CONSTANT_MACROS}
  999. {$definec kHICheckBoxGroupClassID CFSTRP('com.apple.HICheckBoxGroup')}
  1000. {$endc}
  1001. { Creation APIs: Carbon only }
  1002. {
  1003. * CreateGroupBoxControl()
  1004. *
  1005. * Summary:
  1006. * Creates a group box control.
  1007. *
  1008. * Mac OS X threading:
  1009. * Not thread safe
  1010. *
  1011. * Parameters:
  1012. *
  1013. * window:
  1014. * The window that should contain the control.
  1015. *
  1016. * boundsRect:
  1017. * The bounding box of the control.
  1018. *
  1019. * title:
  1020. * The title of the control.
  1021. *
  1022. * primary:
  1023. * Whether to create a primary or secondary group box.
  1024. *
  1025. * outControl:
  1026. * On exit, contains the new control.
  1027. *
  1028. * Availability:
  1029. * Mac OS X: in version 10.0 and later in Carbon.framework
  1030. * CarbonLib: in CarbonLib 1.1 and later
  1031. * Non-Carbon CFM: not available
  1032. }
  1033. function CreateGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; primary: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateGroupBoxControl';
  1034. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1035. {
  1036. * CreateCheckGroupBoxControl()
  1037. *
  1038. * Summary:
  1039. * Creates a group box control that has a check box as its title.
  1040. *
  1041. * Mac OS X threading:
  1042. * Not thread safe
  1043. *
  1044. * Parameters:
  1045. *
  1046. * window:
  1047. * The window that should contain the control.
  1048. *
  1049. * boundsRect:
  1050. * The bounding box of the control.
  1051. *
  1052. * title:
  1053. * The title of the control (used as the title of the check box).
  1054. *
  1055. * initialValue:
  1056. * The initial value of the check box.
  1057. *
  1058. * primary:
  1059. * Whether to create a primary or secondary group box.
  1060. *
  1061. * autoToggle:
  1062. * Whether to create an auto-toggling check box. Auto-toggling
  1063. * check box titles are only supported on Mac OS X; this parameter
  1064. * must be false when used with CarbonLib.
  1065. *
  1066. * outControl:
  1067. * On exit, contains the new control.
  1068. *
  1069. * Availability:
  1070. * Mac OS X: in version 10.0 and later in Carbon.framework
  1071. * CarbonLib: in CarbonLib 1.1 and later
  1072. * Non-Carbon CFM: not available
  1073. }
  1074. function CreateCheckGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; initialValue: SInt32; primary: Boolean; autoToggle: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateCheckGroupBoxControl';
  1075. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1076. {
  1077. * CreatePopupGroupBoxControl()
  1078. *
  1079. * Summary:
  1080. * Creates a group box control that has a popup button as its title.
  1081. *
  1082. * Mac OS X threading:
  1083. * Not thread safe
  1084. *
  1085. * Parameters:
  1086. *
  1087. * window:
  1088. * The window that should contain the control.
  1089. *
  1090. * boundsRect:
  1091. * The bounding box of the control.
  1092. *
  1093. * title:
  1094. * The title of the control (used as the title of the popup
  1095. * button).
  1096. *
  1097. * primary:
  1098. * Whether to create a primary or secondary group box.
  1099. *
  1100. * menuID:
  1101. * The menu ID of the menu to be displayed by the popup button.
  1102. *
  1103. * variableWidth:
  1104. * Whether the popup button should have a variable-width title.
  1105. * Fixed-width titles are only supported by Mac OS X; this
  1106. * parameter must be true when used with CarbonLib.
  1107. *
  1108. * titleWidth:
  1109. * The width in pixels of the popup button title.
  1110. *
  1111. * titleJustification:
  1112. * The justification of the popup button title. Use one of the
  1113. * TextEdit justification constants here (teFlushDefault,
  1114. * teCenter, teFlushRight, or teFlushLeft).
  1115. *
  1116. * titleStyle:
  1117. * The QuickDraw text style of the popup button title.
  1118. *
  1119. * outControl:
  1120. * On exit, contains the new control.
  1121. *
  1122. * Availability:
  1123. * Mac OS X: in version 10.0 and later in Carbon.framework
  1124. * CarbonLib: in CarbonLib 1.1 and later
  1125. * Non-Carbon CFM: not available
  1126. }
  1127. function CreatePopupGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; primary: Boolean; menuID: SInt16; variableWidth: Boolean; titleWidth: SInt16; titleJustification: SInt16; titleStyle: Style; var outControl: ControlRef ): OSStatus; external name '_CreatePopupGroupBoxControl';
  1128. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1129. { Tagged data supported by group box }
  1130. const
  1131. kControlGroupBoxMenuHandleTag = $6D68616E (* 'mhan' *); { MenuRef (popup title only)}
  1132. kControlGroupBoxMenuRefTag = $6D68616E (* 'mhan' *); { MenuRef (popup title only)}
  1133. kControlGroupBoxFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
  1134. { tags available with Appearance 1.1 or later }
  1135. const
  1136. kControlGroupBoxTitleRectTag = $74726563 (* 'trec' *); { Rect. Rectangle that the title text/control is drawn in. (get only)}
  1137. {
  1138. * Summary:
  1139. * Tags available with Mac OS X 10.3 or later
  1140. }
  1141. const
  1142. {
  1143. * Passed data is a Rect. Returns the full rectangle that content is
  1144. * drawn in (get only). This is slightly different than the content
  1145. * region, as it also includes the frame drawn around the content.
  1146. }
  1147. kControlGroupBoxFrameRectTag = $66726563 (* 'frec' *);
  1148. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1149. { ¥ IMAGE WELL (CDEF 11) }
  1150. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1151. { Image Wells allow you to control the content type (pict/icon/etc.) shown in the }
  1152. { well. }
  1153. { This is made possible by overloading the Min and Value parameters for the control. }
  1154. { Parameter What Goes Here }
  1155. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  1156. { Min content type (see constants for bevel buttons) }
  1157. { Value Resource ID of content type, if resource-based. }
  1158. { Handle-based Content }
  1159. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  1160. { You can create your control and then set the content to an existing handle to an }
  1161. { icon suite, etc. using the macros below. Please keep in mind that resource-based }
  1162. { content is owned by the control, handle-based content is owned by you. The CDEF will}
  1163. { not try to dispose of handle-based content. If you are changing the content type of }
  1164. { the button on the fly, you must make sure that if you are replacing a handle- }
  1165. { based content with a resource-based content to properly dispose of the handle, }
  1166. { else a memory leak will ensue. }
  1167. { Image Well proc IDs }
  1168. const
  1169. kControlImageWellProc = 176;
  1170. { Control Kind Tag }
  1171. const
  1172. kControlKindImageWell = $77656C6C (* 'well' *);
  1173. { The HIObject class ID for the HIImageWell class. }
  1174. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1175. {$definec kHIImageWellClassID CFSTRP('com.apple.HIImageWell')}
  1176. {$endc}
  1177. { Creation API: Carbon only }
  1178. {
  1179. * CreateImageWellControl()
  1180. *
  1181. * Mac OS X threading:
  1182. * Not thread safe
  1183. *
  1184. * Availability:
  1185. * Mac OS X: in version 10.0 and later in Carbon.framework
  1186. * CarbonLib: in CarbonLib 1.1 and later
  1187. * Non-Carbon CFM: not available
  1188. }
  1189. function CreateImageWellControl( window: WindowRef; const (*var*) boundsRect: Rect; const (*var*) info: ControlButtonContentInfo; var outControl: ControlRef ): OSStatus; external name '_CreateImageWellControl';
  1190. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1191. { Tagged data supported by image wells }
  1192. const
  1193. kControlImageWellContentTag = $636F6E74 (* 'cont' *); { ButtonContentInfo}
  1194. kControlImageWellTransformTag = $7472616E (* 'tran' *); { IconTransformType}
  1195. kControlImageWellIsDragDestinationTag = $64726167 (* 'drag' *); { Boolean}
  1196. { Helper routines are available only thru the shared library/glue. }
  1197. {
  1198. * GetImageWellContentInfo()
  1199. *
  1200. * Mac OS X threading:
  1201. * Not thread safe
  1202. *
  1203. * Availability:
  1204. * Mac OS X: in version 10.0 and later in Carbon.framework
  1205. * CarbonLib: in CarbonLib 1.0 and later
  1206. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1207. }
  1208. function GetImageWellContentInfo( inButton: ControlRef; outContent: ControlButtonContentInfoPtr ): OSErr; external name '_GetImageWellContentInfo';
  1209. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1210. {
  1211. * SetImageWellContentInfo()
  1212. *
  1213. * Mac OS X threading:
  1214. * Not thread safe
  1215. *
  1216. * Availability:
  1217. * Mac OS X: in version 10.0 and later in Carbon.framework
  1218. * CarbonLib: in CarbonLib 1.0 and later
  1219. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1220. }
  1221. function SetImageWellContentInfo( inButton: ControlRef; inContent: ControlButtonContentInfoPtr ): OSErr; external name '_SetImageWellContentInfo';
  1222. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1223. {
  1224. * SetImageWellTransform()
  1225. *
  1226. * Mac OS X threading:
  1227. * Not thread safe
  1228. *
  1229. * Availability:
  1230. * Mac OS X: in version 10.0 and later in Carbon.framework
  1231. * CarbonLib: in CarbonLib 1.0 and later
  1232. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1233. }
  1234. function SetImageWellTransform( inButton: ControlRef; inTransform: IconTransformType ): OSErr; external name '_SetImageWellTransform';
  1235. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1236. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1237. { ¥ POPUP ARROW (CDEF 12) }
  1238. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1239. { The popup arrow CDEF is used to draw the small arrow normally associated with a }
  1240. { popup control. The arrow can point in four directions, and a small or large version }
  1241. { can be used. This control is provided to allow clients to draw the arrow in a }
  1242. { normalized fashion which will take advantage of themes automatically. }
  1243. { Popup Arrow proc IDs }
  1244. const
  1245. kControlPopupArrowEastProc = 192;
  1246. kControlPopupArrowWestProc = 193;
  1247. kControlPopupArrowNorthProc = 194;
  1248. kControlPopupArrowSouthProc = 195;
  1249. kControlPopupArrowSmallEastProc = 196;
  1250. kControlPopupArrowSmallWestProc = 197;
  1251. kControlPopupArrowSmallNorthProc = 198;
  1252. kControlPopupArrowSmallSouthProc = 199;
  1253. { Popup Arrow Orientations }
  1254. const
  1255. kControlPopupArrowOrientationEast = 0;
  1256. kControlPopupArrowOrientationWest = 1;
  1257. kControlPopupArrowOrientationNorth = 2;
  1258. kControlPopupArrowOrientationSouth = 3;
  1259. type
  1260. ControlPopupArrowOrientation = UInt16;
  1261. { Popup Arrow Size }
  1262. const
  1263. kControlPopupArrowSizeNormal = 0;
  1264. kControlPopupArrowSizeSmall = 1;
  1265. type
  1266. ControlPopupArrowSize = UInt16;
  1267. { Control Kind Tag }
  1268. const
  1269. kControlKindPopupArrow = $70617272 (* 'parr' *);
  1270. {
  1271. * CreatePopupArrowControl()
  1272. *
  1273. * Summary:
  1274. * Creates a popup arrow control.
  1275. *
  1276. * Mac OS X threading:
  1277. * Not thread safe
  1278. *
  1279. * Parameters:
  1280. *
  1281. * window:
  1282. * The window that should contain the control. May be NULL on 10.3
  1283. * and later.
  1284. *
  1285. * boundsRect:
  1286. * The bounding box of the control.
  1287. *
  1288. * orientation:
  1289. * The orientation of the control.
  1290. *
  1291. * size:
  1292. * The size of the control.
  1293. *
  1294. * outControl:
  1295. * On exit, contains the new control.
  1296. *
  1297. * Availability:
  1298. * Mac OS X: in version 10.0 and later in Carbon.framework
  1299. * CarbonLib: in CarbonLib 1.1 and later
  1300. * Non-Carbon CFM: not available
  1301. }
  1302. function CreatePopupArrowControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; orientation: ControlPopupArrowOrientation; size: ControlPopupArrowSize; var outControl: ControlRef ): OSStatus; external name '_CreatePopupArrowControl';
  1303. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1304. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1305. { ¥ PLACARD (CDEF 14) }
  1306. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1307. { Placard proc IDs }
  1308. const
  1309. kControlPlacardProc = 224;
  1310. { Control Kind Tag }
  1311. const
  1312. kControlKindPlacard = $706C6163 (* 'plac' *);
  1313. { The HIObject class ID for the HIPlacardView class. }
  1314. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1315. {$definec kHIPlacardViewClassID CFSTRP('com.apple.HIPlacardView')}
  1316. {$endc}
  1317. {
  1318. * CreatePlacardControl()
  1319. *
  1320. * Summary:
  1321. * Creates a placard control.
  1322. *
  1323. * Mac OS X threading:
  1324. * Not thread safe
  1325. *
  1326. * Parameters:
  1327. *
  1328. * window:
  1329. * The window that should contain the control. May be NULL on 10.3
  1330. * and later.
  1331. *
  1332. * boundsRect:
  1333. * The bounding box of the control.
  1334. *
  1335. * outControl:
  1336. * On exit, contains the new control.
  1337. *
  1338. * Availability:
  1339. * Mac OS X: in version 10.0 and later in Carbon.framework
  1340. * CarbonLib: in CarbonLib 1.1 and later
  1341. * Non-Carbon CFM: not available
  1342. }
  1343. function CreatePlacardControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreatePlacardControl';
  1344. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1345. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1346. { ¥ CLOCK (CDEF 15) }
  1347. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1348. { NOTE: You can specify more options in the Value paramter when creating the clock. }
  1349. { See below. }
  1350. { NOTE: Under Appearance 1.1, the clock control knows and returns more part codes. }
  1351. { The new clock-specific part codes are defined with the other control parts. }
  1352. { Besides these clock-specific parts, we also return kControlUpButtonPart }
  1353. { and kControlDownButtonPart when they hit the up and down arrows. }
  1354. { The new part codes give you more flexibility for focusing and hit testing. }
  1355. { The original kControlClockPart is still valid. When hit testing, it means }
  1356. { that some non-editable area of the clock's whitespace has been clicked. }
  1357. { When focusing a currently unfocused clock, it changes the focus to the }
  1358. { first part; it is the same as passing kControlFocusNextPart. When }
  1359. { re-focusing a focused clock, it will not change the focus at all. }
  1360. { Clock proc IDs }
  1361. const
  1362. kControlClockTimeProc = 240;
  1363. kControlClockTimeSecondsProc = 241;
  1364. kControlClockDateProc = 242;
  1365. kControlClockMonthYearProc = 243;
  1366. { Clock Types }
  1367. type
  1368. ControlClockType = UInt16;
  1369. const
  1370. kControlClockTypeHourMinute = 0;
  1371. kControlClockTypeHourMinuteSecond = 1;
  1372. kControlClockTypeMonthDayYear = 2;
  1373. kControlClockTypeMonthYear = 3;
  1374. { Clock Flags }
  1375. { These flags can be passed into 'value' field on creation of the control. }
  1376. { Value is set to 0 after control is created. }
  1377. type
  1378. ControlClockFlags = UInt32;
  1379. const
  1380. kControlClockFlagStandard = 0; { editable, non-live}
  1381. kControlClockNoFlags = 0;
  1382. kControlClockFlagDisplayOnly = 1; { add this to become non-editable}
  1383. kControlClockIsDisplayOnly = 1;
  1384. kControlClockFlagLive = 2; { automatically shows current time on idle. only valid with display only.}
  1385. kControlClockIsLive = 2;
  1386. { Control Kind Tag }
  1387. const
  1388. kControlKindClock = $636C636B (* 'clck' *);
  1389. { The HIObject class ID for the HIClock class. }
  1390. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1391. {$definec kHIClockViewClassID CFSTRP('com.apple.HIClock')}
  1392. {$endc}
  1393. { Creation API: Carbon only }
  1394. {
  1395. * CreateClockControl()
  1396. *
  1397. * Mac OS X threading:
  1398. * Not thread safe
  1399. *
  1400. * Availability:
  1401. * Mac OS X: in version 10.0 and later in Carbon.framework
  1402. * CarbonLib: in CarbonLib 1.1 and later
  1403. * Non-Carbon CFM: not available
  1404. }
  1405. function CreateClockControl( window: WindowRef; const (*var*) boundsRect: Rect; clockType: ControlClockType; clockFlags: ControlClockFlags; var outControl: ControlRef ): OSStatus; external name '_CreateClockControl';
  1406. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1407. { Tagged data supported by clocks }
  1408. const
  1409. kControlClockLongDateTag = $64617465 (* 'date' *); { LongDateRec}
  1410. kControlClockFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
  1411. kControlClockAnimatingTag = $616E696D (* 'anim' *); { Boolean}
  1412. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1413. { ¥ USER PANE (CDEF 16) }
  1414. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1415. { User panes have two primary purposes: to allow easy implementation of a custom }
  1416. { control by the developer, and to provide a generic container for embedding other }
  1417. { controls. }
  1418. { In Carbon, with the advent of Carbon-event-based controls, you may find it easier }
  1419. { to simply write a new control from scratch than to customize a user pane control. }
  1420. { The set of callbacks provided by the user pane will not be extended to support }
  1421. { new Control Manager features; instead, you should just write a real control. }
  1422. { User panes do not, by default, support embedding. If you try to embed a control }
  1423. { into a user pane, you will get back errControlIsNotEmbedder. You can make a user }
  1424. { pane support embedding by passing the kControlSupportsEmbedding flag in the 'value' }
  1425. { parameter when you create the control. }
  1426. { User panes support the following overloaded control initialization options: }
  1427. { Parameter What Goes Here }
  1428. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  1429. { Value Control feature flags }
  1430. { User Pane proc IDs }
  1431. const
  1432. kControlUserPaneProc = 256;
  1433. { Control Kind Tag }
  1434. const
  1435. kControlKindUserPane = $7570616E (* 'upan' *);
  1436. { The HIObject class ID for the HIUserPane class. }
  1437. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1438. {$definec kHIUserPaneClassID CFSTRP('com.apple.HIUserPane')}
  1439. {$endc}
  1440. { Creation API: Carbon only }
  1441. {
  1442. * CreateUserPaneControl()
  1443. *
  1444. * Mac OS X threading:
  1445. * Not thread safe
  1446. *
  1447. * Availability:
  1448. * Mac OS X: in version 10.0 and later in Carbon.framework
  1449. * CarbonLib: in CarbonLib 1.1 and later
  1450. * Non-Carbon CFM: not available
  1451. }
  1452. function CreateUserPaneControl( window: WindowRef; const (*var*) boundsRect: Rect; features: UInt32; var outControl: ControlRef ): OSStatus; external name '_CreateUserPaneControl';
  1453. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1454. { Tagged data supported by user panes }
  1455. { Currently, they are all proc ptrs for doing things like drawing and hit testing, etc. }
  1456. const
  1457. kControlUserItemDrawProcTag = $75696470 (* 'uidp' *); { UserItemUPP}
  1458. kControlUserPaneDrawProcTag = $64726177 (* 'draw' *); { ControlUserPaneDrawUPP}
  1459. kControlUserPaneHitTestProcTag = $68697474 (* 'hitt' *); { ControlUserPaneHitTestUPP}
  1460. kControlUserPaneTrackingProcTag = $7472616B (* 'trak' *); { ControlUserPaneTrackingUPP}
  1461. kControlUserPaneIdleProcTag = $69646C65 (* 'idle' *); { ControlUserPaneIdleUPP}
  1462. kControlUserPaneKeyDownProcTag = $6B657964 (* 'keyd' *); { ControlUserPaneKeyDownUPP}
  1463. kControlUserPaneActivateProcTag = $61637469 (* 'acti' *); { ControlUserPaneActivateUPP}
  1464. kControlUserPaneFocusProcTag = $666F6369 (* 'foci' *); { ControlUserPaneFocusUPP}
  1465. kControlUserPaneBackgroundProcTag = $6261636B (* 'back' *); { ControlUserPaneBackgroundUPP}
  1466. type
  1467. ControlUserPaneDrawProcPtr = procedure( control: ControlRef; part: SInt16 );
  1468. type
  1469. ControlUserPaneHitTestProcPtr = function( control: ControlRef; where: Point ): ControlPartCode;
  1470. type
  1471. ControlUserPaneTrackingProcPtr = function( control: ControlRef; startPt: Point; actionProc: ControlActionUPP ): ControlPartCode;
  1472. type
  1473. ControlUserPaneIdleProcPtr = procedure( control: ControlRef );
  1474. type
  1475. ControlUserPaneKeyDownProcPtr = function( control: ControlRef; keyCode: SInt16; charCode: SInt16; modifiers: SInt16 ): ControlPartCode;
  1476. type
  1477. ControlUserPaneActivateProcPtr = procedure( control: ControlRef; activating: Boolean );
  1478. type
  1479. ControlUserPaneFocusProcPtr = function( control: ControlRef; action: ControlFocusPart ): ControlPartCode;
  1480. type
  1481. ControlUserPaneBackgroundProcPtr = procedure( control: ControlRef; info: ControlBackgroundPtr );
  1482. type
  1483. ControlUserPaneDrawUPP = ControlUserPaneDrawProcPtr;
  1484. type
  1485. ControlUserPaneHitTestUPP = ControlUserPaneHitTestProcPtr;
  1486. type
  1487. ControlUserPaneTrackingUPP = ControlUserPaneTrackingProcPtr;
  1488. type
  1489. ControlUserPaneIdleUPP = ControlUserPaneIdleProcPtr;
  1490. type
  1491. ControlUserPaneKeyDownUPP = ControlUserPaneKeyDownProcPtr;
  1492. type
  1493. ControlUserPaneActivateUPP = ControlUserPaneActivateProcPtr;
  1494. type
  1495. ControlUserPaneFocusUPP = ControlUserPaneFocusProcPtr;
  1496. type
  1497. ControlUserPaneBackgroundUPP = ControlUserPaneBackgroundProcPtr;
  1498. {
  1499. * NewControlUserPaneDrawUPP()
  1500. *
  1501. * Availability:
  1502. * Mac OS X: in version 10.0 and later in Carbon.framework
  1503. * CarbonLib: in CarbonLib 1.0 and later
  1504. * Non-Carbon CFM: available as macro/inline
  1505. }
  1506. function NewControlUserPaneDrawUPP( userRoutine: ControlUserPaneDrawProcPtr ): ControlUserPaneDrawUPP; external name '_NewControlUserPaneDrawUPP';
  1507. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1508. {
  1509. * NewControlUserPaneHitTestUPP()
  1510. *
  1511. * Availability:
  1512. * Mac OS X: in version 10.0 and later in Carbon.framework
  1513. * CarbonLib: in CarbonLib 1.0 and later
  1514. * Non-Carbon CFM: available as macro/inline
  1515. }
  1516. function NewControlUserPaneHitTestUPP( userRoutine: ControlUserPaneHitTestProcPtr ): ControlUserPaneHitTestUPP; external name '_NewControlUserPaneHitTestUPP';
  1517. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1518. {
  1519. * NewControlUserPaneTrackingUPP()
  1520. *
  1521. * Availability:
  1522. * Mac OS X: in version 10.0 and later in Carbon.framework
  1523. * CarbonLib: in CarbonLib 1.0 and later
  1524. * Non-Carbon CFM: available as macro/inline
  1525. }
  1526. function NewControlUserPaneTrackingUPP( userRoutine: ControlUserPaneTrackingProcPtr ): ControlUserPaneTrackingUPP; external name '_NewControlUserPaneTrackingUPP';
  1527. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1528. {
  1529. * NewControlUserPaneIdleUPP()
  1530. *
  1531. * Availability:
  1532. * Mac OS X: in version 10.0 and later in Carbon.framework
  1533. * CarbonLib: in CarbonLib 1.0 and later
  1534. * Non-Carbon CFM: available as macro/inline
  1535. }
  1536. function NewControlUserPaneIdleUPP( userRoutine: ControlUserPaneIdleProcPtr ): ControlUserPaneIdleUPP; external name '_NewControlUserPaneIdleUPP';
  1537. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1538. {
  1539. * NewControlUserPaneKeyDownUPP()
  1540. *
  1541. * Availability:
  1542. * Mac OS X: in version 10.0 and later in Carbon.framework
  1543. * CarbonLib: in CarbonLib 1.0 and later
  1544. * Non-Carbon CFM: available as macro/inline
  1545. }
  1546. function NewControlUserPaneKeyDownUPP( userRoutine: ControlUserPaneKeyDownProcPtr ): ControlUserPaneKeyDownUPP; external name '_NewControlUserPaneKeyDownUPP';
  1547. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1548. {
  1549. * NewControlUserPaneActivateUPP()
  1550. *
  1551. * Availability:
  1552. * Mac OS X: in version 10.0 and later in Carbon.framework
  1553. * CarbonLib: in CarbonLib 1.0 and later
  1554. * Non-Carbon CFM: available as macro/inline
  1555. }
  1556. function NewControlUserPaneActivateUPP( userRoutine: ControlUserPaneActivateProcPtr ): ControlUserPaneActivateUPP; external name '_NewControlUserPaneActivateUPP';
  1557. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1558. {
  1559. * NewControlUserPaneFocusUPP()
  1560. *
  1561. * Availability:
  1562. * Mac OS X: in version 10.0 and later in Carbon.framework
  1563. * CarbonLib: in CarbonLib 1.0 and later
  1564. * Non-Carbon CFM: available as macro/inline
  1565. }
  1566. function NewControlUserPaneFocusUPP( userRoutine: ControlUserPaneFocusProcPtr ): ControlUserPaneFocusUPP; external name '_NewControlUserPaneFocusUPP';
  1567. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1568. {
  1569. * NewControlUserPaneBackgroundUPP()
  1570. *
  1571. * Availability:
  1572. * Mac OS X: in version 10.0 and later in Carbon.framework
  1573. * CarbonLib: in CarbonLib 1.0 and later
  1574. * Non-Carbon CFM: available as macro/inline
  1575. }
  1576. function NewControlUserPaneBackgroundUPP( userRoutine: ControlUserPaneBackgroundProcPtr ): ControlUserPaneBackgroundUPP; external name '_NewControlUserPaneBackgroundUPP';
  1577. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1578. {
  1579. * DisposeControlUserPaneDrawUPP()
  1580. *
  1581. * Availability:
  1582. * Mac OS X: in version 10.0 and later in Carbon.framework
  1583. * CarbonLib: in CarbonLib 1.0 and later
  1584. * Non-Carbon CFM: available as macro/inline
  1585. }
  1586. procedure DisposeControlUserPaneDrawUPP( userUPP: ControlUserPaneDrawUPP ); external name '_DisposeControlUserPaneDrawUPP';
  1587. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1588. {
  1589. * DisposeControlUserPaneHitTestUPP()
  1590. *
  1591. * Availability:
  1592. * Mac OS X: in version 10.0 and later in Carbon.framework
  1593. * CarbonLib: in CarbonLib 1.0 and later
  1594. * Non-Carbon CFM: available as macro/inline
  1595. }
  1596. procedure DisposeControlUserPaneHitTestUPP( userUPP: ControlUserPaneHitTestUPP ); external name '_DisposeControlUserPaneHitTestUPP';
  1597. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1598. {
  1599. * DisposeControlUserPaneTrackingUPP()
  1600. *
  1601. * Availability:
  1602. * Mac OS X: in version 10.0 and later in Carbon.framework
  1603. * CarbonLib: in CarbonLib 1.0 and later
  1604. * Non-Carbon CFM: available as macro/inline
  1605. }
  1606. procedure DisposeControlUserPaneTrackingUPP( userUPP: ControlUserPaneTrackingUPP ); external name '_DisposeControlUserPaneTrackingUPP';
  1607. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1608. {
  1609. * DisposeControlUserPaneIdleUPP()
  1610. *
  1611. * Availability:
  1612. * Mac OS X: in version 10.0 and later in Carbon.framework
  1613. * CarbonLib: in CarbonLib 1.0 and later
  1614. * Non-Carbon CFM: available as macro/inline
  1615. }
  1616. procedure DisposeControlUserPaneIdleUPP( userUPP: ControlUserPaneIdleUPP ); external name '_DisposeControlUserPaneIdleUPP';
  1617. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1618. {
  1619. * DisposeControlUserPaneKeyDownUPP()
  1620. *
  1621. * Availability:
  1622. * Mac OS X: in version 10.0 and later in Carbon.framework
  1623. * CarbonLib: in CarbonLib 1.0 and later
  1624. * Non-Carbon CFM: available as macro/inline
  1625. }
  1626. procedure DisposeControlUserPaneKeyDownUPP( userUPP: ControlUserPaneKeyDownUPP ); external name '_DisposeControlUserPaneKeyDownUPP';
  1627. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1628. {
  1629. * DisposeControlUserPaneActivateUPP()
  1630. *
  1631. * Availability:
  1632. * Mac OS X: in version 10.0 and later in Carbon.framework
  1633. * CarbonLib: in CarbonLib 1.0 and later
  1634. * Non-Carbon CFM: available as macro/inline
  1635. }
  1636. procedure DisposeControlUserPaneActivateUPP( userUPP: ControlUserPaneActivateUPP ); external name '_DisposeControlUserPaneActivateUPP';
  1637. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1638. {
  1639. * DisposeControlUserPaneFocusUPP()
  1640. *
  1641. * Availability:
  1642. * Mac OS X: in version 10.0 and later in Carbon.framework
  1643. * CarbonLib: in CarbonLib 1.0 and later
  1644. * Non-Carbon CFM: available as macro/inline
  1645. }
  1646. procedure DisposeControlUserPaneFocusUPP( userUPP: ControlUserPaneFocusUPP ); external name '_DisposeControlUserPaneFocusUPP';
  1647. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1648. {
  1649. * DisposeControlUserPaneBackgroundUPP()
  1650. *
  1651. * Availability:
  1652. * Mac OS X: in version 10.0 and later in Carbon.framework
  1653. * CarbonLib: in CarbonLib 1.0 and later
  1654. * Non-Carbon CFM: available as macro/inline
  1655. }
  1656. procedure DisposeControlUserPaneBackgroundUPP( userUPP: ControlUserPaneBackgroundUPP ); external name '_DisposeControlUserPaneBackgroundUPP';
  1657. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1658. {
  1659. * InvokeControlUserPaneDrawUPP()
  1660. *
  1661. * Availability:
  1662. * Mac OS X: in version 10.0 and later in Carbon.framework
  1663. * CarbonLib: in CarbonLib 1.0 and later
  1664. * Non-Carbon CFM: available as macro/inline
  1665. }
  1666. procedure InvokeControlUserPaneDrawUPP( control: ControlRef; part: SInt16; userUPP: ControlUserPaneDrawUPP ); external name '_InvokeControlUserPaneDrawUPP';
  1667. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1668. {
  1669. * InvokeControlUserPaneHitTestUPP()
  1670. *
  1671. * Availability:
  1672. * Mac OS X: in version 10.0 and later in Carbon.framework
  1673. * CarbonLib: in CarbonLib 1.0 and later
  1674. * Non-Carbon CFM: available as macro/inline
  1675. }
  1676. function InvokeControlUserPaneHitTestUPP( control: ControlRef; where: Point; userUPP: ControlUserPaneHitTestUPP ): ControlPartCode; external name '_InvokeControlUserPaneHitTestUPP';
  1677. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1678. {
  1679. * InvokeControlUserPaneTrackingUPP()
  1680. *
  1681. * Availability:
  1682. * Mac OS X: in version 10.0 and later in Carbon.framework
  1683. * CarbonLib: in CarbonLib 1.0 and later
  1684. * Non-Carbon CFM: available as macro/inline
  1685. }
  1686. function InvokeControlUserPaneTrackingUPP( control: ControlRef; startPt: Point; actionProc: ControlActionUPP; userUPP: ControlUserPaneTrackingUPP ): ControlPartCode; external name '_InvokeControlUserPaneTrackingUPP';
  1687. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1688. {
  1689. * InvokeControlUserPaneIdleUPP()
  1690. *
  1691. * Availability:
  1692. * Mac OS X: in version 10.0 and later in Carbon.framework
  1693. * CarbonLib: in CarbonLib 1.0 and later
  1694. * Non-Carbon CFM: available as macro/inline
  1695. }
  1696. procedure InvokeControlUserPaneIdleUPP( control: ControlRef; userUPP: ControlUserPaneIdleUPP ); external name '_InvokeControlUserPaneIdleUPP';
  1697. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1698. {
  1699. * InvokeControlUserPaneKeyDownUPP()
  1700. *
  1701. * Availability:
  1702. * Mac OS X: in version 10.0 and later in Carbon.framework
  1703. * CarbonLib: in CarbonLib 1.0 and later
  1704. * Non-Carbon CFM: available as macro/inline
  1705. }
  1706. function InvokeControlUserPaneKeyDownUPP( control: ControlRef; keyCode: SInt16; charCode: SInt16; modifiers: SInt16; userUPP: ControlUserPaneKeyDownUPP ): ControlPartCode; external name '_InvokeControlUserPaneKeyDownUPP';
  1707. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1708. {
  1709. * InvokeControlUserPaneActivateUPP()
  1710. *
  1711. * Availability:
  1712. * Mac OS X: in version 10.0 and later in Carbon.framework
  1713. * CarbonLib: in CarbonLib 1.0 and later
  1714. * Non-Carbon CFM: available as macro/inline
  1715. }
  1716. procedure InvokeControlUserPaneActivateUPP( control: ControlRef; activating: Boolean; userUPP: ControlUserPaneActivateUPP ); external name '_InvokeControlUserPaneActivateUPP';
  1717. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1718. {
  1719. * InvokeControlUserPaneFocusUPP()
  1720. *
  1721. * Availability:
  1722. * Mac OS X: in version 10.0 and later in Carbon.framework
  1723. * CarbonLib: in CarbonLib 1.0 and later
  1724. * Non-Carbon CFM: available as macro/inline
  1725. }
  1726. function InvokeControlUserPaneFocusUPP( control: ControlRef; action: ControlFocusPart; userUPP: ControlUserPaneFocusUPP ): ControlPartCode; external name '_InvokeControlUserPaneFocusUPP';
  1727. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1728. {
  1729. * InvokeControlUserPaneBackgroundUPP()
  1730. *
  1731. * Availability:
  1732. * Mac OS X: in version 10.0 and later in Carbon.framework
  1733. * CarbonLib: in CarbonLib 1.0 and later
  1734. * Non-Carbon CFM: available as macro/inline
  1735. }
  1736. procedure InvokeControlUserPaneBackgroundUPP( control: ControlRef; info: ControlBackgroundPtr; userUPP: ControlUserPaneBackgroundUPP ); external name '_InvokeControlUserPaneBackgroundUPP';
  1737. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1738. {
  1739. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1740. ¥ EDIT TEXT (CDEF 17)
  1741. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  1742. }
  1743. { Edit Text proc IDs }
  1744. const
  1745. kControlEditTextProc = 272;
  1746. kControlEditTextPasswordProc = 274;
  1747. { proc IDs available with Appearance 1.1 or later }
  1748. const
  1749. kControlEditTextInlineInputProc = 276; { Can't combine with the other variants}
  1750. { Control Kind Tag }
  1751. const
  1752. kControlKindEditText = $65747874 (* 'etxt' *);
  1753. {
  1754. * CreateEditTextControl() *** DEPRECATED ***
  1755. *
  1756. * Deprecated:
  1757. * Use CreateEditUnicodeTextControl API instead.
  1758. *
  1759. * Summary:
  1760. * Creates a new edit text control.
  1761. *
  1762. * Discussion:
  1763. * This control is a legacy control. It is deprecated in favor of
  1764. * the EditUnicodeText control, which handles Unicode and draws its
  1765. * text using antialiasing.
  1766. *
  1767. * Mac OS X threading:
  1768. * Not thread safe
  1769. *
  1770. * Parameters:
  1771. *
  1772. * window:
  1773. * The window in which the control should be placed. May be NULL
  1774. * in 10.3 and later.
  1775. *
  1776. * boundsRect:
  1777. * The bounds of the control, in local coordinates of the window.
  1778. *
  1779. * text:
  1780. * The text of the control. May be NULL.
  1781. *
  1782. * isPassword:
  1783. * A Boolean indicating whether the field is to be used as a
  1784. * password field. Passing false indicates that the field is to
  1785. * display entered text normally. True means that the field will
  1786. * be used as a password field and any text typed into the field
  1787. * will be displayed only as bullets.
  1788. *
  1789. * useInlineInput:
  1790. * A Boolean indicating whether or not the control is to accept
  1791. * inline input. Pass true to to accept inline input, otherwise
  1792. * pass false.
  1793. *
  1794. * style:
  1795. * The control's font style, size, color, and so on. May be NULL.
  1796. *
  1797. * outControl:
  1798. * On exit, contains the new control (if noErr is returned as the
  1799. * result code).
  1800. *
  1801. * Result:
  1802. * An operating system result code.
  1803. *
  1804. * Availability:
  1805. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  1806. * CarbonLib: in CarbonLib 1.1 and later
  1807. * Non-Carbon CFM: not available
  1808. }
  1809. function CreateEditTextControl( window: WindowRef; const (*var*) boundsRect: Rect; text: CFStringRef { can be NULL }; isPassword: Boolean; useInlineInput: Boolean; {const} style: ControlFontStyleRecPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateEditTextControl';
  1810. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  1811. { Tagged data supported by edit text }
  1812. const
  1813. kControlEditTextStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
  1814. kControlEditTextTextTag = $74657874 (* 'text' *); { Buffer of chars - you supply the buffer}
  1815. kControlEditTextTEHandleTag = $7468616E (* 'than' *); { The TEHandle of the text edit record}
  1816. kControlEditTextKeyFilterTag = kControlKeyFilterTag;
  1817. kControlEditTextSelectionTag = $73656C65 (* 'sele' *); { ControlEditTextSelectionRec}
  1818. kControlEditTextPasswordTag = $70617373 (* 'pass' *); { The clear text password text}
  1819. kControlEditTextCharCount = $63687263 (* 'chrc' *); { Count of characters in the control's text}
  1820. { tags available with Appearance 1.1 or later }
  1821. const
  1822. kControlEditTextKeyScriptBehaviorTag = $6B736372 (* 'kscr' *); { ControlKeyScriptBehavior. Defaults to "PrefersRoman" for password fields,}
  1823. { or "AllowAnyScript" for non-password fields.}
  1824. kControlEditTextLockedTag = $6C6F636B (* 'lock' *); { Boolean. Locking disables editability.}
  1825. kControlEditTextFixedTextTag = $66747874 (* 'ftxt' *); { Like the normal text tag, but fixes inline input first}
  1826. kControlEditTextValidationProcTag = $76616C69 (* 'vali' *); { ControlEditTextValidationUPP. Called when a key filter can't be: after cut, paste, etc.}
  1827. kControlEditTextInlinePreUpdateProcTag = $70727570 (* 'prup' *); { TSMTEPreUpdateUPP and TSMTEPostUpdateUpp. For use with inline input variant...}
  1828. kControlEditTextInlinePostUpdateProcTag = $706F7570 (* 'poup' *); { ...The refCon parameter will contain the ControlRef.}
  1829. {
  1830. * Discussion:
  1831. * EditText ControlData tags available with MacOSX and later.
  1832. }
  1833. const
  1834. {
  1835. * Extract the content of the edit text field as a CFString. Don't
  1836. * forget that you own the returned CFStringRef and are responsible
  1837. * for CFReleasing it.
  1838. }
  1839. kControlEditTextCFStringTag = $63667374 (* 'cfst' *); { CFStringRef (Also available on CarbonLib 1.5)}
  1840. {
  1841. * Extract the content of the edit text field as a CFString, if it is
  1842. * a password field. Don't forget that you own the returned
  1843. * CFStringRef and are responsible for CFReleasing it.
  1844. }
  1845. kControlEditTextPasswordCFStringTag = $70776366 (* 'pwcf' *); { CFStringRef}
  1846. { Structure for getting the edit text selection }
  1847. type
  1848. ControlEditTextSelectionRecPtr = ^ControlEditTextSelectionRec;
  1849. ControlEditTextSelectionRec = record
  1850. selStart: SInt16;
  1851. selEnd: SInt16;
  1852. end;
  1853. type
  1854. ControlEditTextSelectionPtr = ControlEditTextSelectionRecPtr;
  1855. type
  1856. ControlEditTextValidationProcPtr = procedure( control: ControlRef );
  1857. type
  1858. ControlEditTextValidationUPP = ControlEditTextValidationProcPtr;
  1859. {
  1860. * NewControlEditTextValidationUPP()
  1861. *
  1862. * Availability:
  1863. * Mac OS X: in version 10.0 and later in Carbon.framework
  1864. * CarbonLib: in CarbonLib 1.0 and later
  1865. * Non-Carbon CFM: available as macro/inline
  1866. }
  1867. function NewControlEditTextValidationUPP( userRoutine: ControlEditTextValidationProcPtr ): ControlEditTextValidationUPP; external name '_NewControlEditTextValidationUPP';
  1868. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1869. {
  1870. * DisposeControlEditTextValidationUPP()
  1871. *
  1872. * Availability:
  1873. * Mac OS X: in version 10.0 and later in Carbon.framework
  1874. * CarbonLib: in CarbonLib 1.0 and later
  1875. * Non-Carbon CFM: available as macro/inline
  1876. }
  1877. procedure DisposeControlEditTextValidationUPP( userUPP: ControlEditTextValidationUPP ); external name '_DisposeControlEditTextValidationUPP';
  1878. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1879. {
  1880. * InvokeControlEditTextValidationUPP()
  1881. *
  1882. * Availability:
  1883. * Mac OS X: in version 10.0 and later in Carbon.framework
  1884. * CarbonLib: in CarbonLib 1.0 and later
  1885. * Non-Carbon CFM: available as macro/inline
  1886. }
  1887. procedure InvokeControlEditTextValidationUPP( control: ControlRef; userUPP: ControlEditTextValidationUPP ); external name '_InvokeControlEditTextValidationUPP';
  1888. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1889. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1890. { ¥ STATIC TEXT (CDEF 18) }
  1891. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1892. { Static Text proc IDs }
  1893. const
  1894. kControlStaticTextProc = 288;
  1895. { Control Kind Tag }
  1896. const
  1897. kControlKindStaticText = $73747874 (* 'stxt' *);
  1898. { The HIObject class ID for the HIStaticTextView class. }
  1899. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1900. {$definec kHIStaticTextViewClassID CFSTRP('com.apple.HIStaticTextView')}
  1901. {$endc}
  1902. { Creation API: Carbon only }
  1903. {
  1904. * CreateStaticTextControl()
  1905. *
  1906. * Summary:
  1907. * Creates a new static text control.
  1908. *
  1909. * Mac OS X threading:
  1910. * Not thread safe
  1911. *
  1912. * Parameters:
  1913. *
  1914. * window:
  1915. * The window in which the control should be placed. May be NULL
  1916. * in 10.3 and later.
  1917. *
  1918. * boundsRect:
  1919. * The bounds of the control, in local coordinates of the window.
  1920. *
  1921. * text:
  1922. * The text of the control. May be NULL.
  1923. *
  1924. * style:
  1925. * The control's font style, size, color, and so on. May be NULL.
  1926. *
  1927. * outControl:
  1928. * On exit, contains the new control.
  1929. *
  1930. * Result:
  1931. * An operating system result code.
  1932. *
  1933. * Availability:
  1934. * Mac OS X: in version 10.0 and later in Carbon.framework
  1935. * CarbonLib: in CarbonLib 1.1 and later
  1936. * Non-Carbon CFM: not available
  1937. }
  1938. function CreateStaticTextControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; text: CFStringRef { can be NULL }; {const} style: ControlFontStyleRecPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateStaticTextControl';
  1939. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1940. {
  1941. * Summary:
  1942. * Tagged data supported by the static text control
  1943. }
  1944. const
  1945. {
  1946. * Used to get or set the control's current text style. Data is of
  1947. * type ControlFontStyleRec. Available with Appearance Manager 1.0
  1948. * (Mac OS 8.0) and later.
  1949. }
  1950. kControlStaticTextStyleTag = kControlFontStyleTag;
  1951. {
  1952. * Used to get or set the control's current text. Data is an array of
  1953. * chars. Generally you should used GetControlDataSize to determine
  1954. * the length of the text, and allocate a buffer of that length,
  1955. * before calling GetControlData with this selector. Deprecated in
  1956. * Carbon in favor of kControlStaticTextCFStringTag. Available with
  1957. * Appearance Manager 1.0 (Mac OS 8.0) and later.
  1958. }
  1959. kControlStaticTextTextTag = $74657874 (* 'text' *);
  1960. {
  1961. * Used to get the height of the control's text. May not be used with
  1962. * SetControlData. Data is of type SInt16. Available with Appearance
  1963. * Manager 1.0 (Mac OS 8.0) and later.
  1964. }
  1965. kControlStaticTextTextHeightTag = $74686569 (* 'thei' *);
  1966. {
  1967. * Used to get or set the control's text truncation style. Data is of
  1968. * type TruncCode; pass a truncation code of -1 to indication no
  1969. * truncation. Available with Appearance Manager 1.1 (Mac OS 8.5) and
  1970. * later. Truncation will not occur unless
  1971. * kControlStaticTextIsMultilineTag is set to false.
  1972. }
  1973. kControlStaticTextTruncTag = $7472756E (* 'trun' *);
  1974. {
  1975. * Used to get or set the control's current text. Data is of type
  1976. * CFStringRef. When setting the text, the control will retain the
  1977. * string, so you may release the string after calling
  1978. * SetControlData; if the string is mutable, the control will make a
  1979. * copy of the string, so any changes to the string after calling
  1980. * SetControlData will not affect the control. When getting the text,
  1981. * the control retains the string before returning it to you, so you
  1982. * must release the string after you are done with it. Available in
  1983. * CarbonLib 1.5 and Mac OS X 10.0 and later.
  1984. }
  1985. kControlStaticTextCFStringTag = $63667374 (* 'cfst' *);
  1986. {
  1987. * Used to get or set whether the control draws its text in multiple
  1988. * lines if the text is too wide for the control bounds. If false,
  1989. * then the control always draws the text in a single line. Data is
  1990. * of type Boolean. Available in Mac OS X 10.1 and later.
  1991. }
  1992. kControlStaticTextIsMultilineTag = $7374696D (* 'stim' *);
  1993. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1994. { ¥ PICTURE CONTROL (CDEF 19) }
  1995. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1996. { Value parameter should contain the ID of the picture you wish to display when }
  1997. { creating controls of this type. If you don't want the control tracked at all, use }
  1998. { the 'no track' variant. }
  1999. { Picture control proc IDs }
  2000. const
  2001. kControlPictureProc = 304;
  2002. kControlPictureNoTrackProc = 305; { immediately returns kControlPicturePart}
  2003. { Control Kind Tag }
  2004. const
  2005. kControlKindPicture = $70696374 (* 'pict' *);
  2006. {
  2007. * CreatePictureControl()
  2008. *
  2009. * Summary:
  2010. * Creates a picture control.
  2011. *
  2012. * Mac OS X threading:
  2013. * Not thread safe
  2014. *
  2015. * Parameters:
  2016. *
  2017. * window:
  2018. * The window that should contain the control. May be NULL on 10.3
  2019. * and later.
  2020. *
  2021. * boundsRect:
  2022. * The bounding box of the control.
  2023. *
  2024. * content:
  2025. * The descriptor for the picture you want the control to display.
  2026. *
  2027. * dontTrack:
  2028. * A Boolean value indicating whether the control should hilite
  2029. * when it is clicked on. False means hilite and track the mouse.
  2030. *
  2031. * outControl:
  2032. * On exit, contains the new control.
  2033. *
  2034. * Availability:
  2035. * Mac OS X: in version 10.0 and later in Carbon.framework
  2036. * CarbonLib: in CarbonLib 1.1 and later
  2037. * Non-Carbon CFM: not available
  2038. }
  2039. function CreatePictureControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; const (*var*) content: ControlButtonContentInfo; dontTrack: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreatePictureControl';
  2040. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2041. { Tagged data supported by picture controls }
  2042. const
  2043. kControlPictureHandleTag = $70696368 (* 'pich' *); { PicHandle}
  2044. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2045. { ¥ ICON CONTROL (CDEF 20) }
  2046. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2047. { Value parameter should contain the ID of the ICON or cicn you wish to display when }
  2048. { creating controls of this type. If you don't want the control tracked at all, use }
  2049. { the 'no track' variant. }
  2050. { Icon control proc IDs }
  2051. const
  2052. kControlIconProc = 320;
  2053. kControlIconNoTrackProc = 321; { immediately returns kControlIconPart}
  2054. kControlIconSuiteProc = 322;
  2055. kControlIconSuiteNoTrackProc = 323; { immediately returns kControlIconPart}
  2056. const
  2057. { icon ref controls may have either an icon, color icon, icon suite, or icon ref.}
  2058. { for data other than icon, you must set the data by passing a}
  2059. { ControlButtonContentInfo to SetControlData}
  2060. kControlIconRefProc = 324;
  2061. kControlIconRefNoTrackProc = 325; { immediately returns kControlIconPart}
  2062. { Control Kind Tag }
  2063. const
  2064. kControlKindIcon = $69636F6E (* 'icon' *);
  2065. { The HIObject class ID for the HIIconView class. }
  2066. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2067. {$definec kHIIconViewClassID CFSTRP('com.apple.HIIconView')}
  2068. {$endc}
  2069. {
  2070. * CreateIconControl()
  2071. *
  2072. * Summary:
  2073. * Creates an Icon control at a specific position in the specified
  2074. * window.
  2075. *
  2076. * Discussion:
  2077. * Icon controls display an icon that (optionally) hilites when
  2078. * clicked on. On Mac OS X, a root control will be created for the
  2079. * window if one does not already exist. If a root control exists
  2080. * for the window, the Icon control will be embedded into it.
  2081. *
  2082. * Mac OS X threading:
  2083. * Not thread safe
  2084. *
  2085. * Parameters:
  2086. *
  2087. * inWindow:
  2088. * The WindowRef into which the Icon control will be created. May
  2089. * be NULL on 10.3 and later.
  2090. *
  2091. * inBoundsRect:
  2092. * The desired position (in coordinates local to the window's
  2093. * port) for the Icon control.
  2094. *
  2095. * inIconContent:
  2096. * The descriptor for the icon you want the control to display.
  2097. * Mac OS X and CarbonLib 1.5 (and beyond) support all of the icon
  2098. * content types. Prior to CarbonLib 1.5, the only content types
  2099. * that are properly respected are kControlContentIconSuiteRes,
  2100. * kControlContentCIconRes, and kControlContentICONRes.
  2101. *
  2102. * inDontTrack:
  2103. * A Boolean value indicating whether the control should hilite
  2104. * when it is clicked on. False means hilite and track the mouse.
  2105. *
  2106. * outControl:
  2107. * On successful output, outControl will contain a reference to
  2108. * the Icon control.
  2109. *
  2110. * Result:
  2111. * An OSStatus code indicating success or failure.
  2112. *
  2113. * Availability:
  2114. * Mac OS X: in version 10.0 and later in Carbon.framework
  2115. * CarbonLib: in CarbonLib 1.1 and later
  2116. * Non-Carbon CFM: not available
  2117. }
  2118. function CreateIconControl( inWindow: WindowRef { can be NULL }; const (*var*) inBoundsRect: Rect; const (*var*) inIconContent: ControlButtonContentInfo; inDontTrack: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateIconControl';
  2119. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2120. { Tagged data supported by icon controls }
  2121. const
  2122. kControlIconTransformTag = $7472666D (* 'trfm' *); { IconTransformType}
  2123. kControlIconAlignmentTag = $616C676E (* 'algn' *); { IconAlignmentType}
  2124. { Tags available with appearance 1.1 or later }
  2125. const
  2126. kControlIconResourceIDTag = $69726573 (* 'ires' *); { SInt16 resource ID of icon to use}
  2127. kControlIconContentTag = $636F6E74 (* 'cont' *); { accepts a ControlButtonContentInfo}
  2128. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2129. { ¥ WINDOW HEADER (CDEF 21) }
  2130. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2131. { Window Header proc IDs }
  2132. const
  2133. kControlWindowHeaderProc = 336; { normal header}
  2134. kControlWindowListViewHeaderProc = 337; { variant for list views - no bottom line}
  2135. { Control Kind Tag }
  2136. const
  2137. kControlKindWindowHeader = $77686564 (* 'whed' *);
  2138. {
  2139. * Summary:
  2140. * Tags available with Mac OS X 10.3 or later
  2141. }
  2142. const
  2143. {
  2144. * Passed data is a Boolean. Set to true if the control is to draw
  2145. * as a list header.
  2146. }
  2147. kControlWindowHeaderIsListHeaderTag = $69736C68 (* 'islh' *);
  2148. { The HIObject class ID for the HIWindowHeaderView class. }
  2149. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2150. {$definec kHIWindowHeaderViewClassID CFSTRP('com.apple.HIWindowHeaderView')}
  2151. {$endc}
  2152. { Creation API: Carbon Only }
  2153. {
  2154. * CreateWindowHeaderControl()
  2155. *
  2156. * Mac OS X threading:
  2157. * Not thread safe
  2158. *
  2159. * Availability:
  2160. * Mac OS X: in version 10.0 and later in Carbon.framework
  2161. * CarbonLib: in CarbonLib 1.1 and later
  2162. * Non-Carbon CFM: not available
  2163. }
  2164. function CreateWindowHeaderControl( window: WindowRef; const (*var*) boundsRect: Rect; isListHeader: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateWindowHeaderControl';
  2165. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2166. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2167. { ¥ LIST BOX (CDEF 22) }
  2168. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2169. { Lists use an auxiliary resource to define their format. The resource type used is }
  2170. { 'ldes' and a definition for it can be found in Appearance.r. The resource ID for }
  2171. { the ldes is passed in the 'value' parameter when creating the control. You may pass }
  2172. { zero in value. This tells the List Box control to not use a resource. The list will }
  2173. { be created with default values, and will use the standard LDEF (0). You can change }
  2174. { the list by getting the list handle. You can set the LDEF to use by using the tag }
  2175. { below (kControlListBoxLDEFTag) }
  2176. { List Box proc IDs }
  2177. const
  2178. kControlListBoxProc = 352;
  2179. kControlListBoxAutoSizeProc = 353;
  2180. { Control Kind Tag }
  2181. const
  2182. kControlKindListBox = $6C626F78 (* 'lbox' *);
  2183. { Creation API: Carbon Only }
  2184. {
  2185. * CreateListBoxControl()
  2186. *
  2187. * Mac OS X threading:
  2188. * Not thread safe
  2189. *
  2190. * Availability:
  2191. * Mac OS X: in version 10.0 and later in Carbon.framework
  2192. * CarbonLib: in CarbonLib 1.1 and later
  2193. * Non-Carbon CFM: not available
  2194. }
  2195. function CreateListBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; autoSize: Boolean; numRows: SInt16; numColumns: SInt16; horizScroll: Boolean; vertScroll: Boolean; cellHeight: SInt16; cellWidth: SInt16; hasGrowSpace: Boolean; const (*var*) listDef: ListDefSpec; var outControl: ControlRef ): OSStatus; external name '_CreateListBoxControl';
  2196. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2197. { Tagged data supported by list box }
  2198. const
  2199. kControlListBoxListHandleTag = $6C68616E (* 'lhan' *); { ListHandle}
  2200. kControlListBoxKeyFilterTag = kControlKeyFilterTag; { ControlKeyFilterUPP}
  2201. kControlListBoxFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
  2202. { New tags in 1.0.1 or later }
  2203. const
  2204. kControlListBoxDoubleClickTag = $64626C63 (* 'dblc' *); { Boolean. Was last click a double-click?}
  2205. kControlListBoxLDEFTag = $6C646566 (* 'ldef' *); { SInt16. ID of LDEF to use.}
  2206. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2207. { ¥ PUSH BUTTON (CDEF 23) }
  2208. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2209. { The new standard checkbox and radio button controls support a "mixed" value that }
  2210. { indicates that the current setting contains a mixed set of on and off values. The }
  2211. { control value used to display this indication is defined in Controls.h: }
  2212. { kControlCheckBoxMixedValue = 2 }
  2213. { Two new variants of the standard pushbutton have been added to the standard control }
  2214. { suite that draw a color icon next to the control title. One variant draws the icon }
  2215. { on the left side, the other draws it on the right side (when the system justifica- }
  2216. { tion is right to left, these are reversed). }
  2217. { When either of the icon pushbuttons are created, the contrlMax field of the control }
  2218. { record is used to determine the ID of the 'cicn' resource drawn in the pushbutton. }
  2219. { In addition, a push button can now be told to draw with a default outline using the }
  2220. { SetControlData routine with the kControlPushButtonDefaultTag below. }
  2221. { A push button may also be marked using the kControlPushButtonCancelTag. This has }
  2222. { no visible representation, but does cause the button to play the CancelButton theme }
  2223. { sound instead of the regular pushbutton theme sound when pressed. }
  2224. { Theme Push Button/Check Box/Radio Button proc IDs }
  2225. const
  2226. kControlPushButtonProc = 368;
  2227. kControlCheckBoxProc = 369;
  2228. kControlRadioButtonProc = 370;
  2229. kControlPushButLeftIconProc = 374; { Standard pushbutton with left-side icon}
  2230. kControlPushButRightIconProc = 375; { Standard pushbutton with right-side icon}
  2231. { Variants with Appearance 1.1 or later }
  2232. const
  2233. kControlCheckBoxAutoToggleProc = 371;
  2234. kControlRadioButtonAutoToggleProc = 372;
  2235. { Push Button Icon Alignments }
  2236. type
  2237. ControlPushButtonIconAlignment = UInt16;
  2238. const
  2239. kControlPushButtonIconOnLeft = 6;
  2240. kControlPushButtonIconOnRight = 7;
  2241. { Control Kind Tag }
  2242. const
  2243. kControlKindPushButton = $70757368 (* 'push' *);
  2244. kControlKindPushIconButton = $7069636E (* 'picn' *);
  2245. kControlKindRadioButton = $7264696F (* 'rdio' *);
  2246. kControlKindCheckBox = $63626F78 (* 'cbox' *);
  2247. { The HIObject class ID for the HIPushButton class. }
  2248. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2249. {$definec kHIPushButtonClassID CFSTRP('com.apple.HIPushButton')}
  2250. {$endc}
  2251. { The HIObject class ID for the HICheckBox class. }
  2252. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2253. {$definec kHICheckBoxClassID CFSTRP('com.apple.HICheckBox')}
  2254. {$endc}
  2255. { The HIObject class ID for the HIRadioButton class. }
  2256. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2257. {$definec kHIRadioButtonClassID CFSTRP('com.apple.HIRadioButton')}
  2258. {$endc}
  2259. { Creation APIs: Carbon Only }
  2260. {
  2261. * CreatePushButtonControl()
  2262. *
  2263. * Summary:
  2264. * Creates a push button control.
  2265. *
  2266. * Mac OS X threading:
  2267. * Not thread safe
  2268. *
  2269. * Parameters:
  2270. *
  2271. * window:
  2272. * The window that should contain the control. May be NULL on 10.3
  2273. * and later.
  2274. *
  2275. * boundsRect:
  2276. * The bounds of the control, in local coordinates of the window.
  2277. *
  2278. * title:
  2279. * The control title. May be NULL.
  2280. *
  2281. * outControl:
  2282. * On exit, contains the new control.
  2283. *
  2284. * Availability:
  2285. * Mac OS X: in version 10.0 and later in Carbon.framework
  2286. * CarbonLib: in CarbonLib 1.1 and later
  2287. * Non-Carbon CFM: not available
  2288. }
  2289. function CreatePushButtonControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreatePushButtonControl';
  2290. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2291. {
  2292. * CreatePushButtonWithIconControl()
  2293. *
  2294. * Summary:
  2295. * Creates a push button control containing an icon or other
  2296. * graphical content.
  2297. *
  2298. * Mac OS X threading:
  2299. * Not thread safe
  2300. *
  2301. * Parameters:
  2302. *
  2303. * window:
  2304. * The window that should contain the control. May be NULL on 10.3
  2305. * and later.
  2306. *
  2307. * boundsRect:
  2308. * The bounds of the control, in local coordinates of the window.
  2309. *
  2310. * title:
  2311. * The control title. May be NULL.
  2312. *
  2313. * icon:
  2314. * The control graphic content.
  2315. *
  2316. * iconAlignment:
  2317. * The alignment of the control graphic content.
  2318. *
  2319. * outControl:
  2320. * On exit, contains the new control.
  2321. *
  2322. * Availability:
  2323. * Mac OS X: in version 10.0 and later in Carbon.framework
  2324. * CarbonLib: in CarbonLib 1.1 and later
  2325. * Non-Carbon CFM: not available
  2326. }
  2327. function CreatePushButtonWithIconControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; var icon: ControlButtonContentInfo; iconAlignment: ControlPushButtonIconAlignment; var outControl: ControlRef ): OSStatus; external name '_CreatePushButtonWithIconControl';
  2328. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2329. {
  2330. * CreateRadioButtonControl()
  2331. *
  2332. * Summary:
  2333. * Creates a radio button control.
  2334. *
  2335. * Mac OS X threading:
  2336. * Not thread safe
  2337. *
  2338. * Parameters:
  2339. *
  2340. * window:
  2341. * The window that should contain the control. May be NULL on 10.3
  2342. * and later.
  2343. *
  2344. * boundsRect:
  2345. * The bounds of the control, in local coordinates of the window.
  2346. *
  2347. * title:
  2348. * The control title. May be NULL.
  2349. *
  2350. * initialValue:
  2351. * The initial value of the control. Should be zero (off), one
  2352. * (on), or two (mixed). The control is automatically given a
  2353. * minimum value of zero and a maximum value of two.
  2354. *
  2355. * autoToggle:
  2356. * Whether this control should have auto-toggle behavior. If true,
  2357. * the control will automatically toggle between on and off states
  2358. * when clicked. This parameter should be false if the control
  2359. * will be embedded into a radio group control; in that case, the
  2360. * radio group will handle setting the correct control value in
  2361. * response to a click.
  2362. *
  2363. * outControl:
  2364. * On exit, contains the new control.
  2365. *
  2366. * Availability:
  2367. * Mac OS X: in version 10.0 and later in Carbon.framework
  2368. * CarbonLib: in CarbonLib 1.1 and later
  2369. * Non-Carbon CFM: not available
  2370. }
  2371. function CreateRadioButtonControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; initialValue: SInt32; autoToggle: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateRadioButtonControl';
  2372. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2373. {
  2374. * CreateCheckBoxControl()
  2375. *
  2376. * Summary:
  2377. * Creates a checkbox control.
  2378. *
  2379. * Mac OS X threading:
  2380. * Not thread safe
  2381. *
  2382. * Parameters:
  2383. *
  2384. * window:
  2385. * The window that should contain the control. May be NULL on 10.3
  2386. * and later.
  2387. *
  2388. * boundsRect:
  2389. * The bounds of the control, in local coordinates of the window.
  2390. *
  2391. * title:
  2392. * The control title. May be NULL.
  2393. *
  2394. * initialValue:
  2395. * The initial value of the control. Should be zero (off), one
  2396. * (on), or two (mixed). The control is automatically given a
  2397. * minimum value of zero and a maximum value of two.
  2398. *
  2399. * autoToggle:
  2400. * Whether this control should have auto-toggle behavior. If true,
  2401. * the control will automatically toggle between on and off states
  2402. * when clicked.
  2403. *
  2404. * outControl:
  2405. * On exit, contains the new control.
  2406. *
  2407. * Availability:
  2408. * Mac OS X: in version 10.0 and later in Carbon.framework
  2409. * CarbonLib: in CarbonLib 1.1 and later
  2410. * Non-Carbon CFM: not available
  2411. }
  2412. function CreateCheckBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; initialValue: SInt32; autoToggle: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateCheckBoxControl';
  2413. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2414. { Tagged data supported by standard buttons }
  2415. const
  2416. kControlPushButtonDefaultTag = $64666C74 (* 'dflt' *); { default ring flag}
  2417. kControlPushButtonCancelTag = $636E636C (* 'cncl' *); { cancel button flag (1.1 and later)}
  2418. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2419. { ¥ SCROLL BAR (CDEF 24) }
  2420. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2421. { This is the new Appearance scroll bar. }
  2422. { Mac OS X has a "Scroll to here" option in the General pane of System Preferences }
  2423. { which allows users to click in the page up/down regions of a scroll bar and have }
  2424. { the thumb/indicator jump directly to the clicked position, which alters the value }
  2425. { of the scroll bar and moves the scrolled content appropriately. As long as the }
  2426. { mouse button is held down, the click is treated as though the user had clicked in }
  2427. { the thumb/indicator in the first place. }
  2428. { If you want the scroll bars in your application to work with the "Scroll to here" }
  2429. { option, you must do the following: }
  2430. { 1. Create live-tracking scroll bars, not scroll bars that show a "ghost" thumb }
  2431. { when you click on it. You can request live-tracking scroll bars by passing true }
  2432. { in the liveTracking parameter to CreateScrollBarControl. If you create scroll bars }
  2433. { with NewControl, use the kControlScrollBarLiveProc. }
  2434. { 2. Write an appropriate ControlActionProc and associate it with your scroll bar }
  2435. { via the SetControlAction API. This allows your application to update its content }
  2436. { appropriately when the live-tracking scroll bar is clicked. }
  2437. { 3. When calling HandleControlClick or TrackControl, pass -1 in the action proc }
  2438. { parameter. This is a request for the Control Manager to use the action proc you }
  2439. { associated with your control in step 2. If you rely on the standard window event }
  2440. { handler to do your control tracking, this step is handled for you automatically. }
  2441. { Theme Scroll Bar proc IDs }
  2442. const
  2443. kControlScrollBarProc = 384; { normal scroll bar}
  2444. kControlScrollBarLiveProc = 386; { live scrolling variant}
  2445. { Control Kind Tag }
  2446. const
  2447. kControlKindScrollBar = $73626172 (* 'sbar' *);
  2448. { The HIObject class ID for the HIScrollBar class. }
  2449. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2450. {$definec kHIScrollBarClassID CFSTRP('com.apple.HIScrollBar')}
  2451. {$endc}
  2452. {
  2453. * CreateScrollBarControl()
  2454. *
  2455. * Summary:
  2456. * Creates a scroll bar control.
  2457. *
  2458. * Discussion:
  2459. * This creation API is available in Carbon only.
  2460. *
  2461. * Mac OS X threading:
  2462. * Not thread safe
  2463. *
  2464. * Parameters:
  2465. *
  2466. * window:
  2467. * The window that should contain the control. May be NULL on 10.3
  2468. * and later.
  2469. *
  2470. * boundsRect:
  2471. * The bounding box of the control.
  2472. *
  2473. * value:
  2474. * The initial value of the control.
  2475. *
  2476. * minimum:
  2477. * The minimum value of the control.
  2478. *
  2479. * maximum:
  2480. * The maximum value of the control.
  2481. *
  2482. * viewSize:
  2483. * The size of the visible area of the scroll bar content.
  2484. *
  2485. * liveTracking:
  2486. * A Boolean indicating whether or not live tracking is enabled
  2487. * for this scroll bar. If set to true and a valid
  2488. * liveTrackingProc is also passed in, the callback will be called
  2489. * repeatedly as the thumb is moved during tracking. If set to
  2490. * false, a semi-transparent thumb called a "ghost thumb" will
  2491. * draw and no live tracking will occur.
  2492. *
  2493. * liveTrackingProc:
  2494. * If liveTracking is on, a ControlActionUPP callback to be called
  2495. * as the control live tracks. This callback is called repeatedly
  2496. * as the scroll thumb is moved during tracking.
  2497. *
  2498. * outControl:
  2499. * On exit, contains the new control.
  2500. *
  2501. * Availability:
  2502. * Mac OS X: in version 10.0 and later in Carbon.framework
  2503. * CarbonLib: in CarbonLib 1.1 and later
  2504. * Non-Carbon CFM: not available
  2505. }
  2506. function CreateScrollBarControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; viewSize: SInt32; liveTracking: Boolean; liveTrackingProc: ControlActionUPP; var outControl: ControlRef ): OSStatus; external name '_CreateScrollBarControl';
  2507. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2508. { These tags are available in Mac OS X or later }
  2509. const
  2510. kControlScrollBarShowsArrowsTag = $6172726F (* 'arro' *); { Boolean whether or not to draw the scroll arrows}
  2511. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2512. { ¥ POPUP BUTTON (CDEF 25) }
  2513. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2514. { This is the new Appearance Popup Button. It takes the same variants and does the }
  2515. { same overloading as the previous popup menu control. There are some differences: }
  2516. { Passing in a menu ID of -12345 causes the popup not to try and get the menu from a }
  2517. { resource. Instead, you can build the menu and later stuff the MenuRef field in }
  2518. { the popup data information. }
  2519. { You can pass -1 in the Max parameter to have the control calculate the width of the }
  2520. { title on its own instead of guessing and then tweaking to get it right. It adds the }
  2521. { appropriate amount of space between the title and the popup. }
  2522. { Theme Popup Button proc IDs }
  2523. const
  2524. kControlPopupButtonProc = 400;
  2525. kControlPopupFixedWidthVariant = 1 shl 0;
  2526. kControlPopupVariableWidthVariant = 1 shl 1;
  2527. kControlPopupUseAddResMenuVariant = 1 shl 2;
  2528. kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant;
  2529. { Control Kind Tag }
  2530. const
  2531. kControlKindPopupButton = $706F7062 (* 'popb' *);
  2532. { The HIObject class ID for the HIPopupButton class. }
  2533. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2534. {$definec kHIPopupButtonClassID CFSTRP('com.apple.HIPopupButton')}
  2535. {$endc}
  2536. {
  2537. * CreatePopupButtonControl()
  2538. *
  2539. * Summary:
  2540. * Creates a popup button control.
  2541. *
  2542. * Mac OS X threading:
  2543. * Not thread safe
  2544. *
  2545. * Parameters:
  2546. *
  2547. * window:
  2548. * The window that should contain the control. May be NULL on 10.3
  2549. * and later.
  2550. *
  2551. * boundsRect:
  2552. * The bounding box of the control.
  2553. *
  2554. * title:
  2555. * The title of the control.
  2556. *
  2557. * menuID:
  2558. * The ID of a menu that should be used by the control. A menu
  2559. * with this ID should be inserted into the menubar with
  2560. * InsertMenu(menu, kInsertHierarchicalMenu). You can also pass
  2561. * -12345 to have the control delay its acquisition of a menu; in
  2562. * this case, you can build the menu and later provide it to the
  2563. * control with SetControlData and kControlPopupButtonMenuRefTag
  2564. * or kControlPopupButtonOwnedMenuRefTag.
  2565. *
  2566. * variableWidth:
  2567. * Whether the width of the control is allowed to vary according
  2568. * to the width of the selected menu item text, or should remain
  2569. * fixed to the original control bounds width.
  2570. *
  2571. * titleWidth:
  2572. * The width of the title.
  2573. *
  2574. * titleJustification:
  2575. * The justification of the title.
  2576. *
  2577. * titleStyle:
  2578. * A QuickDraw style bitfield indicating the font style of the
  2579. * title.
  2580. *
  2581. * outControl:
  2582. * On exit, contains the new control.
  2583. *
  2584. * Availability:
  2585. * Mac OS X: in version 10.0 and later in Carbon.framework
  2586. * CarbonLib: in CarbonLib 1.1 and later
  2587. * Non-Carbon CFM: not available
  2588. }
  2589. function CreatePopupButtonControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; title: CFStringRef; menuID: SInt16; variableWidth: Boolean; titleWidth: SInt16; titleJustification: SInt16; titleStyle: Style; var outControl: ControlRef ): OSStatus; external name '_CreatePopupButtonControl';
  2590. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2591. { These tags are available in 1.0.1 or later of Appearance }
  2592. const
  2593. kControlPopupButtonMenuHandleTag = $6D68616E (* 'mhan' *); { MenuRef}
  2594. kControlPopupButtonMenuRefTag = $6D68616E (* 'mhan' *); { MenuRef}
  2595. kControlPopupButtonMenuIDTag = $6D6E6964 (* 'mnid' *); { SInt16}
  2596. { These tags are available in 1.1 or later of Appearance }
  2597. const
  2598. kControlPopupButtonExtraHeightTag = $65786874 (* 'exht' *); { SInt16 - extra vertical whitespace within the button}
  2599. kControlPopupButtonOwnedMenuRefTag = $6F6D7266 (* 'omrf' *); { MenuRef}
  2600. { These tags are available in Mac OS X }
  2601. const
  2602. kControlPopupButtonCheckCurrentTag = $6368636B (* 'chck' *); { Boolean - whether the popup puts a checkmark next to the current item (defaults to true)}
  2603. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2604. { ¥ RADIO GROUP (CDEF 26) }
  2605. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2606. { This control implements a radio group. It is an embedding control and can therefore }
  2607. { only be used when a control hierarchy is established for its owning window. You }
  2608. { should only embed radio buttons within it. As radio buttons are embedded into it, }
  2609. { the group sets up its value, min, and max to represent the number of embedded items.}
  2610. { The current value of the control is the index of the sub-control that is the current}
  2611. { 'on' radio button. To get the current radio button control handle, you can use the }
  2612. { control manager call GetIndSubControl, passing in the value of the radio group. }
  2613. { Note that when creating radio buttons for use in a radio group control, you should }
  2614. { not use the autoToggle version of the radio button. The radio group control will }
  2615. { handling toggling the radio button values itself; auto-toggle radio buttons do not }
  2616. { work properly in a radio group control on Mac OS 9. }
  2617. { NOTE: This control is only available with Appearance 1.0.1. }
  2618. { Radio Group Proc ID }
  2619. const
  2620. kControlRadioGroupProc = 416;
  2621. { Control Kind Tag }
  2622. const
  2623. kControlKindRadioGroup = $72677270 (* 'rgrp' *);
  2624. { The HIObject class ID for the HIRadioGroup class. }
  2625. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2626. {$definec kHIRadioGroupClassID CFSTRP('com.apple.HIRadioGroup')}
  2627. {$endc}
  2628. { Creation API: Carbon Only }
  2629. {
  2630. * CreateRadioGroupControl()
  2631. *
  2632. * Mac OS X threading:
  2633. * Not thread safe
  2634. *
  2635. * Availability:
  2636. * Mac OS X: in version 10.0 and later in Carbon.framework
  2637. * CarbonLib: in CarbonLib 1.1 and later
  2638. * Non-Carbon CFM: not available
  2639. }
  2640. function CreateRadioGroupControl( window: WindowRef; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreateRadioGroupControl';
  2641. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2642. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2643. { ¥ SCROLL TEXT BOX (CDEF 27) }
  2644. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2645. { This control implements a scrolling box of (non-editable) text. This is useful for }
  2646. { credits in about boxes, etc. }
  2647. { The standard version of this control has a scroll bar, but the autoscrolling }
  2648. { variant does not. The autoscrolling variant needs two pieces of information to }
  2649. { work: delay (in ticks) before the scrolling starts, and time (in ticks) between }
  2650. { scrolls. It will scroll one pixel at a time, unless changed via SetControlData. }
  2651. { Parameter What Goes Here }
  2652. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  2653. { Value Resource ID of 'TEXT'/'styl' content. }
  2654. { Min Scroll start delay (in ticks) . }
  2655. { Max Delay (in ticks) between scrolls. }
  2656. { NOTE: This control is only available with Appearance 1.1. }
  2657. { Scroll Text Box Proc IDs }
  2658. const
  2659. kControlScrollTextBoxProc = 432;
  2660. kControlScrollTextBoxAutoScrollProc = 433;
  2661. { Control Kind Tag }
  2662. const
  2663. kControlKindScrollingTextBox = $73746278 (* 'stbx' *);
  2664. { Creation API: Carbon Only }
  2665. {
  2666. * CreateScrollingTextBoxControl()
  2667. *
  2668. * Mac OS X threading:
  2669. * Not thread safe
  2670. *
  2671. * Availability:
  2672. * Mac OS X: in version 10.0 and later in Carbon.framework
  2673. * CarbonLib: in CarbonLib 1.1 and later
  2674. * Non-Carbon CFM: not available
  2675. }
  2676. function CreateScrollingTextBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; contentResID: SInt16; autoScroll: Boolean; delayBeforeAutoScroll: UInt32; delayBetweenAutoScroll: UInt32; autoScrollAmount: UInt16; var outControl: ControlRef ): OSStatus; external name '_CreateScrollingTextBoxControl';
  2677. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2678. { Tagged data supported by Scroll Text Box }
  2679. const
  2680. kControlScrollTextBoxDelayBeforeAutoScrollTag = $7374646C (* 'stdl' *); { UInt32 (ticks until autoscrolling starts)}
  2681. kControlScrollTextBoxDelayBetweenAutoScrollTag = $7363646C (* 'scdl' *); { UInt32 (ticks between scrolls)}
  2682. kControlScrollTextBoxAutoScrollAmountTag = $73616D74 (* 'samt' *); { UInt16 (pixels per scroll) -- defaults to 1}
  2683. kControlScrollTextBoxContentsTag = $74726573 (* 'tres' *); { SInt16 (resource ID of 'TEXT'/'styl') -- write only!}
  2684. kControlScrollTextBoxAnimatingTag = $616E696D (* 'anim' *); { Boolean (whether the text box should auto-scroll)}
  2685. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2686. { ¥ DISCLOSURE BUTTON }
  2687. { (CDEF 30) }
  2688. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2689. { The HIObject class ID for the HIDisclosureButton class. }
  2690. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2691. {$definec kHIDisclosureButtonClassID CFSTRP('com.apple.HIDisclosureButton')}
  2692. {$endc}
  2693. {
  2694. * CreateDisclosureButtonControl()
  2695. *
  2696. * Summary:
  2697. * Creates a new instance of the Disclosure Button Control.
  2698. *
  2699. * Discussion:
  2700. * CreateDisclosureButtonControl is preferred over NewControl
  2701. * because it allows you to specify the exact set of parameters
  2702. * required to create the control without overloading parameter
  2703. * semantics. The initial minimum of the Disclosure Button will be
  2704. * kControlDisclosureButtonClosed, and the maximum will be
  2705. * kControlDisclosureButtonDisclosed.
  2706. *
  2707. * Mac OS X threading:
  2708. * Not thread safe
  2709. *
  2710. * Parameters:
  2711. *
  2712. * inWindow:
  2713. * The WindowRef in which to create the control.
  2714. *
  2715. * inBoundsRect:
  2716. * The bounding rectangle for the control. The height of the
  2717. * control is fixed and the control will be centered vertically
  2718. * within the rectangle you specify.
  2719. *
  2720. * inValue:
  2721. * The initial value; either kControlDisclosureButtonClosed or
  2722. * kControlDisclosureButtonDisclosed.
  2723. *
  2724. * inAutoToggles:
  2725. * A boolean value indicating whether its value should change
  2726. * automatically after tracking the mouse.
  2727. *
  2728. * outControl:
  2729. * On successful exit, this will contain the new control.
  2730. *
  2731. * Availability:
  2732. * Mac OS X: in version 10.0 and later in Carbon.framework
  2733. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2734. * Non-Carbon CFM: not available
  2735. }
  2736. function CreateDisclosureButtonControl( inWindow: WindowRef; const (*var*) inBoundsRect: Rect; inValue: SInt32; inAutoToggles: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateDisclosureButtonControl';
  2737. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2738. { Control Kind Tag }
  2739. const
  2740. kControlKindDisclosureButton = $64697362 (* 'disb' *);
  2741. {
  2742. * Discussion:
  2743. * Disclosure Button Values
  2744. }
  2745. const
  2746. {
  2747. * The control be drawn suggesting a closed state.
  2748. }
  2749. kControlDisclosureButtonClosed = 0;
  2750. {
  2751. * The control will be drawn suggesting an open state.
  2752. }
  2753. kControlDisclosureButtonDisclosed = 1;
  2754. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2755. { ¥ ROUND BUTTON }
  2756. { (CDEF 31) }
  2757. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2758. {
  2759. * ControlRoundButtonSize
  2760. *
  2761. * Discussion:
  2762. * Button Sizes
  2763. }
  2764. type
  2765. ControlRoundButtonSize = SInt16;
  2766. const
  2767. {
  2768. * A 20 pixel diameter button.
  2769. }
  2770. kControlRoundButtonNormalSize = kControlSizeNormal;
  2771. {
  2772. * A 25 pixel diameter button.
  2773. }
  2774. kControlRoundButtonLargeSize = kControlSizeLarge;
  2775. { Data tags supported by the round button controls }
  2776. const
  2777. kControlRoundButtonContentTag = $636F6E74 (* 'cont' *); { ControlButtonContentInfo}
  2778. kControlRoundButtonSizeTag = kControlSizeTag; { ControlRoundButtonSize}
  2779. { Control Kind Tag }
  2780. const
  2781. kControlKindRoundButton = $726E6462 (* 'rndb' *);
  2782. { The HIObject class ID for the HIRoundButton class. }
  2783. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2784. {$definec kHIRoundButtonClassID CFSTRP('com.apple.HIRoundButton')}
  2785. {$endc}
  2786. {
  2787. * CreateRoundButtonControl()
  2788. *
  2789. * Summary:
  2790. * Creates a new instance of the Round Button Control.
  2791. *
  2792. * Discussion:
  2793. * CreateRoundButtonControl is preferred over NewControl because it
  2794. * allows you to specify the exact set of parameters required to
  2795. * create the control without overloading parameter semantics.
  2796. *
  2797. * Mac OS X threading:
  2798. * Not thread safe
  2799. *
  2800. * Parameters:
  2801. *
  2802. * inWindow:
  2803. * The WindowRef in which to create the control. May be NULL in
  2804. * 10.3 and later.
  2805. *
  2806. * inBoundsRect:
  2807. * The bounding rectangle for the control. The height and width of
  2808. * the control is fixed (specified by the ControlRoundButtonSize
  2809. * parameter) and the control will be centered within the
  2810. * rectangle you specify.
  2811. *
  2812. * inSize:
  2813. * The button size; either kControlRoundButtonNormalSize or
  2814. * kControlRoundButtonLargeSize.
  2815. *
  2816. * inContent:
  2817. * Any optional content displayed in the button. Currently only
  2818. * kControlContentIconRef is supported. May be NULL.
  2819. *
  2820. * outControl:
  2821. * On successful exit, this will contain the new control.
  2822. *
  2823. * Availability:
  2824. * Mac OS X: in version 10.0 and later in Carbon.framework
  2825. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2826. * Non-Carbon CFM: not available
  2827. }
  2828. function CreateRoundButtonControl( inWindow: WindowRef { can be NULL }; const (*var*) inBoundsRect: Rect; inSize: ControlRoundButtonSize; inContent: ControlButtonContentInfoPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateRoundButtonControl';
  2829. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2830. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2831. { ¥ DATA BROWSER }
  2832. { (CDEF 29) }
  2833. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2834. { This control implements a user interface component for browsing (optionally) }
  2835. { hiearchical data structures. The browser supports multiple presentation styles }
  2836. { including, but not limited to: }
  2837. { kDataBrowserListView - items and item properties in }
  2838. { multi-column (optionally outline) format }
  2839. { kDataBrowserColumnView - in-place browsing using fixed navigation columns }
  2840. { The browser manages all view styles through a single high-level interface. }
  2841. { The high-level interface makes the following assumptions: }
  2842. { - Items have unique 32-bit identifiers (0 is reserved) }
  2843. { - Items have two kinds of named and typed properties: }
  2844. { - Predefined attribute properties ( < 1024 ) }
  2845. { (including some display properties) }
  2846. { - Client-defined display properties ( >= 1024 ) }
  2847. { - Some items are containers of other items }
  2848. { - Items may be sorted by any property }
  2849. { Because a browser doesn't know all details about the type of objects it manages, }
  2850. { some implementation responsibility is best handled by its client. The client must }
  2851. { provide a set of callback routines which define the item hierarchy and help to }
  2852. { populate the browser with items. The client may also provide callbacks for handling }
  2853. { custom data types and doing low-level event management. }
  2854. { The API is subdivided into a "universal" set of routines that applies to all view }
  2855. { styles, and a set of routines unique to each view style. kDataBrowserListView and }
  2856. { kDataBrowserColumnView share an (internal) TableView abstract base class. The }
  2857. { TableView formatting options and API applies to both of these view styles. }
  2858. { NOTE: This control is only available with CarbonLib 1.1. }
  2859. { NOTE: This control must be created with the CreateDataBrowserControl API in }
  2860. { CarbonLib 1.1 through 1.4. In Mac OS X and CarbonLib 1.5 and later, you }
  2861. { may use the control's procID (29) to create the control with NewControl }
  2862. { or with a 'CNTL' resource. }
  2863. { The HIObject class ID for the HIDataBrowser class. }
  2864. {$ifc USE_CFSTR_CONSTANT_MACROS}
  2865. {$definec kHIDataBrowserClassID CFSTRP('com.apple.HIDataBrowser')}
  2866. {$endc}
  2867. { Control Kind Tag }
  2868. const
  2869. kControlKindDataBrowser = $64617462 (* 'datb' *);
  2870. { Error Codes }
  2871. const
  2872. errDataBrowserNotConfigured = -4970;
  2873. errDataBrowserItemNotFound = -4971;
  2874. errDataBrowserItemNotAdded = -4975;
  2875. errDataBrowserPropertyNotFound = -4972;
  2876. errDataBrowserInvalidPropertyPart = -4973;
  2877. errDataBrowserInvalidPropertyData = -4974;
  2878. errDataBrowserPropertyNotSupported = -4979; { Return from DataBrowserGetSetItemDataProc }
  2879. const
  2880. { Generic Control Tags }
  2881. kControlDataBrowserIncludesFrameAndFocusTag = $62726472 (* 'brdr' *); { Boolean }
  2882. kControlDataBrowserKeyFilterTag = kControlEditTextKeyFilterTag;
  2883. kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag;
  2884. kControlDataBrowserEditTextValidationProcTag = kControlEditTextValidationProcTag;
  2885. { Data Browser View Styles }
  2886. type
  2887. DataBrowserViewStyle = OSType;
  2888. const
  2889. kDataBrowserNoView = $3F3F3F3F (* '????' *); { Error State }
  2890. kDataBrowserListView = $6C737476 (* 'lstv' *);
  2891. kDataBrowserColumnView = $636C6D76 (* 'clmv' *);
  2892. { Selection Flags }
  2893. type
  2894. DataBrowserSelectionFlags = UInt32;
  2895. const
  2896. kDataBrowserDragSelect = 1 shl 0; { Å ListMgr lNoRect }
  2897. kDataBrowserSelectOnlyOne = 1 shl 1; { Å ListMgr lOnlyOne }
  2898. kDataBrowserResetSelection = 1 shl 2; { Å ListMgr lNoExtend }
  2899. kDataBrowserCmdTogglesSelection = 1 shl 3; { Å ListMgr lUseSense }
  2900. kDataBrowserNoDisjointSelection = 1 shl 4; { Å ListMgr lNoDisjoint }
  2901. kDataBrowserAlwaysExtendSelection = 1 shl 5; { Å ListMgr lExtendDrag }
  2902. kDataBrowserNeverEmptySelectionSet = 1 shl 6; { Å ListMgr lNoNilHilite }
  2903. { Data Browser Sorting }
  2904. type
  2905. DataBrowserSortOrder = UInt16;
  2906. const
  2907. kDataBrowserOrderUndefined = 0; { Not currently supported }
  2908. kDataBrowserOrderIncreasing = 1;
  2909. kDataBrowserOrderDecreasing = 2;
  2910. { Data Browser Item Management }
  2911. type
  2912. DataBrowserItemID = UInt32;
  2913. DataBrowserItemIDPtr = ^DataBrowserItemID;
  2914. const
  2915. kDataBrowserNoItem = 0; { Reserved DataBrowserItemID }
  2916. type
  2917. DataBrowserItemState = UInt32;
  2918. const
  2919. kDataBrowserItemNoState = 0;
  2920. kDataBrowserItemAnyState = $FFFFFFFF;
  2921. kDataBrowserItemIsSelected = 1 shl 0;
  2922. kDataBrowserContainerIsOpen = 1 shl 1;
  2923. kDataBrowserItemIsDragTarget = 1 shl 2; { During a drag operation }
  2924. { Options for use with RevealDataBrowserItem }
  2925. type
  2926. DataBrowserRevealOptions = UInt8;
  2927. const
  2928. kDataBrowserRevealOnly = 0;
  2929. kDataBrowserRevealAndCenterInView = 1 shl 0;
  2930. kDataBrowserRevealWithoutSelecting = 1 shl 1;
  2931. { Set operations for use with SetDataBrowserSelectedItems }
  2932. type
  2933. DataBrowserSetOption = UInt32;
  2934. const
  2935. kDataBrowserItemsAdd = 0; { add specified items to existing set }
  2936. kDataBrowserItemsAssign = 1; { assign destination set to specified items }
  2937. kDataBrowserItemsToggle = 2; { toggle membership state of specified items }
  2938. kDataBrowserItemsRemove = 3; { remove specified items from existing set }
  2939. { Commands for use with MoveDataBrowserSelectionAnchor }
  2940. type
  2941. DataBrowserSelectionAnchorDirection = UInt32;
  2942. const
  2943. kDataBrowserSelectionAnchorUp = 0;
  2944. kDataBrowserSelectionAnchorDown = 1;
  2945. kDataBrowserSelectionAnchorLeft = 2;
  2946. kDataBrowserSelectionAnchorRight = 3;
  2947. { Edit menu command IDs for use with Enable/ExecuteDataBrowserEditCommand }
  2948. type
  2949. DataBrowserEditCommand = UInt32;
  2950. const
  2951. kDataBrowserEditMsgUndo = kHICommandUndo;
  2952. kDataBrowserEditMsgRedo = kHICommandRedo;
  2953. kDataBrowserEditMsgCut = kHICommandCut;
  2954. kDataBrowserEditMsgCopy = kHICommandCopy;
  2955. kDataBrowserEditMsgPaste = kHICommandPaste;
  2956. kDataBrowserEditMsgClear = kHICommandClear;
  2957. kDataBrowserEditMsgSelectAll = kHICommandSelectAll;
  2958. { Notifications used in DataBrowserItemNotificationProcPtr }
  2959. type
  2960. DataBrowserItemNotification = UInt32;
  2961. const
  2962. kDataBrowserItemAdded = 1; { The specified item has been added to the browser }
  2963. kDataBrowserItemRemoved = 2; { The specified item has been removed from the browser }
  2964. kDataBrowserEditStarted = 3; { Starting an EditText session for specified item }
  2965. kDataBrowserEditStopped = 4; { Stopping an EditText session for specified item }
  2966. kDataBrowserItemSelected = 5; { Item has just been added to the selection set }
  2967. kDataBrowserItemDeselected = 6; { Item has just been removed from the selection set }
  2968. kDataBrowserItemDoubleClicked = 7;
  2969. kDataBrowserContainerOpened = 8; { Container is open }
  2970. kDataBrowserContainerClosing = 9; { Container is about to close (and will real soon now, y'all) }
  2971. kDataBrowserContainerClosed = 10; { Container is closed (y'all come back now!) }
  2972. kDataBrowserContainerSorting = 11; { Container is about to be sorted (lock any volatile properties) }
  2973. kDataBrowserContainerSorted = 12; { Container has been sorted (you may release any property locks) }
  2974. kDataBrowserUserToggledContainer = 16; { _User_ requested container open/close state to be toggled }
  2975. kDataBrowserTargetChanged = 15; { The target has changed to the specified item }
  2976. kDataBrowserUserStateChanged = 13; { The user has reformatted the view for the target }
  2977. kDataBrowserSelectionSetChanged = 14; { The selection set has been modified (net result may be the same) }
  2978. {
  2979. * DataBrowserPropertyID
  2980. *
  2981. * Discussion:
  2982. * Properties with values 0 through 1023 are reserved for Apple's
  2983. * use. Values greater than or equal to 1024 are for client use.
  2984. }
  2985. type
  2986. DataBrowserPropertyID = UInt32;
  2987. const
  2988. { Predefined attribute properties, optional & non-display unless otherwise stated }
  2989. kDataBrowserItemNoProperty = 0; { The anti-property (no associated data) }
  2990. kDataBrowserItemIsActiveProperty = 1; { Boolean typed data (defaults to true) }
  2991. kDataBrowserItemIsSelectableProperty = 2; { Boolean typed data (defaults to true) }
  2992. kDataBrowserItemIsEditableProperty = 3; { Boolean typed data (defaults to false, used for editable properties) }
  2993. kDataBrowserItemIsContainerProperty = 4; { Boolean typed data (defaults to false) }
  2994. kDataBrowserContainerIsOpenableProperty = 5; { Boolean typed data (defaults to true) }
  2995. kDataBrowserContainerIsClosableProperty = 6; { Boolean typed data (defaults to true) }
  2996. kDataBrowserContainerIsSortableProperty = 7; { Boolean typed data (defaults to true) }
  2997. kDataBrowserItemSelfIdentityProperty = 8; { kDataBrowserIconAndTextType (display property; ColumnView only) }
  2998. {
  2999. * kDataBrowserContainerAliasIDProperty is sent to your
  3000. * DataBrowserItemDataProcPtr callback to give you a chance to follow
  3001. * an alias or symlink that the item might represent. If the incoming
  3002. * item is an alias to another item, you can call
  3003. * SetDataBrowserItemDataItemID to let Data Browser know which other
  3004. * item the incoming item points to.
  3005. *
  3006. * This is only sent from column view, and your support for it is
  3007. * optional. It allows Data Browser to be more memory efficient with
  3008. * its internal storage. If a given container item is an alias to an
  3009. * item whose contents are already displayed in an existing column
  3010. * view column, the contents can be shared between those two columns.
  3011. }
  3012. kDataBrowserContainerAliasIDProperty = 9; { DataBrowserItemID (alias/symlink an item to a container item) }
  3013. {
  3014. * kDataBrowserColumnViewPreviewProperty is sent to various callbacks
  3015. * to give you a chance to draw or track in the preview column of
  3016. * column view.
  3017. *
  3018. * You can also pass kDataBrowserColumnViewPreviewProperty in the
  3019. * property parameter of RevealDataBrowserItem in conjunction with
  3020. * the appropriate DataBrowserItemID of the item whose preview is
  3021. * being displayed when you want to make sure the preview column is
  3022. * visible to the user.
  3023. *
  3024. * kDataBrowserColumnViewPreviewProperty is only supported in column
  3025. * view.
  3026. }
  3027. kDataBrowserColumnViewPreviewProperty = 10; { kDataBrowserCustomType (display property; ColumnView only) }
  3028. {
  3029. * kDataBrowserItemParentContainerProperty is sent to your
  3030. * DataBrowserItemDataProcPtr callback when Data Browser needs to
  3031. * know the parent container item for a given item.
  3032. *
  3033. * In column view, this allows the internals of SetDataBrowserTarget
  3034. * to work. The target is the container whose contents you wish to
  3035. * display, which is the rightmost column in column view. However,
  3036. * unlike SetDataBrowserColumnViewPath, SetDataBrowserTarget doesn't
  3037. * offer a way for you to communicate the DataBrowserItemIDs of the
  3038. * rest of the column containers, so SetDataBrowserTarget needs to
  3039. * ask for them explicitly by asking for the container's parent, then
  3040. * the container's parent's parent, and so on.
  3041. *
  3042. * In list view, this allows you to pass a non-container to
  3043. * SetDataBrowserTarget. In this situation, Data Browser will ask you
  3044. * for the parent of the target so it knows which container to
  3045. * display the contents of in the list view.
  3046. *
  3047. * In both list and column views, your DataBrowserItemDataProcPtr
  3048. * callback might be called with
  3049. * kDataBrowserItemParentContainerProperty at a variety of other
  3050. * times, so you should be sure to support this property if your Data
  3051. * Browser displays a containment hierarchy.
  3052. }
  3053. kDataBrowserItemParentContainerProperty = 11; { DataBrowserItemID (the parent of the specified item, used by ColumnView) }
  3054. { DataBrowser Property Types (for display properties; i.e. ListView columns) }
  3055. { These are primarily presentation types (or styles) although }
  3056. { they also imply a particular set of primitive types or structures. }
  3057. type
  3058. DataBrowserPropertyType = OSType;
  3059. const
  3060. { == Corresponding data type or structure == }
  3061. kDataBrowserCustomType = $3F3F3F3F; { No associated data, custom callbacks used }
  3062. kDataBrowserIconType = $69636E72 (* 'icnr' *); { IconRef, IconTransformType, RGBColor }
  3063. kDataBrowserTextType = $74657874 (* 'text' *); { CFStringRef }
  3064. kDataBrowserDateTimeType = $64617465 (* 'date' *); { DateTime or LongDateTime }
  3065. kDataBrowserSliderType = $736C6472 (* 'sldr' *); { Min, Max, Value }
  3066. kDataBrowserCheckboxType = $63686278 (* 'chbx' *); { ThemeButtonValue }
  3067. kDataBrowserProgressBarType = $70726F67 (* 'prog' *); { Min, Max, Value }
  3068. kDataBrowserRelevanceRankType = $72616E6B (* 'rank' *); { Min, Max, Value }
  3069. kDataBrowserPopupMenuType = $6D656E75 (* 'menu' *); { MenuRef, Value }
  3070. kDataBrowserIconAndTextType = $7469636E (* 'ticn' *); { IconRef, CFStringRef, etc }
  3071. { DataBrowser Property Parts }
  3072. { Visual components of a property type. }
  3073. { For use with GetDataBrowserItemPartBounds. }
  3074. type
  3075. DataBrowserPropertyPart = OSType;
  3076. const
  3077. kDataBrowserPropertyEnclosingPart = 0;
  3078. kDataBrowserPropertyContentPart = $2D2D2D2D (* '----' *);
  3079. kDataBrowserPropertyDisclosurePart = $64697363 (* 'disc' *);
  3080. kDataBrowserPropertyTextPart = kDataBrowserTextType;
  3081. kDataBrowserPropertyIconPart = kDataBrowserIconType;
  3082. kDataBrowserPropertySliderPart = kDataBrowserSliderType;
  3083. kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType;
  3084. kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType;
  3085. kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType;
  3086. { Modify appearance/behavior of display properties }
  3087. type
  3088. DataBrowserPropertyFlags = UInt32;
  3089. { Low 8 bits apply to all property types }
  3090. const
  3091. kDataBrowserUniversalPropertyFlagsMask = $FF;
  3092. kDataBrowserPropertyIsMutable = 1 shl 0;
  3093. kDataBrowserDefaultPropertyFlags = 0 shl 0;
  3094. kDataBrowserUniversalPropertyFlags = kDataBrowserUniversalPropertyFlagsMask; { support for an old name}
  3095. kDataBrowserPropertyIsEditable = kDataBrowserPropertyIsMutable; { support for an old name}
  3096. { Next 8 bits contain property-specific modifiers }
  3097. {
  3098. * Summary:
  3099. * Data Browser Property Flags
  3100. }
  3101. const
  3102. kDataBrowserPropertyFlagsOffset = 8;
  3103. kDataBrowserPropertyFlagsMask = $FF shl kDataBrowserPropertyFlagsOffset;
  3104. kDataBrowserCheckboxTriState = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserCheckboxType}
  3105. kDataBrowserDateTimeRelative = 1 shl (kDataBrowserPropertyFlagsOffset); { kDataBrowserDateTimeType }
  3106. kDataBrowserDateTimeDateOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 1); { kDataBrowserDateTimeType }
  3107. kDataBrowserDateTimeTimeOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 2); { kDataBrowserDateTimeType }
  3108. kDataBrowserDateTimeSecondsToo = 1 shl (kDataBrowserPropertyFlagsOffset + 3); { kDataBrowserDateTimeType }
  3109. kDataBrowserSliderPlainThumb = kThemeThumbPlain shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
  3110. kDataBrowserSliderUpwardThumb = kThemeThumbUpward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
  3111. kDataBrowserSliderDownwardThumb = kThemeThumbDownward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
  3112. kDataBrowserDoNotTruncateText = 3 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  3113. kDataBrowserTruncateTextAtEnd = 2 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  3114. kDataBrowserTruncateTextMiddle = 0 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  3115. kDataBrowserTruncateTextAtStart = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
  3116. {
  3117. * This flag is only for use with columns of type
  3118. * kDataBrowserPopupMenuType. This flag indicates that the popup be
  3119. * drawn in a sleek buttonless fashion. The text will be drawn next
  3120. * to a popup glyph, and the whole cell will be clickable. Available
  3121. * on 10.4 and later.
  3122. }
  3123. kDataBrowserPopupMenuButtonless = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserPopupMenuType}
  3124. kDataBrowserPropertyModificationFlags = kDataBrowserPropertyFlagsMask; { support for an old name}
  3125. kDataBrowserRelativeDateTime = kDataBrowserDateTimeRelative; { support for an old name}
  3126. {
  3127. Next 8 bits contain viewStyle-specific modifiers
  3128. See individual ViewStyle sections below for flag definitions
  3129. }
  3130. const
  3131. kDataBrowserViewSpecificFlagsOffset = 16;
  3132. kDataBrowserViewSpecificFlagsMask = $FF shl kDataBrowserViewSpecificFlagsOffset;
  3133. kDataBrowserViewSpecificPropertyFlags = kDataBrowserViewSpecificFlagsMask; { support for an old name}
  3134. { High 8 bits are reserved for client application use }
  3135. const
  3136. kDataBrowserClientPropertyFlagsOffset = 24;
  3137. kDataBrowserClientPropertyFlagsMask = $FF000000;
  3138. { Client defined property description }
  3139. type
  3140. DataBrowserPropertyDescPtr = ^DataBrowserPropertyDesc;
  3141. DataBrowserPropertyDesc = record
  3142. propertyID: DataBrowserPropertyID;
  3143. propertyType: DataBrowserPropertyType;
  3144. propertyFlags: DataBrowserPropertyFlags;
  3145. end;
  3146. { Callback definition for use with ForEachDataBrowserItem }
  3147. type
  3148. DataBrowserItemProcPtr = procedure( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr );
  3149. type
  3150. DataBrowserItemUPP = DataBrowserItemProcPtr;
  3151. {
  3152. * NewDataBrowserItemUPP()
  3153. *
  3154. * Availability:
  3155. * Mac OS X: in version 10.0 and later in Carbon.framework
  3156. * CarbonLib: in CarbonLib 1.1 and later
  3157. * Non-Carbon CFM: not available
  3158. }
  3159. function NewDataBrowserItemUPP( userRoutine: DataBrowserItemProcPtr ): DataBrowserItemUPP; external name '_NewDataBrowserItemUPP';
  3160. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3161. {
  3162. * DisposeDataBrowserItemUPP()
  3163. *
  3164. * Availability:
  3165. * Mac OS X: in version 10.0 and later in Carbon.framework
  3166. * CarbonLib: in CarbonLib 1.1 and later
  3167. * Non-Carbon CFM: not available
  3168. }
  3169. procedure DisposeDataBrowserItemUPP( userUPP: DataBrowserItemUPP ); external name '_DisposeDataBrowserItemUPP';
  3170. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3171. {
  3172. * InvokeDataBrowserItemUPP()
  3173. *
  3174. * Availability:
  3175. * Mac OS X: in version 10.0 and later in Carbon.framework
  3176. * CarbonLib: in CarbonLib 1.1 and later
  3177. * Non-Carbon CFM: not available
  3178. }
  3179. procedure InvokeDataBrowserItemUPP( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr; userUPP: DataBrowserItemUPP ); external name '_InvokeDataBrowserItemUPP';
  3180. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3181. { Creation/Configuration }
  3182. {
  3183. * CreateDataBrowserControl()
  3184. *
  3185. * Mac OS X threading:
  3186. * Not thread safe
  3187. *
  3188. * Availability:
  3189. * Mac OS X: in version 10.0 and later in Carbon.framework
  3190. * CarbonLib: in CarbonLib 1.1 and later
  3191. * Non-Carbon CFM: not available
  3192. }
  3193. function CreateDataBrowserControl( window: WindowRef; const (*var*) boundsRect: Rect; style: DataBrowserViewStyle; var outControl: ControlRef ): OSStatus; external name '_CreateDataBrowserControl';
  3194. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3195. {
  3196. * GetDataBrowserViewStyle()
  3197. *
  3198. * Mac OS X threading:
  3199. * Not thread safe
  3200. *
  3201. * Availability:
  3202. * Mac OS X: in version 10.0 and later in Carbon.framework
  3203. * CarbonLib: in CarbonLib 1.1 and later
  3204. * Non-Carbon CFM: not available
  3205. }
  3206. function GetDataBrowserViewStyle( browser: ControlRef; var style: DataBrowserViewStyle ): OSStatus; external name '_GetDataBrowserViewStyle';
  3207. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3208. {
  3209. * SetDataBrowserViewStyle()
  3210. *
  3211. * Mac OS X threading:
  3212. * Not thread safe
  3213. *
  3214. * Availability:
  3215. * Mac OS X: in version 10.0 and later in Carbon.framework
  3216. * CarbonLib: in CarbonLib 1.1 and later
  3217. * Non-Carbon CFM: not available
  3218. }
  3219. function SetDataBrowserViewStyle( browser: ControlRef; style: DataBrowserViewStyle ): OSStatus; external name '_SetDataBrowserViewStyle';
  3220. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3221. {
  3222. * Summary:
  3223. * Data Browser attributes
  3224. *
  3225. * Discussion:
  3226. * For use with DataBrowserChangeAttributes and
  3227. * DataBrowserGetAttributes. Available in Mac OS X 10.4 and later.
  3228. }
  3229. const
  3230. {
  3231. * A constant with value zero; the lack of any attributes.
  3232. }
  3233. kDataBrowserAttributeNone = 0;
  3234. {
  3235. * In Column View, this Data Browser is allowed to resize the owning
  3236. * window whenever necessary. This includes, but is not necessarily
  3237. * limited to, situations where column resize operations need more
  3238. * visible space in the window. If you turn this attribute on, your
  3239. * window must tolerate being resized behind your app's back. If your
  3240. * window needs to react to bounds changes, use a
  3241. * kEventWindowBoundsChanged event handler. If you need to constrain
  3242. * your window's minimum and maximum bounds, use
  3243. * kEventWindowGetMinimum/MaximumSize handlers, the
  3244. * SetWindowResizeLimits API, or something similar.
  3245. }
  3246. kDataBrowserAttributeColumnViewResizeWindow = 1 shl 0;
  3247. {
  3248. * In List View, this Data Browser should draw alternating row
  3249. * background colors.
  3250. }
  3251. kDataBrowserAttributeListViewAlternatingRowColors = 1 shl 1;
  3252. {
  3253. * In List View, this Data Browser should draw a vertical line
  3254. * between the columns.
  3255. }
  3256. kDataBrowserAttributeListViewDrawColumnDividers = 1 shl 2;
  3257. {
  3258. * DataBrowserChangeAttributes()
  3259. *
  3260. * Summary:
  3261. * Set the attributes for the given Data Browser.
  3262. *
  3263. * Mac OS X threading:
  3264. * Not thread safe
  3265. *
  3266. * Parameters:
  3267. *
  3268. * inDataBrowser:
  3269. * The Data Browser whose attributes to change.
  3270. *
  3271. * inAttributesToSet:
  3272. * The attributes to set.
  3273. *
  3274. * inAttributesToClear:
  3275. * The attributes to clear.
  3276. *
  3277. * Result:
  3278. * An operating system status code.
  3279. *
  3280. * Availability:
  3281. * Mac OS X: in version 10.4 and later in Carbon.framework
  3282. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3283. * Non-Carbon CFM: not available
  3284. }
  3285. function DataBrowserChangeAttributes( inDataBrowser: ControlRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_DataBrowserChangeAttributes';
  3286. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3287. {
  3288. * DataBrowserGetAttributes()
  3289. *
  3290. * Summary:
  3291. * Returns the attributes of a given Data Browser.
  3292. *
  3293. * Mac OS X threading:
  3294. * Not thread safe
  3295. *
  3296. * Parameters:
  3297. *
  3298. * inDataBrowser:
  3299. * The Data Browser whose attributes to query.
  3300. *
  3301. * outAttributes:
  3302. * On exit, will contain the attributes of the Data Browser. This
  3303. * parameter cannot be NULL.
  3304. *
  3305. * Result:
  3306. * An operating system status code.
  3307. *
  3308. * Availability:
  3309. * Mac OS X: in version 10.4 and later in Carbon.framework
  3310. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3311. * Non-Carbon CFM: not available
  3312. }
  3313. function DataBrowserGetAttributes( inDataBrowser: ControlRef; var outAttributes: OptionBits ): OSStatus; external name '_DataBrowserGetAttributes';
  3314. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3315. {
  3316. * Summary:
  3317. * DataBrowserMetric values
  3318. *
  3319. * Discussion:
  3320. * For use with DataBrowserSetMetric.
  3321. }
  3322. const
  3323. {
  3324. * The content (icon, text, etc.) within a cell is drawn a certain
  3325. * amount in from the left & right edges of the cell. This metric
  3326. * governs the amount of inset.
  3327. }
  3328. kDataBrowserMetricCellContentInset = 1;
  3329. {
  3330. * This metric controls the space between the icon and text within a
  3331. * column of type kDataBrowserIconAndTextType.
  3332. }
  3333. kDataBrowserMetricIconAndTextGap = 2;
  3334. {
  3335. * In List View only, this metric is similar to
  3336. * kDataBrowserMetricCellContentInset, but it only affects the
  3337. * disclosure column and it only affects the side of the cell that
  3338. * displays the disclosure triangle. In other words, this metric is
  3339. * used instead of (not in addition to)
  3340. * DataBrowserMetricCellContentInset for one side of the disclosure
  3341. * column.
  3342. }
  3343. kDataBrowserMetricDisclosureColumnEdgeInset = 3;
  3344. {
  3345. * In List View only, this metric controls the amount of space
  3346. * between the disclosure triangle and the cell's content.
  3347. }
  3348. kDataBrowserMetricDisclosureTriangleAndContentGap = 4;
  3349. {
  3350. * In List View only, this metric controls the amount of space in the
  3351. * disclosure column for each level of indentation in progressively
  3352. * deeper hierarchies of disclosed items.
  3353. }
  3354. kDataBrowserMetricDisclosureColumnPerDepthGap = 5;
  3355. kDataBrowserMetricLast = kDataBrowserMetricDisclosureColumnPerDepthGap;
  3356. type
  3357. DataBrowserMetric = UInt32;
  3358. {
  3359. * DataBrowserSetMetric()
  3360. *
  3361. * Summary:
  3362. * Sets a value for a specified Data Browser metric.
  3363. *
  3364. * Mac OS X threading:
  3365. * Not thread safe
  3366. *
  3367. * Parameters:
  3368. *
  3369. * inDataBrowser:
  3370. * The Data Browser instance whose metric is being changed.
  3371. *
  3372. * inMetric:
  3373. * The DataBrowserMetric whose value is being changed.
  3374. *
  3375. * inUseDefaultValue:
  3376. * A Boolean indicating whether you want the Data Browser instance
  3377. * to revert to the default value for the metric. If you pass
  3378. * true, inValue will be ignored and a suitable default value will
  3379. * be used. If you pass false, inValue will be used as the value
  3380. * of the metric.
  3381. *
  3382. * inValue:
  3383. * When you pass false for inUseDefaultValue, this parameter is
  3384. * the value to use for the metric.
  3385. *
  3386. * Result:
  3387. * An operating system status code. If the incoming ControlRef isn't
  3388. * a Data Browser instance, or if the incoming metric isn't known,
  3389. * this function will return paramErr.
  3390. *
  3391. * Availability:
  3392. * Mac OS X: in version 10.4 and later in Carbon.framework
  3393. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3394. * Non-Carbon CFM: not available
  3395. }
  3396. function DataBrowserSetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; inUseDefaultValue: Boolean; inValue: Float32 ): OSStatus; external name '_DataBrowserSetMetric';
  3397. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3398. {
  3399. * DataBrowserGetMetric()
  3400. *
  3401. * Summary:
  3402. * Gets the value for a specified Data Browser metric.
  3403. *
  3404. * Mac OS X threading:
  3405. * Not thread safe
  3406. *
  3407. * Parameters:
  3408. *
  3409. * inDataBrowser:
  3410. * The Data Browser instance whose metric value to get.
  3411. *
  3412. * inMetric:
  3413. * The DataBrowserMetric value to get.
  3414. *
  3415. * outUsingDefaultValue:
  3416. * On exit, this is a Boolean indicating whether the metric's
  3417. * value is determined by Data Browser's default values. You may
  3418. * pass NULL if you don't need this information.
  3419. *
  3420. * outValue:
  3421. * On exit, this is the value of the metric.
  3422. *
  3423. * Result:
  3424. * An operating system status code. If the incoming ControlRef isn't
  3425. * a Data Browser instance, or if the incoming metric isn't known,
  3426. * this function will return paramErr.
  3427. *
  3428. * Availability:
  3429. * Mac OS X: in version 10.4 and later in Carbon.framework
  3430. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3431. * Non-Carbon CFM: not available
  3432. }
  3433. function DataBrowserGetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; outUsingDefaultValue: BooleanPtr { can be NULL }; var outValue: Float32 ): OSStatus; external name '_DataBrowserGetMetric';
  3434. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3435. { Item Manipulation }
  3436. { Passing NULL for "items" argument to RemoveDataBrowserItems and }
  3437. { UpdateDataBrowserItems refers to all items in the specified container. }
  3438. { Passing NULL for "items" argument to AddDataBrowserItems means }
  3439. { "generate IDs starting from 1." }
  3440. {
  3441. * AddDataBrowserItems()
  3442. *
  3443. * Mac OS X threading:
  3444. * Not thread safe
  3445. *
  3446. * Availability:
  3447. * Mac OS X: in version 10.0 and later in Carbon.framework
  3448. * CarbonLib: in CarbonLib 1.1 and later
  3449. * Non-Carbon CFM: not available
  3450. }
  3451. function AddDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: UInt32; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_AddDataBrowserItems';
  3452. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3453. {
  3454. * RemoveDataBrowserItems()
  3455. *
  3456. * Mac OS X threading:
  3457. * Not thread safe
  3458. *
  3459. * Availability:
  3460. * Mac OS X: in version 10.0 and later in Carbon.framework
  3461. * CarbonLib: in CarbonLib 1.1 and later
  3462. * Non-Carbon CFM: not available
  3463. }
  3464. function RemoveDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: UInt32; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_RemoveDataBrowserItems';
  3465. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3466. {
  3467. * UpdateDataBrowserItems()
  3468. *
  3469. * Mac OS X threading:
  3470. * Not thread safe
  3471. *
  3472. * Availability:
  3473. * Mac OS X: in version 10.0 and later in Carbon.framework
  3474. * CarbonLib: in CarbonLib 1.1 and later
  3475. * Non-Carbon CFM: not available
  3476. }
  3477. function UpdateDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: UInt32; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID; propertyID: DataBrowserPropertyID ): OSStatus; external name '_UpdateDataBrowserItems';
  3478. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3479. { Edit Menu Enabling and Handling }
  3480. {
  3481. * EnableDataBrowserEditCommand()
  3482. *
  3483. * Mac OS X threading:
  3484. * Not thread safe
  3485. *
  3486. * Availability:
  3487. * Mac OS X: in version 10.0 and later in Carbon.framework
  3488. * CarbonLib: in CarbonLib 1.1 and later
  3489. * Non-Carbon CFM: not available
  3490. }
  3491. function EnableDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): Boolean; external name '_EnableDataBrowserEditCommand';
  3492. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3493. {
  3494. * ExecuteDataBrowserEditCommand()
  3495. *
  3496. * Mac OS X threading:
  3497. * Not thread safe
  3498. *
  3499. * Availability:
  3500. * Mac OS X: in version 10.0 and later in Carbon.framework
  3501. * CarbonLib: in CarbonLib 1.1 and later
  3502. * Non-Carbon CFM: not available
  3503. }
  3504. function ExecuteDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): OSStatus; external name '_ExecuteDataBrowserEditCommand';
  3505. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3506. {
  3507. * GetDataBrowserSelectionAnchor()
  3508. *
  3509. * Mac OS X threading:
  3510. * Not thread safe
  3511. *
  3512. * Availability:
  3513. * Mac OS X: in version 10.0 and later in Carbon.framework
  3514. * CarbonLib: in CarbonLib 1.1 and later
  3515. * Non-Carbon CFM: not available
  3516. }
  3517. function GetDataBrowserSelectionAnchor( browser: ControlRef; var first: DataBrowserItemID; var last: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserSelectionAnchor';
  3518. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3519. {
  3520. * MoveDataBrowserSelectionAnchor()
  3521. *
  3522. * Mac OS X threading:
  3523. * Not thread safe
  3524. *
  3525. * Availability:
  3526. * Mac OS X: in version 10.0 and later in Carbon.framework
  3527. * CarbonLib: in CarbonLib 1.1 and later
  3528. * Non-Carbon CFM: not available
  3529. }
  3530. function MoveDataBrowserSelectionAnchor( browser: ControlRef; direction: DataBrowserSelectionAnchorDirection; extendSelection: Boolean ): OSStatus; external name '_MoveDataBrowserSelectionAnchor';
  3531. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3532. { Container Manipulation }
  3533. {
  3534. * OpenDataBrowserContainer()
  3535. *
  3536. * Mac OS X threading:
  3537. * Not thread safe
  3538. *
  3539. * Availability:
  3540. * Mac OS X: in version 10.0 and later in Carbon.framework
  3541. * CarbonLib: in CarbonLib 1.1 and later
  3542. * Non-Carbon CFM: not available
  3543. }
  3544. function OpenDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_OpenDataBrowserContainer';
  3545. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3546. {
  3547. * CloseDataBrowserContainer()
  3548. *
  3549. * Mac OS X threading:
  3550. * Not thread safe
  3551. *
  3552. * Availability:
  3553. * Mac OS X: in version 10.0 and later in Carbon.framework
  3554. * CarbonLib: in CarbonLib 1.1 and later
  3555. * Non-Carbon CFM: not available
  3556. }
  3557. function CloseDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_CloseDataBrowserContainer';
  3558. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3559. {
  3560. * SortDataBrowserContainer()
  3561. *
  3562. * Mac OS X threading:
  3563. * Not thread safe
  3564. *
  3565. * Availability:
  3566. * Mac OS X: in version 10.0 and later in Carbon.framework
  3567. * CarbonLib: in CarbonLib 1.1 and later
  3568. * Non-Carbon CFM: not available
  3569. }
  3570. function SortDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID; sortChildren: Boolean ): OSStatus; external name '_SortDataBrowserContainer';
  3571. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3572. { Aggregate Item Access and Iteration }
  3573. {
  3574. * GetDataBrowserItems()
  3575. *
  3576. * Mac OS X threading:
  3577. * Not thread safe
  3578. *
  3579. * Availability:
  3580. * Mac OS X: in version 10.0 and later in Carbon.framework
  3581. * CarbonLib: in CarbonLib 1.1 and later
  3582. * Non-Carbon CFM: not available
  3583. }
  3584. function GetDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; items: Handle ): OSStatus; external name '_GetDataBrowserItems';
  3585. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3586. {
  3587. * GetDataBrowserItemCount()
  3588. *
  3589. * Mac OS X threading:
  3590. * Not thread safe
  3591. *
  3592. * Availability:
  3593. * Mac OS X: in version 10.0 and later in Carbon.framework
  3594. * CarbonLib: in CarbonLib 1.1 and later
  3595. * Non-Carbon CFM: not available
  3596. }
  3597. function GetDataBrowserItemCount( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; var numItems: UInt32 ): OSStatus; external name '_GetDataBrowserItemCount';
  3598. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3599. {
  3600. * ForEachDataBrowserItem()
  3601. *
  3602. * Mac OS X threading:
  3603. * Not thread safe
  3604. *
  3605. * Availability:
  3606. * Mac OS X: in version 10.0 and later in Carbon.framework
  3607. * CarbonLib: in CarbonLib 1.1 and later
  3608. * Non-Carbon CFM: not available
  3609. }
  3610. function ForEachDataBrowserItem( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; callback: DataBrowserItemUPP; clientData: UnivPtr ): OSStatus; external name '_ForEachDataBrowserItem';
  3611. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3612. { Individual Item Access and Display }
  3613. {
  3614. * IsDataBrowserItemSelected()
  3615. *
  3616. * Mac OS X threading:
  3617. * Not thread safe
  3618. *
  3619. * Availability:
  3620. * Mac OS X: in version 10.0 and later in Carbon.framework
  3621. * CarbonLib: in CarbonLib 1.1 and later
  3622. * Non-Carbon CFM: not available
  3623. }
  3624. function IsDataBrowserItemSelected( browser: ControlRef; item: DataBrowserItemID ): Boolean; external name '_IsDataBrowserItemSelected';
  3625. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3626. {
  3627. * GetDataBrowserItemState()
  3628. *
  3629. * Mac OS X threading:
  3630. * Not thread safe
  3631. *
  3632. * Availability:
  3633. * Mac OS X: in version 10.0 and later in Carbon.framework
  3634. * CarbonLib: in CarbonLib 1.1 and later
  3635. * Non-Carbon CFM: not available
  3636. }
  3637. function GetDataBrowserItemState( browser: ControlRef; item: DataBrowserItemID; var state: DataBrowserItemState ): OSStatus; external name '_GetDataBrowserItemState';
  3638. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3639. {
  3640. * RevealDataBrowserItem()
  3641. *
  3642. * Mac OS X threading:
  3643. * Not thread safe
  3644. *
  3645. * Availability:
  3646. * Mac OS X: in version 10.0 and later in Carbon.framework
  3647. * CarbonLib: in CarbonLib 1.1 and later
  3648. * Non-Carbon CFM: not available
  3649. }
  3650. function RevealDataBrowserItem( browser: ControlRef; item: DataBrowserItemID; propertyID: DataBrowserPropertyID; options: DataBrowserRevealOptions ): OSStatus; external name '_RevealDataBrowserItem';
  3651. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3652. { Selection Set Manipulation }
  3653. {
  3654. * SetDataBrowserSelectedItems()
  3655. *
  3656. * Mac OS X threading:
  3657. * Not thread safe
  3658. *
  3659. * Availability:
  3660. * Mac OS X: in version 10.0 and later in Carbon.framework
  3661. * CarbonLib: in CarbonLib 1.1 and later
  3662. * Non-Carbon CFM: not available
  3663. }
  3664. function SetDataBrowserSelectedItems( browser: ControlRef; numItems: UInt32; items: DataBrowserItemIDPtr; operation: DataBrowserSetOption ): OSStatus; external name '_SetDataBrowserSelectedItems';
  3665. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3666. { DataBrowser Attribute Manipulation }
  3667. { The user customizable portion of the current view style settings }
  3668. {
  3669. * SetDataBrowserUserState()
  3670. *
  3671. * Mac OS X threading:
  3672. * Not thread safe
  3673. *
  3674. * Availability:
  3675. * Mac OS X: in version 10.0 and later in Carbon.framework
  3676. * CarbonLib: in CarbonLib 1.1 and later
  3677. * Non-Carbon CFM: not available
  3678. }
  3679. function SetDataBrowserUserState( browser: ControlRef; stateInfo: CFDictionaryRef ): OSStatus; external name '_SetDataBrowserUserState';
  3680. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3681. {
  3682. * GetDataBrowserUserState()
  3683. *
  3684. * Mac OS X threading:
  3685. * Not thread safe
  3686. *
  3687. * Availability:
  3688. * Mac OS X: in version 10.0 and later in Carbon.framework
  3689. * CarbonLib: in CarbonLib 1.1 and later
  3690. * Non-Carbon CFM: not available
  3691. }
  3692. function GetDataBrowserUserState( browser: ControlRef; var stateInfo: CFDictionaryRef ): OSStatus; external name '_GetDataBrowserUserState';
  3693. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3694. { All items are active/enabled or not }
  3695. {
  3696. * SetDataBrowserActiveItems()
  3697. *
  3698. * Mac OS X threading:
  3699. * Not thread safe
  3700. *
  3701. * Availability:
  3702. * Mac OS X: in version 10.0 and later in Carbon.framework
  3703. * CarbonLib: in CarbonLib 1.1 and later
  3704. * Non-Carbon CFM: not available
  3705. }
  3706. function SetDataBrowserActiveItems( browser: ControlRef; active: Boolean ): OSStatus; external name '_SetDataBrowserActiveItems';
  3707. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3708. {
  3709. * GetDataBrowserActiveItems()
  3710. *
  3711. * Mac OS X threading:
  3712. * Not thread safe
  3713. *
  3714. * Availability:
  3715. * Mac OS X: in version 10.0 and later in Carbon.framework
  3716. * CarbonLib: in CarbonLib 1.1 and later
  3717. * Non-Carbon CFM: not available
  3718. }
  3719. function GetDataBrowserActiveItems( browser: ControlRef; var active: Boolean ): OSStatus; external name '_GetDataBrowserActiveItems';
  3720. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3721. { Inset the scrollbars within the DataBrowser bounds }
  3722. {
  3723. * SetDataBrowserScrollBarInset()
  3724. *
  3725. * Mac OS X threading:
  3726. * Not thread safe
  3727. *
  3728. * Availability:
  3729. * Mac OS X: in version 10.0 and later in Carbon.framework
  3730. * CarbonLib: in CarbonLib 1.1 and later
  3731. * Non-Carbon CFM: not available
  3732. }
  3733. function SetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_SetDataBrowserScrollBarInset';
  3734. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3735. {
  3736. * GetDataBrowserScrollBarInset()
  3737. *
  3738. * Mac OS X threading:
  3739. * Not thread safe
  3740. *
  3741. * Availability:
  3742. * Mac OS X: in version 10.0 and later in Carbon.framework
  3743. * CarbonLib: in CarbonLib 1.1 and later
  3744. * Non-Carbon CFM: not available
  3745. }
  3746. function GetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_GetDataBrowserScrollBarInset';
  3747. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3748. { The "user focused" item }
  3749. { For the ListView, this means the root container }
  3750. { For the ColumnView, this means the rightmost container column }
  3751. {
  3752. * SetDataBrowserTarget()
  3753. *
  3754. * Mac OS X threading:
  3755. * Not thread safe
  3756. *
  3757. * Availability:
  3758. * Mac OS X: in version 10.0 and later in Carbon.framework
  3759. * CarbonLib: in CarbonLib 1.1 and later
  3760. * Non-Carbon CFM: not available
  3761. }
  3762. function SetDataBrowserTarget( browser: ControlRef; target: DataBrowserItemID ): OSStatus; external name '_SetDataBrowserTarget';
  3763. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3764. {
  3765. * GetDataBrowserTarget()
  3766. *
  3767. * Mac OS X threading:
  3768. * Not thread safe
  3769. *
  3770. * Availability:
  3771. * Mac OS X: in version 10.0 and later in Carbon.framework
  3772. * CarbonLib: in CarbonLib 1.1 and later
  3773. * Non-Carbon CFM: not available
  3774. }
  3775. function GetDataBrowserTarget( browser: ControlRef; var target: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserTarget';
  3776. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3777. { Current sort ordering }
  3778. { ListView tracks this per-column }
  3779. {
  3780. * SetDataBrowserSortOrder()
  3781. *
  3782. * Mac OS X threading:
  3783. * Not thread safe
  3784. *
  3785. * Availability:
  3786. * Mac OS X: in version 10.0 and later in Carbon.framework
  3787. * CarbonLib: in CarbonLib 1.1 and later
  3788. * Non-Carbon CFM: not available
  3789. }
  3790. function SetDataBrowserSortOrder( browser: ControlRef; order: DataBrowserSortOrder ): OSStatus; external name '_SetDataBrowserSortOrder';
  3791. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3792. {
  3793. * GetDataBrowserSortOrder()
  3794. *
  3795. * Mac OS X threading:
  3796. * Not thread safe
  3797. *
  3798. * Availability:
  3799. * Mac OS X: in version 10.0 and later in Carbon.framework
  3800. * CarbonLib: in CarbonLib 1.1 and later
  3801. * Non-Carbon CFM: not available
  3802. }
  3803. function GetDataBrowserSortOrder( browser: ControlRef; var order: DataBrowserSortOrder ): OSStatus; external name '_GetDataBrowserSortOrder';
  3804. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3805. { Scrollbar values }
  3806. {
  3807. * SetDataBrowserScrollPosition()
  3808. *
  3809. * Mac OS X threading:
  3810. * Not thread safe
  3811. *
  3812. * Availability:
  3813. * Mac OS X: in version 10.0 and later in Carbon.framework
  3814. * CarbonLib: in CarbonLib 1.1 and later
  3815. * Non-Carbon CFM: not available
  3816. }
  3817. function SetDataBrowserScrollPosition( browser: ControlRef; top: UInt32; left: UInt32 ): OSStatus; external name '_SetDataBrowserScrollPosition';
  3818. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3819. {
  3820. * GetDataBrowserScrollPosition()
  3821. *
  3822. * Mac OS X threading:
  3823. * Not thread safe
  3824. *
  3825. * Availability:
  3826. * Mac OS X: in version 10.0 and later in Carbon.framework
  3827. * CarbonLib: in CarbonLib 1.1 and later
  3828. * Non-Carbon CFM: not available
  3829. }
  3830. function GetDataBrowserScrollPosition( browser: ControlRef; var top: UInt32; var left: UInt32 ): OSStatus; external name '_GetDataBrowserScrollPosition';
  3831. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3832. { Show/Hide each scrollbar }
  3833. {
  3834. * SetDataBrowserHasScrollBars()
  3835. *
  3836. * Mac OS X threading:
  3837. * Not thread safe
  3838. *
  3839. * Availability:
  3840. * Mac OS X: in version 10.0 and later in Carbon.framework
  3841. * CarbonLib: in CarbonLib 1.1 and later
  3842. * Non-Carbon CFM: not available
  3843. }
  3844. function SetDataBrowserHasScrollBars( browser: ControlRef; horiz: Boolean; vert: Boolean ): OSStatus; external name '_SetDataBrowserHasScrollBars';
  3845. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3846. {
  3847. * GetDataBrowserHasScrollBars()
  3848. *
  3849. * Mac OS X threading:
  3850. * Not thread safe
  3851. *
  3852. * Availability:
  3853. * Mac OS X: in version 10.0 and later in Carbon.framework
  3854. * CarbonLib: in CarbonLib 1.1 and later
  3855. * Non-Carbon CFM: not available
  3856. }
  3857. function GetDataBrowserHasScrollBars( browser: ControlRef; var horiz: Boolean; var vert: Boolean ): OSStatus; external name '_GetDataBrowserHasScrollBars';
  3858. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3859. { Property passed to sort callback (ListView sort column) }
  3860. {
  3861. * SetDataBrowserSortProperty()
  3862. *
  3863. * Mac OS X threading:
  3864. * Not thread safe
  3865. *
  3866. * Availability:
  3867. * Mac OS X: in version 10.0 and later in Carbon.framework
  3868. * CarbonLib: in CarbonLib 1.1 and later
  3869. * Non-Carbon CFM: not available
  3870. }
  3871. function SetDataBrowserSortProperty( browser: ControlRef; property: DataBrowserPropertyID ): OSStatus; external name '_SetDataBrowserSortProperty';
  3872. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3873. {
  3874. * GetDataBrowserSortProperty()
  3875. *
  3876. * Mac OS X threading:
  3877. * Not thread safe
  3878. *
  3879. * Availability:
  3880. * Mac OS X: in version 10.0 and later in Carbon.framework
  3881. * CarbonLib: in CarbonLib 1.1 and later
  3882. * Non-Carbon CFM: not available
  3883. }
  3884. function GetDataBrowserSortProperty( browser: ControlRef; var property: DataBrowserPropertyID ): OSStatus; external name '_GetDataBrowserSortProperty';
  3885. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3886. { Modify selection behavior }
  3887. {
  3888. * SetDataBrowserSelectionFlags()
  3889. *
  3890. * Mac OS X threading:
  3891. * Not thread safe
  3892. *
  3893. * Availability:
  3894. * Mac OS X: in version 10.0 and later in Carbon.framework
  3895. * CarbonLib: in CarbonLib 1.1 and later
  3896. * Non-Carbon CFM: not available
  3897. }
  3898. function SetDataBrowserSelectionFlags( browser: ControlRef; selectionFlags: DataBrowserSelectionFlags ): OSStatus; external name '_SetDataBrowserSelectionFlags';
  3899. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3900. {
  3901. * GetDataBrowserSelectionFlags()
  3902. *
  3903. * Mac OS X threading:
  3904. * Not thread safe
  3905. *
  3906. * Availability:
  3907. * Mac OS X: in version 10.0 and later in Carbon.framework
  3908. * CarbonLib: in CarbonLib 1.1 and later
  3909. * Non-Carbon CFM: not available
  3910. }
  3911. function GetDataBrowserSelectionFlags( browser: ControlRef; var selectionFlags: DataBrowserSelectionFlags ): OSStatus; external name '_GetDataBrowserSelectionFlags';
  3912. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3913. { Dynamically modify property appearance/behavior }
  3914. {
  3915. * SetDataBrowserPropertyFlags()
  3916. *
  3917. * Mac OS X threading:
  3918. * Not thread safe
  3919. *
  3920. * Availability:
  3921. * Mac OS X: in version 10.0 and later in Carbon.framework
  3922. * CarbonLib: in CarbonLib 1.1 and later
  3923. * Non-Carbon CFM: not available
  3924. }
  3925. function SetDataBrowserPropertyFlags( browser: ControlRef; property: DataBrowserPropertyID; flags: DataBrowserPropertyFlags ): OSStatus; external name '_SetDataBrowserPropertyFlags';
  3926. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3927. {
  3928. * GetDataBrowserPropertyFlags()
  3929. *
  3930. * Mac OS X threading:
  3931. * Not thread safe
  3932. *
  3933. * Availability:
  3934. * Mac OS X: in version 10.0 and later in Carbon.framework
  3935. * CarbonLib: in CarbonLib 1.1 and later
  3936. * Non-Carbon CFM: not available
  3937. }
  3938. function GetDataBrowserPropertyFlags( browser: ControlRef; property: DataBrowserPropertyID; var flags: DataBrowserPropertyFlags ): OSStatus; external name '_GetDataBrowserPropertyFlags';
  3939. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3940. { Text of current in-place edit session }
  3941. {
  3942. * SetDataBrowserEditText()
  3943. *
  3944. * Mac OS X threading:
  3945. * Not thread safe
  3946. *
  3947. * Availability:
  3948. * Mac OS X: in version 10.0 and later in Carbon.framework
  3949. * CarbonLib: in CarbonLib 1.1 and later
  3950. * Non-Carbon CFM: not available
  3951. }
  3952. function SetDataBrowserEditText( browser: ControlRef; text: CFStringRef ): OSStatus; external name '_SetDataBrowserEditText';
  3953. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3954. {
  3955. * CopyDataBrowserEditText()
  3956. *
  3957. * Mac OS X threading:
  3958. * Not thread safe
  3959. *
  3960. * Availability:
  3961. * Mac OS X: in version 10.0 and later in Carbon.framework
  3962. * CarbonLib: in CarbonLib 1.5 and later
  3963. * Non-Carbon CFM: not available
  3964. }
  3965. function CopyDataBrowserEditText( browser: ControlRef; var text: CFStringRef ): OSStatus; external name '_CopyDataBrowserEditText';
  3966. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3967. {
  3968. * GetDataBrowserEditText()
  3969. *
  3970. * Mac OS X threading:
  3971. * Not thread safe
  3972. *
  3973. * Availability:
  3974. * Mac OS X: in version 10.0 and later in Carbon.framework
  3975. * CarbonLib: in CarbonLib 1.1 and later
  3976. * Non-Carbon CFM: not available
  3977. }
  3978. function GetDataBrowserEditText( browser: ControlRef; text: CFMutableStringRef ): OSStatus; external name '_GetDataBrowserEditText';
  3979. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3980. { Item/property currently being edited }
  3981. {
  3982. * SetDataBrowserEditItem()
  3983. *
  3984. * Mac OS X threading:
  3985. * Not thread safe
  3986. *
  3987. * Availability:
  3988. * Mac OS X: in version 10.0 and later in Carbon.framework
  3989. * CarbonLib: in CarbonLib 1.1 and later
  3990. * Non-Carbon CFM: not available
  3991. }
  3992. function SetDataBrowserEditItem( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID ): OSStatus; external name '_SetDataBrowserEditItem';
  3993. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3994. {
  3995. * GetDataBrowserEditItem()
  3996. *
  3997. * Mac OS X threading:
  3998. * Not thread safe
  3999. *
  4000. * Availability:
  4001. * Mac OS X: in version 10.0 and later in Carbon.framework
  4002. * CarbonLib: in CarbonLib 1.1 and later
  4003. * Non-Carbon CFM: not available
  4004. }
  4005. function GetDataBrowserEditItem( browser: ControlRef; var item: DataBrowserItemID; var property: DataBrowserPropertyID ): OSStatus; external name '_GetDataBrowserEditItem';
  4006. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4007. { Get the current bounds of a visual part of an item's property }
  4008. {
  4009. * GetDataBrowserItemPartBounds()
  4010. *
  4011. * Mac OS X threading:
  4012. * Not thread safe
  4013. *
  4014. * Availability:
  4015. * Mac OS X: in version 10.0 and later in Carbon.framework
  4016. * CarbonLib: in CarbonLib 1.1 and later
  4017. * Non-Carbon CFM: not available
  4018. }
  4019. function GetDataBrowserItemPartBounds( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; part: DataBrowserPropertyPart; var bounds: Rect ): OSStatus; external name '_GetDataBrowserItemPartBounds';
  4020. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4021. { DataBrowser ItemData Accessors (used within DataBrowserItemData callback) }
  4022. type
  4023. DataBrowserItemDataRef = UnivPtr;
  4024. {
  4025. * SetDataBrowserItemDataIcon()
  4026. *
  4027. * Mac OS X threading:
  4028. * Not thread safe
  4029. *
  4030. * Availability:
  4031. * Mac OS X: in version 10.0 and later in Carbon.framework
  4032. * CarbonLib: in CarbonLib 1.1 and later
  4033. * Non-Carbon CFM: not available
  4034. }
  4035. function SetDataBrowserItemDataIcon( itemData: DataBrowserItemDataRef; theData: IconRef ): OSStatus; external name '_SetDataBrowserItemDataIcon';
  4036. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4037. {
  4038. * GetDataBrowserItemDataIcon()
  4039. *
  4040. * Mac OS X threading:
  4041. * Not thread safe
  4042. *
  4043. * Availability:
  4044. * Mac OS X: in version 10.0 and later in Carbon.framework
  4045. * CarbonLib: in CarbonLib 1.5 and later
  4046. * Non-Carbon CFM: not available
  4047. }
  4048. function GetDataBrowserItemDataIcon( itemData: DataBrowserItemDataRef; var theData: IconRef ): OSStatus; external name '_GetDataBrowserItemDataIcon';
  4049. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4050. {
  4051. * SetDataBrowserItemDataText()
  4052. *
  4053. * Mac OS X threading:
  4054. * Not thread safe
  4055. *
  4056. * Availability:
  4057. * Mac OS X: in version 10.0 and later in Carbon.framework
  4058. * CarbonLib: in CarbonLib 1.1 and later
  4059. * Non-Carbon CFM: not available
  4060. }
  4061. function SetDataBrowserItemDataText( itemData: DataBrowserItemDataRef; theData: CFStringRef ): OSStatus; external name '_SetDataBrowserItemDataText';
  4062. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4063. {
  4064. * GetDataBrowserItemDataText()
  4065. *
  4066. * Mac OS X threading:
  4067. * Not thread safe
  4068. *
  4069. * Availability:
  4070. * Mac OS X: in version 10.0 and later in Carbon.framework
  4071. * CarbonLib: in CarbonLib 1.1 and later
  4072. * Non-Carbon CFM: not available
  4073. }
  4074. function GetDataBrowserItemDataText( itemData: DataBrowserItemDataRef; var theData: CFStringRef ): OSStatus; external name '_GetDataBrowserItemDataText';
  4075. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4076. {
  4077. * SetDataBrowserItemDataValue()
  4078. *
  4079. * Mac OS X threading:
  4080. * Not thread safe
  4081. *
  4082. * Availability:
  4083. * Mac OS X: in version 10.0 and later in Carbon.framework
  4084. * CarbonLib: in CarbonLib 1.1 and later
  4085. * Non-Carbon CFM: not available
  4086. }
  4087. function SetDataBrowserItemDataValue( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataValue';
  4088. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4089. {
  4090. * GetDataBrowserItemDataValue()
  4091. *
  4092. * Mac OS X threading:
  4093. * Not thread safe
  4094. *
  4095. * Availability:
  4096. * Mac OS X: in version 10.0 and later in Carbon.framework
  4097. * CarbonLib: in CarbonLib 1.1 and later
  4098. * Non-Carbon CFM: not available
  4099. }
  4100. function GetDataBrowserItemDataValue( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataValue';
  4101. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4102. {
  4103. * SetDataBrowserItemDataMinimum()
  4104. *
  4105. * Mac OS X threading:
  4106. * Not thread safe
  4107. *
  4108. * Availability:
  4109. * Mac OS X: in version 10.0 and later in Carbon.framework
  4110. * CarbonLib: in CarbonLib 1.1 and later
  4111. * Non-Carbon CFM: not available
  4112. }
  4113. function SetDataBrowserItemDataMinimum( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataMinimum';
  4114. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4115. {
  4116. * GetDataBrowserItemDataMinimum()
  4117. *
  4118. * Mac OS X threading:
  4119. * Not thread safe
  4120. *
  4121. * Availability:
  4122. * Mac OS X: in version 10.0 and later in Carbon.framework
  4123. * CarbonLib: in CarbonLib 1.1 and later
  4124. * Non-Carbon CFM: not available
  4125. }
  4126. function GetDataBrowserItemDataMinimum( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataMinimum';
  4127. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4128. {
  4129. * SetDataBrowserItemDataMaximum()
  4130. *
  4131. * Mac OS X threading:
  4132. * Not thread safe
  4133. *
  4134. * Availability:
  4135. * Mac OS X: in version 10.0 and later in Carbon.framework
  4136. * CarbonLib: in CarbonLib 1.1 and later
  4137. * Non-Carbon CFM: not available
  4138. }
  4139. function SetDataBrowserItemDataMaximum( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataMaximum';
  4140. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4141. {
  4142. * GetDataBrowserItemDataMaximum()
  4143. *
  4144. * Mac OS X threading:
  4145. * Not thread safe
  4146. *
  4147. * Availability:
  4148. * Mac OS X: in version 10.0 and later in Carbon.framework
  4149. * CarbonLib: in CarbonLib 1.1 and later
  4150. * Non-Carbon CFM: not available
  4151. }
  4152. function GetDataBrowserItemDataMaximum( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataMaximum';
  4153. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4154. {
  4155. * SetDataBrowserItemDataBooleanValue()
  4156. *
  4157. * Mac OS X threading:
  4158. * Not thread safe
  4159. *
  4160. * Availability:
  4161. * Mac OS X: in version 10.0 and later in Carbon.framework
  4162. * CarbonLib: in CarbonLib 1.1 and later
  4163. * Non-Carbon CFM: not available
  4164. }
  4165. function SetDataBrowserItemDataBooleanValue( itemData: DataBrowserItemDataRef; theData: Boolean ): OSStatus; external name '_SetDataBrowserItemDataBooleanValue';
  4166. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4167. {
  4168. * GetDataBrowserItemDataBooleanValue()
  4169. *
  4170. * Mac OS X threading:
  4171. * Not thread safe
  4172. *
  4173. * Availability:
  4174. * Mac OS X: in version 10.0 and later in Carbon.framework
  4175. * CarbonLib: in CarbonLib 1.1 and later
  4176. * Non-Carbon CFM: not available
  4177. }
  4178. function GetDataBrowserItemDataBooleanValue( itemData: DataBrowserItemDataRef; var theData: Boolean ): OSStatus; external name '_GetDataBrowserItemDataBooleanValue';
  4179. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4180. {
  4181. * SetDataBrowserItemDataMenuRef()
  4182. *
  4183. * Mac OS X threading:
  4184. * Not thread safe
  4185. *
  4186. * Availability:
  4187. * Mac OS X: in version 10.0 and later in Carbon.framework
  4188. * CarbonLib: in CarbonLib 1.1 and later
  4189. * Non-Carbon CFM: not available
  4190. }
  4191. function SetDataBrowserItemDataMenuRef( itemData: DataBrowserItemDataRef; theData: MenuRef ): OSStatus; external name '_SetDataBrowserItemDataMenuRef';
  4192. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4193. {
  4194. * GetDataBrowserItemDataMenuRef()
  4195. *
  4196. * Mac OS X threading:
  4197. * Not thread safe
  4198. *
  4199. * Availability:
  4200. * Mac OS X: in version 10.0 and later in Carbon.framework
  4201. * CarbonLib: in CarbonLib 1.1 and later
  4202. * Non-Carbon CFM: not available
  4203. }
  4204. function GetDataBrowserItemDataMenuRef( itemData: DataBrowserItemDataRef; var theData: MenuRef ): OSStatus; external name '_GetDataBrowserItemDataMenuRef';
  4205. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4206. {
  4207. * SetDataBrowserItemDataRGBColor()
  4208. *
  4209. * Mac OS X threading:
  4210. * Not thread safe
  4211. *
  4212. * Availability:
  4213. * Mac OS X: in version 10.0 and later in Carbon.framework
  4214. * CarbonLib: in CarbonLib 1.1 and later
  4215. * Non-Carbon CFM: not available
  4216. }
  4217. function SetDataBrowserItemDataRGBColor( itemData: DataBrowserItemDataRef; const (*var*) theData: RGBColor ): OSStatus; external name '_SetDataBrowserItemDataRGBColor';
  4218. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4219. {
  4220. * GetDataBrowserItemDataRGBColor()
  4221. *
  4222. * Mac OS X threading:
  4223. * Not thread safe
  4224. *
  4225. * Availability:
  4226. * Mac OS X: in version 10.0 and later in Carbon.framework
  4227. * CarbonLib: in CarbonLib 1.1 and later
  4228. * Non-Carbon CFM: not available
  4229. }
  4230. function GetDataBrowserItemDataRGBColor( itemData: DataBrowserItemDataRef; var theData: RGBColor ): OSStatus; external name '_GetDataBrowserItemDataRGBColor';
  4231. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4232. {
  4233. * SetDataBrowserItemDataDrawState()
  4234. *
  4235. * Mac OS X threading:
  4236. * Not thread safe
  4237. *
  4238. * Availability:
  4239. * Mac OS X: in version 10.0 and later in Carbon.framework
  4240. * CarbonLib: in CarbonLib 1.1 and later
  4241. * Non-Carbon CFM: not available
  4242. }
  4243. function SetDataBrowserItemDataDrawState( itemData: DataBrowserItemDataRef; theData: ThemeDrawState ): OSStatus; external name '_SetDataBrowserItemDataDrawState';
  4244. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4245. {
  4246. * GetDataBrowserItemDataDrawState()
  4247. *
  4248. * Mac OS X threading:
  4249. * Not thread safe
  4250. *
  4251. * Availability:
  4252. * Mac OS X: in version 10.0 and later in Carbon.framework
  4253. * CarbonLib: in CarbonLib 1.1 and later
  4254. * Non-Carbon CFM: not available
  4255. }
  4256. function GetDataBrowserItemDataDrawState( itemData: DataBrowserItemDataRef; var theData: ThemeDrawState ): OSStatus; external name '_GetDataBrowserItemDataDrawState';
  4257. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4258. {
  4259. * SetDataBrowserItemDataButtonValue()
  4260. *
  4261. * Mac OS X threading:
  4262. * Not thread safe
  4263. *
  4264. * Availability:
  4265. * Mac OS X: in version 10.0 and later in Carbon.framework
  4266. * CarbonLib: in CarbonLib 1.1 and later
  4267. * Non-Carbon CFM: not available
  4268. }
  4269. function SetDataBrowserItemDataButtonValue( itemData: DataBrowserItemDataRef; theData: ThemeButtonValue ): OSStatus; external name '_SetDataBrowserItemDataButtonValue';
  4270. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4271. {
  4272. * GetDataBrowserItemDataButtonValue()
  4273. *
  4274. * Mac OS X threading:
  4275. * Not thread safe
  4276. *
  4277. * Availability:
  4278. * Mac OS X: in version 10.0 and later in Carbon.framework
  4279. * CarbonLib: in CarbonLib 1.1 and later
  4280. * Non-Carbon CFM: not available
  4281. }
  4282. function GetDataBrowserItemDataButtonValue( itemData: DataBrowserItemDataRef; var theData: ThemeButtonValue ): OSStatus; external name '_GetDataBrowserItemDataButtonValue';
  4283. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4284. {
  4285. * SetDataBrowserItemDataIconTransform()
  4286. *
  4287. * Mac OS X threading:
  4288. * Not thread safe
  4289. *
  4290. * Availability:
  4291. * Mac OS X: in version 10.0 and later in Carbon.framework
  4292. * CarbonLib: in CarbonLib 1.1 and later
  4293. * Non-Carbon CFM: not available
  4294. }
  4295. function SetDataBrowserItemDataIconTransform( itemData: DataBrowserItemDataRef; theData: IconTransformType ): OSStatus; external name '_SetDataBrowserItemDataIconTransform';
  4296. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4297. {
  4298. * GetDataBrowserItemDataIconTransform()
  4299. *
  4300. * Mac OS X threading:
  4301. * Not thread safe
  4302. *
  4303. * Availability:
  4304. * Mac OS X: in version 10.0 and later in Carbon.framework
  4305. * CarbonLib: in CarbonLib 1.1 and later
  4306. * Non-Carbon CFM: not available
  4307. }
  4308. function GetDataBrowserItemDataIconTransform( itemData: DataBrowserItemDataRef; var theData: IconTransformType ): OSStatus; external name '_GetDataBrowserItemDataIconTransform';
  4309. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4310. {
  4311. * SetDataBrowserItemDataDateTime()
  4312. *
  4313. * Mac OS X threading:
  4314. * Not thread safe
  4315. *
  4316. * Availability:
  4317. * Mac OS X: in version 10.0 and later in Carbon.framework
  4318. * CarbonLib: in CarbonLib 1.1 and later
  4319. * Non-Carbon CFM: not available
  4320. }
  4321. function SetDataBrowserItemDataDateTime( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataDateTime';
  4322. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4323. {
  4324. * GetDataBrowserItemDataDateTime()
  4325. *
  4326. * Mac OS X threading:
  4327. * Not thread safe
  4328. *
  4329. * Availability:
  4330. * Mac OS X: in version 10.0 and later in Carbon.framework
  4331. * CarbonLib: in CarbonLib 1.1 and later
  4332. * Non-Carbon CFM: not available
  4333. }
  4334. function GetDataBrowserItemDataDateTime( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataDateTime';
  4335. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4336. {
  4337. * SetDataBrowserItemDataLongDateTime()
  4338. *
  4339. * Mac OS X threading:
  4340. * Not thread safe
  4341. *
  4342. * Availability:
  4343. * Mac OS X: in version 10.0 and later in Carbon.framework
  4344. * CarbonLib: in CarbonLib 1.1 and later
  4345. * Non-Carbon CFM: not available
  4346. }
  4347. function SetDataBrowserItemDataLongDateTime( itemData: DataBrowserItemDataRef; (*const*) var theData: LongDateTime ): OSStatus; external name '_SetDataBrowserItemDataLongDateTime';
  4348. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4349. {
  4350. * GetDataBrowserItemDataLongDateTime()
  4351. *
  4352. * Mac OS X threading:
  4353. * Not thread safe
  4354. *
  4355. * Availability:
  4356. * Mac OS X: in version 10.0 and later in Carbon.framework
  4357. * CarbonLib: in CarbonLib 1.1 and later
  4358. * Non-Carbon CFM: not available
  4359. }
  4360. function GetDataBrowserItemDataLongDateTime( itemData: DataBrowserItemDataRef; var theData: LongDateTime ): OSStatus; external name '_GetDataBrowserItemDataLongDateTime';
  4361. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4362. {
  4363. * SetDataBrowserItemDataItemID()
  4364. *
  4365. * Mac OS X threading:
  4366. * Not thread safe
  4367. *
  4368. * Availability:
  4369. * Mac OS X: in version 10.0 and later in Carbon.framework
  4370. * CarbonLib: in CarbonLib 1.1 and later
  4371. * Non-Carbon CFM: not available
  4372. }
  4373. function SetDataBrowserItemDataItemID( itemData: DataBrowserItemDataRef; theData: DataBrowserItemID ): OSStatus; external name '_SetDataBrowserItemDataItemID';
  4374. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4375. {
  4376. * GetDataBrowserItemDataItemID()
  4377. *
  4378. * Mac OS X threading:
  4379. * Not thread safe
  4380. *
  4381. * Availability:
  4382. * Mac OS X: in version 10.0 and later in Carbon.framework
  4383. * CarbonLib: in CarbonLib 1.5 and later
  4384. * Non-Carbon CFM: not available
  4385. }
  4386. function GetDataBrowserItemDataItemID( itemData: DataBrowserItemDataRef; var theData: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserItemDataItemID';
  4387. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4388. {
  4389. * GetDataBrowserItemDataProperty()
  4390. *
  4391. * Mac OS X threading:
  4392. * Not thread safe
  4393. *
  4394. * Availability:
  4395. * Mac OS X: in version 10.0 and later in Carbon.framework
  4396. * CarbonLib: in CarbonLib 1.1 and later
  4397. * Non-Carbon CFM: not available
  4398. }
  4399. function GetDataBrowserItemDataProperty( itemData: DataBrowserItemDataRef; var theData: DataBrowserPropertyID ): OSStatus; external name '_GetDataBrowserItemDataProperty';
  4400. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4401. { Standard DataBrowser Callbacks }
  4402. { Basic Item Management & Manipulation }
  4403. type
  4404. DataBrowserItemDataProcPtr = function( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemData: DataBrowserItemDataRef; setValue: Boolean ): OSStatus;
  4405. type
  4406. DataBrowserItemDataUPP = DataBrowserItemDataProcPtr;
  4407. { Item Comparison }
  4408. type
  4409. DataBrowserItemCompareProcPtr = function( browser: ControlRef; itemOne: DataBrowserItemID; itemTwo: DataBrowserItemID; sortProperty: DataBrowserPropertyID ): Boolean;
  4410. type
  4411. DataBrowserItemCompareUPP = DataBrowserItemCompareProcPtr;
  4412. { ItemEvent Notification }
  4413. { A Very Important Note about DataBrowserItemNotificationProcPtr: }
  4414. { Under all currently shipping versions of CarbonLib (eg. up through 1.3), your callback is called }
  4415. { just as the prototype appears in this header. It should only be expecting three parameters because }
  4416. { DataBrowser will only pass three parameters. }
  4417. { Under Mac OS X, your callback is called with an additional parameter. If you wish to interpret }
  4418. { the additional parameter, your callback should have the same prototype as the }
  4419. { DataBrowserItemNotificationWithItemProcPtr (below). You may freely take a callback with this }
  4420. { prototype and pass it to NewDataBrowserItemNotificationUPP in order to generate a }
  4421. { DataBrowserItemNotificationUPP that you can use just like any other DataBrowserItemNotificationUPP. }
  4422. { If you use this technique under CarbonLib, you will *not* receive valid data in the fourth }
  4423. { parameter, and any attempt to use the invalid data will probably result in a crash. }
  4424. type
  4425. DataBrowserItemNotificationWithItemProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification; itemData: DataBrowserItemDataRef );
  4426. type
  4427. DataBrowserItemNotificationProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification );
  4428. type
  4429. DataBrowserItemNotificationWithItemUPP = DataBrowserItemNotificationWithItemProcPtr;
  4430. type
  4431. DataBrowserItemNotificationUPP = DataBrowserItemNotificationProcPtr;
  4432. { Drag & Drop Processing }
  4433. type
  4434. DataBrowserAddDragItemProcPtr = function( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; var itemRef: ItemReference ): Boolean;
  4435. type
  4436. DataBrowserAcceptDragProcPtr = function( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID ): Boolean;
  4437. type
  4438. DataBrowserReceiveDragProcPtr = function( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID ): Boolean;
  4439. type
  4440. DataBrowserPostProcessDragProcPtr = procedure( browser: ControlRef; theDrag: DragReference; trackDragResult: OSStatus );
  4441. type
  4442. DataBrowserAddDragItemUPP = DataBrowserAddDragItemProcPtr;
  4443. type
  4444. DataBrowserAcceptDragUPP = DataBrowserAcceptDragProcPtr;
  4445. type
  4446. DataBrowserReceiveDragUPP = DataBrowserReceiveDragProcPtr;
  4447. type
  4448. DataBrowserPostProcessDragUPP = DataBrowserPostProcessDragProcPtr;
  4449. { Contextual Menu Support }
  4450. type
  4451. DataBrowserGetContextualMenuProcPtr = procedure( browser: ControlRef; var menu: MenuRef; var helpType: UInt32; var helpItemString: CFStringRef; var selection: AEDesc );
  4452. type
  4453. DataBrowserSelectContextualMenuProcPtr = procedure( browser: ControlRef; menu: MenuRef; selectionType: UInt32; menuID: SInt16; menuItem: MenuItemIndex );
  4454. type
  4455. DataBrowserGetContextualMenuUPP = DataBrowserGetContextualMenuProcPtr;
  4456. type
  4457. DataBrowserSelectContextualMenuUPP = DataBrowserSelectContextualMenuProcPtr;
  4458. { Help Manager Support }
  4459. type
  4460. DataBrowserItemHelpContentProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr );
  4461. type
  4462. DataBrowserItemHelpContentUPP = DataBrowserItemHelpContentProcPtr;
  4463. {
  4464. * NewDataBrowserItemDataUPP()
  4465. *
  4466. * Availability:
  4467. * Mac OS X: in version 10.0 and later in Carbon.framework
  4468. * CarbonLib: in CarbonLib 1.1 and later
  4469. * Non-Carbon CFM: not available
  4470. }
  4471. function NewDataBrowserItemDataUPP( userRoutine: DataBrowserItemDataProcPtr ): DataBrowserItemDataUPP; external name '_NewDataBrowserItemDataUPP';
  4472. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4473. {
  4474. * NewDataBrowserItemCompareUPP()
  4475. *
  4476. * Availability:
  4477. * Mac OS X: in version 10.0 and later in Carbon.framework
  4478. * CarbonLib: in CarbonLib 1.1 and later
  4479. * Non-Carbon CFM: not available
  4480. }
  4481. function NewDataBrowserItemCompareUPP( userRoutine: DataBrowserItemCompareProcPtr ): DataBrowserItemCompareUPP; external name '_NewDataBrowserItemCompareUPP';
  4482. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4483. {
  4484. * NewDataBrowserItemNotificationWithItemUPP()
  4485. *
  4486. * Availability:
  4487. * Mac OS X: in version 10.1 and later in Carbon.framework
  4488. * CarbonLib: in CarbonLib 1.5 and later
  4489. * Non-Carbon CFM: not available
  4490. }
  4491. function NewDataBrowserItemNotificationWithItemUPP( userRoutine: DataBrowserItemNotificationWithItemProcPtr ): DataBrowserItemNotificationWithItemUPP; external name '_NewDataBrowserItemNotificationWithItemUPP';
  4492. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4493. {
  4494. * NewDataBrowserItemNotificationUPP()
  4495. *
  4496. * Availability:
  4497. * Mac OS X: in version 10.0 and later in Carbon.framework
  4498. * CarbonLib: in CarbonLib 1.1 and later
  4499. * Non-Carbon CFM: not available
  4500. }
  4501. function NewDataBrowserItemNotificationUPP( userRoutine: DataBrowserItemNotificationProcPtr ): DataBrowserItemNotificationUPP; external name '_NewDataBrowserItemNotificationUPP';
  4502. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4503. {
  4504. * NewDataBrowserAddDragItemUPP()
  4505. *
  4506. * Availability:
  4507. * Mac OS X: in version 10.0 and later in Carbon.framework
  4508. * CarbonLib: in CarbonLib 1.1 and later
  4509. * Non-Carbon CFM: not available
  4510. }
  4511. function NewDataBrowserAddDragItemUPP( userRoutine: DataBrowserAddDragItemProcPtr ): DataBrowserAddDragItemUPP; external name '_NewDataBrowserAddDragItemUPP';
  4512. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4513. {
  4514. * NewDataBrowserAcceptDragUPP()
  4515. *
  4516. * Availability:
  4517. * Mac OS X: in version 10.0 and later in Carbon.framework
  4518. * CarbonLib: in CarbonLib 1.1 and later
  4519. * Non-Carbon CFM: not available
  4520. }
  4521. function NewDataBrowserAcceptDragUPP( userRoutine: DataBrowserAcceptDragProcPtr ): DataBrowserAcceptDragUPP; external name '_NewDataBrowserAcceptDragUPP';
  4522. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4523. {
  4524. * NewDataBrowserReceiveDragUPP()
  4525. *
  4526. * Availability:
  4527. * Mac OS X: in version 10.0 and later in Carbon.framework
  4528. * CarbonLib: in CarbonLib 1.1 and later
  4529. * Non-Carbon CFM: not available
  4530. }
  4531. function NewDataBrowserReceiveDragUPP( userRoutine: DataBrowserReceiveDragProcPtr ): DataBrowserReceiveDragUPP; external name '_NewDataBrowserReceiveDragUPP';
  4532. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4533. {
  4534. * NewDataBrowserPostProcessDragUPP()
  4535. *
  4536. * Availability:
  4537. * Mac OS X: in version 10.0 and later in Carbon.framework
  4538. * CarbonLib: in CarbonLib 1.1 and later
  4539. * Non-Carbon CFM: not available
  4540. }
  4541. function NewDataBrowserPostProcessDragUPP( userRoutine: DataBrowserPostProcessDragProcPtr ): DataBrowserPostProcessDragUPP; external name '_NewDataBrowserPostProcessDragUPP';
  4542. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4543. {
  4544. * NewDataBrowserGetContextualMenuUPP()
  4545. *
  4546. * Availability:
  4547. * Mac OS X: in version 10.0 and later in Carbon.framework
  4548. * CarbonLib: in CarbonLib 1.1 and later
  4549. * Non-Carbon CFM: not available
  4550. }
  4551. function NewDataBrowserGetContextualMenuUPP( userRoutine: DataBrowserGetContextualMenuProcPtr ): DataBrowserGetContextualMenuUPP; external name '_NewDataBrowserGetContextualMenuUPP';
  4552. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4553. {
  4554. * NewDataBrowserSelectContextualMenuUPP()
  4555. *
  4556. * Availability:
  4557. * Mac OS X: in version 10.0 and later in Carbon.framework
  4558. * CarbonLib: in CarbonLib 1.1 and later
  4559. * Non-Carbon CFM: not available
  4560. }
  4561. function NewDataBrowserSelectContextualMenuUPP( userRoutine: DataBrowserSelectContextualMenuProcPtr ): DataBrowserSelectContextualMenuUPP; external name '_NewDataBrowserSelectContextualMenuUPP';
  4562. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4563. {
  4564. * NewDataBrowserItemHelpContentUPP()
  4565. *
  4566. * Availability:
  4567. * Mac OS X: in version 10.0 and later in Carbon.framework
  4568. * CarbonLib: in CarbonLib 1.1 and later
  4569. * Non-Carbon CFM: not available
  4570. }
  4571. function NewDataBrowserItemHelpContentUPP( userRoutine: DataBrowserItemHelpContentProcPtr ): DataBrowserItemHelpContentUPP; external name '_NewDataBrowserItemHelpContentUPP';
  4572. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4573. {
  4574. * DisposeDataBrowserItemDataUPP()
  4575. *
  4576. * Availability:
  4577. * Mac OS X: in version 10.0 and later in Carbon.framework
  4578. * CarbonLib: in CarbonLib 1.1 and later
  4579. * Non-Carbon CFM: not available
  4580. }
  4581. procedure DisposeDataBrowserItemDataUPP( userUPP: DataBrowserItemDataUPP ); external name '_DisposeDataBrowserItemDataUPP';
  4582. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4583. {
  4584. * DisposeDataBrowserItemCompareUPP()
  4585. *
  4586. * Availability:
  4587. * Mac OS X: in version 10.0 and later in Carbon.framework
  4588. * CarbonLib: in CarbonLib 1.1 and later
  4589. * Non-Carbon CFM: not available
  4590. }
  4591. procedure DisposeDataBrowserItemCompareUPP( userUPP: DataBrowserItemCompareUPP ); external name '_DisposeDataBrowserItemCompareUPP';
  4592. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4593. {
  4594. * DisposeDataBrowserItemNotificationWithItemUPP()
  4595. *
  4596. * Availability:
  4597. * Mac OS X: in version 10.1 and later in Carbon.framework
  4598. * CarbonLib: in CarbonLib 1.5 and later
  4599. * Non-Carbon CFM: not available
  4600. }
  4601. procedure DisposeDataBrowserItemNotificationWithItemUPP( userUPP: DataBrowserItemNotificationWithItemUPP ); external name '_DisposeDataBrowserItemNotificationWithItemUPP';
  4602. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4603. {
  4604. * DisposeDataBrowserItemNotificationUPP()
  4605. *
  4606. * Availability:
  4607. * Mac OS X: in version 10.0 and later in Carbon.framework
  4608. * CarbonLib: in CarbonLib 1.1 and later
  4609. * Non-Carbon CFM: not available
  4610. }
  4611. procedure DisposeDataBrowserItemNotificationUPP( userUPP: DataBrowserItemNotificationUPP ); external name '_DisposeDataBrowserItemNotificationUPP';
  4612. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4613. {
  4614. * DisposeDataBrowserAddDragItemUPP()
  4615. *
  4616. * Availability:
  4617. * Mac OS X: in version 10.0 and later in Carbon.framework
  4618. * CarbonLib: in CarbonLib 1.1 and later
  4619. * Non-Carbon CFM: not available
  4620. }
  4621. procedure DisposeDataBrowserAddDragItemUPP( userUPP: DataBrowserAddDragItemUPP ); external name '_DisposeDataBrowserAddDragItemUPP';
  4622. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4623. {
  4624. * DisposeDataBrowserAcceptDragUPP()
  4625. *
  4626. * Availability:
  4627. * Mac OS X: in version 10.0 and later in Carbon.framework
  4628. * CarbonLib: in CarbonLib 1.1 and later
  4629. * Non-Carbon CFM: not available
  4630. }
  4631. procedure DisposeDataBrowserAcceptDragUPP( userUPP: DataBrowserAcceptDragUPP ); external name '_DisposeDataBrowserAcceptDragUPP';
  4632. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4633. {
  4634. * DisposeDataBrowserReceiveDragUPP()
  4635. *
  4636. * Availability:
  4637. * Mac OS X: in version 10.0 and later in Carbon.framework
  4638. * CarbonLib: in CarbonLib 1.1 and later
  4639. * Non-Carbon CFM: not available
  4640. }
  4641. procedure DisposeDataBrowserReceiveDragUPP( userUPP: DataBrowserReceiveDragUPP ); external name '_DisposeDataBrowserReceiveDragUPP';
  4642. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4643. {
  4644. * DisposeDataBrowserPostProcessDragUPP()
  4645. *
  4646. * Availability:
  4647. * Mac OS X: in version 10.0 and later in Carbon.framework
  4648. * CarbonLib: in CarbonLib 1.1 and later
  4649. * Non-Carbon CFM: not available
  4650. }
  4651. procedure DisposeDataBrowserPostProcessDragUPP( userUPP: DataBrowserPostProcessDragUPP ); external name '_DisposeDataBrowserPostProcessDragUPP';
  4652. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4653. {
  4654. * DisposeDataBrowserGetContextualMenuUPP()
  4655. *
  4656. * Availability:
  4657. * Mac OS X: in version 10.0 and later in Carbon.framework
  4658. * CarbonLib: in CarbonLib 1.1 and later
  4659. * Non-Carbon CFM: not available
  4660. }
  4661. procedure DisposeDataBrowserGetContextualMenuUPP( userUPP: DataBrowserGetContextualMenuUPP ); external name '_DisposeDataBrowserGetContextualMenuUPP';
  4662. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4663. {
  4664. * DisposeDataBrowserSelectContextualMenuUPP()
  4665. *
  4666. * Availability:
  4667. * Mac OS X: in version 10.0 and later in Carbon.framework
  4668. * CarbonLib: in CarbonLib 1.1 and later
  4669. * Non-Carbon CFM: not available
  4670. }
  4671. procedure DisposeDataBrowserSelectContextualMenuUPP( userUPP: DataBrowserSelectContextualMenuUPP ); external name '_DisposeDataBrowserSelectContextualMenuUPP';
  4672. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4673. {
  4674. * DisposeDataBrowserItemHelpContentUPP()
  4675. *
  4676. * Availability:
  4677. * Mac OS X: in version 10.0 and later in Carbon.framework
  4678. * CarbonLib: in CarbonLib 1.1 and later
  4679. * Non-Carbon CFM: not available
  4680. }
  4681. procedure DisposeDataBrowserItemHelpContentUPP( userUPP: DataBrowserItemHelpContentUPP ); external name '_DisposeDataBrowserItemHelpContentUPP';
  4682. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4683. {
  4684. * InvokeDataBrowserItemDataUPP()
  4685. *
  4686. * Availability:
  4687. * Mac OS X: in version 10.0 and later in Carbon.framework
  4688. * CarbonLib: in CarbonLib 1.1 and later
  4689. * Non-Carbon CFM: not available
  4690. }
  4691. function InvokeDataBrowserItemDataUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemData: DataBrowserItemDataRef; setValue: Boolean; userUPP: DataBrowserItemDataUPP ): OSStatus; external name '_InvokeDataBrowserItemDataUPP';
  4692. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4693. {
  4694. * InvokeDataBrowserItemCompareUPP()
  4695. *
  4696. * Availability:
  4697. * Mac OS X: in version 10.0 and later in Carbon.framework
  4698. * CarbonLib: in CarbonLib 1.1 and later
  4699. * Non-Carbon CFM: not available
  4700. }
  4701. function InvokeDataBrowserItemCompareUPP( browser: ControlRef; itemOne: DataBrowserItemID; itemTwo: DataBrowserItemID; sortProperty: DataBrowserPropertyID; userUPP: DataBrowserItemCompareUPP ): Boolean; external name '_InvokeDataBrowserItemCompareUPP';
  4702. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4703. {
  4704. * InvokeDataBrowserItemNotificationWithItemUPP()
  4705. *
  4706. * Availability:
  4707. * Mac OS X: in version 10.1 and later in Carbon.framework
  4708. * CarbonLib: in CarbonLib 1.5 and later
  4709. * Non-Carbon CFM: not available
  4710. }
  4711. procedure InvokeDataBrowserItemNotificationWithItemUPP( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification; itemData: DataBrowserItemDataRef; userUPP: DataBrowserItemNotificationWithItemUPP ); external name '_InvokeDataBrowserItemNotificationWithItemUPP';
  4712. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4713. {
  4714. * InvokeDataBrowserItemNotificationUPP()
  4715. *
  4716. * Availability:
  4717. * Mac OS X: in version 10.0 and later in Carbon.framework
  4718. * CarbonLib: in CarbonLib 1.1 and later
  4719. * Non-Carbon CFM: not available
  4720. }
  4721. procedure InvokeDataBrowserItemNotificationUPP( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification; userUPP: DataBrowserItemNotificationUPP ); external name '_InvokeDataBrowserItemNotificationUPP';
  4722. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4723. {
  4724. * InvokeDataBrowserAddDragItemUPP()
  4725. *
  4726. * Availability:
  4727. * Mac OS X: in version 10.0 and later in Carbon.framework
  4728. * CarbonLib: in CarbonLib 1.1 and later
  4729. * Non-Carbon CFM: not available
  4730. }
  4731. function InvokeDataBrowserAddDragItemUPP( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; var itemRef: ItemReference; userUPP: DataBrowserAddDragItemUPP ): Boolean; external name '_InvokeDataBrowserAddDragItemUPP';
  4732. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4733. {
  4734. * InvokeDataBrowserAcceptDragUPP()
  4735. *
  4736. * Availability:
  4737. * Mac OS X: in version 10.0 and later in Carbon.framework
  4738. * CarbonLib: in CarbonLib 1.1 and later
  4739. * Non-Carbon CFM: not available
  4740. }
  4741. function InvokeDataBrowserAcceptDragUPP( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; userUPP: DataBrowserAcceptDragUPP ): Boolean; external name '_InvokeDataBrowserAcceptDragUPP';
  4742. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4743. {
  4744. * InvokeDataBrowserReceiveDragUPP()
  4745. *
  4746. * Availability:
  4747. * Mac OS X: in version 10.0 and later in Carbon.framework
  4748. * CarbonLib: in CarbonLib 1.1 and later
  4749. * Non-Carbon CFM: not available
  4750. }
  4751. function InvokeDataBrowserReceiveDragUPP( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; userUPP: DataBrowserReceiveDragUPP ): Boolean; external name '_InvokeDataBrowserReceiveDragUPP';
  4752. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4753. {
  4754. * InvokeDataBrowserPostProcessDragUPP()
  4755. *
  4756. * Availability:
  4757. * Mac OS X: in version 10.0 and later in Carbon.framework
  4758. * CarbonLib: in CarbonLib 1.1 and later
  4759. * Non-Carbon CFM: not available
  4760. }
  4761. procedure InvokeDataBrowserPostProcessDragUPP( browser: ControlRef; theDrag: DragReference; trackDragResult: OSStatus; userUPP: DataBrowserPostProcessDragUPP ); external name '_InvokeDataBrowserPostProcessDragUPP';
  4762. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4763. {
  4764. * InvokeDataBrowserGetContextualMenuUPP()
  4765. *
  4766. * Availability:
  4767. * Mac OS X: in version 10.0 and later in Carbon.framework
  4768. * CarbonLib: in CarbonLib 1.1 and later
  4769. * Non-Carbon CFM: not available
  4770. }
  4771. procedure InvokeDataBrowserGetContextualMenuUPP( browser: ControlRef; var menu: MenuRef; var helpType: UInt32; var helpItemString: CFStringRef; var selection: AEDesc; userUPP: DataBrowserGetContextualMenuUPP ); external name '_InvokeDataBrowserGetContextualMenuUPP';
  4772. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4773. {
  4774. * InvokeDataBrowserSelectContextualMenuUPP()
  4775. *
  4776. * Availability:
  4777. * Mac OS X: in version 10.0 and later in Carbon.framework
  4778. * CarbonLib: in CarbonLib 1.1 and later
  4779. * Non-Carbon CFM: not available
  4780. }
  4781. procedure InvokeDataBrowserSelectContextualMenuUPP( browser: ControlRef; menu: MenuRef; selectionType: UInt32; menuID: SInt16; menuItem: MenuItemIndex; userUPP: DataBrowserSelectContextualMenuUPP ); external name '_InvokeDataBrowserSelectContextualMenuUPP';
  4782. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4783. {
  4784. * InvokeDataBrowserItemHelpContentUPP()
  4785. *
  4786. * Availability:
  4787. * Mac OS X: in version 10.0 and later in Carbon.framework
  4788. * CarbonLib: in CarbonLib 1.1 and later
  4789. * Non-Carbon CFM: not available
  4790. }
  4791. procedure InvokeDataBrowserItemHelpContentUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: DataBrowserItemHelpContentUPP ); external name '_InvokeDataBrowserItemHelpContentUPP';
  4792. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4793. { Standard Callback (vtable) Structure }
  4794. const
  4795. kDataBrowserLatestCallbacks = 0;
  4796. type
  4797. DataBrowserCallbacksPtr = ^DataBrowserCallbacks;
  4798. DataBrowserCallbacks = record
  4799. version: UInt32; { Use kDataBrowserLatestCallbacks }
  4800. case SInt16 of
  4801. 0: (
  4802. itemDataCallback: DataBrowserItemDataUPP;
  4803. itemCompareCallback: DataBrowserItemCompareUPP;
  4804. itemNotificationCallback: DataBrowserItemNotificationUPP;
  4805. addDragItemCallback: DataBrowserAddDragItemUPP;
  4806. acceptDragCallback: DataBrowserAcceptDragUPP;
  4807. receiveDragCallback: DataBrowserReceiveDragUPP;
  4808. postProcessDragCallback: DataBrowserPostProcessDragUPP;
  4809. itemHelpContentCallback: DataBrowserItemHelpContentUPP;
  4810. getContextualMenuCallback: DataBrowserGetContextualMenuUPP;
  4811. selectContextualMenuCallback: DataBrowserSelectContextualMenuUPP;
  4812. );
  4813. end;
  4814. {
  4815. * InitDataBrowserCallbacks()
  4816. *
  4817. * Mac OS X threading:
  4818. * Not thread safe
  4819. *
  4820. * Availability:
  4821. * Mac OS X: in version 10.0 and later in Carbon.framework
  4822. * CarbonLib: in CarbonLib 1.1 and later
  4823. * Non-Carbon CFM: not available
  4824. }
  4825. function InitDataBrowserCallbacks( var callbacks: DataBrowserCallbacks ): OSStatus; external name '_InitDataBrowserCallbacks';
  4826. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4827. { Macro for initializing callback structure }
  4828. // #define InitializeDataBrowserCallbacks(callbacks, vers) \
  4829. { (callbacks)->version = (vers); InitDataBrowserCallbacks(callbacks); }
  4830. {
  4831. * GetDataBrowserCallbacks()
  4832. *
  4833. * Mac OS X threading:
  4834. * Not thread safe
  4835. *
  4836. * Availability:
  4837. * Mac OS X: in version 10.0 and later in Carbon.framework
  4838. * CarbonLib: in CarbonLib 1.1 and later
  4839. * Non-Carbon CFM: not available
  4840. }
  4841. function GetDataBrowserCallbacks( browser: ControlRef; var callbacks: DataBrowserCallbacks ): OSStatus; external name '_GetDataBrowserCallbacks';
  4842. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4843. {
  4844. * SetDataBrowserCallbacks()
  4845. *
  4846. * Mac OS X threading:
  4847. * Not thread safe
  4848. *
  4849. * Availability:
  4850. * Mac OS X: in version 10.0 and later in Carbon.framework
  4851. * CarbonLib: in CarbonLib 1.1 and later
  4852. * Non-Carbon CFM: not available
  4853. }
  4854. function SetDataBrowserCallbacks( browser: ControlRef; const (*var*) callbacks: DataBrowserCallbacks ): OSStatus; external name '_SetDataBrowserCallbacks';
  4855. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4856. { Custom Format Callbacks (kDataBrowserCustomType display properties) }
  4857. type
  4858. DataBrowserDragFlags = UInt32;
  4859. type
  4860. DataBrowserTrackingResult = SInt16;
  4861. const
  4862. kDataBrowserContentHit = 1;
  4863. kDataBrowserNothingHit = 0;
  4864. kDataBrowserStopTracking = -1;
  4865. type
  4866. DataBrowserDrawItemProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemState: DataBrowserItemState; const (*var*) theRect: Rect; gdDepth: SInt16; colorDevice: Boolean );
  4867. type
  4868. DataBrowserEditItemProcPtr = function( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; theString: CFStringRef; var maxEditTextRect: Rect; var shrinkToFit: Boolean ): Boolean;
  4869. type
  4870. DataBrowserHitTestProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; const (*var*) mouseRect: Rect ): Boolean;
  4871. type
  4872. DataBrowserTrackingProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; startPt: Point; modifiers: EventModifiers ): DataBrowserTrackingResult;
  4873. type
  4874. DataBrowserItemDragRgnProcPtr = procedure( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; dragRgn: RgnHandle );
  4875. type
  4876. DataBrowserItemAcceptDragProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; theDrag: DragReference ): DataBrowserDragFlags;
  4877. type
  4878. DataBrowserItemReceiveDragProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; dragFlags: DataBrowserDragFlags; theDrag: DragReference ): Boolean;
  4879. type
  4880. DataBrowserDrawItemUPP = DataBrowserDrawItemProcPtr;
  4881. type
  4882. DataBrowserEditItemUPP = DataBrowserEditItemProcPtr;
  4883. type
  4884. DataBrowserHitTestUPP = DataBrowserHitTestProcPtr;
  4885. type
  4886. DataBrowserTrackingUPP = DataBrowserTrackingProcPtr;
  4887. type
  4888. DataBrowserItemDragRgnUPP = DataBrowserItemDragRgnProcPtr;
  4889. type
  4890. DataBrowserItemAcceptDragUPP = DataBrowserItemAcceptDragProcPtr;
  4891. type
  4892. DataBrowserItemReceiveDragUPP = DataBrowserItemReceiveDragProcPtr;
  4893. {
  4894. * NewDataBrowserDrawItemUPP()
  4895. *
  4896. * Availability:
  4897. * Mac OS X: in version 10.1 and later in Carbon.framework
  4898. * CarbonLib: in CarbonLib 1.1 and later
  4899. * Non-Carbon CFM: not available
  4900. }
  4901. function NewDataBrowserDrawItemUPP( userRoutine: DataBrowserDrawItemProcPtr ): DataBrowserDrawItemUPP; external name '_NewDataBrowserDrawItemUPP';
  4902. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4903. {
  4904. * NewDataBrowserEditItemUPP()
  4905. *
  4906. * Availability:
  4907. * Mac OS X: in version 10.1 and later in Carbon.framework
  4908. * CarbonLib: in CarbonLib 1.1 and later
  4909. * Non-Carbon CFM: not available
  4910. }
  4911. function NewDataBrowserEditItemUPP( userRoutine: DataBrowserEditItemProcPtr ): DataBrowserEditItemUPP; external name '_NewDataBrowserEditItemUPP';
  4912. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4913. {
  4914. * NewDataBrowserHitTestUPP()
  4915. *
  4916. * Availability:
  4917. * Mac OS X: in version 10.1 and later in Carbon.framework
  4918. * CarbonLib: in CarbonLib 1.1 and later
  4919. * Non-Carbon CFM: not available
  4920. }
  4921. function NewDataBrowserHitTestUPP( userRoutine: DataBrowserHitTestProcPtr ): DataBrowserHitTestUPP; external name '_NewDataBrowserHitTestUPP';
  4922. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4923. {
  4924. * NewDataBrowserTrackingUPP()
  4925. *
  4926. * Availability:
  4927. * Mac OS X: in version 10.1 and later in Carbon.framework
  4928. * CarbonLib: in CarbonLib 1.1 and later
  4929. * Non-Carbon CFM: not available
  4930. }
  4931. function NewDataBrowserTrackingUPP( userRoutine: DataBrowserTrackingProcPtr ): DataBrowserTrackingUPP; external name '_NewDataBrowserTrackingUPP';
  4932. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4933. {
  4934. * NewDataBrowserItemDragRgnUPP()
  4935. *
  4936. * Availability:
  4937. * Mac OS X: in version 10.1 and later in Carbon.framework
  4938. * CarbonLib: in CarbonLib 1.1 and later
  4939. * Non-Carbon CFM: not available
  4940. }
  4941. function NewDataBrowserItemDragRgnUPP( userRoutine: DataBrowserItemDragRgnProcPtr ): DataBrowserItemDragRgnUPP; external name '_NewDataBrowserItemDragRgnUPP';
  4942. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4943. {
  4944. * NewDataBrowserItemAcceptDragUPP()
  4945. *
  4946. * Availability:
  4947. * Mac OS X: in version 10.1 and later in Carbon.framework
  4948. * CarbonLib: in CarbonLib 1.1 and later
  4949. * Non-Carbon CFM: not available
  4950. }
  4951. function NewDataBrowserItemAcceptDragUPP( userRoutine: DataBrowserItemAcceptDragProcPtr ): DataBrowserItemAcceptDragUPP; external name '_NewDataBrowserItemAcceptDragUPP';
  4952. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4953. {
  4954. * NewDataBrowserItemReceiveDragUPP()
  4955. *
  4956. * Availability:
  4957. * Mac OS X: in version 10.1 and later in Carbon.framework
  4958. * CarbonLib: in CarbonLib 1.1 and later
  4959. * Non-Carbon CFM: not available
  4960. }
  4961. function NewDataBrowserItemReceiveDragUPP( userRoutine: DataBrowserItemReceiveDragProcPtr ): DataBrowserItemReceiveDragUPP; external name '_NewDataBrowserItemReceiveDragUPP';
  4962. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4963. {
  4964. * DisposeDataBrowserDrawItemUPP()
  4965. *
  4966. * Availability:
  4967. * Mac OS X: in version 10.1 and later in Carbon.framework
  4968. * CarbonLib: in CarbonLib 1.1 and later
  4969. * Non-Carbon CFM: not available
  4970. }
  4971. procedure DisposeDataBrowserDrawItemUPP( userUPP: DataBrowserDrawItemUPP ); external name '_DisposeDataBrowserDrawItemUPP';
  4972. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4973. {
  4974. * DisposeDataBrowserEditItemUPP()
  4975. *
  4976. * Availability:
  4977. * Mac OS X: in version 10.1 and later in Carbon.framework
  4978. * CarbonLib: in CarbonLib 1.1 and later
  4979. * Non-Carbon CFM: not available
  4980. }
  4981. procedure DisposeDataBrowserEditItemUPP( userUPP: DataBrowserEditItemUPP ); external name '_DisposeDataBrowserEditItemUPP';
  4982. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4983. {
  4984. * DisposeDataBrowserHitTestUPP()
  4985. *
  4986. * Availability:
  4987. * Mac OS X: in version 10.1 and later in Carbon.framework
  4988. * CarbonLib: in CarbonLib 1.1 and later
  4989. * Non-Carbon CFM: not available
  4990. }
  4991. procedure DisposeDataBrowserHitTestUPP( userUPP: DataBrowserHitTestUPP ); external name '_DisposeDataBrowserHitTestUPP';
  4992. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4993. {
  4994. * DisposeDataBrowserTrackingUPP()
  4995. *
  4996. * Availability:
  4997. * Mac OS X: in version 10.1 and later in Carbon.framework
  4998. * CarbonLib: in CarbonLib 1.1 and later
  4999. * Non-Carbon CFM: not available
  5000. }
  5001. procedure DisposeDataBrowserTrackingUPP( userUPP: DataBrowserTrackingUPP ); external name '_DisposeDataBrowserTrackingUPP';
  5002. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5003. {
  5004. * DisposeDataBrowserItemDragRgnUPP()
  5005. *
  5006. * Availability:
  5007. * Mac OS X: in version 10.1 and later in Carbon.framework
  5008. * CarbonLib: in CarbonLib 1.1 and later
  5009. * Non-Carbon CFM: not available
  5010. }
  5011. procedure DisposeDataBrowserItemDragRgnUPP( userUPP: DataBrowserItemDragRgnUPP ); external name '_DisposeDataBrowserItemDragRgnUPP';
  5012. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5013. {
  5014. * DisposeDataBrowserItemAcceptDragUPP()
  5015. *
  5016. * Availability:
  5017. * Mac OS X: in version 10.1 and later in Carbon.framework
  5018. * CarbonLib: in CarbonLib 1.1 and later
  5019. * Non-Carbon CFM: not available
  5020. }
  5021. procedure DisposeDataBrowserItemAcceptDragUPP( userUPP: DataBrowserItemAcceptDragUPP ); external name '_DisposeDataBrowserItemAcceptDragUPP';
  5022. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5023. {
  5024. * DisposeDataBrowserItemReceiveDragUPP()
  5025. *
  5026. * Availability:
  5027. * Mac OS X: in version 10.1 and later in Carbon.framework
  5028. * CarbonLib: in CarbonLib 1.1 and later
  5029. * Non-Carbon CFM: not available
  5030. }
  5031. procedure DisposeDataBrowserItemReceiveDragUPP( userUPP: DataBrowserItemReceiveDragUPP ); external name '_DisposeDataBrowserItemReceiveDragUPP';
  5032. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5033. {
  5034. * InvokeDataBrowserDrawItemUPP()
  5035. *
  5036. * Availability:
  5037. * Mac OS X: in version 10.1 and later in Carbon.framework
  5038. * CarbonLib: in CarbonLib 1.1 and later
  5039. * Non-Carbon CFM: not available
  5040. }
  5041. procedure InvokeDataBrowserDrawItemUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemState: DataBrowserItemState; const (*var*) theRect: Rect; gdDepth: SInt16; colorDevice: Boolean; userUPP: DataBrowserDrawItemUPP ); external name '_InvokeDataBrowserDrawItemUPP';
  5042. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5043. {
  5044. * InvokeDataBrowserEditItemUPP()
  5045. *
  5046. * Availability:
  5047. * Mac OS X: in version 10.1 and later in Carbon.framework
  5048. * CarbonLib: in CarbonLib 1.1 and later
  5049. * Non-Carbon CFM: not available
  5050. }
  5051. function InvokeDataBrowserEditItemUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; theString: CFStringRef; var maxEditTextRect: Rect; var shrinkToFit: Boolean; userUPP: DataBrowserEditItemUPP ): Boolean; external name '_InvokeDataBrowserEditItemUPP';
  5052. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5053. {
  5054. * InvokeDataBrowserHitTestUPP()
  5055. *
  5056. * Availability:
  5057. * Mac OS X: in version 10.1 and later in Carbon.framework
  5058. * CarbonLib: in CarbonLib 1.1 and later
  5059. * Non-Carbon CFM: not available
  5060. }
  5061. function InvokeDataBrowserHitTestUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; const (*var*) mouseRect: Rect; userUPP: DataBrowserHitTestUPP ): Boolean; external name '_InvokeDataBrowserHitTestUPP';
  5062. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5063. {
  5064. * InvokeDataBrowserTrackingUPP()
  5065. *
  5066. * Availability:
  5067. * Mac OS X: in version 10.1 and later in Carbon.framework
  5068. * CarbonLib: in CarbonLib 1.1 and later
  5069. * Non-Carbon CFM: not available
  5070. }
  5071. function InvokeDataBrowserTrackingUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; startPt: Point; modifiers: EventModifiers; userUPP: DataBrowserTrackingUPP ): DataBrowserTrackingResult; external name '_InvokeDataBrowserTrackingUPP';
  5072. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5073. {
  5074. * InvokeDataBrowserItemDragRgnUPP()
  5075. *
  5076. * Availability:
  5077. * Mac OS X: in version 10.1 and later in Carbon.framework
  5078. * CarbonLib: in CarbonLib 1.1 and later
  5079. * Non-Carbon CFM: not available
  5080. }
  5081. procedure InvokeDataBrowserItemDragRgnUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; dragRgn: RgnHandle; userUPP: DataBrowserItemDragRgnUPP ); external name '_InvokeDataBrowserItemDragRgnUPP';
  5082. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5083. {
  5084. * InvokeDataBrowserItemAcceptDragUPP()
  5085. *
  5086. * Availability:
  5087. * Mac OS X: in version 10.1 and later in Carbon.framework
  5088. * CarbonLib: in CarbonLib 1.1 and later
  5089. * Non-Carbon CFM: not available
  5090. }
  5091. function InvokeDataBrowserItemAcceptDragUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; theDrag: DragReference; userUPP: DataBrowserItemAcceptDragUPP ): DataBrowserDragFlags; external name '_InvokeDataBrowserItemAcceptDragUPP';
  5092. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5093. {
  5094. * InvokeDataBrowserItemReceiveDragUPP()
  5095. *
  5096. * Availability:
  5097. * Mac OS X: in version 10.1 and later in Carbon.framework
  5098. * CarbonLib: in CarbonLib 1.1 and later
  5099. * Non-Carbon CFM: not available
  5100. }
  5101. function InvokeDataBrowserItemReceiveDragUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; dragFlags: DataBrowserDragFlags; theDrag: DragReference; userUPP: DataBrowserItemReceiveDragUPP ): Boolean; external name '_InvokeDataBrowserItemReceiveDragUPP';
  5102. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  5103. { Custom Callback (vtable) Structure }
  5104. const
  5105. kDataBrowserLatestCustomCallbacks = 0;
  5106. type
  5107. DataBrowserCustomCallbacksPtr = ^DataBrowserCustomCallbacks;
  5108. DataBrowserCustomCallbacks = record
  5109. version: UInt32; { Use kDataBrowserLatestCustomCallbacks }
  5110. case SInt16 of
  5111. 0: (
  5112. drawItemCallback: DataBrowserDrawItemUPP;
  5113. editTextCallback: DataBrowserEditItemUPP;
  5114. hitTestCallback: DataBrowserHitTestUPP;
  5115. trackingCallback: DataBrowserTrackingUPP;
  5116. dragRegionCallback: DataBrowserItemDragRgnUPP;
  5117. acceptDragCallback: DataBrowserItemAcceptDragUPP;
  5118. receiveDragCallback: DataBrowserItemReceiveDragUPP;
  5119. );
  5120. end;
  5121. {
  5122. * InitDataBrowserCustomCallbacks()
  5123. *
  5124. * Mac OS X threading:
  5125. * Not thread safe
  5126. *
  5127. * Availability:
  5128. * Mac OS X: in version 10.0 and later in Carbon.framework
  5129. * CarbonLib: in CarbonLib 1.1 and later
  5130. * Non-Carbon CFM: not available
  5131. }
  5132. function InitDataBrowserCustomCallbacks( var callbacks: DataBrowserCustomCallbacks ): OSStatus; external name '_InitDataBrowserCustomCallbacks';
  5133. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5134. { Macro for initializing custom callback structure }
  5135. // #define InitializeDataBrowserCustomCallbacks(callbacks, vers) \
  5136. { (callbacks)->version = (vers); InitDataBrowserCustomCallbacks(callbacks); }
  5137. {
  5138. * GetDataBrowserCustomCallbacks()
  5139. *
  5140. * Mac OS X threading:
  5141. * Not thread safe
  5142. *
  5143. * Availability:
  5144. * Mac OS X: in version 10.0 and later in Carbon.framework
  5145. * CarbonLib: in CarbonLib 1.1 and later
  5146. * Non-Carbon CFM: not available
  5147. }
  5148. function GetDataBrowserCustomCallbacks( browser: ControlRef; var callbacks: DataBrowserCustomCallbacks ): OSStatus; external name '_GetDataBrowserCustomCallbacks';
  5149. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5150. {
  5151. * SetDataBrowserCustomCallbacks()
  5152. *
  5153. * Mac OS X threading:
  5154. * Not thread safe
  5155. *
  5156. * Availability:
  5157. * Mac OS X: in version 10.0 and later in Carbon.framework
  5158. * CarbonLib: in CarbonLib 1.1 and later
  5159. * Non-Carbon CFM: not available
  5160. }
  5161. function SetDataBrowserCustomCallbacks( browser: ControlRef; const (*var*) callbacks: DataBrowserCustomCallbacks ): OSStatus; external name '_SetDataBrowserCustomCallbacks';
  5162. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5163. { TableView Formatting }
  5164. type
  5165. DataBrowserTableViewHiliteStyle = UInt32;
  5166. const
  5167. kDataBrowserTableViewMinimalHilite = 0;
  5168. kDataBrowserTableViewFillHilite = 1;
  5169. type
  5170. DataBrowserTableViewPropertyFlags = UInt32;
  5171. const
  5172. { kDataBrowserTableView DataBrowserPropertyFlags }
  5173. kDataBrowserTableViewSelectionColumn = 1 shl kDataBrowserViewSpecificFlagsOffset;
  5174. { The row and column indicies are zero-based }
  5175. type
  5176. DataBrowserTableViewRowIndex = UInt32;
  5177. type
  5178. DataBrowserTableViewColumnIndex = UInt32;
  5179. type
  5180. DataBrowserTableViewColumnID = DataBrowserPropertyID;
  5181. type
  5182. DataBrowserTableViewColumnDesc = DataBrowserPropertyDesc;
  5183. DataBrowserTableViewColumnDescPtr = ^DataBrowserTableViewColumnDesc;
  5184. { TableView API }
  5185. { Use when setting column position }
  5186. const
  5187. kDataBrowserTableViewLastColumn = $FFFFFFFF;
  5188. {
  5189. * RemoveDataBrowserTableViewColumn()
  5190. *
  5191. * Mac OS X threading:
  5192. * Not thread safe
  5193. *
  5194. * Availability:
  5195. * Mac OS X: in version 10.0 and later in Carbon.framework
  5196. * CarbonLib: in CarbonLib 1.1 and later
  5197. * Non-Carbon CFM: not available
  5198. }
  5199. function RemoveDataBrowserTableViewColumn( browser: ControlRef; column: DataBrowserTableViewColumnID ): OSStatus; external name '_RemoveDataBrowserTableViewColumn';
  5200. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5201. {
  5202. * GetDataBrowserTableViewColumnCount()
  5203. *
  5204. * Mac OS X threading:
  5205. * Not thread safe
  5206. *
  5207. * Availability:
  5208. * Mac OS X: in version 10.0 and later in Carbon.framework
  5209. * CarbonLib: in CarbonLib 1.1 and later
  5210. * Non-Carbon CFM: not available
  5211. }
  5212. function GetDataBrowserTableViewColumnCount( browser: ControlRef; var numColumns: UInt32 ): OSStatus; external name '_GetDataBrowserTableViewColumnCount';
  5213. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5214. {
  5215. * SetDataBrowserTableViewHiliteStyle()
  5216. *
  5217. * Mac OS X threading:
  5218. * Not thread safe
  5219. *
  5220. * Availability:
  5221. * Mac OS X: in version 10.0 and later in Carbon.framework
  5222. * CarbonLib: in CarbonLib 1.1 and later
  5223. * Non-Carbon CFM: not available
  5224. }
  5225. function SetDataBrowserTableViewHiliteStyle( browser: ControlRef; hiliteStyle: DataBrowserTableViewHiliteStyle ): OSStatus; external name '_SetDataBrowserTableViewHiliteStyle';
  5226. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5227. {
  5228. * GetDataBrowserTableViewHiliteStyle()
  5229. *
  5230. * Mac OS X threading:
  5231. * Not thread safe
  5232. *
  5233. * Availability:
  5234. * Mac OS X: in version 10.0 and later in Carbon.framework
  5235. * CarbonLib: in CarbonLib 1.1 and later
  5236. * Non-Carbon CFM: not available
  5237. }
  5238. function GetDataBrowserTableViewHiliteStyle( browser: ControlRef; var hiliteStyle: DataBrowserTableViewHiliteStyle ): OSStatus; external name '_GetDataBrowserTableViewHiliteStyle';
  5239. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5240. {
  5241. * SetDataBrowserTableViewRowHeight()
  5242. *
  5243. * Mac OS X threading:
  5244. * Not thread safe
  5245. *
  5246. * Availability:
  5247. * Mac OS X: in version 10.0 and later in Carbon.framework
  5248. * CarbonLib: in CarbonLib 1.1 and later
  5249. * Non-Carbon CFM: not available
  5250. }
  5251. function SetDataBrowserTableViewRowHeight( browser: ControlRef; height: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewRowHeight';
  5252. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5253. {
  5254. * GetDataBrowserTableViewRowHeight()
  5255. *
  5256. * Mac OS X threading:
  5257. * Not thread safe
  5258. *
  5259. * Availability:
  5260. * Mac OS X: in version 10.0 and later in Carbon.framework
  5261. * CarbonLib: in CarbonLib 1.1 and later
  5262. * Non-Carbon CFM: not available
  5263. }
  5264. function GetDataBrowserTableViewRowHeight( browser: ControlRef; var height: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewRowHeight';
  5265. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5266. {
  5267. * SetDataBrowserTableViewColumnWidth()
  5268. *
  5269. * Mac OS X threading:
  5270. * Not thread safe
  5271. *
  5272. * Availability:
  5273. * Mac OS X: in version 10.0 and later in Carbon.framework
  5274. * CarbonLib: in CarbonLib 1.1 and later
  5275. * Non-Carbon CFM: not available
  5276. }
  5277. function SetDataBrowserTableViewColumnWidth( browser: ControlRef; width: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewColumnWidth';
  5278. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5279. {
  5280. * GetDataBrowserTableViewColumnWidth()
  5281. *
  5282. * Mac OS X threading:
  5283. * Not thread safe
  5284. *
  5285. * Availability:
  5286. * Mac OS X: in version 10.0 and later in Carbon.framework
  5287. * CarbonLib: in CarbonLib 1.1 and later
  5288. * Non-Carbon CFM: not available
  5289. }
  5290. function GetDataBrowserTableViewColumnWidth( browser: ControlRef; var width: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewColumnWidth';
  5291. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5292. {
  5293. * SetDataBrowserTableViewItemRowHeight()
  5294. *
  5295. * Mac OS X threading:
  5296. * Not thread safe
  5297. *
  5298. * Availability:
  5299. * Mac OS X: in version 10.0 and later in Carbon.framework
  5300. * CarbonLib: in CarbonLib 1.1 and later
  5301. * Non-Carbon CFM: not available
  5302. }
  5303. function SetDataBrowserTableViewItemRowHeight( browser: ControlRef; item: DataBrowserItemID; height: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewItemRowHeight';
  5304. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5305. {
  5306. * GetDataBrowserTableViewItemRowHeight()
  5307. *
  5308. * Mac OS X threading:
  5309. * Not thread safe
  5310. *
  5311. * Availability:
  5312. * Mac OS X: in version 10.0 and later in Carbon.framework
  5313. * CarbonLib: in CarbonLib 1.1 and later
  5314. * Non-Carbon CFM: not available
  5315. }
  5316. function GetDataBrowserTableViewItemRowHeight( browser: ControlRef; item: DataBrowserItemID; var height: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewItemRowHeight';
  5317. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5318. {
  5319. * SetDataBrowserTableViewNamedColumnWidth()
  5320. *
  5321. * Mac OS X threading:
  5322. * Not thread safe
  5323. *
  5324. * Availability:
  5325. * Mac OS X: in version 10.0 and later in Carbon.framework
  5326. * CarbonLib: in CarbonLib 1.1 and later
  5327. * Non-Carbon CFM: not available
  5328. }
  5329. function SetDataBrowserTableViewNamedColumnWidth( browser: ControlRef; column: DataBrowserTableViewColumnID; width: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewNamedColumnWidth';
  5330. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5331. {
  5332. * GetDataBrowserTableViewNamedColumnWidth()
  5333. *
  5334. * Mac OS X threading:
  5335. * Not thread safe
  5336. *
  5337. * Availability:
  5338. * Mac OS X: in version 10.0 and later in Carbon.framework
  5339. * CarbonLib: in CarbonLib 1.1 and later
  5340. * Non-Carbon CFM: not available
  5341. }
  5342. function GetDataBrowserTableViewNamedColumnWidth( browser: ControlRef; column: DataBrowserTableViewColumnID; var width: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewNamedColumnWidth';
  5343. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5344. {
  5345. * SetDataBrowserTableViewGeometry()
  5346. *
  5347. * Mac OS X threading:
  5348. * Not thread safe
  5349. *
  5350. * Availability:
  5351. * Mac OS X: in version 10.0 and later in Carbon.framework
  5352. * CarbonLib: in CarbonLib 1.1 and later
  5353. * Non-Carbon CFM: not available
  5354. }
  5355. function SetDataBrowserTableViewGeometry( browser: ControlRef; variableWidthColumns: Boolean; variableHeightRows: Boolean ): OSStatus; external name '_SetDataBrowserTableViewGeometry';
  5356. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5357. {
  5358. * GetDataBrowserTableViewGeometry()
  5359. *
  5360. * Mac OS X threading:
  5361. * Not thread safe
  5362. *
  5363. * Availability:
  5364. * Mac OS X: in version 10.0 and later in Carbon.framework
  5365. * CarbonLib: in CarbonLib 1.1 and later
  5366. * Non-Carbon CFM: not available
  5367. }
  5368. function GetDataBrowserTableViewGeometry( browser: ControlRef; var variableWidthColumns: Boolean; var variableHeightRows: Boolean ): OSStatus; external name '_GetDataBrowserTableViewGeometry';
  5369. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5370. {
  5371. * GetDataBrowserTableViewItemID()
  5372. *
  5373. * Mac OS X threading:
  5374. * Not thread safe
  5375. *
  5376. * Availability:
  5377. * Mac OS X: in version 10.0 and later in Carbon.framework
  5378. * CarbonLib: in CarbonLib 1.1 and later
  5379. * Non-Carbon CFM: not available
  5380. }
  5381. function GetDataBrowserTableViewItemID( browser: ControlRef; row: DataBrowserTableViewRowIndex; var item: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserTableViewItemID';
  5382. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5383. {
  5384. * SetDataBrowserTableViewItemRow()
  5385. *
  5386. * Mac OS X threading:
  5387. * Not thread safe
  5388. *
  5389. * Availability:
  5390. * Mac OS X: in version 10.0 and later in Carbon.framework
  5391. * CarbonLib: in CarbonLib 1.1 and later
  5392. * Non-Carbon CFM: not available
  5393. }
  5394. function SetDataBrowserTableViewItemRow( browser: ControlRef; item: DataBrowserItemID; row: DataBrowserTableViewRowIndex ): OSStatus; external name '_SetDataBrowserTableViewItemRow';
  5395. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5396. {
  5397. * GetDataBrowserTableViewItemRow()
  5398. *
  5399. * Mac OS X threading:
  5400. * Not thread safe
  5401. *
  5402. * Availability:
  5403. * Mac OS X: in version 10.0 and later in Carbon.framework
  5404. * CarbonLib: in CarbonLib 1.1 and later
  5405. * Non-Carbon CFM: not available
  5406. }
  5407. function GetDataBrowserTableViewItemRow( browser: ControlRef; item: DataBrowserItemID; var row: DataBrowserTableViewRowIndex ): OSStatus; external name '_GetDataBrowserTableViewItemRow';
  5408. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5409. {
  5410. * SetDataBrowserTableViewColumnPosition()
  5411. *
  5412. * Mac OS X threading:
  5413. * Not thread safe
  5414. *
  5415. * Availability:
  5416. * Mac OS X: in version 10.0 and later in Carbon.framework
  5417. * CarbonLib: in CarbonLib 1.1 and later
  5418. * Non-Carbon CFM: not available
  5419. }
  5420. function SetDataBrowserTableViewColumnPosition( browser: ControlRef; column: DataBrowserTableViewColumnID; position: DataBrowserTableViewColumnIndex ): OSStatus; external name '_SetDataBrowserTableViewColumnPosition';
  5421. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5422. {
  5423. * GetDataBrowserTableViewColumnPosition()
  5424. *
  5425. * Mac OS X threading:
  5426. * Not thread safe
  5427. *
  5428. * Availability:
  5429. * Mac OS X: in version 10.0 and later in Carbon.framework
  5430. * CarbonLib: in CarbonLib 1.1 and later
  5431. * Non-Carbon CFM: not available
  5432. }
  5433. function GetDataBrowserTableViewColumnPosition( browser: ControlRef; column: DataBrowserTableViewColumnID; var position: DataBrowserTableViewColumnIndex ): OSStatus; external name '_GetDataBrowserTableViewColumnPosition';
  5434. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5435. {
  5436. * GetDataBrowserTableViewColumnProperty()
  5437. *
  5438. * Mac OS X threading:
  5439. * Not thread safe
  5440. *
  5441. * Availability:
  5442. * Mac OS X: in version 10.0 and later in Carbon.framework
  5443. * CarbonLib: in CarbonLib 1.1 and later
  5444. * Non-Carbon CFM: not available
  5445. }
  5446. function GetDataBrowserTableViewColumnProperty( browser: ControlRef; column: DataBrowserTableViewColumnIndex; var property: DataBrowserTableViewColumnID ): OSStatus; external name '_GetDataBrowserTableViewColumnProperty';
  5447. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5448. { kDataBrowserListView Formatting }
  5449. {
  5450. * Discussion:
  5451. * DataBrowserPropertyFlags that are specific to kDataBrowserListView
  5452. }
  5453. const
  5454. kDataBrowserListViewSelectionColumn = kDataBrowserTableViewSelectionColumn;
  5455. kDataBrowserListViewMovableColumn = 1 shl (kDataBrowserViewSpecificFlagsOffset + 1);
  5456. kDataBrowserListViewSortableColumn = 1 shl (kDataBrowserViewSpecificFlagsOffset + 2);
  5457. {
  5458. * kDataBrowserListViewTypeSelectColumn marks a column as
  5459. * type-selectable. If one or more of your list view columns are
  5460. * marked as type-selectable, Data Browser will do type-selection for
  5461. * you automatically. Data Browser applies the typing to the first
  5462. * column (in the system direction) with this property flag. This
  5463. * flag only intended for use with columns of type
  5464. * kDataBrowserTextType, kDataBrowserIconAndTextType, and
  5465. * kDataBrowserDateTimeType; if you set it for a column of another
  5466. * type, the type-selection behavior is undefined. Turning on this
  5467. * flag also causes Data Browser to gather all keyboard input via a
  5468. * carbon event handler instead of relying on calls to
  5469. * HandleControlKey; therefore, you will never see these keyboard
  5470. * events come out of WaitNextEvent. Only available on 10.3 and later.
  5471. }
  5472. kDataBrowserListViewTypeSelectColumn = 1 shl (kDataBrowserViewSpecificFlagsOffset + 3);
  5473. {
  5474. * Normally the text in a header button for a column of type
  5475. * kDataBrowserIconAndTextType is aligned as though it has an icon
  5476. * next to it even if no icon is specified for the header button; in
  5477. * other words, space is reserved for an icon in the header button
  5478. * even if no icon is displayed. However, this flag indicates that
  5479. * space should not be reserved for an icon if no icon is provided
  5480. * for the header button. This flag allows a client to justify the
  5481. * left edge of the text in a header button to the left edge of the
  5482. * icon in the cells beneath it. Available on 10.4 and later.
  5483. }
  5484. kDataBrowserListViewNoGapForIconInHeaderButton = 1 shl (kDataBrowserViewSpecificFlagsOffset + 4);
  5485. kDataBrowserListViewDefaultColumnFlags = kDataBrowserListViewMovableColumn + kDataBrowserListViewSortableColumn;
  5486. type
  5487. DataBrowserListViewPropertyFlags = DataBrowserPropertyFlags;
  5488. const
  5489. kDataBrowserListViewLatestHeaderDesc = 0;
  5490. type
  5491. DataBrowserListViewHeaderDescPtr = ^DataBrowserListViewHeaderDesc;
  5492. DataBrowserListViewHeaderDesc = record
  5493. version: UInt32; { Use kDataBrowserListViewLatestHeaderDesc }
  5494. minimumWidth: UInt16;
  5495. maximumWidth: UInt16;
  5496. titleOffset: SInt16;
  5497. titleString: CFStringRef;
  5498. initialOrder: DataBrowserSortOrder;
  5499. btnFontStyle: ControlFontStyleRec;
  5500. btnContentInfo: ControlButtonContentInfo;
  5501. end;
  5502. type
  5503. DataBrowserListViewColumnDescPtr = ^DataBrowserListViewColumnDesc;
  5504. DataBrowserListViewColumnDesc = record
  5505. propertyDesc: DataBrowserTableViewColumnDesc;
  5506. headerBtnDesc: DataBrowserListViewHeaderDesc;
  5507. end;
  5508. { kDataBrowserListView API }
  5509. const
  5510. kDataBrowserListViewAppendColumn = kDataBrowserTableViewLastColumn;
  5511. {
  5512. * AutoSizeDataBrowserListViewColumns()
  5513. *
  5514. * Mac OS X threading:
  5515. * Not thread safe
  5516. *
  5517. * Availability:
  5518. * Mac OS X: in version 10.0 and later in Carbon.framework
  5519. * CarbonLib: in CarbonLib 1.1 and later
  5520. * Non-Carbon CFM: not available
  5521. }
  5522. function AutoSizeDataBrowserListViewColumns( browser: ControlRef ): OSStatus; external name '_AutoSizeDataBrowserListViewColumns';
  5523. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5524. {
  5525. * AddDataBrowserListViewColumn()
  5526. *
  5527. * Mac OS X threading:
  5528. * Not thread safe
  5529. *
  5530. * Availability:
  5531. * Mac OS X: in version 10.0 and later in Carbon.framework
  5532. * CarbonLib: in CarbonLib 1.1 and later
  5533. * Non-Carbon CFM: not available
  5534. }
  5535. function AddDataBrowserListViewColumn( browser: ControlRef; var columnDesc: DataBrowserListViewColumnDesc; position: DataBrowserTableViewColumnIndex ): OSStatus; external name '_AddDataBrowserListViewColumn';
  5536. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5537. {
  5538. * GetDataBrowserListViewHeaderDesc()
  5539. *
  5540. * Summary:
  5541. * Returns information about a specified column header in a list
  5542. * view.
  5543. *
  5544. * Discussion:
  5545. * Note that this API does not correctly use CoreFoundation naming
  5546. * conventions. Although the API name begins with "Get", implying
  5547. * that you do not need to release the CFStringRef and IconRef
  5548. * returned by this API, in fact you do actually need to release
  5549. * these objects.
  5550. *
  5551. * Mac OS X threading:
  5552. * Not thread safe
  5553. *
  5554. * Parameters:
  5555. *
  5556. * browser:
  5557. * The data browser for which you need header information.
  5558. *
  5559. * column:
  5560. * The column ID for which you need header information.
  5561. *
  5562. * desc:
  5563. * On exit, contains header information for the specified column.
  5564. * You must release the CFStringRef and IconRef contained in this
  5565. * structure.
  5566. *
  5567. * Availability:
  5568. * Mac OS X: in version 10.2 and later in Carbon.framework
  5569. * CarbonLib: in CarbonLib 1.5 and later
  5570. * Non-Carbon CFM: not available
  5571. }
  5572. function GetDataBrowserListViewHeaderDesc( browser: ControlRef; column: DataBrowserTableViewColumnID; var desc: DataBrowserListViewHeaderDesc ): OSStatus; external name '_GetDataBrowserListViewHeaderDesc';
  5573. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  5574. {
  5575. * SetDataBrowserListViewHeaderDesc()
  5576. *
  5577. * Mac OS X threading:
  5578. * Not thread safe
  5579. *
  5580. * Availability:
  5581. * Mac OS X: in version 10.2 and later in Carbon.framework
  5582. * CarbonLib: in CarbonLib 1.5 and later
  5583. * Non-Carbon CFM: not available
  5584. }
  5585. function SetDataBrowserListViewHeaderDesc( browser: ControlRef; column: DataBrowserTableViewColumnID; var desc: DataBrowserListViewHeaderDesc ): OSStatus; external name '_SetDataBrowserListViewHeaderDesc';
  5586. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  5587. {
  5588. * SetDataBrowserListViewHeaderBtnHeight()
  5589. *
  5590. * Mac OS X threading:
  5591. * Not thread safe
  5592. *
  5593. * Availability:
  5594. * Mac OS X: in version 10.0 and later in Carbon.framework
  5595. * CarbonLib: in CarbonLib 1.1 and later
  5596. * Non-Carbon CFM: not available
  5597. }
  5598. function SetDataBrowserListViewHeaderBtnHeight( browser: ControlRef; height: UInt16 ): OSStatus; external name '_SetDataBrowserListViewHeaderBtnHeight';
  5599. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5600. {
  5601. * GetDataBrowserListViewHeaderBtnHeight()
  5602. *
  5603. * Mac OS X threading:
  5604. * Not thread safe
  5605. *
  5606. * Availability:
  5607. * Mac OS X: in version 10.0 and later in Carbon.framework
  5608. * CarbonLib: in CarbonLib 1.1 and later
  5609. * Non-Carbon CFM: not available
  5610. }
  5611. function GetDataBrowserListViewHeaderBtnHeight( browser: ControlRef; var height: UInt16 ): OSStatus; external name '_GetDataBrowserListViewHeaderBtnHeight';
  5612. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5613. {
  5614. * SetDataBrowserListViewUsePlainBackground()
  5615. *
  5616. * Mac OS X threading:
  5617. * Not thread safe
  5618. *
  5619. * Availability:
  5620. * Mac OS X: in version 10.0 and later in Carbon.framework
  5621. * CarbonLib: in CarbonLib 1.1 and later
  5622. * Non-Carbon CFM: not available
  5623. }
  5624. function SetDataBrowserListViewUsePlainBackground( browser: ControlRef; usePlainBackground: Boolean ): OSStatus; external name '_SetDataBrowserListViewUsePlainBackground';
  5625. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5626. {
  5627. * GetDataBrowserListViewUsePlainBackground()
  5628. *
  5629. * Mac OS X threading:
  5630. * Not thread safe
  5631. *
  5632. * Availability:
  5633. * Mac OS X: in version 10.0 and later in Carbon.framework
  5634. * CarbonLib: in CarbonLib 1.1 and later
  5635. * Non-Carbon CFM: not available
  5636. }
  5637. function GetDataBrowserListViewUsePlainBackground( browser: ControlRef; var usePlainBackground: Boolean ): OSStatus; external name '_GetDataBrowserListViewUsePlainBackground';
  5638. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5639. {
  5640. * SetDataBrowserListViewDisclosureColumn()
  5641. *
  5642. * Mac OS X threading:
  5643. * Not thread safe
  5644. *
  5645. * Availability:
  5646. * Mac OS X: in version 10.0 and later in Carbon.framework
  5647. * CarbonLib: in CarbonLib 1.1 and later
  5648. * Non-Carbon CFM: not available
  5649. }
  5650. function SetDataBrowserListViewDisclosureColumn( browser: ControlRef; column: DataBrowserTableViewColumnID; expandableRows: Boolean ): OSStatus; external name '_SetDataBrowserListViewDisclosureColumn';
  5651. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5652. {
  5653. * GetDataBrowserListViewDisclosureColumn()
  5654. *
  5655. * Mac OS X threading:
  5656. * Not thread safe
  5657. *
  5658. * Availability:
  5659. * Mac OS X: in version 10.0 and later in Carbon.framework
  5660. * CarbonLib: in CarbonLib 1.1 and later
  5661. * Non-Carbon CFM: not available
  5662. }
  5663. function GetDataBrowserListViewDisclosureColumn( browser: ControlRef; var column: DataBrowserTableViewColumnID; var expandableRows: Boolean ): OSStatus; external name '_GetDataBrowserListViewDisclosureColumn';
  5664. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5665. { kDataBrowserColumnView API }
  5666. {
  5667. * GetDataBrowserColumnViewPath()
  5668. *
  5669. * Mac OS X threading:
  5670. * Not thread safe
  5671. *
  5672. * Availability:
  5673. * Mac OS X: in version 10.0 and later in Carbon.framework
  5674. * CarbonLib: in CarbonLib 1.1 and later
  5675. * Non-Carbon CFM: not available
  5676. }
  5677. function GetDataBrowserColumnViewPath( browser: ControlRef; path: Handle ): OSStatus; external name '_GetDataBrowserColumnViewPath';
  5678. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5679. {
  5680. * GetDataBrowserColumnViewPathLength()
  5681. *
  5682. * Mac OS X threading:
  5683. * Not thread safe
  5684. *
  5685. * Availability:
  5686. * Mac OS X: in version 10.0 and later in Carbon.framework
  5687. * CarbonLib: in CarbonLib 1.1 and later
  5688. * Non-Carbon CFM: not available
  5689. }
  5690. function GetDataBrowserColumnViewPathLength( browser: ControlRef; var pathLength: UInt32 ): OSStatus; external name '_GetDataBrowserColumnViewPathLength';
  5691. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5692. {
  5693. * SetDataBrowserColumnViewPath()
  5694. *
  5695. * Mac OS X threading:
  5696. * Not thread safe
  5697. *
  5698. * Availability:
  5699. * Mac OS X: in version 10.0 and later in Carbon.framework
  5700. * CarbonLib: in CarbonLib 1.1 and later
  5701. * Non-Carbon CFM: not available
  5702. }
  5703. function SetDataBrowserColumnViewPath( browser: ControlRef; length: UInt32; path: DataBrowserItemIDPtr ): OSStatus; external name '_SetDataBrowserColumnViewPath';
  5704. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5705. {
  5706. * SetDataBrowserColumnViewDisplayType()
  5707. *
  5708. * Mac OS X threading:
  5709. * Not thread safe
  5710. *
  5711. * Availability:
  5712. * Mac OS X: in version 10.0 and later in Carbon.framework
  5713. * CarbonLib: in CarbonLib 1.1 and later
  5714. * Non-Carbon CFM: not available
  5715. }
  5716. function SetDataBrowserColumnViewDisplayType( browser: ControlRef; propertyType: DataBrowserPropertyType ): OSStatus; external name '_SetDataBrowserColumnViewDisplayType';
  5717. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5718. {
  5719. * GetDataBrowserColumnViewDisplayType()
  5720. *
  5721. * Mac OS X threading:
  5722. * Not thread safe
  5723. *
  5724. * Availability:
  5725. * Mac OS X: in version 10.0 and later in Carbon.framework
  5726. * CarbonLib: in CarbonLib 1.1 and later
  5727. * Non-Carbon CFM: not available
  5728. }
  5729. function GetDataBrowserColumnViewDisplayType( browser: ControlRef; var propertyType: DataBrowserPropertyType ): OSStatus; external name '_GetDataBrowserColumnViewDisplayType';
  5730. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5731. { DataBrowser UPP macros }
  5732. {
  5733. Customizing Data Browser Accessibility Information
  5734. Warning: The following assumes you already understand how to handle the
  5735. Accessibility Carbon Events described in CarbonEvents.h.
  5736. Data Browser automatically handles the various Accessibility Carbon
  5737. Events to provide a large amount of Accessibility information. However,
  5738. your application may need to override or augment the default information
  5739. that Data Browser provides.
  5740. Though it is already possible for your application to install various
  5741. Accessibility Carbon Event handlers on a Data Browser instance, it is
  5742. impossible to interpret the AXUIElementRefs contained in the events
  5743. without the help of the Data Browser. A given AXUIElementRef that is
  5744. passed to Data Browser list view in an Accessibility Carbon Event could
  5745. represent a row, a cell, or the list view as a whole. If your
  5746. application needs to add an attribute to only the rows in a list view,
  5747. your application will need to ask Data Browser what any given
  5748. AXUIElementRef represents. The AXUIElementGetDataBrowserItemInfo allows
  5749. your application to ask that question.
  5750. Additionally, your application may want to generate its own AXUIElementRefs
  5751. that represent children of or point to various rows or cells of a Data Browser
  5752. instance. The AXUIElementCreateWithDataBrowserAndItemInfo API allows your
  5753. application to manufacture AXUIElementRefs that represent certain parts of a
  5754. Data Browser so you can provide them in your Accessibility Carbon Event
  5755. handlers.
  5756. Typical Usage Scenario: You want to add an Accessibility attribute to
  5757. all rows in a Data Browser list view.
  5758. Step 1: Install the appropriate Accessibility Carbon Event handlers
  5759. on your Data Browser instance. Call InstallEventHandler or a similar
  5760. API to install a handler onto your Data Browser ControlRef for the
  5761. kEventAccessibleGetAllAttributeNames,
  5762. kEventAccessibleGetNamedAttribute, and other appropriate events.
  5763. Step 2: Your handler should find out what part of the Data Browser
  5764. is being asked for its accessibility information. Extract the
  5765. kEventParamAccessibleObject parameter out of the Carbon Event and
  5766. pass it to AXUIElementGetDataBrowserItemInfo. See that API
  5767. description for more usage information and calling requirements.
  5768. Examine the DataBrowserAccessibilityItemInfo structure that is
  5769. filled out to determine whether it represents the part of the Data
  5770. Browser you are interested in adding an attribute to. In this case,
  5771. you are looking for a row, so you would make sure the item field is
  5772. not kDataBrowserNoItem, and that the columnProperty is
  5773. kDataBrowserItemNoProperty.
  5774. Step 3: Your event handler should call CallNextEventHandler to allow
  5775. the Data Browser to do the default handling of the event. This is
  5776. particularly important if the AXUIElementRef did not represent a
  5777. row, since you don't want to disrupt the Data Browser's handling of
  5778. the event for parts other than rows.
  5779. Step 4: If you determined that the part was a row in step 2, your
  5780. handler should now do whatever custom work it deems necessary. For
  5781. the kEventAccessibleGetAllAttributeNames, your handler would extract
  5782. the kEventParamAccessibleAttributeNames parameter out of the event
  5783. and add your custom attribute name to the array. For the
  5784. kEventAccessibleGetNamedAttribute event, your handler would test the
  5785. kEventParamAccessibleAttributeName parameter to see if it matches
  5786. your custom attribute name; if so, your handler would put its custom
  5787. data in the kEventParamAccessibleAttributeValue parameter. Any other
  5788. events would be handled similarly.
  5789. Step 5: Your event handler should return an appropriate result code.
  5790. In cases where the AXUIElementRef does not represent a row or when
  5791. the attribute name is not your custom attribute, your handler can
  5792. return the same result code that was returned by
  5793. CallNextEventHandler in step 3. In cases where your handler decided
  5794. to augment or override the default handling of the event, your
  5795. handler will typically want to return noErr. See the Carbon Event
  5796. documentation for more details on the meanings of result codes
  5797. returned by event handlers.
  5798. }
  5799. {
  5800. * DataBrowserAccessibilityItemInfoV0
  5801. *
  5802. * Summary:
  5803. * A specific description of Data Browser accessibility item
  5804. * information.
  5805. *
  5806. * Discussion:
  5807. * If you fill this structure as part of a
  5808. * DataBrowserAccessibilityItemInfo, you must set the
  5809. * DataBrowserAccessibilityItemInfo's version field to zero.
  5810. }
  5811. type
  5812. DataBrowserAccessibilityItemInfoV0 = record
  5813. {
  5814. * The DataBrowserItemID of the container the AXUIElementRef
  5815. * represents or lives within. Even kDataBrowserNoItem might be
  5816. * meaningful, since it is the root container ID if you haven't
  5817. * overridden it via SetDataBrowserTarget. In list view, the
  5818. * container helps narrow down the AXUIElementRef to either a
  5819. * disclosed child of another row, or the list as a whole. In column
  5820. * view, the container helps narrow down the AXUIElementRef to a
  5821. * column; also see the columnProperty description below.
  5822. }
  5823. container: DataBrowserItemID;
  5824. {
  5825. * The DataBrowserItemID of the item the AXUIElementRef represents or
  5826. * lives within. If item is kDataBrowserNoItem, the AXUIElementRef
  5827. * represents just the container. In list view, the item helps narrow
  5828. * down the AXUIElementRef to either a row, or the root container as
  5829. * a whole. In column view, the item helps narrow down the
  5830. * AXUIElementRef to either a cell, or a column as a whole; also see
  5831. * the columnProperty description below.
  5832. }
  5833. item: DataBrowserItemID;
  5834. {
  5835. * The DataBrowserPropertyID of the column the AXUIElementRef
  5836. * represents or lives within. If columnProperty is
  5837. * kDataBrowserItemNoProperty and item is not kDataBrowserNoItem, the
  5838. * AXUIElementRef represents a whole row. In list view, this field
  5839. * helps narrow down the AXUIElementRef to either a cell, or a row as
  5840. * a whole. In column view, the columnProperty will/must always be
  5841. * set to kDataBrowserItemNoProperty unless the AXUIElementRef
  5842. * represents the preview column. When the AXUIElementRef represents
  5843. * the preview column, the columnProperty will/must always be set to
  5844. * kDataBrowserColumnViewPreviewProperty, and the other fields of
  5845. * this structure will/must be set to zero or the equivalent constant.
  5846. }
  5847. columnProperty: DataBrowserPropertyID;
  5848. {
  5849. * The DataBrowserPropertyPart of the sub-cell part the
  5850. * AXUIElementRef represents. Examples include the disclosure
  5851. * triangle in a cell, the text in a cell, and the check box in a
  5852. * cell. If propertyPart is kDataBrowserPropertyEnclosingPart and
  5853. * columnProperty is not kDataBrowserItemNoProperty, the
  5854. * AXUIElementRef represents the cell as a whole. In both list view
  5855. * and column view, this field helps narrow down the AXUIElementRef
  5856. * to either a sub-cell part, or a cell as a whole. For column view,
  5857. * also see the columnProperty description above.
  5858. }
  5859. propertyPart: DataBrowserPropertyPart;
  5860. end;
  5861. {
  5862. * DataBrowserAccessibilityItemInfoV1
  5863. *
  5864. * Summary:
  5865. * A specific description of Data Browser accessibility item
  5866. * information.
  5867. *
  5868. * Discussion:
  5869. * If you fill this structure as part of a
  5870. * DataBrowserAccessibilityItemInfo, you must set the
  5871. * DataBrowserAccessibilityItemInfo's version field to one.
  5872. *
  5873. * This structure is identical to the V0 structure except for the
  5874. * inclusion of row and column indicies. These indicies may be
  5875. * useful to clients who call AXUIElementGetDataBrowserItemInfo.
  5876. *
  5877. * If your Data Browser instance allows a given item and/or
  5878. * container to be displayed more than once at a given point in
  5879. * time, you can use the row and column indicies to differentiate
  5880. * the particular visual occurances of that item when calling
  5881. * AXUIElementCreateWithDataBrowserAndItemInfo. See the additional
  5882. * details in the rowIndex and columnIndex discussions below.
  5883. }
  5884. type
  5885. DataBrowserAccessibilityItemInfoV1 = record
  5886. {
  5887. * The DataBrowserItemID of the container the AXUIElementRef
  5888. * represents or lives within. Even kDataBrowserNoItem might be
  5889. * meaningful, since it is the root container ID if you haven't
  5890. * overridden it via SetDataBrowserTarget. In list view, the
  5891. * container helps narrow down the AXUIElementRef to either a
  5892. * disclosed child of another row, or the list as a whole. In column
  5893. * view, the container helps narrow down the AXUIElementRef to a
  5894. * column; also see the columnProperty description below.
  5895. }
  5896. container: DataBrowserItemID;
  5897. {
  5898. * The DataBrowserItemID of the item the AXUIElementRef represents or
  5899. * lives within. If item is kDataBrowserNoItem, the AXUIElementRef
  5900. * represents just the container. In list view, the item helps narrow
  5901. * down the AXUIElementRef to either a row, or the root container as
  5902. * a whole. In column view, the item helps narrow down the
  5903. * AXUIElementRef to either a cell, or a column as a whole; also see
  5904. * the columnProperty description below.
  5905. }
  5906. item: DataBrowserItemID;
  5907. {
  5908. * The DataBrowserPropertyID of the column the AXUIElementRef
  5909. * represents or lives within. If columnProperty is
  5910. * kDataBrowserItemNoProperty and item is not kDataBrowserNoItem, the
  5911. * AXUIElementRef represents a whole row. In list view, this field
  5912. * helps narrow down the AXUIElementRef to either a cell, or a row as
  5913. * a whole. In column view, the columnProperty will/must always be
  5914. * set to kDataBrowserItemNoProperty unless the AXUIElementRef
  5915. * represents the preview column. When the AXUIElementRef represents
  5916. * the preview column, the columnProperty will/must always be set to
  5917. * kDataBrowserColumnViewPreviewProperty, and the other fields of
  5918. * this structure will/must be set to zero or the equivalent constant.
  5919. }
  5920. columnProperty: DataBrowserPropertyID;
  5921. {
  5922. * The DataBrowserPropertyPart of the sub-cell part the
  5923. * AXUIElementRef represents. Examples include the disclosure
  5924. * triangle in a cell, the text in a cell, and the check box in a
  5925. * cell. If propertyPart is kDataBrowserPropertyEnclosingPart and
  5926. * columnProperty is not kDataBrowserItemNoProperty, the
  5927. * AXUIElementRef represents the cell as a whole. In both list view
  5928. * and column view, this field helps narrow down the AXUIElementRef
  5929. * to either a sub-cell part, or a cell as a whole. For column view,
  5930. * also see the columnProperty description above.
  5931. }
  5932. propertyPart: DataBrowserPropertyPart;
  5933. {
  5934. * The zero-based DataBrowserTableViewRowIndex of the row specified
  5935. * by the other parts of this structure. If the other parts of this
  5936. * structure do not specify a row or a part thereof, this field
  5937. * will/must be set to zero; because this field is zero based, you
  5938. * must test the other parts this structure to see whether this field
  5939. * is meaningful. In list view, when the other parts of this
  5940. * structure specify an item or part thereof, this field will/must be
  5941. * set to the row index at which the specified item can be found. In
  5942. * column view, when the other parts of this structure specify a cell
  5943. * or part thereof, this field will/must be set to the row index at
  5944. * which the specified cell can be found.
  5945. }
  5946. rowIndex: DataBrowserTableViewRowIndex;
  5947. {
  5948. * The zero-based DataBrowserTableViewColumnIndex of the column
  5949. * specified by the other parts of this structure. If the other parts
  5950. * of this structure do not specify a column or a part thereof, this
  5951. * field will/must be set to zero; because this field is zero based,
  5952. * you must test the other parts this structure to see whether this
  5953. * field is meaningful. In list view, when the other parts of this
  5954. * structure specify a cell or part thereof, this field will/must be
  5955. * set to the column index at which the specified cell can be found.
  5956. * In column view, when the other parts of this structure specify a
  5957. * column or part thereof, this field will/must be set to the column
  5958. * index at which the specified cell can be found.
  5959. }
  5960. columnIndex: DataBrowserTableViewColumnIndex;
  5961. end;
  5962. {
  5963. * DataBrowserAccessibilityItemInfo
  5964. *
  5965. * Summary:
  5966. * A generalized description of Data Browser accessibility item
  5967. * information.
  5968. *
  5969. * Discussion:
  5970. * Pass this structure to AXUIElementGetDataBrowserItemInfo or
  5971. * AXUIElementCreateWithDataBrowserAndItemInfo.
  5972. }
  5973. type
  5974. DataBrowserAccessibilityItemInfo = record
  5975. {
  5976. * A UInt32 which identifies how to interpret the following union.
  5977. * Set this field to zero if you fill out the union's data in the
  5978. * form of a DataBrowserAccessibilityItemInfoV0 structure. Set this
  5979. * field to one if you fill out the union's data in the form of a
  5980. * DataBrowserAccessibilityItemInfoV1 structure.
  5981. }
  5982. version: UInt32;
  5983. case SInt16 of
  5984. 0: (
  5985. v0: DataBrowserAccessibilityItemInfoV0;
  5986. );
  5987. 1: (
  5988. v1: DataBrowserAccessibilityItemInfoV1;
  5989. );
  5990. end;
  5991. {
  5992. * AXUIElementGetDataBrowserItemInfo()
  5993. *
  5994. * Summary:
  5995. * Gets a description of the part of a Data Browser represented by a
  5996. * given AXUIElementRef.
  5997. *
  5998. * Mac OS X threading:
  5999. * Not thread safe
  6000. *
  6001. * Parameters:
  6002. *
  6003. * inElement:
  6004. * An AXUIElementRef representing part of a Data Browser.
  6005. *
  6006. * inDataBrowser:
  6007. * A Data Browser ControlRef.
  6008. *
  6009. * inDesiredInfoVersion:
  6010. * A UInt32 indicating the the version you want the ioInfo
  6011. * structure passed back as. Currently, the only supported version
  6012. * is zero, so you must pass zero in the inDesiredInfoVersion
  6013. * parameter.
  6014. *
  6015. * outInfo:
  6016. * A DataBrowserAccessibilityItemInfo that will be filled in with
  6017. * a description of the part of the Data Browser that the
  6018. * AXUIElementRef represents.
  6019. *
  6020. * Result:
  6021. * An OSStatus result code. The function will return noErr if it was
  6022. * able to generate a description of the AXUIElementRef. If the
  6023. * AXUIElementRef does not represent the Data Browser you passed in,
  6024. * the function will return paramErr. If the AXUIElementRef
  6025. * represents some non-item part of the Data Browser, the function
  6026. * will return errDataBrowserItemNotFound.
  6027. *
  6028. * Availability:
  6029. * Mac OS X: in version 10.4 and later in Carbon.framework
  6030. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  6031. * Non-Carbon CFM: not available
  6032. }
  6033. function AXUIElementGetDataBrowserItemInfo( inElement: AXUIElementRef; inDataBrowser: ControlRef; inDesiredInfoVersion: UInt32; var outInfo: DataBrowserAccessibilityItemInfo ): OSStatus; external name '_AXUIElementGetDataBrowserItemInfo';
  6034. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  6035. {
  6036. * AXUIElementCreateWithDataBrowserAndItemInfo()
  6037. *
  6038. * Summary:
  6039. * Creates an AXUIElementRef to represent some part of a Data
  6040. * Browser accessibility hierarchy.
  6041. *
  6042. * Mac OS X threading:
  6043. * Not thread safe
  6044. *
  6045. * Parameters:
  6046. *
  6047. * inDataBrowser:
  6048. * A Data Browser ControlRef.
  6049. *
  6050. * inInfo:
  6051. * A DataBrowserAccessibilityItemInfo describing the part of the
  6052. * Data Browser for which you want to create an AXUIElementRef.
  6053. *
  6054. * Result:
  6055. * An AXUIElementRef representing the part, or NULL if one cannot be
  6056. * created to represent the part you specified.
  6057. *
  6058. * Availability:
  6059. * Mac OS X: in version 10.4 and later in Carbon.framework
  6060. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  6061. * Non-Carbon CFM: not available
  6062. }
  6063. function AXUIElementCreateWithDataBrowserAndItemInfo( inDataBrowser: ControlRef; const (*var*) inInfo: DataBrowserAccessibilityItemInfo ): AXUIElementRef; external name '_AXUIElementCreateWithDataBrowserAndItemInfo';
  6064. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  6065. {---------------------------------------------------------------------------------------}
  6066. { EditUnicodeText Control }
  6067. {---------------------------------------------------------------------------------------}
  6068. { This control is only available in Mac OS X. It is super similar to Edit Text control }
  6069. { Use all the same Get/Set tags. But don't ask for the TEHandle. }
  6070. {---------------------------------------------------------------------------------------}
  6071. { This callback supplies the functionality of the TSMTEPostUpdateProcPtr that is used }
  6072. { in the EditText control. A client should supply this call if they want to look at }
  6073. { inline text that has been fixed before it is included in the actual body text }
  6074. { if the new text (i.e. the text in the handle) should be included in the body text }
  6075. { the client should return true. If the client wants to block the inclusion of the }
  6076. { text they should return false. }
  6077. type
  6078. EditUnicodePostUpdateProcPtr = function( uniText: UniCharArrayHandle; uniTextLength: UniCharCount; iStartOffset: UniCharArrayOffset; iEndOffset: UniCharArrayOffset; refcon: UnivPtr ): Boolean;
  6079. type
  6080. EditUnicodePostUpdateUPP = EditUnicodePostUpdateProcPtr;
  6081. {
  6082. * NewEditUnicodePostUpdateUPP()
  6083. *
  6084. * Availability:
  6085. * Mac OS X: in version 10.0 and later in Carbon.framework
  6086. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  6087. * Non-Carbon CFM: not available
  6088. }
  6089. function NewEditUnicodePostUpdateUPP( userRoutine: EditUnicodePostUpdateProcPtr ): EditUnicodePostUpdateUPP; external name '_NewEditUnicodePostUpdateUPP';
  6090. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6091. {
  6092. * DisposeEditUnicodePostUpdateUPP()
  6093. *
  6094. * Availability:
  6095. * Mac OS X: in version 10.0 and later in Carbon.framework
  6096. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  6097. * Non-Carbon CFM: not available
  6098. }
  6099. procedure DisposeEditUnicodePostUpdateUPP( userUPP: EditUnicodePostUpdateUPP ); external name '_DisposeEditUnicodePostUpdateUPP';
  6100. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6101. {
  6102. * InvokeEditUnicodePostUpdateUPP()
  6103. *
  6104. * Availability:
  6105. * Mac OS X: in version 10.0 and later in Carbon.framework
  6106. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  6107. * Non-Carbon CFM: not available
  6108. }
  6109. function InvokeEditUnicodePostUpdateUPP( uniText: UniCharArrayHandle; uniTextLength: UniCharCount; iStartOffset: UniCharArrayOffset; iEndOffset: UniCharArrayOffset; refcon: UnivPtr; userUPP: EditUnicodePostUpdateUPP ): Boolean; external name '_InvokeEditUnicodePostUpdateUPP';
  6110. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6111. const
  6112. kControlEditUnicodeTextProc = 912;
  6113. kControlEditUnicodeTextPasswordProc = 914;
  6114. { Control Kind Tag }
  6115. const
  6116. kControlKindEditUnicodeText = $65757478 (* 'eutx' *);
  6117. { The HIObject class ID for the HITextField class. }
  6118. {$ifc USE_CFSTR_CONSTANT_MACROS}
  6119. {$definec kHITextFieldClassID CFSTRP('com.apple.HITextField')}
  6120. {$endc}
  6121. {
  6122. * CreateEditUnicodeTextControl()
  6123. *
  6124. * Summary:
  6125. * Creates a new edit text control.
  6126. *
  6127. * Discussion:
  6128. * This is the preferred edit text control. Use it instead of the
  6129. * EditText control. This control handles Unicode and draws its text
  6130. * using antialiasing, which the other control does not.
  6131. *
  6132. * Mac OS X threading:
  6133. * Not thread safe
  6134. *
  6135. * Parameters:
  6136. *
  6137. * window:
  6138. * The window in which the control should be placed. May be NULL
  6139. * in 10.3 and later.
  6140. *
  6141. * boundsRect:
  6142. * The bounds of the control, in local coordinates of the window.
  6143. *
  6144. * text:
  6145. * The text of the control. May be NULL.
  6146. *
  6147. * isPassword:
  6148. * A Boolean indicating whether the field is to be used as a
  6149. * password field. Passing false indicates that the field is to
  6150. * display entered text normally. True means that the field will
  6151. * be used as a password field and any text typed into the field
  6152. * will be displayed only as bullets.
  6153. *
  6154. * style:
  6155. * The control's font style, size, color, and so on. May be NULL.
  6156. *
  6157. * outControl:
  6158. * On exit, contains the new control (if noErr is returned as the
  6159. * result code).
  6160. *
  6161. * Result:
  6162. * An operating system result code.
  6163. *
  6164. * Availability:
  6165. * Mac OS X: in version 10.0 and later in Carbon.framework
  6166. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  6167. * Non-Carbon CFM: not available
  6168. }
  6169. function CreateEditUnicodeTextControl( window: WindowRef; const (*var*) boundsRect: Rect; text: CFStringRef { can be NULL }; isPassword: Boolean; {const} style: ControlFontStyleRecPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateEditUnicodeTextControl';
  6170. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6171. {
  6172. The EditUnicodeText control supports these tags previously defined for the EditText control:
  6173. kControlEditTextLockedTag
  6174. kControlFontStyleTag
  6175. kControlEditTextFixedTextTag
  6176. kControlEditTextTextTag
  6177. kControlEditTextKeyFilterTag
  6178. kControlEditTextValidationProcTag
  6179. kControlEditTextSelectionTag
  6180. kControlEditTextKeyScriptBehaviorTag
  6181. kControlEditTextCFStringTag
  6182. kControlEditTextPasswordTag
  6183. kControlEditTextPasswordCFStringTag
  6184. }
  6185. { Tagged data supported by EditUnicodeText control only }
  6186. const
  6187. kControlEditTextSingleLineTag = $73676C63 (* 'sglc' *); { data is a Boolean; indicates whether the control should always be single-line}
  6188. kControlEditTextInsertTextBufferTag = $696E7478 (* 'intx' *); { data is an array of char; get or set the control's text as WorldScript-encoded text}
  6189. kControlEditTextInsertCFStringRefTag = $696E6366 (* 'incf' *); { data is a CFStringRef; get or set the control's text as a CFStringRef. Caller should release CFString if getting.}
  6190. kControlEditUnicodeTextPostUpdateProcTag = $75707570 (* 'upup' *); { data is a UnicodePostUpdateUPP; get or set the post-update proc}
  6191. {$ifc OLDROUTINENAMES}
  6192. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6193. { ¥ OLDROUTINENAMES }
  6194. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6195. const
  6196. kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue;
  6197. kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue;
  6198. kControlCheckboxMixedValue = kControlCheckBoxMixedValue;
  6199. const
  6200. inLabel = kControlLabelPart;
  6201. inMenu = kControlMenuPart;
  6202. inTriangle = kControlTrianglePart;
  6203. inButton = kControlButtonPart;
  6204. inCheckBox = kControlCheckBoxPart;
  6205. inUpButton = kControlUpButtonPart;
  6206. inDownButton = kControlDownButtonPart;
  6207. inPageUp = kControlPageUpPart;
  6208. inPageDown = kControlPageDownPart;
  6209. const
  6210. kInLabelControlPart = kControlLabelPart;
  6211. kInMenuControlPart = kControlMenuPart;
  6212. kInTriangleControlPart = kControlTrianglePart;
  6213. kInButtonControlPart = kControlButtonPart;
  6214. kInCheckBoxControlPart = kControlCheckBoxPart;
  6215. kInUpButtonControlPart = kControlUpButtonPart;
  6216. kInDownButtonControlPart = kControlDownButtonPart;
  6217. kInPageUpControlPart = kControlPageUpPart;
  6218. kInPageDownControlPart = kControlPageDownPart;
  6219. {$endc} {OLDROUTINENAMES}
  6220. {$ALIGN MAC68K}
  6221. end.