This file is indexed.

/usr/share/doc/racket/mrlib/snip.html is in racket-doc 6.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>16&nbsp;Snip Canvases</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Mr<span class="mywbr"> &nbsp;</span>Lib:<span class="mywbr"> &nbsp;</span> Extra GUI Libraries</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="Aligned_Pasteboard.html" class="tocviewlink" data-pltdoc="x">Aligned Pasteboard</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="Bitmap_Label.html" class="tocviewlink" data-pltdoc="x">Bitmap Label</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="Cache-image_Snip.html" class="tocviewlink" data-pltdoc="x">Cache-<wbr></wbr>image Snip</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="Close_Icon.html" class="tocviewlink" data-pltdoc="x">Close Icon</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="GIF_and_Animated_GIF_Writing.html" class="tocviewlink" data-pltdoc="x">GIF and Animated GIF Writing</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="Graphs.html" class="tocviewlink" data-pltdoc="x">Graphs</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="Hierarchical_List_Control.html" class="tocviewlink" data-pltdoc="x">Hierarchical List Control</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="Include_Bitmap.html" class="tocviewlink" data-pltdoc="x">Include Bitmap</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="Interactive_Value_Port.html" class="tocviewlink" data-pltdoc="x">Interactive Value Port</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="Name_Message.html" class="tocviewlink" data-pltdoc="x">Name Message</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="Path_Dialog.html" class="tocviewlink" data-pltdoc="x">Path Dialog</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Plot.html" class="tocviewlink" data-pltdoc="x">Plot</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="Switchable_Button.html" class="tocviewlink" data-pltdoc="x">Switchable Button</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="Image_Core.html" class="tocviewlink" data-pltdoc="x">Image Core</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="Matrix_Snip.html" class="tocviewlink" data-pltdoc="x">Matrix Snip</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Snip Canvases</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="TeX_Table.html" class="tocviewlink" data-pltdoc="x">Te<span class="mywbr"> &nbsp;</span>X Table</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="Terminal_Window.html" class="tocviewlink" data-pltdoc="x">Terminal Window</a></td></tr><tr><td align="right">19&nbsp;</td><td><a href="Acknowledgments.html" class="tocviewlink" data-pltdoc="x">Acknowledgments</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">snip-<wbr></wbr>canvas%</span></span></a></td></tr><tr><td><a href="#%28constructor._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">new</span></span></a></td></tr><tr><td><a href="#%28meth._%28%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29._get-snip%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">get-<wbr></wbr>snip</span></span></a></td></tr><tr><td><a href="#%28meth._%28%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29._on-size%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">on-<wbr></wbr>size</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="versionbox"><span class="version">6.7</span></div><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Matrix_Snip.html" title="backward to &quot;15 Matrix Snip&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;MrLib: Extra GUI Libraries&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="TeX_Table.html" title="forward to &quot;17 TeX Table&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3 x-source-module="(lib &quot;mrlib/scribblings/mrlib.scrbl&quot;)" x-source-pkg="gui-doc" x-part-tag="&quot;snip&quot;">16<tt>&nbsp;</tt><a name="(part._snip)"></a><a name="(mod-path._mrlib/snip-canvas)"></a>Snip Canvases</h3><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">mrlib/snip-canvas</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">gui-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>class</p></div></div><p class="RForeground"><a name="(def._((lib._mrlib/snip-canvas..rkt)._snip-canvas~25))"></a><span title="Provided from: mrlib/snip-canvas | Package: gui-lib"><span class="RktSym"><a href="#%28def._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="RktValDef RktValLink" data-pltdoc="x">snip-canvas%</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=objectutils.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._class%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">class?</a></span></p></blockquote></td></tr><tr><td><p><span class="hspace">&nbsp;&nbsp;</span>superclass:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=editor-canvas_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">editor-canvas%</a></span></p></td></tr></table></div><div class="SIntrapara">A canvas that contains a single snip.</div><div class="SIntrapara">Snips cannot be placed directly on dialogs, frames and panels.
To use an interactive snip in a GUI,
it must be inserted into an editor, which itself must be placed on a special canvas, which can be placed in a GUI container.
To provide a seamless user experience, the editor should be enabled but not writable,
not be able to receive focus, not have scrollbars, and other small details.</div><div class="SIntrapara">The <span class="RktSym"><a href="#%28def._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="RktValLink" data-pltdoc="x">snip-canvas%</a></span> class handles these details, making it easy to use interactive snips as normal GUI elements.</div><div class="SIntrapara"><blockquote class="leftindent"><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>constructor</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top" colspan="3"><span class="RktPn">(</span><a name="(constructor._((lib._mrlib/snip-canvas..rkt)._snip-canvas~25))"></a><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=objcreation.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._new%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">new</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="RktValLink" data-pltdoc="x">snip-canvas%</a></span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">parent</span><span class="hspace">&nbsp;</span><span class="RktVar">parent</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">make-snip</span><span class="hspace">&nbsp;</span><span class="RktVar">make-snip</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktPn">[</span><span class="RktSym">style</span><span class="hspace">&nbsp;</span><span class="RktVar">style</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">label</span><span class="hspace">&nbsp;</span><span class="RktVar">label</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">horizontal-inset</span><span class="hspace">&nbsp;</span><span class="RktVar">horizontal-inset</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">vertical-inset</span><span class="hspace">&nbsp;</span><span class="RktVar">vertical-inset</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">enabled</span><span class="hspace">&nbsp;</span><span class="RktVar">enabled</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">vert-margin</span><span class="hspace">&nbsp;</span><span class="RktVar">vert-margin</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">horiz-margin</span><span class="hspace">&nbsp;</span><span class="RktVar">horiz-margin</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">min-width</span><span class="hspace">&nbsp;</span><span class="RktVar">min-width</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">min-height</span><span class="hspace">&nbsp;</span><span class="RktVar">min-height</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">stretchable-width</span><span class="hspace">&nbsp;</span><span class="RktVar">stretchable-width</span><span class="RktPn">]</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktPn">[</span><span class="RktSym">stretchable-height</span><span class="hspace">&nbsp;</span><span class="RktVar">stretchable-height</span><span class="RktPn">]</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="RktValLink" data-pltdoc="x">snip-canvas%</a></span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">parent</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=frame_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">frame%</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=dialog_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">dialog%</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=panel_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">panel%</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=pane_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">pane%</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">make-snip</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">10000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">10000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=snip_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">snip%</a></span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace">&nbsp;&nbsp;</span></td><td valign="top"><span class="RktVar">style</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">:</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._listof%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._one-of%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">one-of/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">no-border</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">control-border</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">combo</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">resize-corner</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">no-focus</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">deleted</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">transparent</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">=</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">null</a></span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">label</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._label-string%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">label-string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">horizontal-inset</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">5</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">vertical-inset</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">5</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">enabled</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">vert-margin</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">horiz-margin</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">min-width</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">10000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">min-height</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">10000</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">stretchable-width</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">stretchable-height</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Unlike instances of <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=editor-canvas_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">editor-canvas%</a></span>, each instance of this class creates and manages its own editor.
The editor contains one object: a <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=snip_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">snip%</a></span> instance created by <span class="RktVar">make-snip</span>.</div></p><p>The <span class="RktVar">make-snip</span> function receives the requested width and height of the snip, which are calculated from the size of the snip canvas.
It is called the first time the snip canvas is resized, which most likely coincides with the first time the snip canvas is shown.
The snip is thus created <span style="font-style: italic">lazily</span>: only when needed, at the size needed.
See <span class="RktSym"><a href="#%28meth._%28%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29._on-size%29%29" class="RktValLink" data-pltdoc="x">on-size</a></span> for more details and an example.</p><p>The <span class="RktVar">style</span> list is prepended with <span class="RktVal">'</span><span class="RktVal">no-hscroll</span> and <span class="RktVal">'</span><span class="RktVal">no-vscroll</span> before being passed to the <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=editor-canvas_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">editor-canvas%</a></span> constructor.
The other constructor arguments are passed untouched.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>method</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=ivaraccess.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._send%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">send</a></span><span class="hspace">&nbsp;</span><span class="RktVar">a-snip-canvas</span><span class="hspace">&nbsp;</span><a name="(meth._(((lib._mrlib/snip-canvas..rkt)._snip-canvas~25)._get-snip))"></a><span class="RktSym"><a href="#%28meth._%28%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29._get-snip%29%29" class="RktValDef RktValLink" data-pltdoc="x">get-snip</a></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=snip_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">snip%</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Returns the wrapped snip, or <span class="RktVal">#f</span> if <span class="RktSym">make-snip</span> has not been called yet.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>method</p></div></div><p class="RForeground"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=ivaraccess.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._send%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">send</a></span><span class="hspace">&nbsp;</span><span class="RktVar">a-snip-canvas</span><span class="hspace">&nbsp;</span><a name="(meth._(((lib._mrlib/snip-canvas..rkt)._snip-canvas~25)._on-size))"></a><span class="RktSym"><a href="#%28meth._%28%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29._on-size%29%29" class="RktValDef RktValLink" data-pltdoc="x">on-size</a></span><span class="hspace">&nbsp;</span><span class="RktVar">width</span><span class="hspace">&nbsp;</span><span class="RktVar">height</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">width</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">10000</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">height</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._integer-in%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">integer-in</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktVal">10000</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Overrides <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=editor-canvas_.html%23%2528meth._%2528%2528%2528lib._mred%252Fmain..rkt%2529._editor-canvas%7E25%2529._on-size%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">on-size</a></span> in <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=editor-canvas_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">editor-canvas%</a></span>.</div><div class="SIntrapara">This is called when the snip canvas is resized.</div></p><p>On the first call, <span class="RktSym"><a href="#%28meth._%28%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29._on-size%29%29" class="RktValLink" data-pltdoc="x">on-size</a></span> calls <span class="RktSym">make-snip</span> with width and height arguments
respectively <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._max%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">max</a></span><span class="stt"> </span><span class="RktVal">0</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._-%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="stt"> </span><span class="RktVar">width</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktVal">2</span><span class="stt"> </span><span class="RktSym">horizontal-inset</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span> and <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._max%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">max</a></span><span class="stt"> </span><span class="RktVal">0</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._-%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="stt"> </span><span class="RktVar">height</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252A%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">*</a></span><span class="stt"> </span><span class="RktVal">2</span><span class="stt"> </span><span class="RktSym">vertical-inset</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span>.
It then inserts the resulting snip into its editor.</p><p>On subsequent calls, <span class="RktSym"><a href="#%28meth._%28%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29._on-size%29%29" class="RktValLink" data-pltdoc="x">on-size</a></span> calls the snip&rsquo;s <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=snip_.html%23%2528meth._%2528%2528%2528lib._racket%252Fsnip..rkt%2529._snip%7E25%2529._resize%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">resize</a></span> method, calculating the width and height arguments the same way.</p><p>When a <span class="RktSym"><a href="#%28def._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="RktValLink" data-pltdoc="x">snip-canvas%</a></span> instance is intended to wrap an existing <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=snip_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">snip%</a></span> instance, <span class="RktSym">make-snip</span> should simply resize it and return it.</p><p><div class="SIntrapara">Example: functions from <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?tag=%28mod-path._.%27plot.%27%29&amp;version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">plot</span></a>
create snips and call a function similar to the following to place plots in a frame:
</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">make-snip-frame</span><span class="hspace">&nbsp;</span><span class="RktSym">snip</span><span class="hspace">&nbsp;</span><span class="RktSym">w</span><span class="hspace">&nbsp;</span><span class="RktSym">h</span><span class="hspace">&nbsp;</span><span class="RktSym">label</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">make-snip</span><span class="hspace">&nbsp;</span><span class="RktVar">width</span><span class="hspace">&nbsp;</span><span class="RktVar">height</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=ivaraccess.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._send%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">send</a></span><span class="hspace">&nbsp;</span><span class="RktSym">snip</span><span class="hspace">&nbsp;</span><span class="RktSym">resize</span><span class="hspace">&nbsp;</span><span class="RktVar">width</span><span class="hspace">&nbsp;</span><span class="RktVar">height</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">snip</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">frame</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=objcreation.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._new%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">new</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=gui&amp;rel=frame_.html&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">frame%</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">label</span><span class="hspace">&nbsp;</span><span class="RktSym">label</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktVar">width</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktSym">w</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktVar">height</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&amp;version=6.7" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktSym">h</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&amp;rel=objcreation.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fclass-internal..rkt%2529._new%2529%2529&amp;version=6.7" class="RktStxLink Sq" data-pltdoc="x">new</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._mrlib%2Fsnip-canvas..rkt%29._snip-canvas~25%29%29" class="RktValLink" data-pltdoc="x">snip-canvas%</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">parent</span><span class="hspace">&nbsp;</span><span class="RktSym">frame</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">make-snip</span><span class="hspace">&nbsp;</span><span class="RktSym">make-snip</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">horiz-margin</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">vert-margin</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">horizontal-inset</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">vertical-inset</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktSym">frame</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"></div></p></blockquote></div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Matrix_Snip.html" title="backward to &quot;15 Matrix Snip&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;MrLib: Extra GUI Libraries&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="TeX_Table.html" title="forward to &quot;17 TeX Table&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>