1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: assocs classes.predicate fry generic io.pathnames kernel
4 macros sequences vocabs words words.symbol words.constant
5 lexer parser help.topics ;
8 GENERIC: definition-icon ( definition -- path )
12 : definition-icon-path ( string -- string' )
13 "resource:basis/definitions/icons/" prepend-path ".tiff" append ;
18 scan-word \ definition-icon create-method
19 scan '[ drop _ definition-icon-path ]
24 ICON: predicate-class class-predicate-word
25 ICON: generic generic-word
26 ICON: macro macro-word
27 ICON: parsing-word parsing-word
28 ICON: primitive primitive-word
29 ICON: symbol symbol-word
30 ICON: constant constant-word
31 ICON: word normal-word
32 ICON: vocab-link unopen-vocab
33 ICON: word-link word-help-article
34 ICON: link help-article
38 M: vocab definition-icon
39 vocab-main "runnable-vocab" "open-vocab" ? definition-icon-path ;