|
Class: Icon
Object
|
+--Icon
- Package:
- stx:libview2
- Category:
- Graphics-Images
- Version:
- rev:
1.55
date: 2023/05/26 11:44:02
- user: cg
- file: Icon.st directory: libview2
- module: stx stc-classLibrary: libview2
The Icon class keeps track of already loaded Images and caches
them for later reuse.
Icons are accessed by a symbolic name, so there is no need to
remember their names (they must have been registered under that name
before - of course).
Icon was mostly added for ST-80 Compatibility:
Images are returned via the #constantNamed: message which is used by
many ST-80 public domain classes and returns corresponding ST/X icons.
Notice, that ST/X does not provide Icon instances - Icon only consists
of class mimicri protocol, to make your life easier.
If you like the original ST-80 icons, install the image files in the `bitmap'
directory under a name foo.xbm, where `foo' corresponds to the icons
name symbol
(i.e. for the `Icon constantNamed:#foo', a 'foo.xbm' file is required).
You can grab those icons from manchester or from the PrimeTime Freeware
(PTF) CD. A copy of those bitmaps (from the PTF-CD) is found in
'goodies/bitmaps/st80bitmaps'.
[instance variables:]
image - these have been added in instVar-slots according to the ST-80's Icon class.
mask - to allow loading of st-80 icons (which are stored as instVarAt:put: expressions)
copyrightCOPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
constantNamed: aName
-
return the image registered under aName.
Usage example(s):
Icon constantNamed:#file
Icon constantNamed:#debugger
Icon constantNamed:#systembrowser
Icon constantNamed:#SBrowser
Icon constantNamed:#SBrowser
|
-
constantNamed: aName ifAbsentPut: aBlock
-
if an image for aName is registered, return it;
otherwise, register the result from evaluating aBlock
(which also could be a value holder) and return it.
-
constantNamed: aName ifAbsentPutImageFromFile: aFileName
-
if an image for aName is registered, return it;
otherwise, load the image from aFileName (searched in bitmaps directories),
register the result and return it.
-
constantNamed: aName put: anImage
-
register anImage under aName.
-
constantNamed: aName searchForFile: doSearchForFile
-
return the image registered under aName.
Usage example(s):
Icon constantNamed:#file
Icon constantNamed:#debugger
Icon constantNamed:#systembrowser
Icon constantNamed:#SBrowser
Icon constantNamed:#SBrowser
|
-
nameIfKnownIcon: anImage
-
back-query, given an image, return its name-key if known; nil otherwise
cleanup
-
lowSpaceCleanup
-
cleanup in low-memory situations
Usage example(s):
image specs
-
defaultSTXIcon1
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self defaultSTXIcon1 inspect
ImageEditor openOnClass:self andSelector:#defaultSTXIcon1
Icon flushCachedIcons
|
-
defaultSTXIcon2
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self defaultSTXIcon2 inspect
ImageEditor openOnClass:self andSelector:#defaultSTXIcon2
Icon flushCachedIcons
|
-
defaultSTXIcon3
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self defaultSTXIcon3 inspect
ImageEditor openOnClass:self andSelector:#defaultSTXIcon3
Icon flushCachedIcons
|
-
stxIcon
-
icn := self stxIcon32x32alpha.
Usage example(s):
Icon stxIcon
self constantNamed:'stxIcon' put:(self stxIcon32x32alpha)
|
-
stxIcon16x16
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self stxIcon16x16 inspect
ImageEditor openOnClass:self andSelector:#stxIcon16x16
Icon flushCachedIcons
|
-
stxIcon32x32
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self stxIcon32x32 inspect
ImageEditor openOnClass:self andSelector:#stxIcon32x32
Icon flushCachedIcons
|
-
stxIcon32x32alpha
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self stxIcon32x32alpha inspect
ImageEditor openOnClass:self andSelector:#stxIcon32x32alpha
Icon flushCachedIcons
|
-
stxIconOld
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self stxIconOld inspect
ImageEditor openOnClass:self andSelector:#stxIconOld
Icon flushCachedIcons
|
-
stxIconTransparent
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self stxIconTransparent inspect
ImageEditor openOnClass:self andSelector:#stxIconTransparent
Icon flushCachedIcons
|
-
stxIconTransparent2
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self stxIconTransparent2 inspect
ImageEditor openOnClass:self andSelector:#stxIconTransparent2
Icon flushCachedIcons
|
-
stxIconTransparent3
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
Usage example(s):
self stxIconTransparent3 inspect
ImageEditor openOnClass:self andSelector:#stxIconTransparent3
Icon flushCachedIcons
|
initialization
-
initialize
-
Icon initialize
-
replacementNameFor: aName
-
return a replacement ST/X name for an ST80 icon name.
-
replacementNames
-
return an ST-80 constant name to ST/X file name translation.
This was added for ST-80 compatibility, to support code which uses
things like 'Icon constantNamed:#categoryBrowser'.
obsolete image specs
-
backwardIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
copyIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
cutIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
deleteIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
downIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
downRightIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
forwardIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
helpIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
leftDownIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
leftIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
loadIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
newIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
pasteIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
rightIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
saveIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
startIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
upIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
upRightIcon
-
Obsolete - please goto ToolbarIconLibrary directly
** This is an obsolete interface - do not use it (it may vanish in future versions) **
startup & release
-
flushCachedIcons
-
Icon flushCachedIcons
-
preSnapshot
-
flush cached icons contents before saving a snapshot
(do not save them in the image)
-
releaseCachedIconsFromDevice: aGraphicsDevice
-
Icon releaseCachedIconsFromDevice:Display
|