class: SelectionInListModelView
authorStefan Vogel <sv@exept.de>
Sun, 13 Apr 2014 23:00:15 +0200
changeset 4571 bf04b7618d7c
parent 4570 4da74a5c2f14
child 4572 612d49704e0f
class: SelectionInListModelView class definition removed: #selectOnButtomMenu #selectOnButtomMenu: comment/format in: #documentation #selectOnButtonMenu: changed: #buttonMultiPress:x:y: #pointerEntersItem: lint
SelectionInListModelView.st
--- a/SelectionInListModelView.st	Sun Apr 13 22:25:30 2014 +0200
+++ b/SelectionInListModelView.st	Sun Apr 13 23:00:15 2014 +0200
@@ -12,16 +12,15 @@
 "{ Package: 'stx:libwidg2' }"
 
 ListModelView subclass:#SelectionInListModelView
-	instanceVariableNames:'selection multipleSelectOk selectOnButtonMenu actionBlock
-		doubleClickActionBlock selectConditionBlock buttonMotionAction
-		buttonReleaseAction highlightMode useIndex ignoreReselect
-		toggleSelect hilightFgColor hilightBgColor hilightFgColorNoFocus
-		hilightBgColorNoFocus hilightLevel hilightFrameColor hilightStyle
-		dropSource editorView openEditorAction closeEditorAction
-		highlightEnterItem enterItem cursorItem lineMask keyActionStyle
-		returnKeyActionStyle strikeOut modelChangedDuringButtonPress
-		selectOnButtonPress selectOnMenuButton minimumEditorHeight
-		extraSpaceAtBottomForDrop'
+	instanceVariableNames:'selection multipleSelectOk actionBlock doubleClickActionBlock
+		selectConditionBlock buttonMotionAction buttonReleaseAction
+		highlightMode useIndex ignoreReselect toggleSelect hilightFgColor
+		hilightBgColor hilightFgColorNoFocus hilightBgColorNoFocus
+		hilightLevel hilightFrameColor hilightStyle dropSource editorView
+		openEditorAction closeEditorAction highlightEnterItem enterItem
+		cursorItem lineMask keyActionStyle returnKeyActionStyle strikeOut
+		modelChangedDuringButtonPress selectOnButtonPress
+		selectOnMenuButton minimumEditorHeight extraSpaceAtBottomForDrop'
 	classVariableNames:'DefaultHilightStyle DefaultHilightBackgroundColor
 		DefaultHilightForegroundColor DefaultHilightLevel
 		DefaultHilightFrameColor'
@@ -78,52 +77,52 @@
 
     [Instance variables:]
 
-	selection               <misc>       the current selection. nil, a number or collection of numbers
-	multipleSelectOk        <Boolean>    allow/disallow multiple selections( default:false )
-	selectOnButtonMenu      <Boolean>    enable/disable selection will change on menu pressed
-
-	buttonReleaseAction     <Action>     called if the mouse button is released
-	buttonMotionAction      <Action>     called during mouse motion with one argument the point
-					     under the mouse.
-
-	actionBlock             <Block>      action evaluated on single click (0/1/2 arguments)
-	doubleClickActionBlock  <Block>      action evaluated on double click (0/1/2 arguments)
-	selectConditionBlock    <Block>      action evaluated before selection changed (0/1/2 arguments)
-
-	keyActionStyle          <Symbol>     controls how to respond to keyboard selects
-	returnKeyActionStyle    <Symbol>     controls how to respond to return key
-
-	useIndex                <Boolean>    representation of the model selection
-
-	ignoreReselect          <Boolean>    if set, a click on an already selected entry is ignored
-	toggleSelect            <Boolean>    a click on an entry unselects it and vice versa
-
-	highlightMode           <Symbol>     how to draw the selection
-	hilightFgColor          <Color>      foregroundColor of highlighted items
-	hilightBgColor          <Color>      backgroundColor of highlighted items
-	hilightLevel            <Integer>    level to draw selections (i.e. for 3D effect)
-	hilightFrameColor       <Color>      rectangle around highlighted items
-	hilightStyle            <Boolean>    actions on widget are enabled/disabled
-	strikeOut               <Boolean>    turn on/off strikeOut mode
-
-	dropTarget              <DropTarget> keeps information about the drop operation
-	dropSource              <DropSource> keeps information about the drag operation
-
-	editorView              <View>       editor on current selected item
-	openEditorAction        <Action>     action to get an editor on the current selection from user
-	closeEditorAction       <Action>     action invoked before the editor is closed.
-
-	enterItem               <Item/nil>   item over which the mouse pointer is located
-					     or nil
-	highlightEnterItem      <Boolean>    enable or disable highlight of enterItem
+        selection               <misc>       the current selection. nil, a number or collection of numbers
+        multipleSelectOk        <Boolean>    allow/disallow multiple selections( default:false )
+        selectMenuButton        <Boolean>    enable/disable selection will change on menu pressed
+
+        buttonReleaseAction     <Action>     called if the mouse button is released
+        buttonMotionAction      <Action>     called during mouse motion with one argument the point
+                                             under the mouse.
+
+        actionBlock             <Block>      action evaluated on single click (0/1/2 arguments)
+        doubleClickActionBlock  <Block>      action evaluated on double click (0/1/2 arguments)
+        selectConditionBlock    <Block>      action evaluated before selection changed (0/1/2 arguments)
+
+        keyActionStyle          <Symbol>     controls how to respond to keyboard selects
+        returnKeyActionStyle    <Symbol>     controls how to respond to return key
+
+        useIndex                <Boolean>    representation of the model selection
+
+        ignoreReselect          <Boolean>    if set, a click on an already selected entry is ignored
+        toggleSelect            <Boolean>    a click on an entry unselects it and vice versa
+
+        highlightMode           <Symbol>     how to draw the selection
+        hilightFgColor          <Color>      foregroundColor of highlighted items
+        hilightBgColor          <Color>      backgroundColor of highlighted items
+        hilightLevel            <Integer>    level to draw selections (i.e. for 3D effect)
+        hilightFrameColor       <Color>      rectangle around highlighted items
+        hilightStyle            <Boolean>    actions on widget are enabled/disabled
+        strikeOut               <Boolean>    turn on/off strikeOut mode
+
+        dropTarget              <DropTarget> keeps information about the drop operation
+        dropSource              <DropSource> keeps information about the drag operation
+
+        editorView              <View>       editor on current selected item
+        openEditorAction        <Action>     action to get an editor on the current selection from user
+        closeEditorAction       <Action>     action invoked before the editor is closed.
+
+        enterItem               <Item/nil>   item over which the mouse pointer is located
+                                             or nil
+        highlightEnterItem      <Boolean>    enable or disable highlight of enterItem
 
     [author:]
