subroutinepage_outlineprivate
subroutine page_outline(site, id, b)
Write the sections of a procedure page, for the sidebar.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| site | type(site_t) | in | the site | |
| id | integer | in | the entity | |
| b | type(buffer_t) | inout | the HTML |
Calls
Source
Show the code
subroutine page_outline(site, id, b)
type(site_t), intent(in) :: site !! the site
integer, intent(in) :: id !! the entity
type(buffer_t), intent(inout) :: b !! the HTML
associate (e => site%p%list%box(id)%e)
if (.not. is_procedure(e%kind) .and. e%kind /= E_MODPROC) return
call add(b, '<h4>On this page</h4><ul>')
if (allocated(e%more%arg_ids)) then
if (size(e%more%arg_ids) > 0) call add(b, '<li><a href="#arguments">Arguments</a></li>')
end if
if (e%result > 0) call add(b, '<li><a href="#result">Result</a></li>')
if (allocated(e%more%uses)) then
if (size(e%more%uses) > 0) call add(b, '<li><a href="#uses">Uses</a></li>')
end if
if (allocated(e%call_ids)) then
if (size(e%call_ids) > 0) call add(b, '<li><a href="#calls">Calls</a></li>')
end if
if (e%source_first > 0) call add(b, '<li><a href="#source">Source</a></li>')
call add(b, '</ul>'//achar(10))
end associate
end subroutine page_outline