eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Icon':

Home

everywhere
www.exept.de
for:
[back]

Class: Icon


Inheritance:

   Object
   |
   +--Icon

Package:
stx:libview2
Category:
Graphics-Images
Version:
rev: 1.37 date: 2009/10/14 14:07:15
user: cg
file: Icon.st directory: libview2
module: stx stc-classLibrary: libview2
Author:
Claus Gittinger

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 
some ST-80 PD 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'.

CAVEAT:
    masks are not yet implemented


Related information:

    Image
    Form
    ImageReader

Class protocol:

accessing
o  constantNamed: aName
return the image registered under aName.

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.

image specs
o  backwardIcon
Obsolete - please goto ToolbarIconLibrary directly

o  copyIcon
Obsolete - please goto ToolbarIconLibrary directly

o  cutIcon
Obsolete - please goto ToolbarIconLibrary directly

o  deleteIcon
Obsolete - please goto ToolbarIconLibrary directly

o  downIcon
Obsolete - please goto ToolbarIconLibrary directly

o  downRightIcon
Obsolete - please goto ToolbarIconLibrary directly

o  forwardIcon
Obsolete - please goto ToolbarIconLibrary directly

o  helpIcon
Obsolete - please goto ToolbarIconLibrary directly

o  leftDownIcon
Obsolete - please goto ToolbarIconLibrary directly

o  leftIcon
Obsolete - please goto ToolbarIconLibrary directly

o  loadIcon
Obsolete - please goto ToolbarIconLibrary directly

o  newIcon
Obsolete - please goto ToolbarIconLibrary directly

o  pasteIcon
Obsolete - please goto ToolbarIconLibrary directly

o  rightIcon
Obsolete - please goto ToolbarIconLibrary directly

o  saveIcon
Obsolete - please goto ToolbarIconLibrary directly

o  startIcon
Obsolete - please goto ToolbarIconLibrary directly

o  stxIcon

o  stxIcon16x16
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  stxIconOld
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  stxIconTransparent
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  stxIconTransparent2
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  stxIconTransparent3
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  upIcon
Obsolete - please goto ToolbarIconLibrary directly

o  upRightIcon
Obsolete - please goto ToolbarIconLibrary directly

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

startup & release
o  flushCachedIcons

o  preSnapshot



ST/X 6.1.1; WebServer 1.620 at exept:8081; Mon, 21 May 2012 18:03:38 GMT