home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / KAPA2.ZIP / EXAMPLES.ZIP / CARINFO.KAL < prev    next >
Encoding:
Text File  |  1990-07-26  |  9.9 KB  |  319 lines

  1.  
  2.  
  3.  
  4. /*********************************************************/
  5. /**         ALL FUNCTIONS ARE SAVED BELOW             **/
  6. /*********************************************************/
  7.  
  8.        /*************************************
  9.         ****  FUNCTION: ExitKappaAndToolBook
  10.         *************************************/
  11. MakeFunction( ExitKappaAndToolBook, [],
  12.     {
  13.     RemoteExecute( "send exit to  this page", toolbook, carinfo.tbk );
  14.     Exit(  );
  15.     } );
  16.  
  17.        /*************************************
  18.         ****  FUNCTION: Process
  19.         *************************************/
  20. MakeFunction( Process, [bName],
  21.     {
  22.     If KnownValue?( Global:PrevArrow )
  23.       Then RemoteExecute( FormatValue( "hide irregularPolygon \"%s\"",
  24.                                        Global:PrevArrow ), toolbook,
  25.                           carinfo.tbk );
  26.     RemoteExecute( FormatValue( "show irregularPolygon \"%s\"", bName:Title ),
  27.                    toolbook, carinfo.tbk );
  28.     Global:PrevArrow = bName:Title;
  29.     } );
  30.  
  31.        /*************************************
  32.         ****  FUNCTION: Start
  33.         *************************************/
  34. MakeFunction( Start, [],
  35.     {
  36.     IconifyWindow( KAPPA );
  37.     HideWindow( BROWSER );
  38.     HideWindow( KTOOLS );
  39.     SetWindowTitle( SESSION, "Part Selection" );
  40.     SetWindowTitle( KAPPA, "KAPPA - Car Information with ToolBook" );
  41.     SetWindowBackground( SESSION, 100, 50, 50 );
  42.     CatchError( RemoteExecute( "set syscursor to 4", toolbook, carinfo.tbk ),
  43.                 Execute( "toolbook.exe carinfo.tbk" ) );
  44.     RemoteExecute( "set syscursor to default", toolbook, carinfo.tbk );
  45.     RemoteExecute( FormatValue( "hide irregularPolygon \"Windshield\"" ),
  46.                    toolbook, carinfo.tbk );
  47.     RemoteExecute( FormatValue( "hide irregularPolygon \"Head Lights\"" ),
  48.                    toolbook, carinfo.tbk );
  49.     RemoteExecute( FormatValue( "hide irregularPolygon \"Bumper\"" ),
  50.                    toolbook, carinfo.tbk );
  51.     RemoteExecute( FormatValue( "hide irregularPolygon \"Front Hood\"" ),
  52.                    toolbook, carinfo.tbk );
  53.     RemoteExecute( FormatValue( "hide irregularPolygon \"Side Vents\"" ),
  54.                    toolbook, carinfo.tbk );
  55.     RemoteExecute( FormatValue( "hide irregularPolygon \"Front Wheel\"" ),
  56.                    toolbook, carinfo.tbk );
  57.     RemoteExecute( FormatValue( "hide irregularPolygon \"Rear Wheel\"" ),
  58.                    toolbook, carinfo.tbk );
  59.     RemoveWindowMenu( SESSION );
  60.     ShowWindow( SESSION );
  61.     PositionWindow( SESSION, 480, 0, 160, 380 );
  62.     } );
  63.  
  64.  
  65.  
  66. /*********************************************************/
  67. /**         ALL CLASSES ARE SAVED BELOW             **/
  68. /*********************************************************/
  69.  
  70.        /*************************************
  71.         ****  CLASS: Image
  72.         *************************************/
  73. Image:Width = 150;
  74. Image:Height = 120;
  75. Image:WinType = Make_ImageWindow;
  76. Image:Visible = FALSE;
  77. Image:ShowBorder = TRUE;
  78. Image:Transparent = FALSE;
  79.  
  80.        /*************************************
  81.         ****  CLASS: SlotView
  82.         *************************************/
  83.  
  84.        /*************************************
  85.         ****  CLASS: OutputView
  86.         *************************************/
  87.  
  88.        /*************************************
  89.         ****  CLASS: Meter
  90.         *************************************/
  91. Meter:Draw = Draw_HMeter;
  92. Meter:Update = Update_HMeter;
  93.  
  94.        /*************************************
  95.         ****  CLASS: StateBox
  96.         *************************************/
  97. SetSlotOption( StateBox:AllowableValues, MULTIPLE );
  98. StateBox:Draw = Draw_RectLight;
  99. StateBox:Update = Update_RectLight;
  100.  
  101.        /*************************************
  102.         ****  CLASS: InputOutputView
  103.         *************************************/
  104.  
  105.        /*************************************
  106.         ****  CLASS: Slider
  107.         *************************************/
  108. Slider:Width = 200;
  109. Slider:Height = 75;
  110. Slider:WinType = Make_SliderWindow;
  111. Slider:Draw = Draw_Slider;
  112. Slider:Update = Update_Slider;
  113.  
  114.        /*************************************
  115.         ****  CLASS: Edit
  116.         *************************************/
  117. Edit:ShowBorder = FALSE;
  118. Edit:Width = 100;
  119. Edit:Height = 25;
  120. Edit:WinType = Make_EditWindow;
  121. Edit:Update = Update_Edit;
  122.  
  123.        /*************************************
  124.         ****  CLASS: Transcript
  125.         *************************************/
  126. Transcript:ProportionalFont = TRUE;
  127. Transcript:WinType = Make_TransWindow;
  128.  
  129.        /*************************************
  130.         ****  CLASS: Button
  131.         *************************************/
  132. Button:ShowBorder = FALSE;
  133. Button:Width = 100;
  134. Button:Height = 25;
  135. Button:WinType = Make_ButtonWindow;
  136. Button:Draw = Draw_Bitmap;
  137.  
  138.        /*************************************
  139.         ****  CLASS: Bitmap
  140.         *************************************/
  141. Bitmap:FitToScreen = FALSE;
  142. Bitmap:Draw = Draw_Bitmap;
  143.  
  144.        /*************************************
  145.         ****  CLASS: Drawing
  146.         *************************************/
  147. Drawing:XLeft = 0;
  148. Drawing:YTop = 0;
  149. Drawing:XRight = 100;
  150. Drawing:YBottom = 100;
  151. Drawing:Draw = Draw_Drawing;
  152. Drawing:Print = Print_Drawing;
  153.  
  154.        /*************************************
  155.         ****  CLASS: Text
  156.         *************************************/
  157. Text:Justification = CENTER;
  158. Text:ShowBorder = FALSE;
  159. Text:Width = 100;
  160. Text:Height = 25;
  161. Text:WinType = Make_StaticWindow;
  162.  
  163.        /*************************************
  164.         ****  CLASS: LinePlot
  165.         *************************************/
  166. LinePlot:AutoScale = FALSE;
  167. LinePlot:Grid = FALSE;
  168. LinePlot:Draw = Draw_LinePlot;
  169. LinePlot:Update = Update_LinePlot;
  170. LinePlot:Print = Print_LinePlot;
  171.  
  172.  
  173.  
  174. /*********************************************************/
  175. /**         ALL INSTANCES ARE SAVED BELOW             **/
  176. /*********************************************************/
  177. MakeSlot( Global:PrevArrow );
  178. Global:PrevArrow = "Front Hood";
  179.  
  180.        /*************************************
  181.         ****  INSTANCE: Bumper
  182.         *************************************/
  183. MakeInstance( Bumper, Button );
  184. Bumper:X = 2;
  185. Bumper:Y = 2;
  186. Bumper:Title = Bumper;
  187. Bumper:Width = 150;
  188. Bumper:Height = 38;
  189. Bumper:Visible = TRUE;
  190. Bumper:RightAction = NULL;
  191. Bumper:Action = Process;
  192. Bumper:FileName = NULL;
  193. Bumper:ShowBorder = FALSE;
  194.  ResetImage (  Bumper  );  
  195.  
  196.        /*************************************
  197.         ****  INSTANCE: FrontHood
  198.         *************************************/
  199. MakeInstance( FrontHood, Button );
  200. FrontHood:X = 2;
  201. FrontHood:Y = 42;
  202. FrontHood:Title = "Front Hood";
  203. FrontHood:Width = 150;
  204. FrontHood:Height = 38;
  205. FrontHood:Visible = TRUE;
  206. FrontHood:RightAction = NULL;
  207. FrontHood:Action = Process;
  208. FrontHood:FileName = NULL;
  209. FrontHood:ShowBorder = FALSE;
  210.  ResetImage (  FrontHood  );  
  211.  
  212.        /*************************************
  213.         ****  INSTANCE: FrontWheel
  214.         *************************************/
  215. MakeInstance( FrontWheel, Button );
  216. FrontWheel:X = 2;
  217. FrontWheel:Y = 82;
  218. FrontWheel:Title = "Front Wheel";
  219. FrontWheel:Width = 150;
  220. FrontWheel:Height = 38;
  221. FrontWheel:Visible = TRUE;
  222. FrontWheel:RightAction = NULL;
  223. FrontWheel:Action = Process;
  224. FrontWheel:FileName = NULL;
  225. FrontWheel:ShowBorder = FALSE;
  226.  ResetImage (  FrontWheel  );  
  227.  
  228.        /*************************************
  229.         ****  INSTANCE: HeadLights
  230.         *************************************/
  231. MakeInstance( HeadLights, Button );
  232. HeadLights:X = 2;
  233. HeadLights:Y = 122;
  234. HeadLights:Title = "Head Lights";
  235. HeadLights:Width = 150;
  236. HeadLights:Height = 38;
  237. HeadLights:Visible = TRUE;
  238. HeadLights:RightAction = NULL;
  239. HeadLights:Action = Process;
  240. HeadLights:FileName = NULL;
  241. HeadLights:ShowBorder = FALSE;
  242.  ResetImage (  HeadLights  );  
  243.  
  244.        /*************************************
  245.         ****  INSTANCE: RearWheel
  246.         *************************************/
  247. MakeInstance( RearWheel, Button );
  248. RearWheel:X = 2;
  249. RearWheel:Y = 162;
  250. RearWheel:Title = "Rear Wheel";
  251. RearWheel:Width = 150;
  252. RearWheel:Height = 38;
  253. RearWheel:Visible = TRUE;
  254. RearWheel:RightAction = NULL;
  255. RearWheel:Action = Process;
  256. RearWheel:FileName = NULL;
  257. RearWheel:ShowBorder = FALSE;
  258.  ResetImage (  RearWheel  );  
  259.  
  260.        /*************************************
  261.         ****  INSTANCE: SideVents
  262.         *************************************/
  263. MakeInstance( SideVents, Button );
  264. SideVents:X = 2;
  265. SideVents:Y = 202;
  266. SideVents:Title = "Side Vents";
  267. SideVents:Width = 150;
  268. SideVents:Height = 38;
  269. SideVents:Visible = TRUE;
  270. SideVents:RightAction = NULL;
  271. SideVents:Action = Process;
  272. SideVents:FileName = NULL;
  273. SideVents:ShowBorder = FALSE;
  274.  ResetImage (  SideVents  );  
  275.  
  276.        /*************************************
  277.         ****  INSTANCE: Windshield
  278.         *************************************/
  279. MakeInstance( Windshield, Button );
  280. Windshield:X = 2;
  281. Windshield:Y = 242;
  282. Windshield:Title = Windshield;
  283. Windshield:Width = 150;
  284. Windshield:Height = 38;
  285. Windshield:Visible = TRUE;
  286. Windshield:RightAction = NULL;
  287. Windshield:Action = Process;
  288. Windshield:FileName = NULL;
  289. Windshield:ShowBorder = FALSE;
  290.  ResetImage (  Windshield  );  
  291.  
  292.        /*************************************
  293.         ****  INSTANCE: Exit
  294.         *************************************/
  295. MakeInstance( Exit, Button );
  296. Exit:X = 2;
  297. Exit:Y = 302;
  298. Exit:Title = Exit;
  299. Exit:Width = 150;
  300. Exit:Height = 58;
  301. Exit:Visible = TRUE;
  302. Exit:RightAction = NULL;
  303. Exit:Action = ExitKappaAndToolBook;
  304. Exit:FileName = NULL;
  305. Exit:ShowBorder = FALSE;
  306.  ResetImage (  Exit  );  
  307.  
  308.  
  309.  
  310. /*********************************************************/
  311. /**         ALL RULES ARE SAVED BELOW             **/
  312. /*********************************************************/
  313.  
  314.  
  315.  
  316. /*********************************************************/
  317. /**         ALL GOALS ARE SAVED BELOW             **/
  318. /*********************************************************/
  319.