Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ To open the instructions execute the follwing code with a DoIt action :
MolGeoPosHelper openAsUnclosableWindow
"
Class {
#name : #ManifestMoleculeGeographicalPositionExample,
#superclass : #PackageManifest,
#category : #'Molecule-Geographical-Position-Example-Manifest'
#name : 'ManifestMoleculeGeographicalPositionExample',
#superclass : 'PackageManifest',
#category : 'Molecule-Geographical-Position-Example-Manifest',
#package : 'Molecule-Geographical-Position-Example',
#tag : 'Manifest'
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
Class {
#name : #MolGeoButtonElementAbstract,
#superclass : #BlElement,
#category : #'Molecule-Geographical-Position-Example-Application'
#name : 'MolGeoButtonElementAbstract',
#superclass : 'BlElement',
#category : 'Molecule-Geographical-Position-Example-Application',
#package : 'Molecule-Geographical-Position-Example',
#tag : 'Application'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementAbstract class >> example [

"See subclasses"
]

{ #category : #testing }
{ #category : 'testing' }
MolGeoButtonElementAbstract class >> isAbstract [

^ self == MolGeoButtonElementAbstract
]

{ #category : #'pyramid-serialized-bloc' }
{ #category : 'pyramid-serialized-bloc' }
MolGeoButtonElementAbstract class >> pystonSpec [
"This class has been generated using Pyramid.

Expand Down Expand Up @@ -238,7 +240,7 @@ MolGeoButtonElementAbstract class >> pystonSpec [
]'
]

{ #category : #initialization }
{ #category : 'initialization' }
MolGeoButtonElementAbstract >> buildElements [

self hasChildren ifTrue: [ self removeChildren ].
Expand All @@ -251,19 +253,19 @@ MolGeoButtonElementAbstract >> buildElements [
(BlLinearLayout vertical alignCenter)
]

{ #category : #defaults }
{ #category : 'defaults' }
MolGeoButtonElementAbstract >> defaultFontSize [

^ 16
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementAbstract >> hoverColor [

^ self shouldBeImplemented
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoButtonElementAbstract >> icon: aForm [

| background iconElement |
Expand All @@ -277,20 +279,20 @@ MolGeoButtonElementAbstract >> icon: aForm [
c horizontal exact: aForm extent y + iconElement margin width ]
]

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

super initialize.
self buildElements.
self
when: BlMouseOverEvent
addEventHandlerOn: BlMouseOverEvent
do: [ :evt |
(self childWithId: #background) background: self hoverColor ].
self when: BlMouseOutEvent do: [ :evt |
self addEventHandlerOn: BlMouseOutEvent do: [ :evt |
(self childWithId: #background) background: self secondaryColor ].
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoButtonElementAbstract >> label: aString [

| newLabel |
Expand All @@ -305,13 +307,13 @@ MolGeoButtonElementAbstract >> label: aString [
self replaceChild: (self childWithId: #label) with: newLabel
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoButtonElementAbstract >> makeNewIconElement: aForm [

^ (aForm collectColors: [ :c | c isTransparent ifTrue: [ c ] ifFalse: [ self primaryColor ] ]) asElement
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoButtonElementAbstract >> makeNewLabelElement: aString [

| rope |
Expand All @@ -322,13 +324,13 @@ MolGeoButtonElementAbstract >> makeNewLabelElement: aString [
^ rope asElement
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementAbstract >> primaryColor [

^ self shouldBeImplemented
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementAbstract >> secondaryColor [

^ self shouldBeImplemented
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #MolGeoButtonElementNotSelected,
#superclass : #MolGeoButtonElementAbstract,
#category : #'Molecule-Geographical-Position-Example-Application'
#name : 'MolGeoButtonElementNotSelected',
#superclass : 'MolGeoButtonElementAbstract',
#category : 'Molecule-Geographical-Position-Example-Application',
#package : 'Molecule-Geographical-Position-Example',
#tag : 'Application'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementNotSelected class >> example [

self new
Expand All @@ -13,19 +15,19 @@ MolGeoButtonElementNotSelected class >> example [
openInNewSpace
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementNotSelected >> hoverColor [

^ Color fromHexString: '#bebdbf'
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementNotSelected >> primaryColor [

^ Color fromHexString: '#6c757d'
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementNotSelected >> secondaryColor [

^ Color transparent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Class {
#name : #MolGeoButtonElementSelected,
#superclass : #MolGeoButtonElementAbstract,
#category : #'Molecule-Geographical-Position-Example-Application'
#name : 'MolGeoButtonElementSelected',
#superclass : 'MolGeoButtonElementAbstract',
#category : 'Molecule-Geographical-Position-Example-Application',
#package : 'Molecule-Geographical-Position-Example',
#tag : 'Application'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementSelected class >> example [

self new
Expand All @@ -13,13 +15,13 @@ MolGeoButtonElementSelected class >> example [
openInNewSpace
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementSelected >> hoverColor [

^ Color fromHexString: '#78A7D6'
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoButtonElementSelected >> makeNewLabelElement: aString [

| rope |
Expand All @@ -31,13 +33,13 @@ MolGeoButtonElementSelected >> makeNewLabelElement: aString [
^ rope asElement
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementSelected >> primaryColor [

^ Color fromHexString: '#0D3151'
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoButtonElementSelected >> secondaryColor [

^ Color fromHexString: '#8DBEF1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Class {
#name : #MolGeoConnectedSwitchesElement,
#superclass : #BlElement,
#name : 'MolGeoConnectedSwitchesElement',
#superclass : 'BlElement',
#instVars : [
'switches'
],
#category : #'Molecule-Geographical-Position-Example-Application'
#category : 'Molecule-Geographical-Position-Example-Application',
#package : 'Molecule-Geographical-Position-Example',
#tag : 'Application'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
MolGeoConnectedSwitchesElement class >> example [

| help pharoBig |
Expand All @@ -20,13 +22,13 @@ MolGeoConnectedSwitchesElement class >> example [
openInNewSpace
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoConnectedSwitchesElement >> deactivateAllSwitchesExcept: aMolGeoSwitchElement [

self switches do: [ :each | aMolGeoSwitchElement = each ifFalse: [ each state: false ] ]
]

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

super initialize.
Expand All @@ -39,20 +41,20 @@ MolGeoConnectedSwitchesElement >> initialize [
c horizontal fitContent ]
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoConnectedSwitchesElement >> switches [

^ switches
]

{ #category : #accessing }
{ #category : 'accessing' }
MolGeoConnectedSwitchesElement >> switches: anObject [

switches := anObject.
self addChildren: anObject.
switches ifEmpty: [ ^ self ].
switches do: [ :each |
each when: BlPrimaryClickEvent do: [ :evt |
each addEventHandlerOn: BlPrimaryClickEvent do: [ :evt |
self deactivateAllSwitchesExcept: each.
each state: true. ] ] .
switches first state: true
Expand Down
Loading