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

Starting viewIcons

viewIcons provides a facility to display the contents of ICONS icon libraries and GIF/PNG icon image files.

By default, the folder given by the Tcl command info library is the default for viewIcons.

An alternative default folder can be specified as the first parameter to the viewIcons.tcl command.

Examples:

The following examples assume a Unix/Linux type operating system. Absolute and relative pathnames may be used.

viewIcons.tcl .

Sets the default icon library/files folder to be the current (working) directory.

viewIcons.tcl /home/adavis

Sets the default icon library/files folder to /home/adavis.

Using viewIcons

When viewIcons is started it will be in "Library" mode and the icon display area of the screen is blank.

If there is an icon library in the default location pressing the View button will display its contents.

A left-click on the "Library" label text will switch to "Folder" mode. Left-click on "Folder" to switch/toggle to "Library" mode.

The buttons and entry fields at the top of the viewIcons window have the following functions:-

NameTypeDescriptionDefault
LibraryEntryFully qualified name of icon library to be displayed.File tkIcons in info library folder.
FolderEntryFully qualified name of icon image folder to be displayed.info library folder.
BrowseButtonOpens icon library file -or- folder selection dialog box.N/A
GroupsEntryList of icon groups to be displayed.Display all groups ("*").
IconsEntryList of icon image files to be displayed.Display all files ("*").
ViewButtonUpdates window to display specified icon library.N/A
ColumnsSpinboxSets the number of columns for the icon display.14 (Library), 16 (Folder)
ExitButtonExit from viewIcons.N/A

The icon library/folder can be changed by typing a new filename/foldername into the Library/Folder field then pressing the "Enter/Return" key or the View button. Alternatively, pressing the Browse button will display a file/folder selection dialog box. When a file/folder is selected from the dialog the icon display area will update automatically.

When in "Library" mode, the groups displayed can be changed by typing a space separated list of groups into the Groups field then pressing the "Enter/Return" key or the View button.

When in "Folder" mode, the icons displayed can be changed by typing a glob pattern into the Icons field then pressing the "Enter/Return" key or the View button.

To display the details of an icon move the mouse pointer to the required icon. The information will be displayed in a "pop up" window:

Note: When in "Folder" mode "Groups" will always be set to "N/A". "Type" will be set to either "GIF" or "PNG" as appropriate.

Using The Clipboard and Primary Transfer

To create a complete "image create" command in the clipboard, move the mouse pointer to the required icon then press the left mouse button.

Example:

Clicking on the "folder16" icon of the kde standard library will generate the following command in the clipboard:-

image create photo folder16 -data {
   R0lGODlhEAAQAIYAAPwCBAQCBExKTBwWHMzKzOzq7ERCRExGTCwqLARqnAQ+
   ZHR2dKyqrNTOzHx2fCQiJMTi9NTu9HzC3AxmnAQ+XPTm7Dy67DymzITC3IzG
   5AxypHRydKymrMzOzOzu7BweHByy9AyGtFyy1IzG3NTu/ARupFRSVByazBR6
   rAyGvFyuzJTK3MTm9BR+tAxWhHS61MTi7Pz+/IymvCxulBRelAx2rHS63Pz6
   /PTy9PTu9Nza3ISitBRupFSixNTS1CxqnDQyNMzGzOTi5MTCxMTGxGxubGxq
   bLy2vLSutGRiZLy6vLSytKyurDQuNFxaXKSipDw6PAAAAAAAAAAAAAAAAAAA
   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAA
   LAAAAAAQABAAAAfDgACCAAECg4eIAAMEBQYHCImDBgkKCwwNBQIBBw4Bhw8Q
   ERITFJYEFQUFnoIPFhcYoRkaFBscHR4Ggh8gIRciEiMQJBkltCa6JyUoKSkX
   KhIrLCQYuQAPLS4TEyUhKb0qLzDVAjEFMjMuNBMoNcw21QY3ODkFOjs82RM1
   PfDzFRU3fOggcM7Fj2pAgggRokOHDx9DhhAZUqQaISBGhjwMEvEIkiIHEgUA
   kgSJkiNLmFSMJChAEydPGBSBwvJQgAc0/QQCACH+aENyZWF0ZWQgYnkgQk1Q
   VG9HSUYgUHJvIHZlcnNpb24gMi41DQqpIERldmVsQ29yIDE5OTcsMTk5OC4g
   QWxsIHJpZ2h0cyByZXNlcnZlZC4NCmh0dHA6Ly93d3cuZGV2ZWxjb3IuY29t
   ADs=
}

When using an X-Windows environment, such as CDE or KDE, the "image create" command is also made available for Primary Transfer. In this case, pressing Shift-Ins will copy the "image create" command.

Note: When in "Folder" mode the clipboard function requires Tcl/Tk 8.6.0 or greater.


Copyright © 2013 Adrian Davis.