{% extends 'base.html' %}

{% macro entry_class(class) %}{% include 'entry-class.html' %}{% endmacro %}
{% macro entry_typedef(typedef, mark_nonpublic=False) %}{% include 'entry-typedef.html' %}{% endmacro %}
{% macro entry_enum(enum, mark_nonpublic=False) %}{% include 'entry-enum.html' %}{% endmacro %}
{% macro entry_func(func, mark_nonpublic=False) %}{% include 'entry-func.html' %}{% endmacro %}
{% macro entry_var(var, mark_nonpublic=False) %}{% include 'entry-var.html' %}{% endmacro %}
{% macro entry_define(define) %}{% include 'entry-define.html' %}{% endmacro %}

{% macro details_typedef(typedef, prefix) %}{% include 'details-typedef.html' %}{% endmacro %}
{% macro details_enum(enum, prefix) %}{% include 'details-enum.html' %}{% endmacro %}
{% macro details_func(func, prefix) %}{% include 'details-func.html' %}{% endmacro %}
{% macro details_var(var, prefix) %}{% include 'details-var.html' %}{% endmacro %}
{% macro details_define(define) %}{% include 'details-define.html' %}{% endmacro %}

{% block title %}{% set j = joiner('::') %}{% for name, _ in compound.breadcrumb %}{{ j() }}{{ name }}{% endfor %} {{ compound.kind }} | {{ super() }}{% endblock %}

