fdoc

subroutineside_iconprivate

subroutine side_icon(e, b)

Write the icon of entity e in a sidebar: a letter, with what it stands for as its tooltip.

Arguments

NameTypeIntentAttributesDescription
etype(entity_t)in

the entity

btype(buffer_t)inout

the HTML

Calls

Source

Show the code
subroutine side_icon(e, b)
    type(entity_t), intent(in) :: e     !! the entity
    type(buffer_t), intent(inout) :: b  !! the HTML
    character(len=:), allocatable :: letter, word

    select case (e%kind)
    case (E_FILE); letter = '≡'; word = 'source file'
    case (E_MODULE); letter = 'M'; word = 'module'
    case (E_SUBMODULE); letter = 'M'; word = 'submodule'
    case (E_PROGRAM); letter = 'P'; word = 'program'
    case (E_BLOCKDATA); letter = 'D'; word = 'block data'
    case (E_SUBROUTINE); letter = 'S'; word = 'subroutine'
    case (E_FUNCTION); letter = 'F'; word = 'function'
    case (E_MODPROC); letter = 'S'; word = 'module procedure'
    case (E_INTERFACE); letter = 'I'; word = 'interface'
    case (E_TYPE); letter = 'T'; word = 'derived type'
    case (E_BOUNDPROC); letter = 'B'; word = 'type-bound procedure'
    case (E_VARIABLE); letter = 'V'; word = 'variable'
    case (E_NAMELIST); letter = 'N'; word = 'namelist'
    case default; return
    end select
    if (e%iface == IFACE_EXPLICIT) then
        letter = 'I'
        word = 'interface'
    else if (e%iface == IFACE_ABSTRACT) then
        letter = 'A'
        word = 'abstract interface'
    end if
    call add(b, '<span class="ico ico-'//letter_class(letter)//'" title="'//word//'" aria-hidden="true">'//letter//'</span>')
end subroutine side_icon

Graphs

Calls

Called by