Gui Command/en: Difference between revisions

From FreeCAD Documentation
(Importing a new version from external source)
 
(Updating to match new version of source page)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
The GuiCommand is one of the most important functions of FreeCAD
{{TOCright}}
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:
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:
* Defines a name
* Defines a name
* Contains an icon
* Contains an icon
Line 9: Line 9:
* Opens and controls dialogs
* Opens and controls dialogs
* Macro recording
* Macro recording
* and so forth...
* and others.


=== Naming ===
== Naming ==
The GuiCommand is named in a certain way: ''ModuleName_CommandName''
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".


The GuiCommand is named in a standard way: ''ModuleName_CommandName'' e.g., "[[Base_Open|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|Part_Cylinder]]".
If the docu is not finished use [[Template:UnfinishedDocu]]


If the documentation is not finished use [[Template:UnfinishedDocu]].
=== Help page ===
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. [[Draft ShapeString]].


== Help page ==
To create your own help pages you can use the template:

[[GuiCommand model]]
Every GuiCommand has to have a help page. The help page is hosted on the FreeCAD documentation wiki. The article has the same name as the GuiCommand, e.g. [[Draft_ShapeString|Draft ShapeString]].

To create your own help pages you can use the template [[GuiCommand_model|GuiCommand model]]


Example:
Example:
* [[Draft ShapeString]]
* [[Draft_ShapeString|Draft ShapeString]]
* [[Draft Line]]
* [[Draft_Line|Draft Line]]

== Icons ==


=== Icons ===
[[Image:Tango-Palette.png|400px|right]]
[[Image:Tango-Palette.png|400px|right]]


Every GuiCommand has to have an icon. We use the [http://tango.freedesktop.org/Tango_Desktop_Project| Tango icon set] and its guidelines. On the right side you see
Every GuiCommand has to have an icon. We use the [http://tango-project.org/Tango_Desktop_Project/ Tango icon set] and its guidelines. On the right side you see the tango color palette.
the tango color palette.


Preferable all Icons are drafted with SVG with e.g. [http://inkscape.org Inkscape].
All icons should be created in [[SVG|SVG]] format with a vector image application, such as [http://inkscape.org Inkscape]. This makes it easier to apply changes and derive additional icons in the same application space.
This makes it easier to apply changes and derive
additional Icons in the same application space.


'''icons color coding chart'''
===Icons color coding chart===


[[Image:Colorchart.png|200px]]
[[Image:Colorchart.png|200px]]
Line 46: Line 41:
We try as much as possible to respect this chart, so the color of the icons has a direct meaning.
We try as much as possible to respect this chart, so the color of the icons has a direct meaning.


=== Quality requirements ===
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 ''Complete'' was created. This
is the default start workbench of FreeCAD and incorporates all GuiCommands
which meet certain '''Quality requirements''' which are described here:


{{Powerdocnavi{{#translation:}}}}
* The Command/Feature has to be '''finished'''. No work in progress!
* Has to have a '''help page''' like [[Draft ShapeString]]
** All the fields in [[Template:GuiCommand]] have to filled in
** A picture of the dialogs the command eventually yield
** detailed description of the command and all its parameters and settings
** Description of the related python interfaces and classes with example code
* Set up a proper Icon and menu position

Hopefully this becomes true for all GuiCommands in the [[List of Commands]].

[[Category:User Documentation]]
[[Category:Command_Reference]]

{{clear}}
<languages/>

Latest revision as of 09:06, 16 August 2022

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:

  • Defines a name
  • Contains an icon
  • Defines the scope for an undo/redo
  • Has a help page
  • Opens and controls dialogs
  • Macro recording
  • and others.

Naming

The GuiCommand is named in a standard way: ModuleName_CommandName 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".

If the documentation is not finished use Template:UnfinishedDocu.

Help page

Every GuiCommand has to have a help page. The help page is hosted on the FreeCAD documentation wiki. The article has the same name as the GuiCommand, e.g. Draft ShapeString.

To create your own help pages you can use the template GuiCommand model

Example:

Icons

Every GuiCommand has to have an icon. We use the Tango icon set and its guidelines. On the right side you see the tango color palette.

All icons should be created in SVG format with a vector image application, such as Inkscape. This makes it easier to apply changes and derive additional icons in the same application space.

Icons color coding chart

We try as much as possible to respect this chart, so the color of the icons has a direct meaning.