Calculatrice>>creeCalcButton: tabEtiquette
for: tabSelecteur
and: tabActivF
frame: rects
window: window
etat: etats
| view collection vues |
tabEtiquette
with: tabSelecteur
and: tabActivF
and: rects
and: etats
do: [:touches :funs :fonc :rect :mesEtats |
| m bouton |
collection := OrderedCollection new.
vues := OrderedCollection new.
m := AlignmentMorph newRow.
touches
with: funs
and: mesEtats
do: [:touche :fun :eta |
view :=
(self newCalcButton: (bouton := fun == #autreBase
ifTrue: [CalcButtonEtiquetteVariable new
label: fun
fonction: fonc
etat: eta
on: self]
ifFalse: [CalcButton new
label: fun
fonction: fonc
etat: eta
on: self]))
vues addFirst: view.
self addDependent: bouton.
collection addFirst: bouton].
CalcButton initialise: collection.
vues
do: [:tView | m addMorph: tView].
window addMorph: m frame: rect]
|
|