Layout.st
changeset 229 612861ef768a
parent 219 106b86ca81da
child 284 b31698e4ebb6
equal deleted inserted replaced
228:8f73cdf66b60 229:612861ef768a
    42     size and are to return a components size upon request.
    42     size and are to return a components size upon request.
    43     This allows more flexible geometry management, since any algorithm can
    43     This allows more flexible geometry management, since any algorithm can
    44     be implemented (if the existing ones are not sufficient, add you own subclass
    44     be implemented (if the existing ones are not sufficient, add you own subclass
    45     and install it as layout-object in your view).
    45     and install it as layout-object in your view).
    46 
    46 
    47     See more info & examples in concrete subclasses:
    47     Notice: 
    48         LayoutOrigin LayoutFrame AlignmentOrigin
    48         this class was implemented using protocol information
    49 
    49         from alpha testers - it may not be complete or compatible to
    50     Notice: this class was implemented using protocol information
    50         the corresponding ST-80 class. 
    51     from alpha testers - it may not be complete or compatible to
    51         If you encounter any incompatibilities, please forward a note 
    52     the corresponding ST-80 class. If you encounter any incompatibilities,
    52         describing the incompatibility verbal (i.e. no code) to the ST/X team.
    53     please forward a note to the ST/X team.
       
    54 
    53 
    55     [author:]
    54     [author:]
    56         Claus Gittinger
    55         Claus Gittinger
       
    56 
       
    57     [see also:]
       
    58         View
       
    59         LayoutOrigin LayoutFrame AlignmentOrigin
    57 "
    60 "
    58 ! !
    61 ! !
    59 
    62 
    60 !Layout class methodsFor:'instance creation'!
    63 !Layout class methodsFor:'instance creation'!
    61 
    64 
    62 new
    65 new
       
    66     "return a new initialized instance"
       
    67 
    63     ^ self basicNew initialize
    68     ^ self basicNew initialize
       
    69 
       
    70     "Modified: 27.4.1996 / 14:47:08 / cg"
    64 ! !
    71 ! !
    65 
    72 
    66 !Layout methodsFor:'initialization'!
    73 !Layout methodsFor:'initialization'!
    67 
    74 
    68 initialize
    75 initialize
       
    76     "setup the instance - to be redefined by concrete subclasses"
       
    77 
    69     ^ self subclassResponsibility
    78     ^ self subclassResponsibility
       
    79 
       
    80     "Modified: 27.4.1996 / 14:46:56 / cg"
    70 ! !
    81 ! !
    71 
    82 
    72 !Layout methodsFor:'queries'!
    83 !Layout methodsFor:'queries'!
    73 
    84 
    74 isLayout
    85 isLayout
       
    86     "return true, if the recevier is a layout object. 
       
    87      Always return true here."
    75     ^ true
    88     ^ true
       
    89 
       
    90     "Modified: 27.4.1996 / 14:45:27 / cg"
    76 !
    91 !
    77 
    92 
    78 rectangleRelativeTo:superRectangle preferred:prefRect
    93 rectangleRelativeTo:superRectangle preferred:prefRect
       
    94     "compute the rectangle represented by the receiver,
       
    95      given the superViews rectangle and the views preferredExtent.
       
    96      Must be implemented by concrete subclasses."
       
    97 
    79     ^ self subclassResponsibility
    98     ^ self subclassResponsibility
       
    99 
       
   100     "Modified: 27.4.1996 / 14:46:37 / cg"
    80 ! !
   101 ! !
    81 
   102 
    82 !Layout class methodsFor:'documentation'!
   103 !Layout class methodsFor:'documentation'!
    83 
   104 
    84 version
   105 version
    85     ^ '$Header: /cvs/stx/stx/libview2/Layout.st,v 1.10 1996-04-25 16:20:30 cg Exp $'
   106     ^ '$Header: /cvs/stx/stx/libview2/Layout.st,v 1.11 1996-04-27 17:50:49 cg Exp $'
    86 ! !
   107 ! !