▼ |  | Plugins: Extending Dr Scheme

1 | Implementing Dr Scheme Tools
2 | Adding Languages to Dr Scheme
3 | Creating New Kinds of Dr Scheme Frames
4 | Extending the Existing Dr Scheme Classes
5 | Expanding the User’s Program Text and Breaking
6 | Editor Modes
7 | #lang-specific tools
8 | Language-specific capabilities
9 | drscheme: get/ extend
10 | drscheme: unit
11 | drscheme: language
12 | drscheme: language-configuration
13 | drscheme: debug
14 | drscheme: rep
15 | drscheme: frame
16 | drscheme: help-desk
17 | drscheme: eval
18 | drscheme: modes
| Index

top ← prev up next →

### 7`` #lang-specific tools

If the result of read-language for a language is a function, DrScheme will query it to determine if there are any new toolbar buttons to be used when editing files in this language (when DrScheme’s language is set to the Module language).

Specifically, DrScheme will pass 'drscheme:toolbar-buttons to the function and expect back a value matching this contract:

(listof (list/c string?
(is-a?/c bitmap% )
(-> (is-a?/c drscheme:unit:frame<%> ) any)))

which is then used to create new toolbar buttons, one for each list in the first. The string is the label on the button; the bitmap is the icon (it should be 16x16), and the function is called when the button is clicked.
top ← prev up next →