Grafoscopio/repository/Grafoscopio/GrafoscopioButtonModel.clas...

87 lines
1.5 KiB
Smalltalk

"
I'm just a prototype of how morphic buttons can be embedded
inside a Grafoscopio notebook UI via Spec.
I'm not used in the actual UI, but I'm more a remainder of directions
to explore.
"
Class {
#name : #GrafoscopioButtonModel,
#superclass : #ComposableModel,
#instVars : [
'button'
],
#category : #'Grafoscopio-UI'
}
{ #category : #specs }
GrafoscopioButtonModel class >> defaultSpec [
^ SpecLayout composed add: #button
]
{ #category : #accessing }
GrafoscopioButtonModel >> body [
^ self button
]
{ #category : #accessing }
GrafoscopioButtonModel >> button [
^ button
]
{ #category : #accessing }
GrafoscopioButtonModel >> button: anObject [
button := anObject
]
{ #category : #accessing }
GrafoscopioButtonModel >> cancel [
^ cancel
]
{ #category : #accessing }
GrafoscopioButtonModel >> cancel: anObject [
cancel := anObject
]
{ #category : #api }
GrafoscopioButtonModel >> content: anAssoc [
button label: anAssoc key.
button action: anAssoc value.
]
{ #category : #accessing }
GrafoscopioButtonModel >> find [
^ find
]
{ #category : #accessing }
GrafoscopioButtonModel >> find: anObject [
find := anObject
]
{ #category : #initalize }
GrafoscopioButtonModel >> initializeWidgets [
button := self newButton.
]
{ #category : #accessing }
GrafoscopioButtonModel >> ok [
^ ok
]
{ #category : #accessing }
GrafoscopioButtonModel >> ok: anObject [
ok := anObject
]
{ #category : #accessing }
GrafoscopioButtonModel >> replace [
^ replace
]
{ #category : #accessing }
GrafoscopioButtonModel >> replace: anObject [
replace := anObject
]