'From Cuis 5.0 [latest update: #4895] on 30 September 2021 at 3:38:27 pm'!

!ChevronMorph methodsFor: 'geometry' stamp: 'jmv 9/30/2021 15:36:47'!
displayBoundsUpdateFrom: aCanvas
	"Private for framework use.
	At time of last draw on world canvas. nil if unknown.
	Only to be used for the world canvas (i.e. this ivar is not to represent our bounds in any other context).
	Rectangle is clipped appropiately if some owner clips us.
	To be called after #postDrawOn:. See also #displayBoundsSetFrom:
	This more complicated update is needed because the contour information from #drawOn: was possibly
	when drawing submorphs. So, the controur from #drawOn: needs to be retrieved, and updated with the
	new contour information from #postDrawOn:"

	self world ifNotNil: [ :w |
		w canvas ifNotNil: [ :c |
			(aCanvas isBoundsFinderCanvas or: [c canvasToUse == aCanvas canvasToUse]) ifTrue: [
				privateDisplayBounds _ privateDisplayBounds
					quickMerge: aCanvas canvasToUse boundingRectOfCurrentMorphAfterDraw.
				self wantsContour ifTrue: [
					(aCanvas canvasToUse
						contourOfCurrentMorphAfterDrawUpdate: (self valueOfProperty: #contour)
						oldTop: (self valueOfProperty: #contourY0)
						oldBottom: (self valueOfProperty: #contourY1)
						into: [ :contourArray :contourY0 :contourY1 |
							self setProperty: #contour toValue: contourArray.
							self setProperty: #contourY0 toValue: contourY0.
							self setProperty: #contourY1 toValue: contourY1 ])]]]].! !

!ChevronMorph methodsFor: 'geometry testing' stamp: 'jmv 9/30/2021 15:32:25'!
hasVariableExtent
	^false! !

!ChevronMorph methodsFor: 'geometry testing' stamp: 'jmv 9/30/2021 15:32:39'!
knowsOwnLocalBounds

	^false! !

!ChevronMorph methodsFor: 'geometry testing' stamp: 'jmv 9/30/2021 15:32:55'!
submorphsMightProtrude

	^ true! !

!ChevronMorph methodsFor: 'geometry services' stamp: 'jmv 9/30/2021 15:34:56'!
coversPixel: worldPoint
	"Answer true if pixel worldPoint is covered by us, even if we are not visible a it because of some
	other morph above us also covers it.
	See #bitMask.
	Remember to do
	self removeProperty: #bitMask.
	when appropriate!! (i.e. when we change in such a way to make the bitMask invalid).

	Note: Subclasses such as KernelMorph and WidgetMorph redefine this method with an optimized
	implementation that doesn't require computing and invalidating the #bitMask. Senders in the base image
	and framework actually only use this optimized implementation. That's why general morphs don't care about
	invalidting #bitMask.
	
	Note: If your morph #requiresVectorCanvas, and depends on this general implementation, remember to 
	`removeProperty: #bitMask` whenever it becomes invalid due to changes in your morphs. You may consider
	using #ownsPixel: if appropriate, that doesn't require any maintenance and is cheaper (in cpu and memory).

	Note: This implementation requires VectorGraphics."

	self visible ifTrue: [
		^(self bitMask pixelValueAt: worldPoint - self displayFullBounds topLeft) = 1 ].
	^ false! !

!ChevronMorph methodsFor: 'geometry services' stamp: 'jmv 9/30/2021 15:36:26'!
fullOwnsOrCoversPixel: worldPoint
	"Answer true if worldPoint is in some submorph, even if not inside our shape.
	See comment at #ownsOrCoversPixel: for important notes on behavior."

	(self ownsOrCoversPixel: worldPoint) ifTrue: [ ^true ].
	self submorphsDo: [ :m |
		(m fullOwnsOrCoversPixel: worldPoint) ifTrue: [ ^true ]].
	^ false.! !

!ChevronMorph methodsFor: 'geometry services' stamp: 'jmv 9/30/2021 15:35:42'!
ownsOrCoversPixel: worldPoint
	"Answer true if we own the pixel, i.e. we are the last morph drawn at worldPoint.
	Some implementations (KernelMorph and WidgetMorph) may also answer true if we cover but don't own the pixel,
	meaning that some other morph was drawn later, covering us.
	Therefore, senders need to be aware that the answer is meaningful only when it is known that no other morph covers us.
	Note: This implementation is only used for VectorGraphics based morphs (i.e. morphs that answer true to #requiresVectorCanvas).
	(See other implementors)
	Note: Also see #ownsPixel: and #coversPixel:"

	^ self ownsPixel: worldPoint.! !

!methodRemoval: ChevronMorph #isOrthoRectangularMorph stamp: 'jmv 9/30/2021 15:32:01'!
ChevronMorph removeSelector: #isOrthoRectangularMorph!

!ChevronMorph reorganize!
('drawing' drawMyShapeOn:with: drawOn:)
('accessing' dropDown performAction radius:)
('initialization' addDropDown aperture:shift:radius:innerRadius:)
('geometry' center displayBoundsUpdateFrom: vertices)
('geometry testing' hasVariableExtent knowsOwnLocalBounds requiresVectorCanvas submorphsMightProtrude)
('testing' isChevron isDropDownChevron isOnSubToolbar)
('geometry services' coversPixel: fullOwnsOrCoversPixel: ownsOrCoversPixel:)
!

