XEROX BICLOCK 2 4 1 BICLOCK 1 4 By: Bernt Nilsson (Bernt Nilsson:Ida:LiTH or BKN%LiUIDA.UUCP@Seismo.ARPA) mps_p߼~߸=8y^u߸s}߸=߸߸߸pp<>}|x<{?{>{{{x{|x|~π||π>|??_?>8x<?8<x~|?>C8xa?>px||~wsy8x8<<88>88À8888{8<?>??pppppw>wpp=?p;p;'p?=;?:9;;""""'@""""#@ """"#""##<"".#x8""/>#p<΋<;y?""##"""z#""""#""""#<x""""#<""""#y"""#""#ȋ?ȋ <"## <""#     """"# """"#  Lj  """"# """"# q x""""# 8"""z# # < ?8 ""'# ""##  """"# """"#!#!"""".þ""""">#@!@!"""";""""?p p| p8""""# p""""# w B A""""# A""""# @ @ @@""""# @@""""# ?""""#""""#""""""""""""" """"""""""""" INTRODUCTION BICLOCK, a realtime screen clock, with hour, minute and second hands. It behaves as a kind of icon, in that it is partly transparent. The snapshot to the right above shows that the greater part of the window's area is transparent, in this case the gray background and part of the PSW window show through. The clock-image may be either black or white, and the shadow around the image-parts the opposite color: The reason for having a shadow is to make the clock easier to read. Markers and/or digits may be chosen. Seconds The seconds hand is optional. When on, the clock process consumes a lot of time, but because (1) it blocks very frequently and (2) shuts itself off temporarily, if the "load" is higher than usual, that does not seem to irritate at all. The "load" is measured by the continuous average of time spent in block, i.e. each round robin. A "usual load" is computed by a second level of average over the "load" value. The "usual load" is limited by upper and lower "reasonable" constants. If "load" is more than 10% above "usual load" then the seconds hand is shut off. This is a rather heuristic method, but works reasonably well. When the seconds hand is shut off, the image is updated approximately once per minute. WINDOW COMANDS Most window commands are applicable. The clock will preserve its "square" form when shaped. More details of the hour/minute markers/digits will appear only when the window is large enough, less if the window is smaller. The digits' fonts are chosen among fonts already "in core". Left button Left buttoning the window will print the current date (and alarmtime) in the promptwindow. Holding down left shift key while buttoning the window will copyselect current date, by BKSYSBUF. Middle button, Alarm There is a simple alarmclock facility built into the clock. That and some other options may be accessed by middlebuttoning the window and selecting the appropriate command from the menu that pops up. Choosing the command "Set Alarm" will change the clock into showing current alarmtime and attach an adjust menu below the clockwindow. If no alarm time is known, current daytime plus 1 minute is used as default. Any change to the alarmtime is shown both by the clock and printed in the promptwindow. Buttoning "OK!" in the attached menu exits the adjust mode. When the alarmtime is reached, you will be aware of that fact... to shut the alarm off, use the "Alarm Off" in the popup menu. FUNCTIONALITY One clockwindow is usually created automatically when the file is loaded. More clockwindows may be created by the following function call: (BICLOCK props) [Function] Creates a new window. Value is the new window. The call may be done either with a free property list as first arg or spread. See properties below. The different properties are also controlled by the variables below. It is allowed to have more than one clock running, but see "bugs" below. When the BICLOCK file is loaded, the following variables are initialized, some through INITVARS, so that you can set them before loading the file: BICLOCKUSERPROPS [Variable] Change this to customize the overall behavior of the clock. Value must be a free property list. Defaults to NIL. BICLOCKDEFAULTPROPS [Variable] These are the default properties, don't modify this, modify BICLOCKUSERPROPS above. Properties are searched for in the following order. 1. those specified in the function call. 2. those specified by the BICLOCKUSERPROPS variable. 3. those specified by the BICLOCKDEFAULTPROPS variable. BICLOCKINITIALPROPS [Variable] Modify this if you like some specific property for the initial clock. BICLOCK is called with these properties when the file is loaded, defaults to NIL. If you want no initial clock, set it to (CREATE NIL). BICLOCKWINDOW [Variable] The window of the clock that is created when the file is loaded. BICLOCKIDLEPROPS [Variable] (IDLE.BICLOCK) [Function] BICLOCK is called with BICLOCKIDLEPROPS from the Idle function IDLE.BICLOCK, defaults to start bouncing at center of screen. Properties Recognized properties and allowed values are: SECONDS T (default), if seconds hand shall be used, or NIL, if no seconds COLOR interior color, one of WHITE (default) or BLACK MARKS NIL (default), if no marks should be used, or one of HOURS, HOUR&MINUTE, 3/6/9/12 or a modulo number DIGITS NIL, if no digits, or one of HOUR (default), 3/6/9/12 or a modulo number DIGITFORMAT one of ARABIC or ROMAN CHIME NIL (default), no chime,or one of HOUR, QUARTER or a modulo number ALARM NIL (default), no alarm, or a the standard string representation of a date SIZE a number describing both width and height of the clock window, defaults to 119 HORIZONTAL generic place on screen, one of LEFT, CENTER, RIGHT (default), or a number to specify left border of window VERTICAL generic place on screen, one of BOTTOM, CENTER, TOP (default), or a number to specify bottom border of window REGION if nonNIL, a region, overides SIZE, HORIZONTAL and VERTICAL for clockwindow WINDOW if nonNIL, a window, overides REGION, SIZE, HORIZONTAL and VERTICAL CREATE T (default), create a clock, or NIL, do not create, probably only useful if you want no initial clock... The nonformal meaning of the Modulo numbers mentioned above are: "1" means: on each possible place. "2" means: on even places and so on... KNOWN BUGS: 1. If the window is reshaped when in "set alarm" mode, the whole window group will be square. 2. Running more than one clock concurrently with seconds hand on, may behave a bit round robin because the load sensor is local for each clock and "senses" the other clocks. 3. Overlapping two clock windows creates a funny image in the intersecting area. (LIST ((PAGE NIL (PAPERSIZE LETTER STARTINGPAGE# 21) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) 8ll225,,,8,8H PAGEHEADING RUNNINGHEAD?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) MODERN MODERN MODERN MODERNMODERN LOGO   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN K, BMOBJ.GETFN3MODERN " BMOBJ.GETFN3?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8))      "rT4*69A} .J6kP#JQTyySKp ^Q"z