-	Claus Atzkern
+        Claus Atzkern
 
     [see also:]
 
-	ListModelView
-	HierarchicalListView
+        ListModelView
+        HierarchicalListView
 "
 !
 
@@ -514,34 +513,14 @@
     multipleSelectOk := false.
 !
 
-selectOnButtomMenu
-    <resource: #obsolete>
-    self obsoleteMethodWarning:'use selectOnButtonMenu'.
-    ^ self selectOnButtonMenu
-!
-
-selectOnButtomMenu:aBoolean
-    <resource: #obsolete>
-    self obsoleteMethodWarning:'use selectOnButtonMenu:'.
-    ^ self selectOnButtonMenu:aBoolean
-!
-
 selectOnButtonMenu
     <resource: #obsolete>
-    "define the button-menu-press behavior; if true the line under the mouse
-     will be selected before the menu is opened. Otherwise the menu is opened
-     on the current selection."
-
     self obsoleteMethodWarning:'use selectOnMenuButton'.
     ^ self selectOnMenuButton
 !
 
 selectOnButtonMenu:aBoolean
     <resource: #obsolete>
-    "define the button-menu-press behavior; if true the line under the mouse
-     will be selected before the menu is opened. Otherwise the menu is opened
-     on the current selection."
-
     self obsoleteMethodWarning:'use selectOnMenuButton:'.
     self selectOnMenuButton:aBoolean.
 !
@@ -1337,7 +1316,7 @@
 buttonMultiPress:button x:x y:y
     "button was pressed multiple - handle a doubleClick action"
 
-    |lnNr item|
+    |lnNr|
 
     buttonMotionAction := buttonReleaseAction := nil.
 
@@ -1345,7 +1324,7 @@
 
     (button == 1) ifTrue:[
         (     (lnNr := self yVisibleToLineNr:y)   notNil
-         and:[(item := self at:lnNr ifAbsent:nil) notNil]
+         and:[(self at:lnNr ifAbsent:nil) notNil]
         ) ifTrue:[
             self selectedIndex == lnNr ifFalse:[
                 self breakPoint:#ca
@@ -1922,18 +1901,13 @@
 !
 
 pointerEntersItem:anItemOrNil
-    "the pointer moves over an item or nil
-    "
-    |newItem|
+    "the pointer moves over an item or nil"
 
     (shown and:[self size ~~ 0]) ifFalse:[
-	enterItem := nil.
-	^ self.
+        enterItem := nil.
+        ^ self.
     ].
 
-    highlightEnterItem ifTrue:[ newItem := anItemOrNil ]
-		      ifFalse:[ newItem := nil ].
-
     anItemOrNil == enterItem ifTrue:[ ^ self ].
 
     enterItem notNil ifTrue:[ self invalidateLineOfItem:enterItem ].
@@ -2697,10 +2671,10 @@
 !SelectionInListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.167 2014-04-13 20:25:30 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.168 2014-04-13 21:00:15 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.167 2014-04-13 20:25:30 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.168 2014-04-13 21:00:15 stefan Exp $'
 ! !