/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1992 by Xerox Corporation. All rights reserved. */ /* time: October 1, 1992 9:47:35 pm PDT */ /* C2C version: October 16, 1990 (native) */ /* ref-counting: off */ /* file: XTkChoiceWidgetsImpl, module: XTkChoiceWidgetsImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [1291570865,698012369] XTkChoiceWidgetsImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {W8 f; W8 r;} W16; typedef struct {W8 f; word r;} W9; typedef struct {W16 f; W9 r;} W25; typedef word (*fPt)(); typedef struct {word f0, f1;} W2; typedef W9 *W9Pt; typedef struct {word f0, f1, f2, f3;} W4; typedef W4 *W4Pt; typedef struct {word f0, f1, f2;} W3; typedef struct {W16 f; W3 r;} W19; typedef W2 *W2Pt; #define SOURCE(p, l) /* source p, l */ #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) ) static void NoName←Q1644(); static void XTkChoiceWidgetsImpl←P0(); static void ChoicesHitProc←P60(); static void Choose←P120(); static void ChooseForChoice←P180(); static word EachChild←P720(); static void ChooseForToggle←P240(); static word FindChoice←P300(); static word CreateChoices←P360(); static void ToggleHitProc←P420(); static word CreateToggle←P480(); static word GetCRef←P540(); static word CurrentChoice←P600(); static word IsChoice←P660(); static struct {unsigned f; char r[4];} string1 = {131076, "\216\251\000"}; static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\114\373\316\261\300\051\232\322\321\100\200\000\000"}; static struct {unsigned f; char r[4];} string4 = {196611, "\004@~"}; static struct {unsigned f; char r[8];} string5 = {458760, "ychoice"}; static struct {unsigned f; char r[8];} string6 = {393224, "toggle\000"}; static struct {unsigned f; char r[8];} string7 = {458760, "xchoice"}; static struct {unsigned f; char r[8];} string8 = {393224, "choice\000"}; static struct {unsigned f; char r[8];} string9 = {327688, "Gray1\000\000"}; static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\114\373\316\261\300\051\232\322\321\100\164\000\000"}; static struct {unsigned f; char r[16];} string11 = {917518, "\006\005\040\001\044\001\050\001\054\001\100\100\004\037\000"}; static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"}; static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\116\324\147\077\300\024\110\066\207\100\150\000\000"}; static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\141\025\232\152\300\166\121\005\142\100\164\000\000"}; static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\310\203\372\072\300\300\310\160\135\100\150\000\000"}; static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\150\000\000"}; static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\227\370\144\253\300\176\165\034\110\100\150\000\000"}; static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\234\350\054\033\300\120\345\145\367\100\150\000\000"}; static struct {unsigned f; char r[16];} string19 = {851984, "\257\300\261\021\273\022\300\336\305\330\021\100\150\000\000"}; static struct { word f0[21]; word f21; word f22; word f23; word f24; word f25; word f26; word f27; word f28; word f29; word f30; word f31; word f32; word f33; word f34; word f35; word f36; word f37; word f38; word f39; word f40; word f41; word f42; word f43; word f44[2]; word f46; word f47; word f48; word f49; word f50; word f51; word f52[3]; word f55; word f56; word f57; word f58; word f59; word f60; word f61[2]; word f63; word f64; word f65[10]; } globalframe = { {0}, (word) IsChoice←P660, 0, (word) CurrentChoice←P600, 0, (word) GetCRef←P540, 0, (word) CreateToggle←P480, 0, (word) ToggleHitProc←P420, 0, (word) CreateChoices←P360, 0, (word) FindChoice←P300, 0, (word) ChooseForToggle←P240, 0, (word) ChooseForChoice←P180, 0, (word) Choose←P120, 0, (word) ChoicesHitProc←P60, 0, (word) XTkChoiceWidgetsImpl←P0, {0}, 2147483648, 2147483648, 2147483648, 2147483648, 2147483648, 3, {0}, 2147483648, 2147483648, 2147483648, 2147483648, 2147483648, 3, {0}, 4294967295, 4294967295, {0} }; static void NoName←Q1644() { register ptr gf←c0124 = (ptr) &globalframe; word var←c19536; (* (( (ptr) gf←c0124)+12) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf←c0124)+13) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4); (* (ptr) (( (bPt) gf←c0124)+64) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0124)+12) ), (word) &string5); (* (ptr) (( (bPt) gf←c0124)+68) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0124)+12) ), (word) &string6); (* (ptr) (( (bPt) gf←c0124)+72) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0124)+12) ), (word) &string7); (* (ptr) (( (bPt) gf←c0124)+76) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0124)+12) ), (word) &string8); (* (ptr) (( (bPt) gf←c0124)+80) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0124)+12) ), (word) &string9); (void) XR←DeclareGlobalFrame((word) "XTkChoiceWidgetsImpl", &globalframe, (word) XR←GetTypeIndex((word) &string10, 0, (word) &string11) , (word) (( (bPt) gf←c0124)+172)/* var←c18448 */ ); var←c19536 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string12)), 43); (* (( (ptr) gf←c0124)+73)/* var←c19152 */ ) = var←c19536; (void) XR←ImportProcS(var←c19536, 67896323); var←c19536 = (word) XR←ImportInterface((word) "XTkButtons", (word) XR←GetTypeIndexS((word) (&string13)), 5); (* (( (ptr) gf←c0124)+69)/* var←c18864 */ ) = var←c19536; (void) XR←ImportProcS(var←c19536, 72089608); var←c19536 = (word) XR←ImportInterface((word) "XTkCollections", (word) XR←GetTypeIndexS((word) (&string14)), 16); (* (( (ptr) gf←c0124)+72)/* var←c19088 */ ) = var←c19536; (void) XR←ImportProcS(var←c19536, 1049604); (void) XR←ImportProcS(var←c19536, 69992451); (void) XR←ImportProcS(var←c19536, 788227); var←c19536 = (word) XR←ImportInterface((word) "XTkContainers", (word) XR←GetTypeIndexS((word) (&string15)), 12); (* (( (ptr) gf←c0124)+67)/* var←c18736 */ ) = var←c19536; var←c19536 = (word) XR←ImportInterface((word) "XTk", (word) XR←GetTypeIndexS((word) (&string16)), 50); (* (( (ptr) gf←c0124)+71)/* var←c18992 */ ) = var←c19536; (void) XR←ImportProcS(var←c19536, 788227); (void) XR←ImportProcS(var←c19536, 67634690); (void) XR←ImportProcS(var←c19536, 67642370); var←c19536 = (word) XR←ImportInterface((word) "XTkFriends", (word) XR←GetTypeIndexS((word) (&string17)), 33); (* (( (ptr) gf←c0124)+68)/* var←c18768 */ ) = var←c19536; (void) XR←ImportProcS(var←c19536, 67637250); (void) XR←ImportProcS(var←c19536, 73666049); var←c19536 = (word) XR←ImportInterface((word) "XTkLabels", (word) XR←GetTypeIndexS((word) (&string18)), 9); (* (( (ptr) gf←c0124)+70)/* var←c18896 */ ) = var←c19536; (void) XR←ImportProcS(var←c19536, 70778883); (void) XR←ImportProcS(var←c19536, 787203); (void) XR←ImportProcS(var←c19536, 787715); var←c19536 = (word) XR←ExportInterface((word) "XTkChoiceWidgets", (word) XR←GetTypeIndexS((word) (&string19)), 5); (* (( (ptr) gf←c0124)+74)/* var←c19568 */ ) = var←c19536; (void) XR←ExportProcS(var←c19536, (word) (( (bPt) gf←c0124)+84)/* var←c18096 */ , 67371009); (void) XR←ExportProcS(var←c19536, (word) (( (bPt) gf←c0124)+92)/* var←c18128 */ , 67371265); (void) XR←ExportProcS(var←c19536, (word) (( (bPt) gf←c0124)+156)/* var←c18384 */ , 786946); (void) XR←ExportProcS(var←c19536, (word) (( (bPt) gf←c0124)+124)/* var←c18256 */ , 71828231); (void) XR←ExportProcS(var←c19536, (word) (( (bPt) gf←c0124)+108)/* var←c18192 */ , 71566342); } static void XTkChoiceWidgetsImpl←P0(formal←c040, formal←c032) word formal←c040; word formal←c032; { register ptr gf←c19600 = (ptr) &globalframe; /* XTkChoiceWidgetsImpl: */ SOURCE(109, 5458) /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ /* moved to installation proc */ SOURCE(292, 37) { word var←c18672; var←c18672 = XR←NewObject(4, (* (( (ptr) gf←c19600)+12) )); (* (ptr) var←c18672 ) = (* (( (ptr) gf←c19600)+19) ); (* (( (ptr) gf←c19600)+8)/* myKey←v2832 */ ) = var←c18672; }; SOURCE(331, 114) { W25 var←c035; (* (ptr) &var←c035 ) = (* (( (ptr) gf←c19600)+18) ); (* (( (ptr) &var←c035)+1) ) = 0; (* (( (ptr) &var←c035)+2) ) = (* (ptr) (* (( (ptr) (* (( (ptr) gf←c19600)+67)/* var←c18736 */ ))+5) ) ); (* (( (ptr) &var←c035)+3) ) = 1; (* (( (ptr) &var←c035)+4) ) = 0; (* (( (ptr) &var←c035)+5) ) = 0; (* (( (ptr) &var←c035)+6) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+7) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+8) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+9) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+10) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+11) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+12) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+13) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+14) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+15) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+16) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+17) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+18) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+19) ) = 0; (* (( (ptr) &var←c035)+20) ) = 0; (* (( (ptr) &var←c035)+21) ) = 0; (* (( (ptr) &var←c035)+22) ) = 0; (* (( (ptr) &var←c035)+23) ) = XR←CheckProc(0); (* (( (ptr) &var←c035)+24) ) = XR←CheckProc(0); { word pd20; pd20 = (* (( (ptr) (* (( (ptr) gf←c19600)+68)/* var←c18768 */ ))+18) ); (* (( (ptr) gf←c19600)+9)/* choiceXClass←v2860 */ ) = (word) ( *( (fPt) ((* (ptr) pd20 ))))((word) (&var←c035), pd20); }; }; SOURCE(447, 114) { W25 var←c037; (* (ptr) &var←c037 ) = (* (( (ptr) gf←c19600)+16) ); (* (( (ptr) &var←c037)+1) ) = 0; (* (( (ptr) &var←c037)+2) ) = (* (ptr) (* (( (ptr) (* (( (ptr) gf←c19600)+67)/* var←c18736 */ ))+4) ) ); (* (( (ptr) &var←c037)+3) ) = 1; (* (( (ptr) &var←c037)+4) ) = 0; (* (( (ptr) &var←c037)+5) ) = 0; (* (( (ptr) &var←c037)+6) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+7) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+8) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+9) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+10) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+11) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+12) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+13) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+14) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+15) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+16) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+17) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+18) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+19) ) = 0; (* (( (ptr) &var←c037)+20) ) = 0; (* (( (ptr) &var←c037)+21) ) = 0; (* (( (ptr) &var←c037)+22) ) = 0; (* (( (ptr) &var←c037)+23) ) = XR←CheckProc(0); (* (( (ptr) &var←c037)+24) ) = XR←CheckProc(0); { word pd21; pd21 = (* (( (ptr) (* (( (ptr) gf←c19600)+68)/* var←c18768 */ ))+18) ); (* (( (ptr) gf←c19600)+10)/* choiceYClass←v2888 */ ) = (word) ( *( (fPt) ((* (ptr) pd21 ))))((word) (&var←c037), pd21); }; }; SOURCE(563, 114) { W25 var←c039; (* (ptr) &var←c039 ) = (* (( (ptr) gf←c19600)+17) ); (* (( (ptr) &var←c039)+1) ) = 0; (* (( (ptr) &var←c039)+2) ) = (* (ptr) (* (( (ptr) (* (( (ptr) gf←c19600)+69)/* var←c18864 */ ))+8) ) ); (* (( (ptr) &var←c039)+3) ) = 1; (* (( (ptr) &var←c039)+4) ) = 0; (* (( (ptr) &var←c039)+5) ) = 0; (* (( (ptr) &var←c039)+6) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+7) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+8) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+9) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+10) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+11) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+12) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+13) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+14) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+15) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+16) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+17) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+18) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+19) ) = 0; (* (( (ptr) &var←c039)+20) ) = 0; (* (( (ptr) &var←c039)+21) ) = 0; (* (( (ptr) &var←c039)+22) ) = 0; (* (( (ptr) &var←c039)+23) ) = XR←CheckProc(0); (* (( (ptr) &var←c039)+24) ) = XR←CheckProc(0); { word pd22; pd22 = (* (( (ptr) (* (( (ptr) gf←c19600)+68)/* var←c18768 */ ))+18) ); (* (( (ptr) gf←c19600)+11)/* toggleClass←v2916 */ ) = (word) ( *( (fPt) ((* (ptr) pd22 ))))((word) (&var←c039), pd22); }; }; } static void ChoicesHitProc←P60(widget←v11576, registerData←v11604, callData←v11632, event←v11660) word widget←v11576; word registerData←v11604; word callData←v11632; word event←v11660; { register ptr gf←c19632 = (ptr) &globalframe; word cRef←v4824; /* ChoicesHitProc: */ SOURCE(883, 412) SOURCE(924, 37) cRef←v4824 = XR←Narrow(registerData←v11604, (* (( (ptr) gf←c19632)+13) )); SOURCE(963, 24) (* (( (ptr) cRef←v4824)+6) ) = callData←v11632; SOURCE(989, 35) if (((* (( (ptr) cRef←v4824)+5) ) == widget←v11576)) { SOURCE(1018, 6) return; }; SOURCE(1026, 76) if (((* (( (ptr) cRef←v4824)+5) ) != 0)) { SOURCE(1052, 50) { word pd23; pd23 = (* (( (ptr) (* (( (ptr) gf←c19632)+70)/* var←c18896 */ ))+9) ); (void) ( *( (fPt) ((* (ptr) pd23 ))))((* (( (ptr) cRef←v4824)+5) ), 0, 1, pd23); }; }; SOURCE(1104, 22) (* (( (ptr) cRef←v4824)+5) ) = widget←v11576; SOURCE(1128, 37) { word pd24; pd24 = (* (( (ptr) (* (( (ptr) gf←c19632)+70)/* var←c18896 */ ))+9) ); (void) ( *( (fPt) ((* (ptr) pd24 ))))(widget←v11576, (* (( (ptr) gf←c19632)+20) ), 2, pd24); }; SOURCE(1167, 128) if (((* (ptr) cRef←v4824 ) != 0)) { SOURCE(1193, 102) { word pd25; pd25 = (* (ptr) cRef←v4824 ); (void) ( *( (fPt) ((* (ptr) pd25 ))))((* (( (ptr) widget←v11576)+31) ), (* (( (ptr) cRef←v4824)+2) ), callData←v11632, event←v11660, pd25) ; }; }; } static void Choose←P120(widget←v3584, ce←v3612) word widget←v3584; W2 ce←v3612; { register ptr gf←c19664 = (ptr) &globalframe; word var←c18928; word widget←v18020; word class←v18048; /* Choose: */ SOURCE(1302, 166) SOURCE(1366, 102) widget←v18020 = widget←v3584; class←v18048 = (* (( (ptr) gf←c19664)+11)/* toggleClass←v2916 */ ); { word pd26; if (((* (( (ptr) widget←v18020)+4) ) == class←v18048)) { var←c18928 = 1; } else { pd26 = (* (( (ptr) (* (( (ptr) gf←c19664)+71)/* var←c18992 */ ))+40) ); var←c18928 = (word) ( *( (fPt) ((* (ptr) pd26 ))))(widget←v18020, class←v18048, pd26); }; }; if (((0 != var←c18928) )) { SOURCE(1408, 33) (void) ChooseForToggle←P240(widget←v3584, ce←v3612); } else { SOURCE(1441, 27) (void) ChooseForChoice←P180(widget←v3584, ce←v3612); }; } static void ChooseForChoice←P180(widget←v3672, ce←v3700) word widget←v3672; W2 ce←v3700; { W8 var←c19696; register ptr gf←c19728 = (ptr) &globalframe; /* declaration of var←c19024 skipped */ /* declaration of cRef←v4880 skipped */ /* declaration of c←v4908 skipped */ /* ChooseForChoice: */ SOURCE(1474, 492) { word tmpAddr27; tmpAddr27 = (word) (( (ptr) &var←c19696)+4)/* var←c19024 */ ; (* (ptr) tmpAddr27 ) = ( ((word) (fPt) EachChild←P720) ); (* (( (ptr) tmpAddr27) + 1) ) = 1; }; SOURCE(1540, 66) { word var←c19056; word superClass←v17972; superClass←v17972 = (* (( (ptr) gf←c19728)+10)/* choiceYClass←v2888 */ ); { word idx28; word limit29; var←c19056 = (* ((( (ptr) widget←v3672)+49)+( idx28 = (* (( (ptr) superClass←v17972)+4) ), limit29 = (* (( (ptr) widget←v3672)+48) ), BCK(idx28, limit29) )) ); }; var←c19696.f6/* cRef←v4880 */ = XR←Narrow(var←c19056, (* (( (ptr) gf←c19728)+13) )); }; SOURCE(1608, 44) var←c19696.f7/* c←v4908 */ = (word) FindChoice←P300((* (( (ptr) var←c19696.f6/* cRef←v4880 */ )+3) ), ce←v3700); SOURCE(1821, 145) if ((var←c19696.f7/* c←v4908 */ != 0)) { SOURCE(1837, 76) if (((* (( (ptr) var←c19696.f6/* cRef←v4880 */ )+5) ) != 0)) { SOURCE(1863, 50) { word pd30; pd30 = (* (( (ptr) (* (( (ptr) gf←c19728)+70)/* var←c18896 */ ))+9) ); (void) ( *( (fPt) ((* (ptr) pd30 ))))((* (( (ptr) var←c19696.f6/* cRef←v4880 */ )+5) ), 0, 1, pd30); }; }; SOURCE(1915, 51) { word pd31; pd31 = (* (( (ptr) (* (( (ptr) gf←c19728)+72)/* var←c19088 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd31 ))))(widget←v3672, (word) (( (bPt) &var←c19696)+16)/* var←c19024 */ , 0, pd31); }; }; } static word EachChild←P720(collection←v14112, child←v14140, data←v14168, idx←v14196, formal←c19792) word collection←v14112; word child←v14140; word data←v14168; word idx←v14196; word formal←c19792; { register ptr gf←c19760 = (ptr) &globalframe; word stop←v14240; formal←c19792 = (formal←c19792 - 16); /* EachChild: */ SOURCE(1654, 161) SOURCE(1654, 161) stop←v14240 = 0; SOURCE(1698, 117) { word pd32; pd32 = (* (( (ptr) (* (( (ptr) gf←c19760)+71)/* var←c18992 */ ))+10) ); if (((* (( (ptr) formal←c19792)+7) ) == (word) ( *( (fPt) ((* (ptr) pd32 ))))(child←v14140, (* (( (ptr) gf←c19760)+8)/* myKey←v2832 */ ), pd32) )) { SOURCE(1742, 21) (* (( (ptr) (* (( (ptr) formal←c19792)+6) ))+5) ) = child←v14140; SOURCE(1765, 36) { word pd33; pd33 = (* (( (ptr) (* (( (ptr) gf←c19760)+70)/* var←c18896 */ ))+9) ); (void) ( *( (fPt) ((* (ptr) pd33 ))))(child←v14140, (* (( (ptr) gf←c19760)+20) ), 2, pd33); }; SOURCE(1803, 12) stop←v14240 = 1; }; }; SOURCE(1654, 161) return(stop←v14240); } static void ChooseForToggle←P240(widget←v3760, ce←v3788) word widget←v3760; W2 ce←v3788; { register ptr gf←c19824 = (ptr) &globalframe; word cRef←v4992; word c←v5020; /* ChooseForToggle: */ SOURCE(1975, 263) SOURCE(2041, 65) { word var←c19120; word superClass←v17924; superClass←v17924 = (* (( (ptr) gf←c19824)+11)/* toggleClass←v2916 */ ); { word idx34; word limit35; var←c19120 = (* ((( (ptr) widget←v3760)+49)+( idx34 = (* (( (ptr) superClass←v17924)+4) ), limit35 = (* (( (ptr) widget←v3760)+48) ), BCK(idx34, limit35) )) ); }; cRef←v4992 = XR←Narrow(var←c19120, (* (( (ptr) gf←c19824)+13) )); }; SOURCE(2108, 44) c←v5020 = (word) FindChoice←P300((* (( (ptr) cRef←v4992)+3) ), ce←v3788); SOURCE(2154, 84) if ((c←v5020 != 0)) { SOURCE(2170, 16) (* (( (ptr) cRef←v4992)+4) ) = c←v5020; SOURCE(2188, 50) { word pd36; pd36 = (* (( (ptr) (* (( (ptr) gf←c19824)+70)/* var←c18896 */ ))+7) ); (void) ( *( (fPt) ((* (ptr) pd36 ))))(widget←v3760, (* (ptr) (* (( (ptr) cRef←v4992)+4) ) ), 2, pd36); }; }; } static word FindChoice←P300(choices←v3848, el←v3876) word choices←v3848; W2 el←v3876; { register ptr gf←c19856 = (ptr) &globalframe; word var←c3920; /* FindChoice: */ SOURCE(2247, 437) SOURCE(2247, 437) var←c3920 = 0; SOURCE(2336, 80) { register word c←v5076; c←v5076 = choices←v3848; lab←L100006: ; if ((c←v5076 != 0)) { } else { goto lab←L100003; }; SOURCE(2387, 29) if (XR←EqualWords(c←v5076, &el←v3876, 2)) { SOURCE(2406, 10) return(c←v5076); }; c←v5076 = (* (( (ptr) c←v5076)+2) ); goto lab←L100006; lab←L100003: ; }; SOURCE(2427, 123) if ((el←v3876.f0 != 0)) { SOURCE(2447, 103) { register word c←v5120; c←v5120 = choices←v3848; lab←L100010: ; if ((c←v5120 != 0)) { } else { goto lab←L100007; }; SOURCE(2498, 52) { word pd37; pd37 = (* (( (ptr) (* (( (ptr) gf←c19856)+73)/* var←c19152 */ ))+8) ); if ((0 != (word) ( *( (fPt) ((* (ptr) pd37 ))))((* (ptr) c←v5120 ), el←v3876.f0, 1, pd37))) { SOURCE(2540, 10) return(c←v5120); }; }; c←v5120 = (* (( (ptr) c←v5120)+2) ); goto lab←L100010; lab←L100007: ; }; }; SOURCE(2561, 123) if ((el←v3876.f1 != 0)) { SOURCE(2586, 98) { register word c←v5164; c←v5164 = choices←v3848; lab←L100014: ; if ((c←v5164 != 0)) { } else { goto lab←L100011; }; SOURCE(2637, 47) if (((* (( (ptr) c←v5164)+1) ) == el←v3876.f1)) { SOURCE(2674, 10) return(c←v5164); }; c←v5164 = (* (( (ptr) c←v5164)+2) ); goto lab←L100014; lab←L100011: ; }; }; SOURCE(2247, 437) return(var←c3920); } static word CreateChoices←P360(formal←c082) word formal←c082; { register ptr gf←c19888 = (ptr) &globalframe; word widget←v4204; word cRef←v5208; word class←v5236; /* CreateChoices: */ SOURCE(2699, 1207) SOURCE(2699, 1207) widget←v4204 = 0; SOURCE(2912, 124) cRef←v5208 = XR←NewObject(28, (* (( (ptr) gf←c19888)+13) )); (* (ptr) cRef←v5208 ) = XR←CheckProc(* (( (ptr) formal←c082)+11)/* hitProc←v4064 */ ); (* (( (ptr) cRef←v5208)+1) ) = (* (( (ptr) formal←c082)+17) ); (* (( (ptr) cRef←v5208)+2) ) = (* (( (ptr) formal←c082)+12)/* registerData←v4092 */ ); (* (( (ptr) cRef←v5208)+3) ) = (* (( (ptr) formal←c082)+9)/* choices←v4008 */ ); SOURCE(3038, 98) { word var←c19216; var←c19216 = (* (( (ptr) formal←c082)+10)/* horizontal←v4036 */ ); if ((var←c19216 == 1)) { class←v5236 = (* (( (ptr) gf←c19888)+9)/* choiceXClass←v2860 */ ); } else { if ((var←c19216 == 0)) { class←v5236 = (* (( (ptr) gf←c19888)+10)/* choiceYClass←v2888 */ ); } else { class←v5236 = ( XR←RaiseUnnamedError(), 0 ); }; }; }; SOURCE(3138, 20) if (((* (( (ptr) formal←c082)+9)/* choices←v4008 */ ) == 0)) { SOURCE(3158, 5) (void) XR←RaiseUnnamedError(); }; SOURCE(3165, 69) { word pd38; pd38 = (* (( (ptr) (* (( (ptr) gf←c19888)+68)/* var←c18768 */ ))+20) ); (* (ptr) formal←c082 ) = (word) ( *( (fPt) ((* (ptr) pd38 ))))((* (ptr) formal←c082 ), class←v5236, pd38); }; SOURCE(3236, 42) { word pd39; pd39 = (* (( (ptr) (* (( (ptr) gf←c19888)+72)/* var←c19088 */ ))+4) ); widget←v4204 = (word) ( *( (fPt) ((* (ptr) pd39 ))))((* (W9Pt) formal←c082/* widgetSpec←v3980 */ ), 0, 0, pd39); }; SOURCE(3280, 46) { word val←v17732; val←v17732 = cRef←v5208; { word idx40; word limit41; (* ((( (ptr) widget←v4204)+49)+( idx40 = (* (( (ptr) class←v5236)+4) ), limit41 = (* (( (ptr) widget←v4204)+48) ), BCK(idx40, limit41) )) ) = val←v17732; }; }; SOURCE(3328, 578) { register word c←v5292; c←v5292 = (* (( (ptr) formal←c082)+9)/* choices←v4008 */ ); lab←L100018: ; if ((c←v5292 != 0)) { } else { goto lab←L100015; }; { word child←v5336 = 0; SOURCE(3394, 35) (* (( (ptr) formal←c082)+17) ) = (* (( (ptr) cRef←v5208)+1) ); SOURCE(3431, 393) if (((* (( (ptr) c←v5292)+1) ) == 0)) { SOURCE(3461, 69) { word pd42; pd42 = (* (( (ptr) (* (( (ptr) gf←c19888)+70)/* var←c18896 */ ))+4) ); child←v5336 = (word) ( *( (fPt) ((* (ptr) pd42 ))))((* (W9Pt) (( (ptr) gf←c19888)+45)/* var←c18512 */ ), (* (ptr) c←v5292 ), (* (W4Pt) ( ( (ptr) formal←c082)+14)/* style←v4148 */ ), pd42); }; } else { SOURCE(3533, 50) if (((* (( (ptr) cRef←v5208)+5) ) == 0)) { SOURCE(3560, 23) (* (( (ptr) formal←c082)+17) ) = (* (( (ptr) gf←c19888)+20) ); }; SOURCE(3586, 152) { W19 var←c090; (* (W9Pt) (word) &var←c090 ) = (* (W9Pt) (( (ptr) gf←c19888)+54)/* var←c18576 */ ); (* (( (ptr) (word) &var←c090) + 9) ) = (* (ptr) c←v5292 ); (* (W4Pt) (( (ptr) (word) &var←c090) + 10) ) = (* (W4Pt) (( (ptr) formal←c082)+14)/* style←v4148 */ ); (* (( (ptr) (word) &var←c090) + 14) ) = (word) (( (bPt) gf←c19888)+164)/* var←c18416 */ ; (* (( (ptr) (word) &var←c090) + 15) ) = cRef←v5208; (* (( (ptr) (word) &var←c090) + 16) ) = (* (( (ptr) c←v5292)+1) ); (* (( (ptr) (word) &var←c090) + 17) ) = (* (( (ptr) formal←c082)+13)/* tq←v4120 */ ); (* (( (ptr) (word) &var←c090) + 18) ) = 0; { word pd43; pd43 = (* (( (ptr) (* (( (ptr) gf←c19888)+69)/* var←c18864 */ ))+4) ); child←v5336 = (word) ( *( (fPt) ((* (ptr) pd43 ))))((word) (&var←c090), pd43); }; }; SOURCE(3740, 84) if (((* (( (ptr) cRef←v5208)+5) ) == 0)) { SOURCE(3768, 21) (* (( (ptr) cRef←v5208)+5) ) = child←v5336; SOURCE(3791, 33) (* (( (ptr) cRef←v5208)+6) ) = (* (( (ptr) c←v5292)+1) ); }; }; SOURCE(3830, 34) { word pd44; pd44 = (* (( (ptr) (* (( (ptr) gf←c19888)+71)/* var←c18992 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd44 ))))(child←v5336, (* (( (ptr) gf←c19888)+8)/* myKey←v2832 */ ), c←v5292, pd44); }; SOURCE(3866, 40) { word pd45; pd45 = (* (( (ptr) (* (( (ptr) gf←c19888)+72)/* var←c19088 */ ))+8) ); (void) ( *( (fPt) ((* (ptr) pd45 ))))(widget←v4204, child←v5336, 0, 1, pd45); }; }; c←v5292 = (* (( (ptr) c←v5292)+2) ); goto lab←L100018; lab←L100015: ; }; SOURCE(2699, 1207) return(widget←v4204); } static void ToggleHitProc←P420(widget←v11720, registerData←v11748, callData←v11776, event←v11804) word widget←v11720; word registerData←v11748; word callData←v11776; word event←v11804; { register ptr gf←c19920 = (ptr) &globalframe; word cRef←v5380; word curr←v5408; W2 ce←v5436; /* ToggleHitProc: */ SOURCE(3940, 411) SOURCE(3980, 37) cRef←v5380 = XR←Narrow(registerData←v11748, (* (( (ptr) gf←c19920)+13) )); SOURCE(4019, 31) curr←v5408 = (* (( (ptr) cRef←v5380)+4) ); SOURCE(4052, 17) ce←v5436.f0 = 0; ce←v5436.f1 = 0; SOURCE(4071, 93) if ((curr←v5408 == 0) || ((* (( (ptr) curr←v5408)+2) ) == 0)) { SOURCE(4106, 34) (* (( (ptr) cRef←v5380)+4) ) = (* (( (ptr) cRef←v5380)+3) ); } else { SOURCE(4140, 24) (* (( (ptr) cRef←v5380)+4) ) = (* (( (ptr) curr←v5408)+2) ); }; SOURCE(4166, 23) ce←v5436 = (* (W2Pt) (* (( (ptr) cRef←v5380)+4) ) ); SOURCE(4191, 34) { word pd46; pd46 = (* (( (ptr) (* (( (ptr) gf←c19920)+70)/* var←c18896 */ ))+7) ); (void) ( *( (fPt) ((* (ptr) pd46 ))))(widget←v11720, ce←v5436.f0, 2, pd46); }; SOURCE(4227, 124) if (((* (ptr) cRef←v5380 ) != 0)) { SOURCE(4253, 98) { word pd47; pd47 = (* (ptr) cRef←v5380 ); (void) ( *( (fPt) ((* (ptr) pd47 ))))(widget←v11720, (* (( (ptr) cRef←v5380)+2) ), ce←v5436.f1, event←v11804, pd47); }; }; } static word CreateToggle←P480(formal←c0104) word formal←c0104; { register ptr gf←c19952 = (ptr) &globalframe; word widget←v4460; word cRef←v5492; /* CreateToggle: */ SOURCE(4358, 595) SOURCE(4358, 595) widget←v4460 = 0; SOURCE(4545, 111) cRef←v5492 = XR←NewObject(28, (* (( (ptr) gf←c19952)+13) )); (* (ptr) cRef←v5492 ) = XR←CheckProc(* (( (ptr) formal←c0104)+10)/* hitProc←v4320 */ ); (* (( (ptr) cRef←v5492)+2) ) = (* (( (ptr) formal←c0104)+11)/* registerData←v4348 */ ); (* (( (ptr) cRef←v5492)+3) ) = (* (( (ptr) formal←c0104)+9)/* choices←v4292 */ ); (* (( (ptr) cRef←v5492)+4) ) = (* (( (ptr) formal←c0104)+9)/* choices←v4292 */ ); SOURCE(4658, 20) if (((* (( (ptr) formal←c0104)+9)/* choices←v4292 */ ) == 0)) { SOURCE(4678, 5) (void) XR←RaiseUnnamedError(); }; SOURCE(4685, 75) { word pd48; pd48 = (* (( (ptr) (* (( (ptr) gf←c19952)+68)/* var←c18768 */ ))+20) ); (* (ptr) formal←c0104 ) = (word) ( *( (fPt) ((* (ptr) pd48 ))))((* (ptr) formal←c0104 ), (* (( (ptr) gf←c19952)+11)/* toggleClass←v2916 */ ), pd48) ; }; SOURCE(4762, 137) { W19 var←c0107; (* (W9Pt) (word) &var←c0107 ) = (* (W9Pt) formal←c0104/* widgetSpec←v4264 */ ); (* (( (ptr) (word) &var←c0107) + 9) ) = (* (ptr) (* (( (ptr) formal←c0104)+9)/* choices←v4292 */ ) ); (* (W4Pt) (( (ptr) (word) &var←c0107) + 10) ) = (* (W4Pt) (( (ptr) gf←c19952)+63)/* var←c18640 */ ); (* (( (ptr) (word) &var←c0107) + 14) ) = (word) (( (bPt) gf←c19952)+116)/* var←c18224 */ ; (* (( (ptr) (word) &var←c0107) + 15) ) = cRef←v5492; (* (( (ptr) (word) &var←c0107) + 16) ) = 0; (* (( (ptr) (word) &var←c0107) + 17) ) = (* (( (ptr) formal←c0104)+12)/* tq←v4376 */ ); (* (( (ptr) (word) &var←c0107) + 18) ) = 0; { word pd49; pd49 = (* (( (ptr) (* (( (ptr) gf←c19952)+69)/* var←c18864 */ ))+4) ); widget←v4460 = (word) ( *( (fPt) ((* (ptr) pd49 ))))((word) (&var←c0107), pd49); }; }; SOURCE(4901, 52) { word superClass←v17656; word val←v17684; superClass←v17656 = (* (( (ptr) gf←c19952)+11)/* toggleClass←v2916 */ ); val←v17684 = cRef←v5492; { word idx50; word limit51; (* ((( (ptr) widget←v4460)+49)+( idx50 = (* (( (ptr) superClass←v17656)+4) ), limit51 = (* (( (ptr) widget←v4460)+48) ), BCK(idx50, limit51) )) ) = val←v17684; }; }; SOURCE(4358, 595) return(widget←v4460); } static word GetCRef←P540(w←v4520) word w←v4520; { register ptr gf←c19984 = (ptr) &globalframe; word cRef←v4564; /* GetCRef: */ SOURCE(4959, 286) SOURCE(4959, 286) cRef←v4564 = 0; SOURCE(5014, 231) { word var←c19312; var←c19312 = (* (( (ptr) w←v4520)+4) ); if ((var←c19312 == (* (( (ptr) gf←c19984)+9)/* choiceXClass←v2860 */ ))) { SOURCE(5052, 53) { word var←c0138; { word var←c19376; word superClass←v17876; superClass←v17876 = (* (( (ptr) gf←c19984)+9)/* choiceXClass←v2860 */ ); { word idx53; word limit54; var←c19376 = (* ((( (ptr) w←v4520)+49)+( idx53 = (* (( (ptr) superClass←v17876)+4) ), limit54 = (* (( (ptr) w←v4520)+48) ), BCK(idx53, limit54) )) ); }; var←c0138 = XR←Narrow(var←c19376, (* (( (ptr) gf←c19984)+13) )); }; return(var←c0138); }; }; if ((var←c19312 == (* (( (ptr) gf←c19984)+10)/* choiceYClass←v2888 */ ))) { SOURCE(5123, 53) { word var←c0139; { word var←c19440; word superClass←v17828; superClass←v17828 = (* (( (ptr) gf←c19984)+10)/* choiceYClass←v2888 */ ); { word idx55; word limit56; var←c19440 = (* ((( (ptr) w←v4520)+49)+( idx55 = (* (( (ptr) superClass←v17828)+4) ), limit56 = (* (( (ptr) w←v4520)+48) ), BCK(idx55, limit56) )) ); }; var←c0139 = XR←Narrow(var←c19440, (* (( (ptr) gf←c19984)+13) )); }; return(var←c0139); }; }; if ((var←c19312 == (* (( (ptr) gf←c19984)+11)/* toggleClass←v2916 */ ))) { SOURCE(5193, 52) { word var←c0140; { word var←c19504; word superClass←v17780; superClass←v17780 = (* (( (ptr) gf←c19984)+11)/* toggleClass←v2916 */ ); { word idx57; word limit58; var←c19504 = (* ((( (ptr) w←v4520)+49)+( idx57 = (* (( (ptr) superClass←v17780)+4) ), limit58 = (* (( (ptr) w←v4520)+48) ), BCK(idx57, limit58) )) ); }; var←c0140 = XR←Narrow(var←c19504, (* (( (ptr) gf←c19984)+13) )); }; return(var←c0140); }; }; SOURCE(5258, 5) (void) XR←RaiseUnnamedError(); goto endif052; endif052: ; }; } static word CurrentChoice←P600(widget←v4636) word widget←v4636; { word var←c4680; word cRef←v5548; /* CurrentChoice: */ SOURCE(5269, 122) SOURCE(5335, 32) cRef←v5548 = (word) GetCRef←P540(widget←v4636); SOURCE(5369, 22) return((* (( (ptr) cRef←v5548)+6) )); } static word IsChoice←P660(w←v4752) word w←v4752; { register ptr gf←c20016 = (ptr) &globalframe; word var←c4796; /* IsChoice: */ SOURCE(5397, 170) SOURCE(5454, 28) if ((w←v4752 == 0)) { SOURCE(5468, 14) return(0); }; SOURCE(5484, 83) { word tc59; if (((* (( (ptr) w←v4752)+4) ) == (* (( (ptr) gf←c20016)+9)/* choiceXClass←v2860 */ )) || ((* (( (ptr) w←v4752)+4) ) == (* ( ( (ptr) gf←c20016)+10)/* choiceYClass←v2888 */ ))) { tc59 = (word) 1; } else { tc59 = (word) ((* (( (ptr) w←v4752)+4) ) == (* (( (ptr) gf←c20016)+11)/* toggleClass←v2916 */ )); }; return(tc59); }; } /* file: XTkChoiceWidgetsImpl, module: XTkChoiceWidgetsImpl, compiled at: October 1, 1992 9:47:34 pm PDT */ extern void XR←install←XTkChoiceWidgetsImpl() { NoName←Q1644(); } extern void XR←run←XTkChoiceWidgetsImpl() { XR←Start(&globalframe); }