41 lines
726 B
Smalltalk
41 lines
726 B
Smalltalk
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 : #api }
|
|
GrafoscopioButtonModel >> content: anAssoc [
|
|
button label: anAssoc key.
|
|
button action: anAssoc value.
|
|
]
|
|
|
|
{ #category : #initalize }
|
|
GrafoscopioButtonModel >> initializeWidgets [
|
|
button := self newButton.
|
|
]
|