eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Icon':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Icon


Inheritance:

   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

Description:


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)

copyright

COPYRIGHT (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.

Class protocol:

accessing
o  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     

o  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.

o  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.

o  constantNamed: aName put: anImage
register anImage under aName.

o  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     

o  nameIfKnownIcon: anImage
back-query, given an image, return its name-key if known; nil otherwise

cleanup
o  lowSpaceCleanup
cleanup in low-memory situations

Usage example(s):

     Icon lowSpaceCleanup

image specs
o  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

o  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

o  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

o  stxIcon
icn := self stxIcon32x32alpha.

Usage example(s):

     Icon stxIcon
     self constantNamed:'stxIcon' put:(self stxIcon32x32alpha)

o  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

o  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

o  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

o  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

o  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

o  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

o  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
o  initialize
Icon initialize

o  replacementNameFor: aName
return a replacement ST/X name for an ST80 icon name.

o  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
o  backwardIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  copyIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  cutIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  deleteIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  downIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  downRightIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  forwardIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  helpIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  leftDownIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  leftIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  loadIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  newIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  pasteIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  rightIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  saveIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  startIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  upIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  upRightIcon
Obsolete - please goto ToolbarIconLibrary directly

** This is an obsolete interface - do not use it (it may vanish in future versions) **

startup & release
o  flushCachedIcons
Icon flushCachedIcons

o  preSnapshot
flush cached icons contents before saving a snapshot
(do not save them in the image)

o  releaseCachedIconsFromDevice: aGraphicsDevice
Icon releaseCachedIconsFromDevice:Display



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 27 Jul 2024 08:51:15 GMT