Skip to content

Quick Reference

Provided here is a list of some common API entry points. The list is inevitably subjective and incomplete. If you feel something is missing here, let us know.

The documentation generator for Bintracker is still having some hiccups at the moment, so some links may be broken or lead to missing documentation.

Procedures & Methods

(assemble TARGET-CPU SOURCE key: ORG EXTRA-SYMBOLS MAX-PASSES)
Assemble the string SOURCE, returning a list of byte values. TARGET-CPU must be a symbol identifying the instruction set to use.

(assemble TARGET-CPU SOURCE key: ORG EXTRA-SYMBOLS MAX-PASSES) Assemble the string SOURCE, returning a list of byte values. TARGET-CPU must be a symbol identifying the instruction set to use.

(clipboard ['put CONTENTS]) Without arguments, retrieve the clipboard contents, returning an s-expression. Otherwise, copy CONTENTS to the clipboard.

(copy CONTENTS) Alias for (clipboard 'put CONTENTS).

(current WHAT) Access various components of the module interface the user is currently interacting with. WHAT must be one of:

  • 'blockview: The current <ui-blockview> instance.
  • 'buffer: The current focussed buffer.
  • 'emulator: The current emulator object.
  • 'group-fields: The current <ui-group-fields> instance.
  • 'mdef: The current MDAL engine definition.
  • 'mmod: The current MDAL module.
  • 'module-view: The current <ui-module-view> instance.
  • 'order-view: The current <ui-order-view> instance.
  • 'selected-contents: The contents of the current block selection, or the value at cursor
  • 'selection: A list containing the first row, first field, last row, and last field of the current block selection

(edit BUFFER WHAT [VALUE]) (<ui-group-field>)
(edit BUFFER WHERE WHAT [CONTENTS]) (<ui-basic-block-view>)
Edit contents of a group field, blockview, or order-view.

(emulate PLATFORM-ID) Generate an emulator object suitable for the target system with the MDAL platform id PLATFORM.

(EMULATOR 'exec|info|pause|quit|run|unpause|start [ARGS...]) Interact with an EMULATOR. Use (current 'emulator) to retrieve the emulator of the currently active module view.

(focus 'assoc|add|list|next|previous|remove|resume|set|suspend|which [ARGS...]) Interact with the input focus controller.

(HOOKS 'add|execute|list|remove [ARGS...]) Modify hook sets.

(info ['kb|keybinding KEYSTROKE]) Access the internal help system. This feature is not complete yet.

(multibuffer-add BUFFER CHILD-SPEC [key: BEFORE])
(multibuffer-hide CHILD-ID)
(multibuffer-delete CHILD-ID)
(multibuffer-show CHILD-ID)
Interact with multibuffers.

(plugins ['register NAME1...]) Without arguments, returns the list of registered plugins. Otherwise, register the given plugin(s).

(redo) Re-apply the latest undone edit.

(say S-EXPR|'where|what) Make the screen reader/text-to-speech tool say things. 'where and what will report the location of resp. value under the cursor. Any other S-EXPRession will be read out as is (with some sanitation performed).

(settings [WHICH [NEW-VALUE]]) Read or set global settings.

(ui) Returns the main UI multibuffer.

(undo) Undo the latest edit.

libmdal

block-field-ref file->mmod inode-instance-ref mmod-mdef mmod-global-node mmod->file mod->bin node-path subnode-ref

UI Classes

Name Description Base class
<ui-element> Base class for most other UI classes. none
<ui-wrapper> Adapter for using raw Tk widgets like the Bintracker UI classes. <ui-element>
<ui-modeline> Modelines, aka status bars. <ui-element>
<ui-setting> Spinbox settings. <ui-element>
<ui-settings-group> Container for multiple <ui-setting>s. <ui-element>
<ui-button-group> Container for one or more toolbar buttons. <ui-element>
<ui-toolbar> Toolbars, consisting of one or more <ui-button-group>s. <ui-element>
<ui-buffer> Container for user content, optionally with toolbars. <ui-element>
<ui-multibuffer> Combine multiple buffers and make them resizable. <ui-element>
<ui-module-view> Top-level GUI abstraction for MDAL modules. <ui-multibuffer>
<ui-group> MDAL group node display. <ui-multibuffer>
<ui-subgroups> Container for the subgroups of an MDAL group node. <ui-buffer>
<ui-blocks> Container for the block subnodes of an MDAL group node. <ui-buffer>
<ui-basic-block-view> Display for MDAL block nodes. <ui-buffer>
<ui-block-view> Display for all MDAL block nodes except order blocks. <ui-basic-block-view>
<ui-order-view> Display for MDAL order block nodes. <ui-basic-block-view>
<ui-group-fields> Container for the field subnodes of an MDAL group node. <ui-buffer>
<ui-group-field> Display for MDAL group field nodes. <ui-element>
<ui-dialog> Simple popup dialog containers. none

UI Class Methods

(ui-children BUFFER) Returns the child elements of the UI class instance BUFFER. Defined for all UI classes. Note that some UI classes bypass the children mechanism, most notably <ui-multibuffer>.

(ui-destroy BUFFER) Unmap and destroy the UI class instance BUFFER. Defined for all UI classes.

(ui-hide BUFFER) Hide the UI class instance BUFFER. Defined for all UI classes.

(ui-metastate BUFFER [ACTION [ARGS...]]) Access the metastate controller of a module view or any child element thereof. Defined for all module-related UI classes.

(ui-ref BUFFER CHILD-ID) Recursively search the child elements of the UI class instance BUFFER for a buffer named CHILD-ID. Defined for all UI classes. Note that some UI classes bypass the children mechanism, most notably <ui-multibuffer>.

(ui-show BUFFER) Show the UI class instance BUFFER. Defined for all UI classes. ui-show recursively calls ui-show on all children of BUFFER. Note that some UI classes bypass the children mechanism, most notably <ui-multibuffer>.

(ui-update BUFFER) Update the display of the UI class instance BUFFER. Defined for <ui-group-fields>, <ui-basic-block-view> and derived classes.

Hook Sets

Miscellaneous

  • btdb, the Bintracker database