[Cuis-dev] Difference between BoxedMorph>>extentInWorld and BoxedMorph>>morphExtent?
H. Hirzel
hannes.hirzel at gmail.com
Thu Feb 27 11:36:29 PST 2025
Hi
In the example below the values for BoxedMorph>>extentInWorld and
BoxedMorph>>morphExtent are the same.
Under which conditions do they differ?
Regards
Hannes
-------------------------------------
'From Cuis7.3 [latest update: #7053] on 27 February 2025 at 8:21:24 pm'!
!classDefinition: #LayoutDemo2d category: #'Add-Ons-LayoutDemo'!
SystemWindow subclass: #LayoutDemo2d
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Add-Ons-LayoutDemo'!
!LayoutDemo2d commentStamp: 'hjh 2/27/2025 20:09:33' prior: 0!
Subclass of SystemWindow specialised to show how content has to be added.
This class shows how to use the #addMorphUseAll: method to use all up
the remaining space. It as well demonstrates the use of UpdatingLabelMorph.
They may be used to build a specialized expression watch window.
LayoutDemo2d new openInWorld!
!LayoutDemo2d methodsFor: 'GUI building' stamp: 'hjh 2/27/2025 20:19:39'!
buildMorphicWindow
self setLabel: self className.
self layoutMorph
addMorph:
((UpdatingLabelMorph new
target: ['Cursor position: ',
self runningWorld activeHand morphPosition
asString
];
getSelector: #value;
stepTime: 10) color: Color blue).
self layoutMorph addMorphUseAll:
(ColoredBoxMorph new color: Color green).
self layoutMorph addMorph:
(UpdatingLabelMorph new
target: ['self extentInWorld ',
self extentInWorld asString];
getSelector: #value;
stepTime: 10)
fixedHeight: 60.
self layoutMorph addMorph:
(UpdatingLabelMorph new
target: ['self morphExtent ',
self morphExtent asString];
"fullBoundsInOwner localBounds "
getSelector: #value;
stepTime: 10)
fixedHeight: 60.
self layoutMorph addMorph:
(UpdatingLabelMorph new
target: ['self localBounds ',
self localBounds asString];
"fullBoundsInOwner "
getSelector: #value;
stepTime: 10)
fixedHeight: 60.
self layoutMorph addMorph:
(UpdatingLabelMorph new
target: ['self fullBoundsInOwner ',
self fullBoundsInOwner asString];
getSelector: #value;
stepTime: 10)
fixedHeight: 60.
! !
!LayoutDemo2d methodsFor: 'initialization' stamp: 'hjh 1/31/2013 04:38'!
initialize
super initialize.
self buildMorphicWindow.
! !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cuis_LayoutDemo2d_screenshot.png
Type: image/png
Size: 40138 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250227/f9555b35/attachment-0001.png>
More information about the Cuis-dev
mailing list