/usr/share/mozart/doc/demo/node30.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Predefined default values: Configure.oz</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node29.html#code.transportation.country"><< Prev</A></TD><TD><A href="transportation.html">- Up -</A></TD><TD><A href="node31.html#code.transportation.dialogs">Next >></A></TD></TR></TABLE><DIV class="unnumbered" id="code.transportation.configure"><H3><A name="code.transportation.configure">Predefined default values: <CODE>Configure.oz</CODE></A></H3><P class="margin"><A href="Transport/Configure.oz">Source File</A></P><P> </P><BLOCKQUOTE><PRE><SPAN class="keyword">functor</SPAN> <BR> <BR><SPAN class="keyword">require</SPAN> <BR> DemoUrls(image: ImageDir) <SPAN class="keyword">at</SPAN> <SPAN class="string">'../DemoUrls.ozf'</SPAN> <BR> <BR><SPAN class="keyword">import</SPAN> <BR> Tk<BR> TkTools<BR> <BR><SPAN class="keyword">export</SPAN> <BR> Images<BR> Capacity<BR> Delta<BR> delay: DelayMove<BR> Colors<BR> Title<BR> Fonts<BR> Goods<BR> <BR><SPAN class="keyword">prepare</SPAN> <BR> <BR> Title = <SPAN class="string">'Transportation'</SPAN> <BR> <BR> Capacity = 100 % <SPAN class="comment">Capacity of a truck<BR></SPAN> Delta = 5 % <SPAN class="comment">How many pixels per movement<BR></SPAN> DelayMove = 100 % <SPAN class="comment">Delay in milliseconds between each move<BR></SPAN> <BR> <BR> FullColors = colors(back: aquamarine<BR> street: black<BR> city: red<BR> truck: [red blue yellow green<BR> plum cyan tan bisque]<BR> frame: black<BR> window: steelblue<BR> good: brown<BR> textBg: wheat)<BR> <BR> BwColors = colors(back: white<BR> street: black<BR> city: black<BR> truck: [white]<BR> frame: black<BR> window: white<BR> good: black<BR> textBg: white)<BR> <BR> <SPAN class="keyword">fun</SPAN><SPAN class="variablename"> </SPAN>{<SPAN class="functionname">Namify</SPAN> B}<BR> ImageDir<SPAN class="keyword">#</SPAN><SPAN class="string">'transport/'</SPAN><SPAN class="keyword">#</SPAN>B<SPAN class="keyword">#</SPAN><SPAN class="string">'.xbm'</SPAN> <BR> <SPAN class="keyword">end</SPAN> <BR> <BR> %% <SPAN class="comment">Predefined goods<BR></SPAN> Goods = bananas <SPAN class="keyword">#</SPAN> cheese <SPAN class="keyword">#</SPAN> cream <SPAN class="keyword">#</SPAN> computers <SPAN class="keyword">#</SPAN> rye <SPAN class="keyword">#</SPAN> oil <SPAN class="keyword">#</SPAN> sugar <SPAN class="keyword">#</SPAN> salt <SPAN class="keyword">#</SPAN> <BR> vinegar <SPAN class="keyword">#</SPAN> apples <SPAN class="keyword">#</SPAN> whisky <SPAN class="keyword">#</SPAN> beer <SPAN class="keyword">#</SPAN> garbage <SPAN class="keyword">#</SPAN> ketchup <SPAN class="keyword">#</SPAN> coffee <SPAN class="keyword">#</SPAN> ham <SPAN class="keyword">#</SPAN> <BR> umbrellas <SPAN class="keyword">#</SPAN> paper <SPAN class="keyword">#</SPAN> books <SPAN class="keyword">#</SPAN> yoghurt <SPAN class="keyword">#</SPAN> engines <SPAN class="keyword">#</SPAN> oranges <SPAN class="keyword">#</SPAN> juice <SPAN class="keyword">#</SPAN> <BR> tea <SPAN class="keyword">#</SPAN> jam <SPAN class="keyword">#</SPAN> grease <SPAN class="keyword">#</SPAN> cigarettes <SPAN class="keyword">#</SPAN> toys <SPAN class="keyword">#</SPAN> corn <SPAN class="keyword">#</SPAN> hamburgers<BR> <BR> <BR><SPAN class="keyword">define</SPAN> <BR> <BR> %% <SPAN class="comment">Fonts<BR></SPAN> Fonts = fonts(text:<BR> {New Tk<SPAN class="keyword">.</SPAN>font tkInit(family:helvetica size:<SPAN class="keyword">~</SPAN>12)}<BR> about:<BR> {New Tk<SPAN class="keyword">.</SPAN>font tkInit(family:times size:<SPAN class="keyword">~</SPAN>24 weight:bold)})<BR> <BR> <BR> Colors = <SPAN class="keyword">if</SPAN> Tk<SPAN class="keyword">.</SPAN>isColor <SPAN class="keyword">then</SPAN> FullColors <SPAN class="keyword">else</SPAN> BwColors <SPAN class="keyword">end</SPAN> <BR> <BR> %% <SPAN class="comment">Where to find the bitmaps?<BR></SPAN> <SPAN class="keyword">local</SPAN> <BR> RI = {TkTools<SPAN class="keyword">.</SPAN>images {Map [down<BR> truck_frame_left truck_frame_right<BR> truck_win_left truck_win_right]<BR> Namify}}<BR> {RI<SPAN class="keyword">.</SPAN>truck_frame_left tk(configure foreground:Colors<SPAN class="keyword">.</SPAN>frame)}<BR> {RI<SPAN class="keyword">.</SPAN>truck_frame_right tk(configure foreground:Colors<SPAN class="keyword">.</SPAN>frame)}<BR> {RI<SPAN class="keyword">.</SPAN>truck_win_left tk(configure foreground:Colors<SPAN class="keyword">.</SPAN>window)}<BR> {RI<SPAN class="keyword">.</SPAN>truck_win_right tk(configure foreground:Colors<SPAN class="keyword">.</SPAN>window)}<BR> CI = {List<SPAN class="keyword">.</SPAN>toRecord c<BR> {Map Colors<SPAN class="keyword">.</SPAN>truck<BR> <SPAN class="keyword">fun</SPAN><SPAN class="variablename"> </SPAN>{<SPAN class="functionname">$</SPAN> C}<BR> I = {TkTools<SPAN class="keyword">.</SPAN>images {Map [truck_fill_right<BR> truck_fill_left] Namify}}<BR> <SPAN class="keyword">in</SPAN> <BR> {I<SPAN class="keyword">.</SPAN>truck_fill_left tk(configure foreground:C)}<BR> {I<SPAN class="keyword">.</SPAN>truck_fill_right tk(configure foreground:C)}<BR> C<SPAN class="keyword">#</SPAN>c(left: I<SPAN class="keyword">.</SPAN>truck_fill_left<BR> right: I<SPAN class="keyword">.</SPAN>truck_fill_right)<BR> <SPAN class="keyword">end</SPAN>}}<BR> <SPAN class="keyword">in</SPAN> <BR> Images = images(down: RI<SPAN class="keyword">.</SPAN>down<BR> truck: t(fill: CI<BR> frame: f(left: RI<SPAN class="keyword">.</SPAN>truck_frame_left<BR> right: RI<SPAN class="keyword">.</SPAN>truck_frame_right)<BR> win: w(left: RI<SPAN class="keyword">.</SPAN>truck_win_left<BR> right: RI<SPAN class="keyword">.</SPAN>truck_win_right)))<BR> <BR> <SPAN class="keyword">end</SPAN> <BR> <BR><SPAN class="keyword">end</SPAN> <BR> <BR></PRE></BLOCKQUOTE><P></P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node29.html#code.transportation.country"><< Prev</A></TD><TD><A href="transportation.html">- Up -</A></TD><TD><A href="node31.html#code.transportation.dialogs">Next >></A></TD></TR></TABLE><HR><ADDRESS><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|