eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'MIMETypeIconLibrary':

Home

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

Class: MIMETypeIconLibrary


Inheritance:

   Object
   |
   +--MIMETypeIconLibrary

Package:
stx:libview2
Category:
Interface-Smalltalk
Version:
rev: 1.36 date: 2019/03/17 10:45:12
user: cg
file: MIMETypeIconLibrary.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


an icon library especially for file type icons as per mime type.
This does not (and should not) provide icons itself - it just forwards
the mime-name based accessors to the standard icon library.


Class protocol:

accessing
o  addOnIconsFor: aFilename to: anIcon
given a fileName, return an appropriate multi-icon,
which adds more symbols to the incoming arg, anIcon.
A multi-icon is returned if linked or locked

o  fileTypeIconKeyFor: aFilename
return an icon-key for a fileName.
This does not look at the file's suffix or into the file's contents,
for more detailed key i.e. it only returns keys for the common broad categories

usage example(s):

     self fileTypeIconKeyFor:'/foo/bar' asFilename 
     self fileTypeIconKeyFor:'/tmp' asFilename 
     self fileTypeIconKeyFor:'/dev/null' asFilename 
     self fileTypeIconKeyFor:'Makefile' asFilename 
     self fileTypeIconKeyFor:'/usr/bin/make' asFilename 

o  iconForFile: aFilename
given a fileName, return an appropriate icon

usage example(s):

     self iconForFile:'/foo/bar/baz.c' asFilename

o  iconForKey: mimeTypeOrKey
self iconForKey:#file
self iconForKey:#directory
self iconForKey:#fileLink
self iconForKey:#directoryLink

o  iconForKeyMatching: mimeTypeOrKey

o  iconForLinkedDirectory
answer the icon used for linked directories

usage example(s):

      self iconForLinkedDirectory

o  iconForMatchKey: matchKey

o  iconKeyForFile: aFilenameArg
given a fileName, return an appropriate icon

o  iconKeyForRemoteDirectory: aFilenameArg
given a fileName, return an appropriate icon

o  icons

o  matchedIcons

image specs
o  addOnLinked

o  addOnLocked

o  applicationBinary

o  applicationJavaArchive

o  applicationLibrary

o  applicationPdf

o  applicationPostscript

o  applicationRtf

o  applicationSharedLibrary

o  audio

o  binaryFile

o  cPlusPlusSource

o  cSource

o  compressedArchive

o  deviceFile

o  digitalNotepad

o  directory

o  directoryGray

o  directoryLink

o  directoryLocked

o  directoryNetwork

o  directoryOpen

o  directoryOpenGray

o  executableFile

o  expeccoLogfile

o  expeccoSuite

o  file

o  fileArchive

o  fileLink

o  fileLocked

o  headerFile

o  homeDirectory

o  imageFile

o  javaArchive

o  javaScriptSource

o  javaSource

o  lispSource

o  smalltalkSource

o  specialFile

o  text

o  textHtml

o  video

initialization
o  flushIcons
remove any cached icons. Call this eg. after a style change

usage example(s):

     self flushIcons

o  initialize
now done lazily, when the first icon is asked for

usage example(s):

self initializeIcons

o  initializeIcons
initialize my icon mapping, which maps MIMEType to icon keys.
The iconKey is used as (part of) a selector into the ToolbarIconLibrary
(see iconForFile:aFilename)

usage example(s):

     self initializeIcons



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 17 May 2022 20:03:30 GMT