17b753b61SAndrzej Bialecki\ Words implementing frame drawing 27b753b61SAndrzej Bialecki\ XXX Filled boxes are left as an exercise for the reader... ;-/ 37b753b61SAndrzej Bialecki\ $Id$ 47b753b61SAndrzej Bialecki 57b753b61SAndrzej Bialeckimarker task-frames.4th 67b753b61SAndrzej Bialecki 77b753b61SAndrzej Bialeckivariable h_el 87b753b61SAndrzej Bialeckivariable v_el 97b753b61SAndrzej Bialeckivariable lt_el 107b753b61SAndrzej Bialeckivariable lb_el 117b753b61SAndrzej Bialeckivariable rt_el 127b753b61SAndrzej Bialeckivariable rb_el 137b753b61SAndrzej Bialeckivariable fill 147b753b61SAndrzej Bialecki 157b753b61SAndrzej Bialecki\ Single frames 167b753b61SAndrzej Bialecki196 constant sh_el 177b753b61SAndrzej Bialecki179 constant sv_el 187b753b61SAndrzej Bialecki218 constant slt_el 197b753b61SAndrzej Bialecki192 constant slb_el 207b753b61SAndrzej Bialecki191 constant srt_el 217b753b61SAndrzej Bialecki217 constant srb_el 227b753b61SAndrzej Bialecki\ Double frames 237b753b61SAndrzej Bialecki205 constant dh_el 247b753b61SAndrzej Bialecki186 constant dv_el 257b753b61SAndrzej Bialecki201 constant dlt_el 267b753b61SAndrzej Bialecki200 constant dlb_el 277b753b61SAndrzej Bialecki187 constant drt_el 287b753b61SAndrzej Bialecki188 constant drb_el 297b753b61SAndrzej Bialecki\ Fillings 307b753b61SAndrzej Bialecki0 constant fill_none 317b753b61SAndrzej Bialecki32 constant fill_blank 327b753b61SAndrzej Bialecki176 constant fill_dark 337b753b61SAndrzej Bialecki177 constant fill_med 347b753b61SAndrzej Bialecki178 constant fill_bright 357b753b61SAndrzej Bialecki 367b753b61SAndrzej Bialecki 377b753b61SAndrzej Bialecki: hline ( len x y -- ) \ Draw horizontal single line 387b753b61SAndrzej Bialecki at-xy \ move cursor 397b753b61SAndrzej Bialecki 0 do 407b753b61SAndrzej Bialecki h_el @ emit 417b753b61SAndrzej Bialecki loop 427b753b61SAndrzej Bialecki; 437b753b61SAndrzej Bialecki 447b753b61SAndrzej Bialecki: f_single ( -- ) \ set frames to single 457b753b61SAndrzej Bialecki sh_el h_el ! 467b753b61SAndrzej Bialecki sv_el v_el ! 477b753b61SAndrzej Bialecki slt_el lt_el ! 487b753b61SAndrzej Bialecki slb_el lb_el ! 497b753b61SAndrzej Bialecki srt_el rt_el ! 507b753b61SAndrzej Bialecki srb_el rb_el ! 517b753b61SAndrzej Bialecki; 527b753b61SAndrzej Bialecki 537b753b61SAndrzej Bialecki: f_double ( -- ) \ set frames to double 547b753b61SAndrzej Bialecki dh_el h_el ! 557b753b61SAndrzej Bialecki dv_el v_el ! 567b753b61SAndrzej Bialecki dlt_el lt_el ! 577b753b61SAndrzej Bialecki dlb_el lb_el ! 587b753b61SAndrzej Bialecki drt_el rt_el ! 597b753b61SAndrzej Bialecki drb_el rb_el ! 607b753b61SAndrzej Bialecki; 617b753b61SAndrzej Bialecki 627b753b61SAndrzej Bialecki: vline ( len x y -- ) \ Draw vertical single line 637b753b61SAndrzej Bialecki 2dup 4 pick 647b753b61SAndrzej Bialecki 0 do 657b753b61SAndrzej Bialecki at-xy 667b753b61SAndrzej Bialecki v_el @ emit 677b753b61SAndrzej Bialecki 1+ 687b753b61SAndrzej Bialecki 2dup 697b753b61SAndrzej Bialecki loop 707b753b61SAndrzej Bialecki 2drop 2drop drop 717b753b61SAndrzej Bialecki; 727b753b61SAndrzej Bialecki 737b753b61SAndrzej Bialecki: box ( w h x y -- ) \ Draw a box 747b753b61SAndrzej Bialecki 2dup 1+ 4 pick 1- -rot 757b753b61SAndrzej Bialecki vline \ Draw left vert line 767b753b61SAndrzej Bialecki 2dup 1+ swap 5 pick + swap 4 pick 1- -rot 777b753b61SAndrzej Bialecki vline \ Draw right vert line 787b753b61SAndrzej Bialecki 2dup swap 1+ swap 5 pick 1- -rot 797b753b61SAndrzej Bialecki hline \ Draw top horiz line 807b753b61SAndrzej Bialecki 2dup swap 1+ swap 4 pick + 5 pick 1- -rot 817b753b61SAndrzej Bialecki hline \ Draw bottom horiz line 827b753b61SAndrzej Bialecki 2dup at-xy lt_el @ emit \ Draw left-top corner 837b753b61SAndrzej Bialecki 2dup 4 pick + at-xy lb_el @ emit \ Draw left bottom corner 847b753b61SAndrzej Bialecki 2dup swap 5 pick + swap at-xy rt_el @ emit \ Draw right top corner 857b753b61SAndrzej Bialecki 2 pick + swap 3 pick + swap at-xy rb_el @ emit 867b753b61SAndrzej Bialecki 2drop 877b753b61SAndrzej Bialecki; 887b753b61SAndrzej Bialecki 897b753b61SAndrzej Bialeckif_single 907b753b61SAndrzej Bialeckifill_none fill ! 91