[squeak-dev] The Trunk: Morphic-mt.899.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Apr 19 07:04:34 UTC 2015


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.899.mcz

==================== Summary ====================

Name: Morphic-mt.899
Author: mt
Time: 19 April 2015, 9:03:56.06 am
UUID: 715f9974-c4fa-314c-bcfb-3f0393c26b5e
Ancestors: Morphic-mt.898

Simplified interface for managing scrollbar visibility in scroll panes.

=============== Diff against Morphic-mt.898 ===============

Item was changed:
  ----- Method: FillInTheBlankMorph>>createTextPaneExtent:acceptBoolean:topOffset:buttonAreaHeight: (in category 'initialization') -----
  createTextPaneExtent: answerExtent acceptBoolean: acceptBoolean topOffset: topOffset buttonAreaHeight: buttonAreaHeight 
  	"create the textPane"
  	| result frame |
  	result := PluggableTextMorph
  				on: self
  				text: #response
  				accept: #response:
  				readSelection: #selectionInterval
  				menu: #codePaneMenu:shifted:.
  	result 
  		extent: answerExtent;
+ 		showScrollBarsOnlyWhenNeeded;
- 		alwaysShowScrollBars: false;
  		hResizing: #spaceFill;
  		vResizing: #spaceFill;
  		borderWidth: 1;
  		hasUnacceptedEdits: true;
  		acceptOnCR: acceptBoolean;
  		setNameTo: 'textPane'.
  	frame := LayoutFrame new
  				leftFraction: 0.0;
  		 		rightFraction: 1.0;
  		 		topFraction: 0.0;
  		 		topOffset: topOffset;
  		 		bottomFraction: 1.0;
  		 		bottomOffset: buttonAreaHeight negated;
  				yourself.
  	result layoutFrame: frame.
  	self addMorph: result.
  	^ result!

Item was added:
+ ----- Method: ScrollPane>>alwaysShowHScrollBar (in category 'access options') -----
+ alwaysShowHScrollBar
+ 
+ 	self setProperty: #hScrollBarAlways toValue: true.
+ 	self setProperty: #noHScrollBarPlease toValue: false.
+ 
+ 	self hHideOrShowScrollBar.
+ !

Item was changed:
+ ----- Method: ScrollPane>>alwaysShowHScrollBar: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>alwaysShowHScrollBar: (in category 'access options') -----
  alwaysShowHScrollBar: bool
+ 	self flag: #deprecated. 
  	self setProperty: #hScrollBarAlways toValue: bool.
  	self hHideOrShowScrollBar.
  !

Item was added:
+ ----- Method: ScrollPane>>alwaysShowScrollBars (in category 'access options') -----
+ alwaysShowScrollBars	
+ 	
+ 	self 
+ 		alwaysShowHScrollBar;
+ 		alwaysShowVScrollBar.
+ !

Item was changed:
+ ----- Method: ScrollPane>>alwaysShowScrollBars: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>alwaysShowScrollBars: (in category 'access options') -----
  alwaysShowScrollBars: bool
  	"Get rid of scroll bar for short panes that don't want it shown."
  
+ 	self flag: #deprecated. 
+ 	
  	self 
  		alwaysShowHScrollBar: bool;
  		alwaysShowVScrollBar: bool.
  !

Item was added:
+ ----- Method: ScrollPane>>alwaysShowVScrollBar (in category 'access options') -----
+ alwaysShowVScrollBar
+ 
+ 	self setProperty: #vScrollBarAlways toValue: true.
+ 	self setProperty: #noVScrollBarPlease toValue: false.
+ 
+ 	self vHideOrShowScrollBar.
+ !

Item was changed:
+ ----- Method: ScrollPane>>alwaysShowVScrollBar: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>alwaysShowVScrollBar: (in category 'access options') -----
  alwaysShowVScrollBar: bool
  
+ 	self flag: #deprecated. 
+ 	
  	self setProperty: #vScrollBarAlways toValue: bool.
  	self vHideOrShowScrollBar.
  !

Item was added:
+ ----- Method: ScrollPane>>hideHScrollBarIndefinitely (in category 'access options') -----
+ hideHScrollBarIndefinitely
+ 	"Get rid of scroll bar for short panes that don't want it shown."
+ 
+ 	self setProperty: #noHScrollBarPlease toValue: true.
+ 	self setProperty: #hScrollBarAlways toValue: false.
+ 
+ 	self hHideOrShowScrollBar.
+ !

Item was changed:
+ ----- Method: ScrollPane>>hideHScrollBarIndefinitely: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>hideHScrollBarIndefinitely: (in category 'access options') -----
  hideHScrollBarIndefinitely: bool
  	"Get rid of scroll bar for short panes that don't want it shown."
  
+ 	self flag: #deprecated. 
+ 	
  	self setProperty: #noHScrollBarPlease toValue: bool.
  	self hHideOrShowScrollBar.
  !

Item was changed:
  ----- Method: ScrollPane>>hideScrollBarsIndefinitely (in category 'access options') -----
  hideScrollBarsIndefinitely
+ 
+ 	self
+ 		hideVScrollBarIndefinitely;
+ 		hideHScrollBarIndefinitely.!
- 	self hideScrollBarsIndefinitely: true
- !

Item was changed:
+ ----- Method: ScrollPane>>hideScrollBarsIndefinitely: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>hideScrollBarsIndefinitely: (in category 'access options') -----
  hideScrollBarsIndefinitely: bool
  	"Get rid of scroll bar for short panes that don't want it shown."
  
+ 	self flag: #deprecated.
+ 
  	self hideVScrollBarIndefinitely: bool.
  	self hideHScrollBarIndefinitely: bool.
  !