{% block main %}
        <h1>
          {% if compound.templates != None %}
          {% if compound.include %}
          <div class="m-doc-include m-code m-inverted m-right-m m-text-right"><span class="cp">#include</span> <a class="cpf" href="{{ compound.include[1] }}">{{ compound.include[0] }}</a></div>
          {% endif %}
          {% set j = joiner(', ') %}
          <div class="m-doc-template">template&lt;{% for t in compound.templates %}{{ j() }}{{ t.type }}{% if t.name %} {{ t.name }}{% endif %}{% if t.default %} = {{ t.default }}{% endif%}{% endfor %}&gt;</div>
          {% endif %}
          {%+ for name, target in compound.breadcrumb[:-1] %}<span class="m-breadcrumb"><a href="{{ target }}">{{ name }}</a>::<wbr/></span>{% endfor %}{{ compound.breadcrumb[-1][0] }} <span class="m-thin">{{ compound.kind }}</span>{% if compound.is_final %} <span class="m-label m-flat m-warning">final</span>{% endif %}{% if compound.since %} {{ compound.since }}{% endif %}
          {# need an explicit space here otherwise the newline gets removed #}

          {% if compound.include and compound.templates == None %}
          <div class="m-doc-include m-code m-inverted m-text-right"><span class="cp">#include</span> <a class="cpf" href="{{ compound.include[1] }}">{{ compound.include[0] }}</a></div>
          {% endif %}
        </h1>
        {% if compound.brief %}
        <p>{{ compound.brief }}</p>
        {% endif %}
        {% if compound.has_template_details %}
        <table class="m-table m-fullwidth m-flat">
          <thead>
            <tr><th colspan="2">Template parameters</th></tr>
          </thead>
          <tbody>
            {% for template in compound.templates|selectattr('name') %}
            <tr>
              <td{% if loop.index == 1 %} style="width: 1%"{% endif %}>{{ template.name }}</td>
              <td>{{ template.description }}</td>
            </tr>
            {% endfor %}
          </tbody>
        </table>
        {% endif %}
        {% if compound.sections or compound.public_types or compound.public_static_funcs or compound.typeless_funcs or compound.public_funcs or compound.signals or compound.public_slots or compound.public_static_vars or compound.public_vars or compound.protected_types or compound.protected_static_funcs or compound.protected_funcs or compound.protected_signals or compound.protected_static_vars or compound.protected_vars or compound.private_funcs or compound.private_slots or compound.groups or compound.friend_funcs or compound.related %}
        <nav class="m-block m-default">
          <h3>Contents</h3>
          <ul>
            {% for id, name, children in compound.sections recursive %}
            {% if children %}
            <li>
              <a href="#{{ id }}">{{ name }}</a>
              <ul>
{{ loop(children)|rtrim|indent(4, true) }}
              </ul>
            </li>
            {% else %}
            <li><a href="#{{ id }}">{{ name }}</a></li>
            {% endif %}
            {% endfor %}
            <li>
              Reference
              <ul>
                {% if compound.base_classes %}
                <li><a href="#base-classes">Base classes</a></li>
                {% endif %}
                {% if compound.derived_classes %}
                <li><a href="#derived-classes">Derived classes</a></li>
                {% endif %}
                {% if compound.public_types %}
                <li><a href="#pub-types">Public types</a></li>
                {% endif %}
                {% if compound.public_static_vars %}
                <li><a href="#pub-static-attribs">Public static variables</a></li>
                {% endif %}
                {% if compound.public_static_funcs %}
                <li><a href="#pub-static-methods">Public static functions</a></li>
                {% endif %}
                {% if compound.typeless_funcs %}
                <li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
                {% endif %}
                {% if compound.public_funcs %}
                <li><a href="#pub-methods">Public functions</a></li>
                {% endif %}
                {% if compound.signals %}
                <li><a href="#signals">Signals</a></li>
                {% endif %}
                {% if compound.public_slots %}
                <li><a href="#pub-slots">Public slots</a></li>
                {% endif %}
                {% if compound.public_vars %}
                <li><a href="#pub-attribs">Public variables</a></li>
                {% endif %}
                {% if compound.protected_types %}
                <li><a href="#pro-types">Protected types</a></li>
                {% endif %}
                {% if compound.protected_static_funcs %}
                <li><a href="#pro-static-methods">Protected static functions</a></li>
                {% endif %}
                {% if compound.protected_funcs %}
                <li><a href="#pro-methods">Protected functions</a></li>
                {% endif %}
                {% if compound.protected_slots %}
                <li><a href="#pro-slots">Protected slots</a></li>
                {% endif %}
                {% if compound.protected_static_vars %}
                <li><a href="#pro-static-attribs">Protected static variables</a></li>
                {% endif %}
                {% if compound.protected_vars %}
                <li><a href="#pro-attribs">Protected variables</a></li>
                {% endif %}
                {% if compound.private_funcs %}
                <li><a href="#pri-methods">Private functions</a></li>
                {% endif %}
                {% if compound.private_slots %}
                <li><a href="#pri-slots">Private slots</a></li>
                {% endif %}
                {% for group in compound.groups %}
                <li><a href="#{{ group.id }}">{{ group.name }}</a></li>
                {% endfor %}
                {% if compound.friend_funcs %}
                <li><a href="#friends">Friends</a></li>
                {% endif %}
                {% if compound.related %}
                <li><a href="#related">Related</a></li>
                {% endif %}
              </ul>
            </li>
          </ul>
        </nav>
        {% endif %}
        {% if compound.description %}
{{ compound.description }}
        {% endif %}
        {% if compound.base_classes %}
        <section id="base-classes">
          <h2><a href="#base-classes">Base classes</a></h2>
          <dl class="m-doc">
            {% for class in compound.base_classes %}
{{ entry_class(class) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.derived_classes %}
        <section id="derived-classes">
          <h2><a href="#derived-classes">Derived classes</a></h2>
          <dl class="m-doc">
            {% for class in compound.derived_classes %}
{{ entry_class(class) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.public_types %}
        <section id="pub-types">
          <h2><a href="#pub-types">Public types</a></h2>
          <dl class="m-doc">
            {% for kind, type in compound.public_types %}
            {% if kind == 'class' %}
{{ entry_class(type) }}
            {% elif kind == 'enum' %}
{{ entry_enum(type) }}
            {% elif kind == 'typedef' %}
{{ entry_typedef(type) }}
            {% endif %}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.public_static_vars %}
        <section id="pub-static-attribs">
          <h2><a href="#pub-static-attribs">Public static variables</a></h2>
          <dl class="m-doc">
            {% for var in compound.public_static_vars %}
{{ entry_var(var) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.public_static_funcs %}
        <section id="pub-static-methods">
          <h2><a href="#pub-static-methods">Public static functions</a></h2>
          <dl class="m-doc">
            {% for func in compound.public_static_funcs %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.typeless_funcs %}
        <section id="typeless-methods">
          <h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
          <dl class="m-doc">
            {% for func in compound.typeless_funcs %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.public_funcs %}
        <section id="pub-methods">
          <h2><a href="#pub-methods">Public functions</a></h2>
          <dl class="m-doc">
            {% for func in compound.public_funcs %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.signals %}
        <section id="signals">
          <h2><a href="#signals">Signals</a></h2>
          <dl class="m-doc">
            {% for func in compound.signals %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.public_slots %}
        <section id="pub-slots">
          <h2><a href="#pub-slots">Public slots</a></h2>
          <dl class="m-doc">
            {% for func in compound.public_slots %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.public_vars %}
        <section id="pub-attribs">
          <h2><a href="#pub-attribs">Public variables</a></h2>
          <dl class="m-doc">
            {% for var in compound.public_vars %}
{{ entry_var(var) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.protected_types %}
        <section id="pro-types">
          <h2><a href="#pro-types">Protected types</a></h2>
          <dl class="m-doc">
            {% for kind, type in compound.protected_types %}
            {% if kind == 'class' %}
{{ entry_class(type) }}
            {% elif kind == 'enum' %}
{{ entry_enum(type) }}
            {% elif kind == 'typedef' %}
{{ entry_typedef(type) }}
            {% endif %}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.protected_static_funcs %}
        <section id="pro-static-methods">
          <h2><a href="#pro-static-methods">Protected static functions</a></h2>
          <dl class="m-doc">
            {% for func in compound.protected_static_funcs %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.protected_funcs %}
        <section id="pro-methods">
          <h2><a href="#pro-methods">Protected functions</a></h2>
          <dl class="m-doc">
            {% for func in compound.protected_funcs %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.protected_slots %}
        <section id="pro-slots">
          <h2><a href="#pro-slots">Protected slots</a></h2>
          <dl class="m-doc">
            {% for func in compound.protected_slots %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.protected_static_vars %}
        <section id="pro-static-attribs">
          <h2><a href="#pro-static-attribs">Protected static variables</a></h2>
          <dl class="m-doc">
            {% for var in compound.protected_static_vars %}
{{ entry_var(var) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.protected_vars %}
        <section id="pro-attribs">
          <h2><a href="#pro-attribs">Protected variables</a></h2>
          <dl class="m-doc">
            {% for var in compound.protected_vars %}
{{ entry_var(var) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.private_funcs %}
        <section id="pri-methods">
          <h2><a href="#pri-methods">Private functions</a></h2>
          <dl class="m-doc">
            {% for func in compound.private_funcs %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.private_slots %}
        <section id="pri-slots">
          <h2><a href="#pri-slots">Private slots</a></h2>
          <dl class="m-doc">
            {% for func in compound.private_slots %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% for group in compound.groups %}
        <section id="{{ group.id }}">
          <h2><a href="#{{ group.id }}">{{ group.name }}</a></h2>
          {% if group.description %}
{{ group.description }}
          {% endif %}
          <dl class="m-doc">
            {% for kind, member in group.members %}
            {% if kind == 'typedef' %}
{{ entry_typedef(member, mark_nonpublic=True) }}
            {% elif kind == 'enum' %}
{{ entry_enum(member, mark_nonpublic=True) }}
            {% elif kind == 'func' %}
{{ entry_func(member, mark_nonpublic=True) }}
            {% elif kind == 'var' %}
{{ entry_var(member, mark_nonpublic=True) }}
            {% endif %}
            {% endfor %}
          </dl>
        </section>
        {% endfor %}
        {% if compound.friend_funcs %}
        <section id="friends">
          <h2><a href="#friends">Friends</a></h2>
          <dl class="m-doc">
            {% for func in compound.friend_funcs %}
{{ entry_func(func) }}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.related %}
        <section id="related">
          <h2><a href="#related">Related</a></h2>
          <dl class="m-doc">
            {% for kind, member in compound.related %}
            {% if kind == 'typedef' %}
{{ entry_typedef(member) }}
            {% elif kind == 'enum' %}
{{ entry_enum(member) }}
            {% elif kind == 'func' %}
{{ entry_func(member) }}
            {% elif kind == 'var' %}
{{ entry_var(member) }}
            {% elif kind == 'define' %}
{{ entry_define(member) }}
            {% endif %}
            {% endfor %}
          </dl>
        </section>
        {% endif %}
        {% if compound.has_enum_details %}
        <section>
          <h2>Enum documentation</h2>
          {% for kind, member in compound.public_types %}
          {% if kind == 'enum' and member.has_details %}
{{ details_enum(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for kind, member in compound.protected_types %}
          {% if kind == 'enum' and member.has_details %}
{{ details_enum(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for group in compound.groups %}
          {% for kind, member in group.members %}
          {% if kind == 'enum' and member.has_details %}
{{ details_enum(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% endfor %}
          {% for kind, member in compound.related %}
          {% if kind == 'enum' and member.has_details %}
{{ details_enum(member, '') }}
          {% endif %}
          {% endfor %}
        </section>
        {% endif %}
        {% if compound.has_typedef_details %}
        <section>
          <h2>Typedef documentation</h2>
          {% for kind, member in compound.public_types %}
          {% if kind == 'typedef' and member.has_details %}
{{ details_typedef(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for kind, member in compound.protected_types %}
          {% if kind == 'typedef' and member.has_details %}
{{ details_typedef(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for group in compound.groups %}
          {% for kind, member in group.members %}
          {% if kind == 'typedef' and member.has_details %}
{{ details_typedef(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% endfor %}
          {% for kind, member in compound.related %}
          {% if kind == 'typedef' and member.has_details %}
{{ details_typedef(member, '') }}
          {% endif %}
          {% endfor %}
        </section>
        {% endif %}
        {% if compound.has_func_details %}
        <section>
          <h2>Function documentation</h2>
          {% for func in compound.public_static_funcs %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.typeless_funcs %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.public_funcs %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.signals %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.public_slots %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.protected_static_funcs %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.protected_funcs %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.protected_slots %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.private_funcs %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for func in compound.private_slots %}
          {% if func.has_details %}
{{ details_func(func, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for group in compound.groups %}
          {% for kind, member in group.members %}
          {% if kind == 'func' and member.has_details %}
{{ details_func(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% endfor %}
          {% for func in compound.friend_funcs %}
          {% if func.has_details %}
{{ details_func(func, '') }}
          {% endif %}
          {% endfor %}
          {% for kind, member in compound.related %}
          {% if kind == 'func' and member.has_details %}
{{ details_func(member, '') }}
          {% endif %}
          {% endfor %}
        </section>
        {% endif %}
        {% if compound.has_var_details %}
        <section>
          <h2>Variable documentation</h2>
          {% for var in compound.public_static_vars %}
          {% if var.has_details %}
{{ details_var(var, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for var in compound.public_vars %}
          {% if var.has_details %}
{{ details_var(var, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for var in compound.protected_static_vars %}
          {% if var.has_details %}
{{ details_var(var, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for var in compound.protected_vars %}
          {% if var.has_details %}
{{ details_var(var, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% for group in compound.groups %}
          {% for kind, member in group.members %}
          {% if kind == 'var' and member.has_details %}
{{ details_var(member, compound.prefix_wbr) }}
          {% endif %}
          {% endfor %}
          {% endfor %}
          {% for kind, member in compound.related %}
          {% if kind == 'var' and member.has_details %}
{{ details_var(member, '') }}
          {% endif %}
          {% endfor %}
        </section>
        {% endif %}
        {% if compound.has_define_details %}
        <section>
          <h2>Define documentation</h2>
          {% for kind, member in compound.related %}
          {% if kind == 'define' and member.has_details %}
{{ details_define(member) }}
          {% endif %}
          {% endfor %}
        </section>
        {% endif %}
{% endblock %}

