|
Class: ConstrainedLayoutFrame
Object
|
+--Layout
|
+--LayoutOrigin
|
+--LayoutFrame
|
+--ConstrainedLayoutFrame
- Package:
- stx:libview2
- Category:
- Graphics-Geometry
- Version:
- rev:
1.2
date: 2019/09/17 10:25:57
- user: cg
- file: ConstrainedLayoutFrame.st directory: libview2
- module: stx stc-classLibrary: libview2
Instances of me are like layoutFrames,
with additional (optional) limits on the bounds.
Useful to arrange for labels in a dialog to never become too large.
copyrightCOPYRIGHT (c) 2019 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
maxBottom
-
-
maxBottom: something
-
-
maxLeft
-
-
maxLeft: pixels
-
-
maxRight
-
-
maxRight: pixels
-
-
maxTop
-
-
maxTop: pixels
-
-
minBottom
-
-
minBottom: pixels
-
-
minLeft
-
-
minLeft: pixels
-
-
minRight
-
-
minRight: pixels
-
-
minTop
-
-
minTop: pixels
-
computing
-
rectangleRelativeTo: superRectangle preferred: prefRectHolder
-
compute the rectangle represented by the receiver,
given the superView's rectangle and the view's preferredExtent.
Usage example(s):
|superRect1 superRect2 lF|
superRect1 := 0@0 corner:100@100.
superRect2 := 0@0 corner:400@100.
lF := (ConstrainedLayoutFrame new).
lF leftFraction:0.25 rightFraction:0.75
topFraction:0.25 bottomFraction:0.75.
lF rectangleRelativeTo:superRect1 preferred:(0@0 corner:30@30).
lF rectangleRelativeTo:superRect2 preferred:(0@0 corner:30@30).
lF maxLeft:70.
lF rectangleRelativeTo:superRect2 preferred:(0@0 corner:30@30).
|
|