Next: , Previous: Eshell, Up: Top


Widgets

Surmulot widgets are Squeak morphs, mostly MuO editors, made available for Emacs via a TCP/IP connection.

When Emacs requests a widget, it starts the MuO image as a subprocess and asks it to become a specific widget. The image then changes its name, close its source files and resizes itself; the requested morph is opened in full size and can be accessed through the Smalltalk global variable Widget.


The Widget menu

Use the global "Widget" menu to create a new widget from Emacs. The customizable variable `surmulot-widget-specs' lists all available widget types.

A widget can be stored in a CSD file, as a <WIDGET>...</WIDGET> area.

Stored widgets can be recreated from a CSD buffer via the "Stored widgets" submenu.

Once a widget is opened and connected, an associated submenu appears which allows for closing, cloning or storing the widget.


Interaction

The widget can send its data to Emacs, usually via menu items.

One common operation is the insertion of text from the widget; this happens in the current Emacs buffer. For example, the envelope editor can insert its envelope description in either linseg of ftgen format for csound buffers, or in Common Music or Nyquist formats for appropriate buffers.

On the Emacs side, a comint buffer named “*Squeak on port xxxx* *” allows interaction with the widget Squeak image, where xxxx is the local port number used for communication. Any Smalltalk command is valid; note that the widget can be accessed via global variable Widget. This is not always the full morph displayed by the Squeak image: Widget may be one of its submorphs. The full morph can be retreived by sending "Widget biggerSurmulotWidget".

The comint buffer can be brought up with the "interact" item of the widget submenu.


Debugging and advanced usage (for Squeak developers)

Use the "collapse" menu item to hide the widget and access the Display of the underlying Squeak image. You can directly debug or modify the widget then file out the current changeset to get a patch for the main MuO image.

Note that is is better to directly work within the MuO image because it has access to its source and change files. In the widget image you will only have decompiled code, and no class comments.