+ small cosmetric improvements to sphinx doc

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5222 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
yorikvanhavre 2011-12-05 20:03:43 +00:00
parent efa1dd9c63
commit 73189752ab
7 changed files with 91 additions and 16 deletions

View File

@ -1,7 +1,16 @@
The Draft module
================
The Draft module offer several convenient functions to work with simple objects.
The Draft module offer several convenient functions to work with simple 2D and 3D objects.
These functions can be used in scripts and macros or from the python interpreter, once the Draft module has been imported.
Example::
import FreeCAD
from Draft import *
myrect = makeRectangle(4,3)
mydistance = FreeCAD.Vector(2,2,0)
move(myrect,mydistance)
.. toctree::
:maxdepth: 4

View File

@ -6,6 +6,7 @@ The FreeCAD module
.. automodule:: FreeCAD
:members:
:show-inheritance:
.. autoclass:: Vector
:members:

View File

@ -6,6 +6,4 @@ The Part module
.. automodule:: Part
:members:
.. automodule:: PartGui
:members:
:show-inheritance:

View File

@ -343,17 +343,46 @@ body[class*='page-Main_Page'] #content ul {
margin-left: 30px;
}
.api .function {
padding: 3px;
background: #dddddd;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
.api .function, dl dt {
padding: 3px 2px 3px 20px;
border-radius: 3px;
}
dl.class dt {
background: #dddddd url("http://sourceforge.net/apps/mediawiki/free-cad/nfs/project/f/fr/free-cad/0/0f/Class.png") left center no-repeat;
}
dl.function dt, dl.method dt {
background: #dddddd url("http://sourceforge.net/apps/mediawiki/free-cad/nfs/project/f/fr/free-cad/2/20/Method.png") left center no-repeat;
}
dl.attribute dt {
background: #dddddd url("http://sourceforge.net/apps/mediawiki/free-cad/nfs/project/f/fr/free-cad/4/47/Property.png") left center no-repeat;
}
dl dt tt {
font-weight: bold;
}
dl dt big {
margin: 0 3px 0 3px;
font-size: 0.8em;
}
.api .description {
padding-left: 30px;
}
.highlight {
background: #ffffff !important;
margin-bottom: 40px;
}
.highlight pre {
margin-left: 30px;
padding: 5px;
}
/* Screenshots ************************ */
.screenthumbs {

View File

@ -0,0 +1,27 @@
{#
basic/searchbox.html
~~~~~~~~~~~~~~~~~~~~
Sphinx sidebar template: quick search box.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- if pagename != "search" %}
<div id="searchbox" style="display: none">
<h3>{{ _('Quick search') }}</h3>
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" />
<input type="submit" value="{{ _('Go') }}" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
{{ _('Enter search terms or a module, class or function name.') }}
</p>
<p>
<a href="http://free-cad.sf.net">Go back to the FreeCAD wiki</a>
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
{%- endif %}

View File

@ -11,15 +11,24 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import sys, os, commands
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.append(os.path.abspath('/home/yorik/Apps/FreeCAD/lib/'))
sys.path.append(os.path.abspath(os.path.join(os.environ["HOME"],"FreeCAD/lib")))
# first look for local (home-compiled) FreeCAD in its default location:
if os.path.exists(os.path.abspath(os.path.join(os.environ["HOME"],"FreeCAD/lib"))):
sys.path.append(os.path.abspath(os.path.join(os.environ["HOME"],"FreeCAD/lib")))
# otherwise try to locate FreeCAD lib somewhere else:
elif commands.getstatusoutput("locate FreeCAD/lib")[0] == 0:
path = commands.getstatusoutput("locate FreeCAD/lib")[1].split()[0]
sys.path.append(path)
import FreeCAD, FreeCADGui
FreeCADGui.showMainWindow() # this is needed for complete import of GUI modules
@ -79,7 +88,7 @@ exclude_patterns = ['_build']
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
add_module_names = False
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
@ -110,7 +119,7 @@ html_style = 'freecad.css'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = "FreeCAD API documentation"
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
@ -138,11 +147,11 @@ html_static_path = ['_static']
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True

View File

@ -25,3 +25,5 @@ This is the complete python API reference of the FreeCAD appication
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* `Go back to the FreeCAD wiki <http://free-cad.sf.net>`_