nitc :: CardLinearizationDef :: _id
nitc :: CardLinearizationDef :: _is_active
Is this card displayed by default?nitc :: CardLinearizationDef :: _title
nitc :: CardLinearizationDef :: _url
Link to external code repositorynitc :: CardLinearizationDef :: is_active=
Is this card displayed by default?nitc :: CardLinearizationDef :: url=
Link to external code repositorynitc $ CardLinearizationDef :: SELF
Type of this instance, automatically specialized in every classnitc $ CardLinearizationDef :: rendering
Service used to render the content of the template.nitc :: CardLinearizationDef :: _id
nitc :: CardMEntity :: _id
nitc :: CardLinearizationDef :: _is_active
Is this card displayed by default?template :: Template :: _is_frozen
Is the template allowing more modification (add
)
template :: Template :: _is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: _render_done
Flag to avoid multiple renderingnitc :: CardLinearizationDef :: _title
nitc :: CardMEntity :: _title
nitc :: CardLinearizationDef :: _url
Link to external code repositorycore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
nitc :: CardMEntity :: defaultinit
template :: Template :: defaultinit
nitc :: StaticCard :: defaultinit
core :: Writable :: defaultinit
nitc :: CardCode :: defaultinit
nitc :: CardMEntity :: full_doc=
Render the mentity full documentation?nitc :: CardLinearizationDef :: is_active=
Is this card displayed by default?template :: Template :: is_frozen=
Is the template allowing more modification (add
)
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
template :: Template :: is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: is_writing=
Flag to avoid infinite recursivity if a template contains itselfcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: CardCode :: render_code
template :: Template :: render_done=
Flag to avoid multiple renderingnitc :: CardLinearizationDef :: url=
Link to external code repositorycore :: Writable :: write_to_bytes
Likewrite_to
but return a new Bytes (may be quite large)
core :: Writable :: write_to_file
Likewrite_to
but take care of creating the file
core :: Writable :: write_to_string
Likewrite_to
but return a new String (may be quite large).
# A card about a definition in a linearization list
class CardLinearizationDef
super CardCode
# Is this card displayed by default?
var is_active: Bool = false is optional, writable
# Link to external code repository
#
# Used if `node` is null
var url: nullable String = null is optional, writable
redef var id = "def_{super}" is lazy
redef var title = mentity.full_name is lazy
redef fun rendering do
var url = self.url
var cin = if is_active then "in" else ""
var active = if is_active then "active" else ""
addn """
<div class='card {{{active}}}' id='{{{id}}}'>
<div class='card-body'>
<h5>
{{{mentity.html_icon.write_to_string}}}
{{{mentity.html_namespace.write_to_string}}}"""
if node != null then
addn """
<div class='btn-bar'>
<button class='btn btn-link' data-toggle='collapse'
data-target='#{{{mentity.html_id}}}'>
<span class='glyphicon glyphicon-console' title='Show code' />
</button>
</div>"""
else if url != null then
addn """
<div class='btn-bar'>
<a class='btn btn-link' href='{{{url}}}'>
<span class='glyphicon glyphicon-console' title='Show code' />
</a>
</div>"""
var mdoc = mentity.mdoc
if mdoc != null then
addn "<br/><br/>"
addn mdoc.html_documentation
end
end
addn "</h5>"
if node != null then
addn """
<div id='{{{mentity.html_id}}}' class='collapse {{{cin}}}'>
<pre>"""
render_code
addn """</pre>
<span class='text-muted'>{{{mentity.location.to_s}}}</span>
</div>"""
end
addn """
</div>
</div>"""
end
end
src/doc/static/static_cards.nit:324,1--385,3