; Copyright (C) 1992, Digital Equipment Corporation ; All rights reserved. ; See the file COPYRIGHT for a full description. ; ; Last modified on Thu Mar 28 17:28:49 PST 1996 by heydon ; Macros for particular shape constraints ; (Macro Width2 BOA (w) `(Width ,w + Inf - ,w)) (Macro Height2 BOA (h) `(Height ,h + Inf - ,h)) (Macro FixedHeight BOA (ch) `(Shape (Height + 0 - 0) ,ch)) (Macro FixedWidth BOA (ch) `(Shape (Width + 0 - 0) ,ch)) (Macro FixedSize BOA (ch) `(Shape (Height + 0 - 0) (Width + 0 - 0) ,ch)) ; Shape macros for particular generics ; (Macro Drawing BOA (ch) `(Shape (Width2 350) (Height2 0) ,ch)) (Macro Sources BOA (ch) `(Shape (Width2 350) ,ch)) (Macro Module BOA (ch) `(Shape (Height2 295) ,ch)) (Macro CCmd BOA (ch) `(Shape (Height2 295) ,ch)) ; Macros for the various "File" menu pop-ups (Macro BrowserAt BOA () '(At 71 20 NW Absolute)) (Macro BrowserShape BOA (ch) `(Shape (Height2 300) (Width2 200) ,ch)) ; MyBar, MyRidge, Space == misc spaces of fixed width ; (Macro MyBar () '(Bar 1)) (Macro MyRidge () '(Bar 1)) (Macro Space () '(Glue 3)) (Macro SmallSpace () '(Glue 1)) ; HTile2(ch1,ch2) == like (HTile ch1 ch2), only puts (MyBar) on either side of ; the bar separating the children ; (Macro HTile2 BOA (ch1 ch2) `(HTile (HBox ,ch1 (MyBar)) (HBox (MyBar) ,ch2))) (Macro VTile2 BOA (ch1 ch2) `(VTile (VBox ,ch1 (MyBar)) (VBox (MyBar) ,ch2))) ; ButtonLabel(lbl) == "lbl" with space on either side ; (Macro ButtonLabel BOA (lbl) `(HBox (SmallSpace) ,lbl (SmallSpace))) ; MenuLabel(lbl) == "lbl" followed by "MenuArrow" ; (Macro MenuLabel BOA (lbl) `(ButtonLabel (HBox ,lbl (SmallSpace) (FixedWidth (Pixmap "MenuArrow.pbm")) (Space)))) ; TextL == left-aligned text ; (Macro TextL BOA (txt) `(Text LeftAlign ,txt)) ; MyLabelFont == set particular LabelFont ; (Macro MyLabelFont () '(LabelFont (Family "Helvetica") (WeightName "bold") (Slant "r") (PointSize 100))) ; MyBrowserFont == set font for file browser windows ; (Macro MyBrowserFont () '(Font (Family "Helvetica") (WeightName "bold") (Slant "r") (Width "normal") (PointSize 100))) (Macro MyBrowserLabelFont () '(LabelFont (Family "Helvetica") (WeightName "bold") (Slant "r") (PointSize 100))) ; ZChassis look-alikes with named "Cancel" buttons ; (Macro If BOA (bool x y) (IF bool x y)) (Macro MyZChassis ((At (0.5 0.5)) (CancelBox TRUE) (CancelName "") (GrowBox TRUE) Name Title Child) `(ZChild %,Name (At ,@At) (MyBrowserLabelFont) (Border (VBox (HBox (If ,CancelBox (CloseButton %,CancelName (Rim (Pen 2) (Pixmap "UpArrow.pbm"))) (Glue 0) ) (Bar) (Shape (Width + Inf) (ZMove ,Title)) (Bar) (If ,GrowBox (ZGrow (Rim (Pen 2) (Pixmap "Grow.pbm"))) (Glue 0) ) ) (Bar) (Frame ,Child) ) ) ) )