[ Main Table Of Contents | Table Of Contents | Keyword Index ]

famfamfam(n) 1.1 doc "FamFamFam Icon Sets For Tcl"

Name

famfamfam - FamFamFam Core

Table Of Contents

Synopsis

Description

Welcome to famfamfam, a set of packages providing access to the same-named icon sets created by Mark James, at http://www.famfamfam.com/lab/icons/

This package is internal to the other FamFamFam packages and provides the common functionality shared by all.

It resides in the Core level of the architecture arch_core

API

::famfamfam intercept cmdprefix

This method adds/removes a callback invoked whenever an image is loaded. This means that the callback is only invoked the first time an image is requested and thus not in the in-memory cache yet. Any further requests served from the cache are not reported.

Setting an empty string as callback deactivates it.

The signature of the callback is

{*}cmdprefix set name path

The arguments to the callback provide the name of the icon set, the name of the icon itself, and the path the icon was loaded from.

The result of the callback is ignored.

Any error thrown by the callback will prevent the icon from being loaded, i.e. the get method of the icon set will be aborted.

::famfamfam names

This method returns a list containing the names of all declared icon sets.

::famfamfam declare name icondir ?pattern?

This method registers the icons found in the icon directory icondir and matching the pattern as the icon set name. If the pattern is not specified it defaults to *.png.

The command creates the accessor commands

  1. ::famfamfam name get

  2. ::famfamfam name list

  3. ::famfamfam name path

for the new icon set. These are aliases to the core methods below, with the name of the icon set preset.

The command returns the empty string as its result.

::famfamfam::Declare name icondir ?pattern?

This command is an alias of famfamfam declare, available for compatibility with packages based on the 1.0 API.

::famfamfam get iconset icon

This method returns a Tk image holding the icon in icon set iconset. An error will be thrown if either icon set or icon are not valid.

::famfamfam path iconset icon

This method returns the path of the image file for the icon in icon set iconset. An error will be thrown if either icon set or icon are not valid.

::famfamfam list iconset ?pattern?

This method returns a list containing the names of all valid icons in the icon set iconset. An error will be thrown if the iconset is not valid. If the pattern is specified then only names matching that pattern are returned. Matching is done by string match, i.e. the argument is a glob pattern.

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such at the FamFamFam Tcl Tracker. Please also report any ideas for enhancements you may have for either package and/or documentation.

Keywords

famfamfam, icons, images

Category

Icon sets