Item was added:
+ ----- Method: ScrollPane>>hideVScrollBarIndefinitely (in category 'access options') -----
+ hideVScrollBarIndefinitely
+ 	"Get rid of scroll bar for short panes that don't want it shown."
+ 
+ 	self setProperty: #noVScrollBarPlease toValue:	true.
+ 	self setProperty: #vScrollBarAlways toValue: false.
+ 
+ 	self vHideOrShowScrollBar.
+ !

Item was changed:
+ ----- Method: ScrollPane>>hideVScrollBarIndefinitely: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>hideVScrollBarIndefinitely: (in category 'access options') -----
  hideVScrollBarIndefinitely: bool
  	"Get rid of scroll bar for short panes that don't want it shown."
  
+ 	self flag: #deprecated. 
+ 	
  	self setProperty: #noVScrollBarPlease toValue: bool.
  	self vHideOrShowScrollBar.
  !

Item was changed:
  ----- Method: ScrollPane>>initializeScrollBars (in category 'initialization') -----
  initializeScrollBars
  "initialize the receiver's scrollBar"
  
  	(scrollBar := ScrollBar on: self getValue: nil setValue: #vScrollBarValue:)
  			menuSelector: #vScrollBarMenuButtonPressed:;
  			orientation: #vertical.
  	(hScrollBar := ScrollBar on: self getValue: nil setValue: #hScrollBarValue:)
  			menuSelector: #hScrollBarMenuButtonPressed:;
  			orientation: #horizontal.
  
  	""
  	scroller := TransformMorph new color: Color transparent.
  	scroller offset: 0 @ 0.
  	self addMorph: scroller.
  	""
  	scrollBar initializeEmbedded: retractableScrollBar not.
  	hScrollBar initializeEmbedded: retractableScrollBar not.
  	retractableScrollBar ifFalse: 
  			[self 
  				addMorph: scrollBar;
  				addMorph: hScrollBar].
  
  	Preferences alwaysShowVScrollbar ifTrue:
+ 		[ self alwaysShowVScrollBar ].
- 		[ self alwaysShowVScrollBar: true ].
  		
  	Preferences alwaysHideHScrollbar
+ 		ifTrue:[self hideHScrollBarIndefinitely ]
+ 		ifFalse: [
+ 			Preferences alwaysShowHScrollbar ifTrue:
+ 				[ self alwaysShowHScrollBar ]].!
- 		ifTrue:[self hideHScrollBarIndefinitely: true ]
- 		ifFalse:
- 			[Preferences alwaysShowHScrollbar ifTrue:
- 				[ self alwaysShowHScrollBar: true ]].
- !

Item was added:
+ ----- Method: ScrollPane>>showHScrollBarOnlyWhenNeeded (in category 'access options') -----
+ showHScrollBarOnlyWhenNeeded
+ 
+ 	self setProperty: #noHScrollBarPlease toValue: false.
+ 	self setProperty: #hScrollBarAlways toValue: false.
+ 	
+ 	self hHideOrShowScrollBar.
+ !

Item was changed:
+ ----- Method: ScrollPane>>showHScrollBarOnlyWhenNeeded: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>showHScrollBarOnlyWhenNeeded: (in category 'access options') -----
  showHScrollBarOnlyWhenNeeded: bool
  	"Get rid of scroll bar for short panes that don't want it shown."
  
+ 	self flag: #deprecated.
+ 
+ 	self setProperty: #noHScrollBarPlease toValue: bool not.
+ 	self setProperty: #hScrollBarAlways toValue: bool not.
- 	self setProperty: #noHScrollBarPlease toValue: bool.
- 	self setProperty: #hScrollBarAlways toValue: bool.
  	
  	self hHideOrShowScrollBar.
  !

Item was added:
+ ----- Method: ScrollPane>>showScrollBarsOnlyWhenNeeded (in category 'access options') -----
+ showScrollBarsOnlyWhenNeeded
+ 
+ 	self
+ 		showHScrollBarOnlyWhenNeeded;
+ 		showVScrollBarOnlyWhenNeeded.
+ !

Item was changed:
+ ----- Method: ScrollPane>>showScrollBarsOnlyWhenNeeded: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>showScrollBarsOnlyWhenNeeded: (in category 'access options') -----
  showScrollBarsOnlyWhenNeeded: bool
  
+ 	self flag: #deprecated. 
+ 	
  	self showHScrollBarOnlyWhenNeeded: bool.
  	self showVScrollBarOnlyWhenNeeded: bool.
  !

Item was added:
+ ----- Method: ScrollPane>>showVScrollBarOnlyWhenNeeded (in category 'access options') -----
+ showVScrollBarOnlyWhenNeeded
+ 	"Get rid of scroll bar for short panes that don't want it shown."
+ 
+ 	self setProperty: #noVScrollBarPlease toValue: false.
+ 	self setProperty: #vScrollBarAlways toValue: false.
+ 	
+ 	self vHideOrShowScrollBar.
+ !

Item was changed:
+ ----- Method: ScrollPane>>showVScrollBarOnlyWhenNeeded: (in category 'DEPRECATED') -----
- ----- Method: ScrollPane>>showVScrollBarOnlyWhenNeeded: (in category 'access options') -----
  showVScrollBarOnlyWhenNeeded: bool
  	"Get rid of scroll bar for short panes that don't want it shown."
  
+ 	self flag: #deprecated. 
+ 
+ 	self setProperty: #noVScrollBarPlease toValue: bool not.
+ 	self setProperty: #vScrollBarAlways toValue: bool not.
- 	self setProperty: #noVScrollBarPlease toValue: bool.
- 	self setProperty: #vScrollBarAlways toValue: bool.
  	self vHideOrShowScrollBar.
  !



More information about the Squeak-dev mailing list