-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from pharo-graphics/ToSelectionModelSelecter
To selection model selecter
- Loading branch information
Showing
54 changed files
with
1,675 additions
and
1,391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
src/Toplo-Examples/ToListElementStresserWithAdditionalSelecters.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
Class { | ||
#name : #ToListElementStresserWithAdditionalSelecters, | ||
#superclass : #ToListElementStresser, | ||
#category : #'Toplo-Examples' | ||
} | ||
|
||
{ #category : #running } | ||
ToListElementStresserWithAdditionalSelecters class >> runInSDL [ | ||
|
||
<script> | ||
self new runInHost: BlOSWindowSDL2Host new | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionDisableAllIn: aList [ | ||
|
||
aList disabledSelecter selectAll | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionDisableIndexIn: aList [ | ||
|
||
| idx | | ||
idx := self randIndexIn: aList. | ||
idx isZero ifFalse: [ aList disabledSelecter selectIndex: idx ] | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionDisableIndexesIn: aList [ | ||
|
||
| nb selected | | ||
nb := (self randIndexIn: aList) min: 30. | ||
nb isZero ifTrue: [ ^ self ]. | ||
selected := (1 to: nb) collect: [ :i | self randIndexIn: aList ]. | ||
aList disabledSelecter selectIndexes: selected | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionEnableAllIn: aList [ | ||
|
||
aList disabledSelecter deselectAll | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionEnableIndexIn: aList [ | ||
|
||
| idx | | ||
idx := self randIndexIn: aList. | ||
idx isZero ifFalse: [ aList disabledSelecter deselectIndex: idx ] | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionEnableIndexesIn: aList [ | ||
|
||
| nb selected | | ||
nb := (self randIndexIn: aList) min: 30. | ||
nb isZero ifTrue: [ ^ self ]. | ||
selected := (1 to: nb) collect: [ :i | self randIndexIn: aList ]. | ||
aList disabledSelecter deselectIndexes: selected | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionHiddenIndexesIn: aList [ | ||
|
||
| nb selected | | ||
nb := (self randIndexIn: aList) min: 30. | ||
nb isZero ifTrue: [ ^ self ]. | ||
selected := (1 to: nb) collect: [ :i | self randIndexIn: aList ]. | ||
aList hiddenSelecter selectIndexes: selected | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionSelectableAllIn: aList [ | ||
|
||
|
||
aList unselectableSelecter deselectAll | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionSelectableIndexIn: aList [ | ||
|
||
| idx | | ||
idx := self randIndexIn: aList. | ||
idx isZero ifFalse: [ aList unselectableSelecter deselectIndex: idx ] | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionSelectableIndexesIn: aList [ | ||
|
||
| nb selected | | ||
nb := (self randIndexIn: aList) min: 30. | ||
nb isZero ifTrue: [ ^ self ]. | ||
selected := (1 to: nb) collect: [ :i | self randIndexIn: aList ]. | ||
aList unselectableSelecter deselectIndexes: selected | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionUnhiddenAllIn: aList [ | ||
|
||
aList hiddenSelecter deselectAll | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionUnselectableAllIn: aList [ | ||
|
||
aList unselectableSelecter selectAll | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionUnselectableIndexIn: aList [ | ||
|
||
| idx | | ||
idx := self randIndexIn: aList. | ||
idx isZero ifFalse: [ aList unselectableSelecter selectIndex: idx ] | ||
] | ||
|
||
{ #category : #actions } | ||
ToListElementStresserWithAdditionalSelecters >> actionUnselectableIndexesIn: aList [ | ||
|
||
| nb selected | | ||
nb := (self randIndexIn: aList) min: 30. | ||
nb isZero ifTrue: [ ^ self ]. | ||
selected := (1 to: nb) collect: [ :i | self randIndexIn: aList ]. | ||
aList unselectableSelecter selectIndexes: selected | ||
] | ||
|
||
{ #category : #initialization } | ||
ToListElementStresserWithAdditionalSelecters >> newListElement [ | ||
|
||
^ super newListElement | ||
withHiddenSelecter; | ||
withUnselectableSelecter; | ||
withDisabledSelecter; | ||
yourself | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.