{% extends "base.html" %}
{% block title %}{{ dtype.name }} &ndash; {{ project }} {% endblock title %}
{% block body %}
  {% import 'macros.html' as macros %}
  <div class="row">
    <h1>{{ dtype.name }}
      <small>Derived Type</small>
      {{ macros.deprecated(dtype) }}
    </h1>
    {{ macros.info_bar(dtype, incl_src, project_url, dtype.lines_description(project.type_lines,project.type_lines_all)) }}
  </div>
  
  <div class="row">
    <div class="col-md-3 hidden-xs hidden-sm visible-md visible-lg">
    {{ macros.sidebar(project,dtype) }}
    </div>
    
    <div class="col-md-9" id='text'>
      <h2>type{% if dtype.parobj == 'module' %}, {{ dtype.permission }}{% endif %}{% for attr in dtype.attributes%}, {{ attr }}{% endfor %}{% if dtype.extends %}, extends({{ dtype.extends }}){% endif %} :: {{ dtype.name }}{% if dtype.sequence%}<br>sequence{% endif %}</h2>
    {{ dtype.doc }}
    {% if dtype.inherbygraph or dtype.inhergraph %}<br>{% endif %}
    {% if dtype.inhergraph %}
    <div class="panel panel-default">
      <div class="panel-heading">
  <h3 class="panel-title">Inherits</h3>
      </div>
      <div class="panel-body">
    {{ dtype.inhergraph }}
      </div>
    </div>
    {% endif %}
    {% if dtype.inherbygraph %}
    <div class="panel panel-default">
      <div class="panel-heading">
  <h3 class="panel-title">Inherited by</h3>
      </div>
      <div class="panel-body">
     {{ dtype.inherbygraph }}
      </div>
    </div>
    {% endif %}
    <br>

    <section class="visible-xs visible-sm hidden-md">
      {{ macros.content_list(dtype,1) }}
    </section>
    <br class="visible-xs visible-sm hidden-md">

    {% if dtype.variables|length > 0 %}
    <section>
    <h2>Components</h2>
    {{ macros.variable_list(dtype.variables, permission=True) }}
    </section>
    <br>
    {% endif %}
    
    {% if dtype.constructor %}
      <section>
        <h2>Constructor</h2>
        {% if dtype.constructor.obj == "interface" %}
          {{ macros.interface(dtype.constructor) }}
        {% elif dtype.constructor.obj in ["subroutine", "function"] %}
          {% set obj = dtype.constructor %}
          <div class="panel panel-default">
            <div class="panel-heading codesum">
              <span class="anchor" id="{{ obj.anchor }}"></span>
              <h3>{{ macros.proc_line(obj) }}</h3>
            </div>
            <div class="panel-body">
              {{ macros.proc_summary(obj, full_docstring=True) }}
            </div>
          </div>
        {% endif %}
      </section>
      <br>
    {% endif %}

    {% if dtype.finalprocs %}
      <section>
        <h2>Finalization Procedures</h2>
        {% for proc in dtype.finalprocs %}
          {{ macros.final(proc) }}
        {% endfor %}
      </section>
      <br>
    {% endif %}

    {% if dtype.boundprocs %}
      <section>
        <h2>Type-Bound Procedures</h2>
        {% for bp in dtype.boundprocs %}
          {{ macros.bound_info(bp) }}
        {% endfor %}
      </section>
    {% endif %}

    {% if dtype.src %}
    <section>
    <h3><span class="anchor" id="src"></span>Source Code</h3>
    {{ dtype.src }}
    </section>
    {% endif %}
    
    </div>
  </div>

{% endblock body %}
