ICONS - Man Page
Home Man Page viewIcons Libraries Examples Download License Contact

NAME
::icons::icons - Create icon images from icon library.
EXPORTS
icons
SYNOPSIS
package require icons ?2.0?
icons::icons mode ?option value(s) ...? ?icon-list?
DESCRIPTION
icons create ?option value(s) ...? ?icon-list?
-file filename|foldername
-group group-list|filename-glob-pattern
icon-list
icons delete icon-list
icon-list
icons query ?option value(s) ...? ?icon-list?
-file filename|foldername
-group group-list|filename-glob-pattern
-items items
icon-list
ICON LIBRARY FORMAT
name:groups:type:size:image-data


NAME

icons::icons - Create images from icon library.

SYNOPSIS

package require icons ?2.0?

icons::icons mode ?option value(s) ...? ?icon-list?

EXPORTS

icons

DESCRIPTION

The icons command is used to create, delete, and query icon images stored in the ICONS icon library format. It can take several different forms, depending on the mode argument. The legal forms are:

icons create ?option value ...? ?icon-list?
Creates new icon images as specified by -group -or- icon-list from the specified/default icon library/folder. The icon images created are named ::icon::icon-name. A list of the names of the icons created is returned. A group-list and/or icon-list must be specified.

-file filename|foldername

If this option identifies a file...
Specifies the name of the icon library file to be used. The default name is tkIcons in the directory given by info library. If a filename is specified, icons will first check to see if it identifies a file relative to the info library directory. If not it will be assumed to be a fully qualified filename.

If this option identifies a folder...
Specifies the name of a folder containing GIF/PNG image files.

-group group-list|filename-glob-pattern

If the "-file" option identifies a file...
Specifies a group -or- group-list for which icon images will be created. To create icon images for all icons in the specified library use asterisk as the group (-group *). This option may be used in conjunction with an icon-list.

If the "-file" option identifies a folder...
Specifies a filename-glob-pattern to select files from which icon images will be created. The files matching the pattern must be in GIF/PNG format. The names of the icons created will be based on the filename with the suffix removed. To create icon images for all icons in the specified folder use asterisk as the group (-group *). This option may not be used in conjunction with an icon-list.

icon-list

If the "-file" option identifies a file...
Specifies an icon -or- icon-list for which icon images will be created. This option may be used in conjunction with a group-list.

If the "-file" option identifies a folder...
Specifies an icon -or- icon-list for which icon images will be created. The icon image filename suffix does not need to be specified if it is either ".gif" or ".png". This option may not be used in conjunction with a filename-glob-pattern.

icons delete icon-list
Deletes each of the icon images specified in the icon-list. An icon-list must be specified.

icon-list

Specifies an icon -or- icon-list for which icon images will be deleted.

icons query ?option value ...? ?icon-list?
Returns the data specified by -items from the specified/default icon library/folder. The result is returned as a list. Each item in the list is a list of data as specified by the -items option. A group-list|filename-glob-pattern and/or icon-list must be specified.

-file filename|foldername

If this option identifies a file...
Specifies the name of the icon library file to be used. The default name is tkIcons in the directory given by info library. If a filename is specified, icons will first check to see if it identifies a file relative to the info library directory. If not it will be assumed to be a fully qualified filename.

If this option identifies a folder...
Specifies the name of a folder containing GIF/PNG image files.

-group group-list|filename-glob-pattern

If the "-file" option identifies a file...
Specifies a group -or- group-list for which icon images will be queried. To query all icons in the specified library use asterisk as the group (-group *). This option may be used in conjunction with an icon-list.

If the "-file" option identifies a folder...
Specifies a filename-glob-pattern to select files for which icon images will be queried. The files matching the pattern must be in GIF/PNG format. The names of the icons queried will be based on the filename with the suffix removed. To query all icons in the specified folder use asterisk as the group (-group *). This option may not be used in conjunction with an icon-list.

-items items

If the "-file" option identifies a file...
Specifies the data items, and their order, in the query result. The default items are ngts. The valid items are:
n - Name (Icon)
g - Groups
t - Type
s - Size
d - Data (Image)

If the "-file" option identifies a folder...
Specifies the data items, and their order, in the query result. The default items are ngts. The valid items are:
n - Name (Icon)
g - Groups ***Always set to "N/A"***
t - Type ***Set to "GIF" or "PNG" as appropriate***
s - Size ***Only available if icon image has been created***
d - Data (Image) ***Only available if icon image has been created and Tcl/Tk version 8.6.0 or greater***

icon-list

If the "-file" option identifies a file...
Specifies an icon -or- icon-list for which icon images will be queried. This option may be used in conjunction with a group-list.

If the "-file" option identifies a folder...
Specifies an icon -or- icon-list for which icon images will be queried. The icon image filename suffix does not need to be specified if it is either ".gif" or ".png". This option may be not used in conjunction with a filename-glob-pattern.

ICON LIBRARY FORMAT

Icon libraries have the following format:

name:groups:type:size:image-data

nameIcon name (Must be unique).
groupsList of groups to which icon belongs (Must be at least one).
typeImage data type (Only photo currently supported).
sizeSize of icon (widthxheight, In pixels).
image-dataImage data (Base64 encoded GIF/PNG).


Copyright © 2013 Adrian Davis.