equal
deleted
inserted
replaced
136 iconBitmap |
136 iconBitmap |
137 "return the bitmap shown as icon in my instances. |
137 "return the bitmap shown as icon in my instances. |
138 This is the default image; you can overwrite this in a concrete |
138 This is the default image; you can overwrite this in a concrete |
139 instance with the image: message" |
139 instance with the image: message" |
140 |
140 |
|
141 <resource: #style (#warningBoxIcon #warningBoxIconFile)> |
|
142 |
|
143 |img imgFileName| |
|
144 |
141 WarnBitmap isNil ifTrue:[ |
145 WarnBitmap isNil ifTrue:[ |
142 WarnBitmap := Image fromFile:'bitmaps/Warning.xbm'. |
146 img := StyleSheet at:'warningBoxIcon'. |
143 WarnBitmap notNil ifTrue:[ |
147 img notNil ifTrue:[ |
144 WarnBitmap := WarnBitmap on:Display |
148 WarnBitmap := img |
145 ] |
149 ] ifFalse:[ |
|
150 imgFileName := StyleSheet at:'warningBoxIconFile' default:'bitmaps/Warning.xbm'. |
|
151 WarnBitmap := Image fromFile:imgFileName. |
|
152 ]. |
|
153 WarnBitmap notNil ifTrue:[ |
|
154 WarnBitmap := WarnBitmap on:Display |
|
155 ] |
146 ]. |
156 ]. |
147 ^ WarnBitmap |
157 ^ WarnBitmap |
148 |
158 |
149 " |
159 " |
150 WarnBitmap := Image fromFile:'bitmaps/WARNING.xpm'. |
160 WarnBitmap := Image fromFile:'bitmaps/WARNING.xpm'. |
162 box image:(Image fromFile:'bitmaps/QUESTION.xpm'). |
172 box image:(Image fromFile:'bitmaps/QUESTION.xpm'). |
163 box showAtPointer. |
173 box showAtPointer. |
164 " |
174 " |
165 |
175 |
166 "Created: 17.11.1995 / 18:16:47 / cg" |
176 "Created: 17.11.1995 / 18:16:47 / cg" |
|
177 "Modified: 1.4.1997 / 14:28:07 / cg" |
167 ! ! |
178 ! ! |
168 |
179 |
169 !WarningBox class methodsFor:'styles'! |
180 !WarningBox class methodsFor:'styles'! |
170 |
181 |
171 updateStyleCache |
182 updateStyleCache |
172 "extract values from the styleSheet and cache them in class variables" |
183 "extract values from the styleSheet and cache them in class variables. |
173 |
184 Here, the cached infoBitmap is simply flushed." |
174 <resource: #style (#warningBoxIcon)> |
185 |
175 |
186 WarnBitmap := nil |
176 |img| |
187 |
177 |
188 "Modified: 1.4.1997 / 14:44:59 / cg" |
178 img := StyleSheet at:'warningBoxIcon'. |
|
179 img notNil ifTrue:[WarnBitmap := img on:Display]. |
|
180 |
|
181 "Modified: 1.3.1996 / 13:51:43 / cg" |
|
182 ! ! |
189 ! ! |
183 |
190 |
184 !WarningBox methodsFor:'initialization'! |
191 !WarningBox methodsFor:'initialization'! |
185 |
192 |
186 initialize |
193 initialize |
204 ! ! |
211 ! ! |
205 |
212 |
206 !WarningBox class methodsFor:'documentation'! |
213 !WarningBox class methodsFor:'documentation'! |
207 |
214 |
208 version |
215 version |
209 ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.20 1996-05-28 14:59:43 cg Exp $' |
216 ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.21 1997-04-01 12:54:23 cg Exp $' |
210 ! ! |
217 ! ! |