<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Disable selection box in EditingTool]]></title><description><![CDATA[<p dir="auto">Hi, I'm working on a tool that subclasses <code>mojo.events.EditingTool</code>. I'm implementing my own <code>mouseDragged</code>, but is there a way to "disable" the selection box that's drawn on <code>mouseDragged</code>?</p>
<p dir="auto">This is what I mean:</p>
<p dir="auto"><img src="/assets/uploads/files/1543006112858-handles.gif" alt="0_1543006105687_handles.gif" class="img-responsive img-markdown" /></p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.robofont.com/topic/542/disable-selection-box-in-editingtool</link><generator>RSS for Node</generator><lastBuildDate>Sat, 09 May 2026 13:56:44 GMT</lastBuildDate><atom:link href="https://forum.robofont.com/topic/542.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Nov 2018 20:49:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Disable selection box in EditingTool on Fri, 23 Nov 2018 21:10:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi, I'm working on a tool that subclasses <code>mojo.events.EditingTool</code>. I'm implementing my own <code>mouseDragged</code>, but is there a way to "disable" the selection box that's drawn on <code>mouseDragged</code>?</p>
<p dir="auto">This is what I mean:</p>
<p dir="auto"><img src="/assets/uploads/files/1543006112858-handles.gif" alt="0_1543006105687_handles.gif" class="img-responsive img-markdown" /></p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.robofont.com/post/1862</link><guid isPermaLink="true">https://forum.robofont.com/post/1862</guid><dc:creator><![CDATA[jesentanadi]]></dc:creator><pubDate>Fri, 23 Nov 2018 21:10:16 GMT</pubDate></item><item><title><![CDATA[Reply to Disable selection box in EditingTool on Fri, 23 Nov 2018 22:54:55 GMT]]></title><description><![CDATA[<p dir="auto">In your subclass of the <code>EditingTool</code> you can overwrite <a href="http://robofont.com/documentation/building-tools/api/custom-tools/#Custom%20tools.getMarqueRect" rel="nofollow">getMarqueRect</a>. Based on your selection (the line between the offcurves) you can return <code>None</code> or super the inherited class.</p>
<p dir="auto">Something like this should work (pseudo code):</p>
<pre><code class="language-python">class MyTool(EditingTool):

    def getMarqueRect(self, offset=None, previousRect=False):
        if self.myToolSelection:
            return None
        return super(self, MyTool).getMarqueRect(offset, previousRect)
</code></pre>
]]></description><link>https://forum.robofont.com/post/1863</link><guid isPermaLink="true">https://forum.robofont.com/post/1863</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 23 Nov 2018 22:54:55 GMT</pubDate></item><item><title><![CDATA[Reply to Disable selection box in EditingTool on Fri, 23 Nov 2018 22:56:06 GMT]]></title><description><![CDATA[<p dir="auto">or you can add the following method to your subclass</p>
<pre><code class="language-python">def canSelectWithMarque(self):
    return False
</code></pre>
<p dir="auto">see the <a href="http://github.com/typemytype/RoboFontExamples/blob/master/tools/polygonSelectionTool.py#L52-L53" rel="nofollow">polygonSelectionTool</a> as example.</p>
<p dir="auto">(side note: I don't know why this is not is added to the docs, will investigate)</p>
]]></description><link>https://forum.robofont.com/post/1864</link><guid isPermaLink="true">https://forum.robofont.com/post/1864</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Fri, 23 Nov 2018 22:56:06 GMT</pubDate></item><item><title><![CDATA[Reply to Disable selection box in EditingTool on Sat, 24 Nov 2018 01:31:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a> both of those work (no more marquee), but both seem to be moving the whole segment when I drag (not pressing any keyboard keys).</p>
<p dir="auto"><img src="/assets/uploads/files/1543020803989-ezgif-4-3f453107b203.gif" alt="0_1543020796649_ezgif-4-3f453107b203.gif" class="img-responsive img-markdown" /></p>
<p dir="auto">Any idea why this is happening?</p>
]]></description><link>https://forum.robofont.com/post/1865</link><guid isPermaLink="true">https://forum.robofont.com/post/1865</guid><dc:creator><![CDATA[jesentanadi]]></dc:creator><pubDate>Sat, 24 Nov 2018 01:31:13 GMT</pubDate></item><item><title><![CDATA[Reply to Disable selection box in EditingTool on Sun, 25 Nov 2018 08:00:14 GMT]]></title><description><![CDATA[<p dir="auto">The selection moves while dragging...</p>
<p dir="auto">You can overwrite:</p>
<pre><code class="language-python">def dragSelection(self, point, delta):
     if myToolHasMySelection:
          # do you own dragging
     else:
         super().dragSelection(point, delta)
</code></pre>
]]></description><link>https://forum.robofont.com/post/1866</link><guid isPermaLink="true">https://forum.robofont.com/post/1866</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Sun, 25 Nov 2018 08:00:14 GMT</pubDate></item><item><title><![CDATA[Reply to Disable selection box in EditingTool on Sun, 25 Nov 2018 00:49:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a> Perfect. Thanks much!</p>
]]></description><link>https://forum.robofont.com/post/1867</link><guid isPermaLink="true">https://forum.robofont.com/post/1867</guid><dc:creator><![CDATA[jesentanadi]]></dc:creator><pubDate>Sun, 25 Nov 2018 00:49:11 GMT</pubDate></item><item><title><![CDATA[Reply to Disable selection box in EditingTool on Sun, 25 Nov 2018 09:16:01 GMT]]></title><description><![CDATA[<p dir="auto">this helps to find out what methods a class has, as not everything is documented on the site...</p>
<pre><code class="language-python">from mojo.events import EditingTool

help(EditingTool)
</code></pre>
]]></description><link>https://forum.robofont.com/post/1868</link><guid isPermaLink="true">https://forum.robofont.com/post/1868</guid><dc:creator><![CDATA[frederik]]></dc:creator><pubDate>Sun, 25 Nov 2018 09:16:01 GMT</pubDate></item><item><title><![CDATA[Reply to Disable selection box in EditingTool on Sun, 25 Nov 2018 12:22:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.robofont.com/uid/1">@frederik</a> Ah, yes. I always forget about the <code>help()</code> function. Thanks!</p>
]]></description><link>https://forum.robofont.com/post/1869</link><guid isPermaLink="true">https://forum.robofont.com/post/1869</guid><dc:creator><![CDATA[jesentanadi]]></dc:creator><pubDate>Sun, 25 Nov 2018 12:22:00 GMT</pubDate></item></channel></rss>