6 Expandable Snip
|(require mrlib/expandable-snip)||package: gui-lib|
(new expandable-snip% [ [layout layout] [closed-editor closed-editor] [open-editor open-editor] [callback callback]] ...superclass-args...) → (is-a?/c expandable-snip%) layout : (or/c 'append 'replace) = 'append closed-editor : (is-a?/c text%) = (new text%) open-editor : (is-a?/c text%) = (new text%) callback : (-> boolean? any) = voidThe callback is called when the snip state is toggled. It is called with a boolean that indicates whether the new state is open.In closed mode, the toggle arrow and closed-editor are displayed adjacent on a single line. In open mode, the layout is controlled by the layout argument as follows:
The first line is unchanged (that is, it contains both toggle arrow and closed-editor), and open-editor is displayed on the second line.
The toggle arrow and the open-editor are displayed on a single line. The closed-editor is not displayed.Get the editor for the open mode.Gets the editor for the closed mode.