NoteBookView.st
changeset 5220 ea3c03715e5b
parent 5218 4999a9f57b7d
child 5221 65cdba77fc63
equal deleted inserted replaced
5218:4999a9f57b7d 5220:ea3c03715e5b
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1997 by eXept Software AG
     4  COPYRIGHT (c) 1997 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
    12 "{ Package: 'stx:libwidg2' }"
    14 "{ Package: 'stx:libwidg2' }"
    13 
    15 
    14 "{ NameSpace: Smalltalk }"
    16 "{ NameSpace: Smalltalk }"
    15 
    17 
    16 View subclass:#NoteBookView
    18 View subclass:#NoteBookView
    17         instanceVariableNames:'list listHolder foregroundColor backgroundColor selection enabled
    19 	instanceVariableNames:'list listHolder foregroundColor backgroundColor selection enabled
    18                 action useIndex direction numberOfLines selectConditionBlock
    20 		action useIndex direction numberOfLines selectConditionBlock
    19                 accessTabMenuAction canvas canvasInset canvasHolder
    21 		accessTabMenuAction canvas canvasInset canvasHolder
    20                 halfLightColor halfShadowColor fitLastRow tabModus
    22 		halfLightColor halfShadowColor fitLastRow tabModus
    21                 lastComputedExtent keepCanvas activeForegroundColor
    23 		lastComputedExtent keepCanvas activeForegroundColor
    22                 activeBackgroundColor drawLightColor edgeStyle tabInset
    24 		activeBackgroundColor drawLightColor edgeStyle tabInset
    23                 tabLabelInset disabledForegroundColor tabLevel tabTopMargin
    25 		tabLabelInset disabledForegroundColor tabLevel tabTopMargin
    24                 tabBottomMargin selectionInsetX selectionInsetY translateLabel
    26 		tabBottomMargin selectionInsetX selectionInsetY translateLabel
    25                 buttonPrev buttonNext tabRightMargin tabLeftMargin
    27 		buttonPrev buttonNext tabRightMargin tabLeftMargin
    26                 showDestroyTabButton destroyTabAction activeTabMarkerColor
    28 		showDestroyTabButton destroyTabAction activeTabMarkerColor
    27                 activeTabMarkerFGColor tabWasActiveWhenPressed removeTabIcon
    29 		activeTabMarkerFGColor tabWasActiveWhenPressed removeTabIcon
    28                 removeTabEnteredIcon removeTabDisabledIcon
    30 		removeTabEnteredIcon removeTabDisabledIcon
    29                 showingEnteredRemoveTabButton lastUserSelection minimumTabWidth
    31 		showingEnteredRemoveTabButton lastUserSelection minimumTabWidth
    30                 addTabAction addTabIcon addTabEnteredIcon addTabDisabledIcon
    32 		addTabAction addTabIcon addTabEnteredIcon addTabDisabledIcon
    31                 showingEnteredAddTabButton canvasLevel
    33 		showingEnteredAddTabButton canvasLevel
    32                 showDestroyTabButtonOnSingleTab'
    34 		showDestroyTabButtonOnSingleTab'
    33         classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
    35 	classVariableNames:'DefaultForegroundColor DefaultBackgroundColor
    34                 DefaultActiveForegroundColor DefaultActiveBackgroundColor
    36 		DefaultActiveForegroundColor DefaultActiveBackgroundColor
    35                 DefaultShadowColor DefaultHalfShadowColor DefaultLightColor
    37 		DefaultShadowColor DefaultHalfShadowColor DefaultLightColor
    36                 DefaultHalfLightColor DefaultEdgeStyle DisabledForegroundColor
    38 		DefaultHalfLightColor DefaultEdgeStyle DisabledForegroundColor
    37                 DefaultActiveTabMarkerColor DefaultActiveTabMarkerFgColor
    39 		DefaultActiveTabMarkerColor DefaultActiveTabMarkerFgColor
    38                 RemoveTabIcon RemoveTabEnteredIcon AddTabIcon AddTabEnteredIcon'
    40 		RemoveTabIcon RemoveTabEnteredIcon AddTabIcon AddTabEnteredIcon'
    39         poolDictionaries:''
    41 	poolDictionaries:''
    40         category:'Views-Layout'
    42 	category:'Views-Layout'
    41 !
    43 !
    42 
    44 
    43 Object subclass:#Tab
    45 Object subclass:#Tab
    44         instanceVariableNames:'label tabItem printableLabel disabledLabel lineNr
    46 	instanceVariableNames:'label tabItem printableLabel disabledLabel lineNr
    45                 unselectedLayout selectedLayout layout extent accessCharacter
    47 		unselectedLayout selectedLayout layout extent accessCharacter
    46                 lastFocusViewId'
    48 		lastFocusViewId'
    47         classVariableNames:''
    49 	classVariableNames:''
    48         poolDictionaries:''
    50 	poolDictionaries:''
    49         privateIn:NoteBookView
    51 	privateIn:NoteBookView
    50 !
    52 !
    51 
    53 
    52 !NoteBookView class methodsFor:'documentation'!
    54 !NoteBookView class methodsFor:'documentation'!
    53 
    55 
    54 copyright
    56 copyright
  3113 indexOfTab:aTab
  3115 indexOfTab:aTab
  3114     ^ list indexOf:aTab 
  3116     ^ list indexOf:aTab 
  3115 !
  3117 !
  3116 
  3118 
  3117 showingDestroyButton
  3119 showingDestroyButton
  3118      ^ showDestroyTabButton 
  3120      ^ showDestroyTabButton
  3119      and:[destroyTabAction notNil
  3121      and:[destroyTabAction notNil
  3120      and:[(showDestroyTabButtonOnSingleTab ~~ false) or:[list size > 1]]]
  3122      and:[(showDestroyTabButtonOnSingleTab ~~ false) or:[list size > 1]]]
  3121 !
  3123 !
  3122 
  3124 
  3123 tabContainingPointX:x y:y
  3125 tabContainingPointX:x y:y
  3408 
  3410 
  3409     index   := list identityIndexOf:aTab.
  3411     index   := list identityIndexOf:aTab.
  3410     nextTab := list at:(index + 1) ifAbsent:nil.
  3412     nextTab := list at:(index + 1) ifAbsent:nil.
  3411 
  3413 
  3412   ^ nextTab isNil or:[nextTab lineNr ~~ aTab lineNr]
  3414   ^ nextTab isNil or:[nextTab lineNr ~~ aTab lineNr]
  3413 !
       
  3414 
       
  3415 showingDestroyButton
       
  3416      ^ showDestroyTabButton 
       
  3417      and:[destroyTabAction notNil
       
  3418      and:[(showDestroyTabButtonOnSingleTab ~~ true) or:[list size > 1]]]
       
  3419 ! !
  3415 ! !
  3420 
  3416 
  3421 !NoteBookView methodsFor:'selection'!
  3417 !NoteBookView methodsFor:'selection'!
  3422 
  3418 
  3423 isSelectable:anIndex
  3419 isSelectable:anIndex