83 lines
5.6 KiB
HTML
83 lines
5.6 KiB
HTML
<html><head><title>Gui Command/pt</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Gui Command/pt</h1></div>
|
|
|
|
<div id="mw-content-text" lang="pt" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><p>The GuiCommand is one of the most important functions of FreeCAD
|
|
in the main interaction point of the user. Every time the user
|
|
selects a menu item or presses a toolbar button it activates a
|
|
GuiCommand. Some of the attributes of a GuiCommand are:
|
|
</p>
|
|
<ul><li> Defines a name</li>
|
|
<li> Contains an icon</li>
|
|
<li> Defines the scope for an undo/redo</li>
|
|
<li> Has a help page</li>
|
|
<li> Opens and controls dialogs</li>
|
|
<li> Macro recording</li>
|
|
<li> and so forth...</li></ul>
|
|
<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
|
|
<ul>
|
|
<li class="toclevel-1 tocsection-1"><a href="#Naming"><span class="tocnumber">1</span> <span class="toctext">Naming</span></a></li>
|
|
<li class="toclevel-1 tocsection-2"><a href="#Help_page"><span class="tocnumber">2</span> <span class="toctext">Help page</span></a></li>
|
|
<li class="toclevel-1 tocsection-3"><a href="#Icons"><span class="tocnumber">3</span> <span class="toctext">Icons</span></a></li>
|
|
<li class="toclevel-1 tocsection-4"><a href="#Quality_requirements"><span class="tocnumber">4</span> <span class="toctext">Quality requirements</span></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<h3><span class="mw-headline" id="Naming">Naming</span></h3>
|
|
<p>The GuiCommand is named in a certain way: <i>ModuleName_CommandName</i>
|
|
e.g "Base_Open" this is the Open Gui Command in the Base system.
|
|
The GuiCommand in a certain module is named with the module name
|
|
in front e.g. "Part_Cylinder".
|
|
</p><p>If the docu is not finished use <a href="https://www.freecadweb.org/wiki/index.php?title=Template:UnfinishedDocu" title="Template:UnfinishedDocu">Template:UnfinishedDocu</a>
|
|
</p>
|
|
<h3><span class="mw-headline" id="Help_page">Help page</span></h3>
|
|
<p>Every GuiCommand has to have a help page. The help page is hosted on the
|
|
FreeCAD docu wiki. The article has the same name as the GuiCommand, e.g. <a href="Draft_ShapeString.html" title="Draft ShapeString">Draft ShapeString</a>.
|
|
</p><p>To create your own help pages you can use the template:
|
|
<a href="GuiCommand_model.html" title="GuiCommand model">GuiCommand model</a>
|
|
</p><p>Example:
|
|
</p>
|
|
<ul><li> <a href="Draft_ShapeString.html" title="Draft ShapeString">Draft ShapeString</a></li>
|
|
<li> <a href="Draft_Line.html" title="Draft Line">Draft Line</a></li></ul>
|
|
<h3><span class="mw-headline" id="Icons">Icons</span></h3>
|
|
<div class="floatright"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Tango-Palette.png" class="image"><img alt="Tango-Palette.png" src="400px-Tango-Palette.png" width="400" height="400" srcset="/wiki/images/thumb/8/8a/Tango-Palette.png/600px-Tango-Palette.png 1.5x, /wiki/images/thumb/8/8a/Tango-Palette.png/800px-Tango-Palette.png 2x" /></a></div>
|
|
<p>Every GuiCommand has to have an icon. We use the <a rel="nofollow" class="external text" href="http://tango.freedesktop.org/Tango_Desktop_Project%7C">Tango icon set</a> and its guidelines. On the right side you see
|
|
the tango color palette.
|
|
</p><p>Preferable all Icons are drafted with SVG with e.g. <a rel="nofollow" class="external text" href="http://inkscape.org">Inkscape</a>.
|
|
This makes it easier to apply changes and derive
|
|
additional Icons in the same application space.
|
|
</p><p><b>icons color coding chart</b>
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Colorchart.png" class="image"><img alt="Colorchart.png" src="200px-Colorchart.png" width="200" height="102" srcset="/wiki/images/thumb/9/9b/Colorchart.png/300px-Colorchart.png 1.5x, /wiki/images/9/9b/Colorchart.png 2x" /></a>
|
|
</p><p>We try as much as possible to respect this chart, so the color of the icons has a direct meaning.
|
|
</p>
|
|
<h3><span class="mw-headline" id="Quality_requirements">Quality requirements</span></h3>
|
|
<p>There are a lot of GuiCommands (Features) in FreeCAD which are experimental
|
|
or used shortly for implementation purposes. These GuiCommands are mostly in
|
|
the dedicated workbenches like Part, Mesh or Cam.
|
|
To ensure a good user experience the workbench <i>Complete</i> was created. This
|
|
is the default start workbench of FreeCAD and incorporates all GuiCommands
|
|
which meet certain <b>Quality requirements</b> which are described here:
|
|
</p>
|
|
<ul><li> The Command/Feature has to be <b>finished</b>. No work in progress!</li>
|
|
<li> Has to have a <b>help page</b> like <a href="Draft_ShapeString.html" title="Draft ShapeString">Draft ShapeString</a>
|
|
<ul><li> All the fields in <a href="https://www.freecadweb.org/wiki/index.php?title=Template:GuiCommand" title="Template:GuiCommand">Template:GuiCommand</a> have to filled in</li>
|
|
<li> A picture of the dialogs the command eventually yield</li>
|
|
<li> detailed description of the command and all its parameters and settings</li>
|
|
<li> Description of the related python interfaces and classes with example code</li></ul></li>
|
|
<li> Set up a proper Icon and menu position</li></ul>
|
|
<p>Hopefully this becomes true for all GuiCommands in the <a href="List_of_Commands.html" class="mw-redirect" title="List of Commands">List of Commands</a>.
|
|
</p>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><div class="printfooter">
|
|
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Gui_Command/pt&oldid=97331">http://www.freecadweb.org/wiki/index.php?title=Gui_Command/pt&oldid=97331</a>"</div>
|
|
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
<div id="mw-navigation">
|
|
<h2>Navigation menu</h2>
|
|
|
|
</body></html> |