'From Cuis 1.0 of 4 September 2009 [latest update: #290] on 8 September 2009 at 10:01:46 am'!

!ScrollPane methodsFor: 'geometry' stamp: 'jmv 9/8/2009 09:59'!
vLeftoverScrollRange
	"Return the entire scrolling range minus the currently viewed area."
	| h |

	scroller hasSubmorphs ifFalse:[^0].
	h _ self vScrollBarHeight.
	"In #hideOrShowScrollBars we add the vertical scrollbar first, without using the space that might later be assigned to the horizontal scrollbar.
	I.e. decide now without knowing if the horizontal scrollbar will be needed.
	But we do know that if we are showing wrapped text, or we have zero width to show, we won't have it"
	"self hIsScrollbarShowing" 
	self hUnadjustedScrollRange > 0 ifTrue: [
		h _ h - Preferences scrollbarThickness ].
	^ (self vTotalScrollRange - h roundTo: self scrollDeltaHeight) max: 0
! !

