--- a/NoteBookView.st Sat Aug 13 16:11:42 2016 +0200
+++ b/NoteBookView.st Sat Aug 13 16:20:07 2016 +0200
@@ -14,39 +14,39 @@
"{ NameSpace: Smalltalk }"
View subclass:#NoteBookView
- instanceVariableNames:'list listHolder foregroundColor backgroundColor selection enabled
- action useIndex direction numberOfLines selectConditionBlock
- accessTabMenuAction canvas canvasInset canvasHolder
- halfLightColor halfShadowColor fitLastRow tabModus
- lastComputedExtent keepCanvas activeForegroundColor
- activeBackgroundColor drawLightColor edgeStyle tabInset
- tabLabelInset disabledForegroundColor tabLevel tabTopMargin
- tabBottomMargin selectionInsetX selectionInsetY translateLabel
- buttonPrev buttonNext tabRightMargin tabLeftMargin
- showDestroyTabButton destroyTabAction activeTabMarkerColor
- activeTabMarkerFGColor tabWasActiveWhenPressed removeTabIcon
- removeTabEnteredIcon removeTabDisabledIcon
- showingEnteredRemoveTabButton lastUserSelection minimumTabWidth
- addTabAction addTabIcon addTabEnteredIcon addTabDisabledIcon
- showingEnteredAddTabButton canvasLevel
- showDestroyTabButtonOnSingleTab'
- classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
- DefaultActiveForegroundColor DefaultActiveBackgroundColor
- DefaultShadowColor DefaultHalfShadowColor DefaultLightColor
- DefaultHalfLightColor DefaultEdgeStyle DisabledForegroundColor
- DefaultActiveTabMarkerColor DefaultActiveTabMarkerFgColor
- RemoveTabIcon RemoveTabEnteredIcon AddTabIcon AddTabEnteredIcon'
- poolDictionaries:''
- category:'Views-Layout'
+ instanceVariableNames:'list listHolder foregroundColor backgroundColor selection enabled
+ action useIndex direction numberOfLines selectConditionBlock
+ accessTabMenuAction canvas canvasInset canvasHolder
+ halfLightColor halfShadowColor fitLastRow tabModus
+ lastComputedExtent keepCanvas activeForegroundColor
+ activeBackgroundColor drawLightColor edgeStyle tabInset
+ tabLabelInset disabledForegroundColor tabLevel tabTopMargin
+ tabBottomMargin selectionInsetX selectionInsetY translateLabel
+ buttonPrev buttonNext tabRightMargin tabLeftMargin
+ showDestroyTabButton destroyTabAction activeTabMarkerColor
+ activeTabMarkerFGColor tabWasActiveWhenPressed removeTabIcon
+ removeTabEnteredIcon removeTabDisabledIcon
+ showingEnteredRemoveTabButton lastUserSelection minimumTabWidth
+ addTabAction addTabIcon addTabEnteredIcon addTabDisabledIcon
+ showingEnteredAddTabButton canvasLevel
+ showDestroyTabButtonOnSingleTab'
+ classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
+ DefaultActiveForegroundColor DefaultActiveBackgroundColor
+ DefaultShadowColor DefaultHalfShadowColor DefaultLightColor
+ DefaultHalfLightColor DefaultEdgeStyle DisabledForegroundColor
+ DefaultActiveTabMarkerColor DefaultActiveTabMarkerFgColor
+ RemoveTabIcon RemoveTabEnteredIcon AddTabIcon AddTabEnteredIcon'
+ poolDictionaries:''
+ category:'Views-Layout'
!
Object subclass:#Tab
- instanceVariableNames:'label tabItem printableLabel disabledLabel lineNr
- unselectedLayout selectedLayout layout extent accessCharacter
- lastFocusViewId'
- classVariableNames:''
- poolDictionaries:''
- privateIn:NoteBookView
+ instanceVariableNames:'label tabItem printableLabel disabledLabel lineNr
+ unselectedLayout selectedLayout layout extent accessCharacter
+ lastFocusViewId'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:NoteBookView
!
!NoteBookView class methodsFor:'documentation'!
@@ -3114,6 +3114,12 @@
^ list indexOf:aTab
!
+showingDestroyButton
+ ^ showDestroyTabButton
+ and:[destroyTabAction notNil
+ and:[(showDestroyTabButtonOnSingleTab ~~ false) or:[list size > 1]]]
+!
+
tabContainingPointX:x y:y
^ list detect:[:aTab| aTab containsPointX:x y:y ] ifNone:nil.
!