Skip to content

Commit

Permalink
Rename BLCursor -> BlCursor
Browse files Browse the repository at this point in the history
This change complements #404

Tested in a workspace with:

selectors := BlCursor class selectors.
c := Object subclass: #PruebaCursor.
selectors do: [ :each |
	c compile: ('{1} ^ BlCursor {1}' format: { each }) ].
selectors collect: [ :each |
	each -> (c new perform: each) ].
  • Loading branch information
tinchodias committed Jan 19, 2024
1 parent ccb1af7 commit ebc9a8e
Show file tree
Hide file tree
Showing 667 changed files with 9,242 additions and 7,950 deletions.
14 changes: 8 additions & 6 deletions src/Bloc/AtomicSharedPriorityQueue.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ Internal Representation and Key Implementation Points.
"
Class {
#name : #AtomicSharedPriorityQueue,
#superclass : #AtomicSharedQueue,
#category : #'Bloc-DataStructure - Priority Queue'
#name : 'AtomicSharedPriorityQueue',
#superclass : 'AtomicSharedQueue',
#category : 'Bloc-DataStructure - Priority Queue',
#package : 'Bloc',
#tag : 'DataStructure - Priority Queue'
}

{ #category : #accessing }
{ #category : 'accessing' }
AtomicSharedPriorityQueue >> next [

| result |
Expand All @@ -44,7 +46,7 @@ AtomicSharedPriorityQueue >> next [

]

{ #category : #accessing }
{ #category : 'accessing' }
AtomicSharedPriorityQueue >> nextIfNone: aBlock [
"Attempt to fetch the next highest priority item from queue (0 = highest priority).
Evaluate a block if attempt is failed i.e. there is no items available or queue is locked by another process"
Expand Down Expand Up @@ -112,7 +114,7 @@ AtomicSharedPriorityQueue >> nextIfNone: aBlock [
] repeat.
]

{ #category : #accessing }
{ #category : 'accessing' }
AtomicSharedPriorityQueue >> nextOrNilSuchThat: aBlock [
"Fetch an object from queue that satisfies aBlock, skipping (but not removing) any intermediate objects.
If no object has been found, answer <nil> and leave me intact.
Expand Down
26 changes: 13 additions & 13 deletions src/Bloc/BLCursor.class.st
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
Class {
#name : 'BLCursor',
#name : 'BlCursor',
#superclass : 'Object',
#category : 'Bloc-Utilities - Selection',
#package : 'Bloc',
#tag : 'Utilities - Selection'
}

{ #category : 'accessing' }
BLCursor class >> crosshair [
BlCursor class >> crosshair [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv crosshair' -> 'Cursor crossHair'.
^ Cursor crossHair
]

{ #category : 'accessing' }
BLCursor class >> default [
BlCursor class >> default [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv default' -> 'Cursor normal'.
^ Cursor normal
]

{ #category : 'accessing' }
BLCursor class >> hand [
BlCursor class >> hand [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv hand' -> 'Cursor webLink'.
^ Cursor webLink
]

{ #category : 'testing' }
BLCursor class >> isDeprecated [
BlCursor class >> isDeprecated [

^ true
]

{ #category : 'accessing' }
BLCursor class >> overEditableText [
BlCursor class >> overEditableText [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv overEditableText' -> 'Cursor overEditableText'.
^ Cursor overEditableText
]

{ #category : 'accessing' }
BLCursor class >> resizeBottom [
BlCursor class >> resizeBottom [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv resizeBottom' -> 'Cursor resizeBottom'.
^ Cursor resizeBottom
]

{ #category : 'accessing' }
BLCursor class >> resizeBottomLeft [
BlCursor class >> resizeBottomLeft [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv resizeBottomLeft' -> 'Cursor resizeBottomLeft'.
^ Cursor resizeBottomLeft
]

{ #category : 'accessing' }
BLCursor class >> resizeBottomRight [
BlCursor class >> resizeBottomRight [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv resizeBottomRight' -> 'Cursor resizeBottomRight'.
^ Cursor resizeBottomRight
]

{ #category : 'accessing' }
BLCursor class >> resizeTop [
BlCursor class >> resizeTop [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv resizeTop' -> 'Cursor resizeTop'.
^ Cursor resizeTop
]

{ #category : 'accessing' }
BLCursor class >> resizeTopLeft [
BlCursor class >> resizeTopLeft [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv resizeTopLeft' -> 'Cursor resizeTopLeft'.
^ Cursor resizeTopLeft
]

{ #category : 'accessing' }
BLCursor class >> resizeTopRight [
BlCursor class >> resizeTopRight [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv resizeTopRight' -> 'Cursor resizeTopRight'.
^ Cursor resizeTopRight
]

{ #category : 'accessing' }
BLCursor class >> wait [
BlCursor class >> wait [

self deprecated: 'Use Cursor instead.' transformWith: '`@rcv wait' -> 'Cursor wait'.
^ Cursor wait
Expand Down
10 changes: 6 additions & 4 deletions src/Bloc/BlActionHandler.class.st
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Class {
#name : #BlActionHandler,
#superclass : #Object,
#name : 'BlActionHandler',
#superclass : 'Object',
#traits : 'TBlDebug',
#classTraits : 'TBlDebug classTrait',
#category : #'Bloc-Events-Handler'
#category : 'Bloc-Events-Handler',
#package : 'Bloc',
#tag : 'Events-Handler'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
BlActionHandler >> actionPerformed [
]
30 changes: 16 additions & 14 deletions src/Bloc/BlAffineCompositeTransformation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,82 @@ I composite `BlAffineTransformation` objects.
There can be only one transformation instance per type.
"
Class {
#name : #BlAffineCompositeTransformation,
#superclass : #BlAffineTransformation,
#name : 'BlAffineCompositeTransformation',
#superclass : 'BlAffineTransformation',
#instVars : [
'transformations'
],
#category : #'Bloc-Basic-Transformations'
#category : 'Bloc-Basic-Transformations',
#package : 'Bloc',
#tag : 'Basic-Transformations'
}

{ #category : #adding }
{ #category : 'adding' }
BlAffineCompositeTransformation >> addTransformation: aBlAffineTransformation [
"There can be only one transformation instance per type"

transformations add: aBlAffineTransformation
]

{ #category : #enumerating }
{ #category : 'enumerating' }
BlAffineCompositeTransformation >> do: aBlock [

transformations do: [ :each | each do: aBlock ]
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineCompositeTransformation >> hasTransformations [

^ transformations isNotEmpty
]

{ #category : #initialization }
{ #category : 'initialization' }
BlAffineCompositeTransformation >> initialize [

super initialize.

transformations := OrderedCollection new
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineCompositeTransformation >> is2D [

^ transformations allSatisfy: [ :each | each is2D ]
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineCompositeTransformation >> isIdentity [

^ self hasTransformations not
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineCompositeTransformation >> isTranslation [

^ transformations allSatisfy: [ :each | each isTranslation ]
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineCompositeTransformation >> multiplyOn: aBlMatrix [

transformations do: [ :each |
each multiplyOn: aBlMatrix ]
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineCompositeTransformation >> multiplyOn: aBlMatrix in: aBlElement [

transformations do: [ :each |
each multiplyOn: aBlMatrix in: aBlElement ]
]

{ #category : #printing }
{ #category : 'printing' }
BlAffineCompositeTransformation >> printOn: aStream [

aStream nextPutAll: 'Composition'
]

{ #category : #accessing }
{ #category : 'accessing' }
BlAffineCompositeTransformation >> transformations [

^ transformations
Expand Down
30 changes: 16 additions & 14 deletions src/Bloc/BlAffineTransformation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ https://en.wikipedia.org/wiki/Affine_transformation
"
Class {
#name : #BlAffineTransformation,
#superclass : #Object,
#name : 'BlAffineTransformation',
#superclass : 'Object',
#instVars : [
'origin'
],
#category : #'Bloc-Basic-Transformations'
#category : 'Bloc-Basic-Transformations',
#package : 'Bloc',
#tag : 'Basic-Transformations'
}

{ #category : #converting }
{ #category : 'converting' }
BlAffineTransformation >> asMatrix [

| aMatrix |
Expand All @@ -28,55 +30,55 @@ BlAffineTransformation >> asMatrix [
^ aMatrix
]

{ #category : #enumerating }
{ #category : 'enumerating' }
BlAffineTransformation >> do: aBlock [

aBlock value: self
]

{ #category : #initialization }
{ #category : 'initialization' }
BlAffineTransformation >> initialize [

super initialize.

origin := BlAffineTransformationCenterOrigin defaultInstance
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineTransformation >> is2D [
"Return true if transformation happens in x-y plane, hence 2D"

^ self subclassResponsibility
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineTransformation >> is3D [
"Return true if transformation happens in x-y-z plane, hence 3D"

^ self is2D not
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineTransformation >> isIdentity [
"Return true if thiss transformation is identity"

^ false
]

{ #category : #testing }
{ #category : 'testing' }
BlAffineTransformation >> isTranslation [
"Return true if this transformation is translation"

^ false
]

{ #category : #'mathematical functions' }
{ #category : 'mathematical functions' }
BlAffineTransformation >> multiplyOn: aBlMatrix [

self subclassResponsibility
]

{ #category : #'mathematical functions' }
{ #category : 'mathematical functions' }
BlAffineTransformation >> multiplyOn: aBlMatrix in: aBlElement [

| aBlVector |
Expand All @@ -87,13 +89,13 @@ BlAffineTransformation >> multiplyOn: aBlMatrix in: aBlElement [
aBlMatrix translateBy: aBlVector
]

{ #category : #accessing }
{ #category : 'accessing' }
BlAffineTransformation >> origin [

^ origin
]

{ #category : #accessing }
{ #category : 'accessing' }
BlAffineTransformation >> origin: aBlAffineTransformationOrigin [

origin := aBlAffineTransformationOrigin
Expand Down
12 changes: 7 additions & 5 deletions src/Bloc/BlAffineTransformationCenterOrigin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ I am a relative transformation origin which is attached to the center of an elem
"
Class {
#name : #BlAffineTransformationCenterOrigin,
#superclass : #BlAffineTransformationOrigin,
#name : 'BlAffineTransformationCenterOrigin',
#superclass : 'BlAffineTransformationOrigin',
#classInstVars : [
'defaultInstance'
],
#category : #'Bloc-Basic-Transformations'
#category : 'Bloc-Basic-Transformations',
#package : 'Bloc',
#tag : 'Basic-Transformations'
}

{ #category : #accessing }
{ #category : 'accessing' }
BlAffineTransformationCenterOrigin class >> defaultInstance [

^ defaultInstance ifNil: [ defaultInstance := self new ]
]

{ #category : #math }
{ #category : 'math' }
BlAffineTransformationCenterOrigin >> originIn: anElement [

^ anElement extent / 2.0
Expand Down
Loading

0 comments on commit ebc9a8e

Please sign in to comment.