nitc :: DocTabLink
nitc :: DocTabLink :: defaultinit
nitc $ DocTabLink :: SELF
Type of this instance, automatically specialized in every classnitc :: static_html $ DocTabLink :: rendering
Service used to render the content of the template.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 renderingcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
template :: Template :: defaultinit
nitc :: DocTab :: defaultinit
core :: Writable :: defaultinit
nitc :: DocTabLink :: defaultinit
core :: Object :: defaultinit
nitc :: DocTab :: is_active=
Is this tab 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).template :: Template :: render_done=
Flag to avoid multiple renderingcore :: 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 fictive tab used to display a link
class DocTabLink
super DocTab
autoinit(id, title, icon, url)
# Link to open when the tab is clicked
var url: String
end
src/doc/static/static_base.nit:333,1--340,3
redef class DocTabLink
redef fun tab_link do
var tpl = new Template
tpl.addn "<li class='{if is_active then "active" else ""}'>"
tpl.addn " <a href='{url.html_escape}'>"
var icon = self.icon
if icon != null then
tpl.addn " <span class='glyphicon glyphicon-{icon}'></span>"
end
tpl.addn " {title}"
tpl.addn " </a>"
tpl.addn "</li>"
return tpl
end
redef fun rendering do end
end
src/doc/static/static_html.nit:252,1--270,3