summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/devdocs/Gjs/_properties.tmpl
blob: b67d75ae9be381938d2b81e4ffb07be5030aafa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<%namespace name="doc" file="_doc.tmpl"/>
<%!
  def dash_to_underscore(string):
    return '_'.join(string.split('-'))

  def dash_to_camel(string):
    words = string.split('-')
    return ''.join([words[0]] + [word.title() for word in words[1:]])
%>
% if getattr(node, 'properties', []):
  <h2>Property Details</h2>
  % for p in node.properties:
    <h3 class="entry property ${doc.deprecated_class(p)}"
        id="${formatter.make_anchor(p)}">
      ${p.name | dash_to_underscore}
    </h3>
    <dl>
      % if p.name.lower() != p.name:
        <dt>Names</dt>
        <dd>
          <code>${p.name}</code>, <code>${p.name | dash_to_underscore}</code>,
          <code>${p.name | dash_to_camel}</code>
        </dd>
      % endif
      <dt>Type</dt>
      <dd><code>${formatter.format_type(p.type)}</code></dd>
      ##<dt>Default value</dt>
      ##<dd>Not currently stored in GIR</dd>
      <dt>Flags</dt>
      <dd>${formatter.format_property_flags(p)}</dd>
    </dl>
    % if p.doc:
      ${doc.format_documentation(p)}
    % endif
  % endfor
% endif