mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-28 12:28:21 +01:00
34 lines
626 B
Smalltalk
34 lines
626 B
Smalltalk
|
Class {
|
||
|
#name : #DiyaStyleSheet,
|
||
|
#superclass : #DiyaBaseObject,
|
||
|
#instVars : [
|
||
|
'stylesheet'
|
||
|
],
|
||
|
#category : #'Diya-Graphics'
|
||
|
}
|
||
|
|
||
|
{ #category : #convenience }
|
||
|
DiyaStyleSheet >> ? sheet [
|
||
|
^stylesheet at: sheet ifAbsent:[
|
||
|
DiyaCoreAPIError signal: 'Unable to query stylesheet ', sheet
|
||
|
].
|
||
|
]
|
||
|
|
||
|
{ #category : #initialization }
|
||
|
DiyaStyleSheet >> define: name styles: styles [
|
||
|
stylesheet at: name put: styles asDictionary.
|
||
|
^self
|
||
|
|
||
|
]
|
||
|
|
||
|
{ #category : #initialization }
|
||
|
DiyaStyleSheet >> initialize [
|
||
|
super initialize.
|
||
|
stylesheet := Dictionary new.
|
||
|
]
|
||
|
|
||
|
{ #category : #accessing }
|
||
|
DiyaStyleSheet >> stylesheet [
|
||
|
^ stylesheet
|
||
|
]
|