FramedBox.st
changeset 24 966098a893f8
parent 7 15a9291b9bd0
child 25 975bead4571a
equal deleted inserted replaced
23:69f1ba57f67a 24:966098a893f8
    24 
    24 
    25 a frame around something. The frame may have a label, whose position
    25 a frame around something. The frame may have a label, whose position
    26 is controlled by the layout variable, aSymbol which may be one of:
    26 is controlled by the layout variable, aSymbol which may be one of:
    27 [#topCenter #topLeft #topRight #bottomLeft #bottomCenter #bottomRight]
    27 [#topCenter #topLeft #topRight #bottomLeft #bottomCenter #bottomRight]
    28 
    28 
    29 $Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.4 1993-12-11 01:44:32 claus Exp $
    29 $Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.5 1994-01-13 00:15:44 claus Exp $
    30 written spring 91 by claus
    30 written spring 91 by claus
    31 '!
    31 '!
    32 
    32 
    33 !FramedBox methodsFor:'private'!
    33 !FramedBox methodsFor:'private'!
    34 
    34 
   123     |sep halfSep right bot left top bm1 rm3|
   123     |sep halfSep right bot left top bm1 rm3|
   124 
   124 
   125     sep := font height.
   125     sep := font height.
   126     halfSep := sep // 2.
   126     halfSep := sep // 2.
   127     self is3D ifFalse:[
   127     self is3D ifFalse:[
   128         self drawRectangleX:halfSep y:halfSep
   128         self displayRectangleX:halfSep y:halfSep
   129                       width:(width - sep) height:(height - sep).
   129                          width:(width - sep) height:(height - sep).
   130         ^ self
   130         ^ self
   131     ].
   131     ].
   132     self paint:lightColor.
   132     self paint:lightColor.
   133     right := width - halfSep.
   133     right := width - halfSep.
   134     bot := height - halfSep.
   134     bot := height - halfSep.
   135     self drawRectangleX:halfSep y:halfSep
   135     self displayRectangleX:halfSep y:halfSep
   136                   width:(width - sep) height:(height - sep + 1).
   136                      width:(width - sep) height:(height - sep + 1).
   137 
   137 
   138     self paint:shadowColor.
   138     self paint:shadowColor.
   139     left := halfSep - 1.
   139     left := halfSep - 1.
   140     top := halfSep - 1.
   140     top := halfSep - 1.
   141     bm1 := bot - 1.
   141     bm1 := bot - 1.