summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/Python/class.tmpl
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-01-31 18:44:09 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2013-02-01 19:47:41 -0500
commit44dea29977be349304a905e01b3ec89f7bdc6168 (patch)
treeb81a817f9642a788813e7f28d80f3bef4ac6f30c /giscanner/doctemplates/Python/class.tmpl
parent217916ca496827aa494d956787e2700b21c66aaa (diff)
downloadgobject-introspection-44dea29977be349304a905e01b3ec89f7bdc6168.tar.gz
doctool: Rename templates to exclude mallard/the language
As templates are in their own directory and segregated into language already, this is sort of repeating the issue. At the same time, always explicitly use relative ("./") or absolute ("/") lookups for templates. We want to eventually have base templates to share between languages, so to do so without namespace clashes makes sense.
Diffstat (limited to 'giscanner/doctemplates/Python/class.tmpl')
-rw-r--r--giscanner/doctemplates/Python/class.tmpl55
1 files changed, 55 insertions, 0 deletions
diff --git a/giscanner/doctemplates/Python/class.tmpl b/giscanner/doctemplates/Python/class.tmpl
new file mode 100644
index 00000000..41e6e499
--- /dev/null
+++ b/giscanner/doctemplates/Python/class.tmpl
@@ -0,0 +1,55 @@
+<%inherit file="/base.tmpl"/>
+<%block name="synopsis">
+ <synopsis><code>
+from gi.repository import ${namespace.name}
+
+${formatter.to_underscores(node.name).lower()} = ${namespace.name}.${node.name}(\
+% for property_, ix in zip(node.properties, range(len(node.properties))):
+% if property_.construct or property_.construct_only or property_.writable:
+<link xref='${namespace.name}.${node.name}-${property_.name}'>${property_.name.replace('-', '_')}</link>=value\
+% if ix != len(node.properties) - 1:
+, \
+% endif
+% endif
+% endfor
+)\
+ </code></synopsis>
+</%block>
+<%block name="details">
+ <synopsis>
+ <title>Hierarchy</title>
+ <tree>
+% for class_ in formatter.get_class_hierarchy(node):
+ <item>
+ <code>${class_.namespace.name}.${class_.name}</code>
+% endfor
+% for class_ in formatter.get_class_hierarchy(node):
+ </item>
+% endfor
+ </tree>
+ </synopsis>
+</%block>
+<%block name="links">
+ <links type="topic" ui:expanded="yes"
+ api:type="function" api:mime="text/x-python"
+ groups="method" style="linklist">
+ <title>Methods</title>
+ </links>
+ <links type="topic" ui:expanded="yes"
+ api:type="function" api:mime="text/x-python"
+ groups="function" style="linklist">
+ <title>Functions</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="property" style="linklist">
+ <title>Properties</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="signal" style="linklist">
+ <title>Signals</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="vfunc" style="linklist">
+ <title>Virtual functions</title>
+ </links>
+ <links type="topic" ui:expanded="yes" groups="#first #default #last" style="linklist">
+ <title>Other</title>
+ </links>
+</%block>