Squeak Class Documentation category index | class index  
 
ScrollPane
  category: Morphic-Windows
  superclass: ComponentLikeModel
  subclasses: PluggableTextMorph PluggableListMorph SimpleHierarchicalListMorph AlansTextPlusMorph

The scroller (a transform) of a scrollPane is driven by the scrollBar. The scroll values vary from 0.0, meaning zero offset to 1.0 meaning sufficient offset such that the bottom of the scrollable material appears 3/4 of the way down the pane. The total distance to achieve this range is called the totalScrollRange.

instance methods
  access
  colorForInsets
hasFocus
retractableScrollBar
scrollBarOnLeft
scroller
scroller:
wantsSlot

  geometry
  containsPoint:
extent:
extraScrollRange
innerBounds
leftoverScrollRange
resetExtent
resizeScrollBar
resizeScroller
scrollBarFills:
scrollBy:
scrollDeltaHeight
scrollbarWidth
totalScrollRange
unadjustedScrollRange

  initialization
  initialize
setScrollDeltas

  menu
  addCustomMenuItems:hand:
getMenu:
leftOrRight
menuTitleSelector:
retractable:
retractableOrNot
scrollBarOnLeft:

  object fileIn
 

  pane events
  handlesMouseDown:
handlesMouseOver:
keyStroke:
mouseDown:
mouseMove:
mouseUp:
scrollByKeyboard:

  retractable scroll bar
 

  scroll bar events
  scrollBarMenuButtonPressed:
scrollBarValue:
shiftedTextPaneMenuRequest
shiftedYellowButtonActivity
unshiftedYellowButtonActivity
yellowButtonActivity:

  scrolling
  hideOrShowScrollBar
hideScrollBar
hideScrollBarIndefinitely
isRetractableScrollbarShowing
isScrollable
isScrollbarShowing
isScrolled
isScrolledFromTop
mouseEnter:
mouseLeave:
showScrollBar

class methods
  as yet unclassified
  includeInNewMorphMenu

instance methods
  access top  
 

colorForInsets

My submorphs use the surrounding color


 

hasFocus

hasFocus is currently set by mouse enter/leave events.
This inst var should probably be moved up to a higher superclass.


 

retractableScrollBar


 

scrollBarOnLeft


 

scroller


 

scroller:


 

wantsSlot

For now do it the old way, until we sort this out


  geometry top  
 

containsPoint:


 

extent:


 

extraScrollRange

Return the amount of extra blank space to include below the bottom of the scroll content.


 

innerBounds

Return the inner rectangle enclosed by the bounds of this morph excluding the space taken by its borders. For an unbordered morph, this is just its bounds.


 

leftoverScrollRange

Return the entire scrolling range minus the currently viewed area.


 

resetExtent

Reset the extent. (may be overridden by subclasses which need to do more than this)


 

resizeScrollBar


 

resizeScroller


 

scrollBarFills:

Return true if a flop-out scrollbar fills the rectangle


 

scrollBy:

Move the contents in the direction delta.


 

scrollDeltaHeight

Return the increment in pixels which this pane should be scrolled (normally a subclass responsibility).


 

scrollbarWidth

Includes border


 

totalScrollRange

Return the entire scrolling range.


 

unadjustedScrollRange

Return the height extent of the receiver's submorphs.


  initialization top  
 

initialize


 

setScrollDeltas

Set the ScrollBar deltas, value and interval, based on the current scroll pane size, offset and range.


  menu top  
 

addCustomMenuItems:hand:

Add morph-specific items to the given menu which was invoked by the given hand. This method provides is invoked both from the halo-menu and from the control-menu regimes.


 

getMenu:

Answer the menu for this text view, supplying an empty menu to be filled in. If the menu selector takes an extra argument, pass in the current state of the shift key.


 

leftOrRight

Change scroll bar location


 

menuTitleSelector:


 

retractable:


 

retractableOrNot

Change scroll bar operation


 

scrollBarOnLeft:


  object fileIn top  

  pane events top  
 

handlesMouseDown:

Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?


 

handlesMouseOver:

Could just ^ true, but this ensures that scroll bars won't flop out
if you mouse-over appendages such as connecting pins.


 

keyStroke:

If pane is not full, pass the event to the last submorph,
 assuming it is the most appropriate recipient (!)


 

mouseDown:

Handle a mouse down event. The default response is to let my eventHandler, if any, handle it.


 

mouseMove:

If pane is not full, pass the event to the last submorph,
assuming it is the most appropriate recipient (!).


 

mouseUp:

If pane is not full, pass the event to the last submorph,
assuming it is the most appropriate recipient (!)


 

scrollByKeyboard:

If event is ctrl+up/down then scroll and answer true


  retractable scroll bar top  

  scroll bar events top  
 

scrollBarMenuButtonPressed:


 

scrollBarValue:


 

shiftedTextPaneMenuRequest

The more... button was hit from the text-pane menu


 

shiftedYellowButtonActivity


 

unshiftedYellowButtonActivity


 

yellowButtonActivity:


  scrolling top  
 

hideOrShowScrollBar

Hide or show the scrollbar depending on if the pane is scrolled/scrollable.


 

hideScrollBar


 

hideScrollBarIndefinitely

Get rid of scroll bar for short panes that don't want it shown.


 

isRetractableScrollbarShowing

Return true if a retractable scroll bar is currently showing


 

isScrollable


 

isScrollbarShowing

Return true if a retractable scroll bar is currently showing


 

isScrolled

If the scroller is not set to y = 0, then the pane has been scrolled.


 

isScrolledFromTop

Have the contents of the pane been scrolled, so that the top of the contents are not visible?


 

mouseEnter:

Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it.


 

mouseLeave:

Handle a mouseLeave event, meaning the mouse just left my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it.


 

showScrollBar


class methods
  as yet unclassified top  
 

includeInNewMorphMenu

OK to instantiate