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.47 date: 2024/02/02 15:34:34
user: stefan
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.

copyright

COPYRIGHT (c) 2004 by eXept Software AG 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  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: aFilenameOrString
given a fileName, return an appropriate icon

Usage example(s):

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

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
don't search for senders - called via reflection based on the mime type

o  applicationJavaArchive
don't search for senders - called via reflection based on the mime type

o  applicationLibrary
don't search for senders - called via reflection based on the mime type

o  applicationPdf
don't search for senders - called via reflection based on the mime type

o  applicationPostscript
don't search for senders - called via reflection based on the mime type

o  applicationRtf
don't search for senders - called via reflection based on the mime type

o  applicationSettings
don't search for senders - called via reflection based on the mime type

o  applicationSharedLibrary
don't search for senders - called via reflection based on the mime type

o  audio
don't search for senders - called via reflection based on the mime type

o  binaryFile
don't search for senders - called via reflection based on the mime type

o  cPlusPlusSource
don't search for senders - called via reflection based on the mime type

o  cSource
don't search for senders - called via reflection based on the mime type

o  compressedArchive
don't search for senders - called via reflection based on the mime type

o  deviceFile
don't search for senders - called via reflection based on the mime type

o  digitalNotepad
don't search for senders - called via reflection based on the mime type

o  directory
don't search for senders - called via reflection based on the mime type

o  directoryGray
don't search for senders - called via reflection based on the mime type

o  directoryLink
don't search for senders - called via reflection based on the mime type

o  directoryLocked
don't search for senders - called via reflection based on the mime type

o  directoryNetwork
don't search for senders - called via reflection based on the mime type

o  directoryOpen
don't search for senders - called via reflection based on the mime type

o  directoryOpenGray
don't search for senders - called via reflection based on the mime type

o  executableFile
don't search for senders - called via reflection based on the mime type

o  expeccoEncryptedFileAttachment
don't search for senders - called via reflection based on the mime type

o  expeccoLogfile
don't search for senders - called via reflection based on the mime type

o  expeccoSuite
don't search for senders - called via reflection based on the mime type

o  file
don't search for senders - called via reflection based on the mime type

o  fileArchive
don't search for senders - called via reflection based on the mime type

o  fileLink
don't search for senders - called via reflection based on the mime type

o  fileLocked
don't search for senders - called via reflection based on the mime type

o  headerFile
don't search for senders - called via reflection based on the mime type

o  homeDirectory
don't search for senders - called via reflection based on the mime type

o  imageFile
don't search for senders - called via reflection based on the mime type

o  javaArchive
don't search for senders - called via reflection based on the mime type

o  javaScriptSource
don't search for senders - called via reflection based on the mime type

o  javaSource
don't search for senders - called via reflection based on the mime type

o  lispSource
don't search for senders - called via reflection based on the mime type

o  pythonSource
don't search for senders - called via reflection based on the mime type

o  smalltalkSource
don't search for senders - called via reflection based on the mime type

o  specialFile
don't search for senders - called via reflection based on the mime type

o  text
don't search for senders - called via reflection based on the mime type

o  textHtml
don't search for senders - called via reflection based on the mime type

o  textXML
don't search for senders - called via reflection based on the mime type

o  video
don't search for senders - called via reflection based on the mime type

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
     MIMETypes mimeTypeForSuffix:'so'       => 'application/shared-library'
     MIMETypes mimeTypeForSuffix:'dylib'    => 'application/shared-library'



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 18:54:43 GMT