def contents_html_template(self): html_template = HtmlTemplate() html_template.title = "%s %s" % (self.type_element.ToString("f"), self.text()) html_template.h1 = "%s %s" % (self.type_element.ToString("s"), self.text()) html_template.main = fmt_non_empty( self.widget_member_filter(show_inherited = not isinstance(self, ConstructorsNode)) + "%s", self.main_html_table()) return html_template
def contents_html_template(self): html_template = HtmlTemplate() html_template.title = "%s %s" % (self.constructor_element.OwnerType.ToString("f"), "Constructor") html_template.h1 = "%s %s" % (self.constructor_element.OwnerType.ToString("s"), "Constructor") html_template.main = self.__summary_section() + \ self.__syntax_section() + \ self.__exceptions_section() + \ self.__remarks_section() + \ self.__example_section() + \ self.__see_also_section() return html_template
def contents_html_template(self): method_name = self.method_element.Name html_template = HtmlTemplate() html_template.title = "%s %s" % (method_name, "Method") html_template.h1 = "%s.%s %s" % (self.method_element.OwnerType.ToString("s"), method_name, "Method") html_template.main = self.__summary_section() + \ self.__syntax_section() + \ self.__exceptions_section() + \ self.__remarks_section() + \ self.__example_section() + \ self.__see_also_section() return html_template
def contents_html_template(self): property_name = self.property_element.Name html_template = HtmlTemplate() html_template.title = "%s %s" % (property_name, "Property") html_template.h1 = "%s.%s %s" % (self.property_element.OwnerType.ToString("s"), property_name, "Property") html_template.main = fmt_non_empty(""" <h2>Summary</h2> <p>%s</p> """, self.property_element.XmlComment.Summary()) + \ """ <h2>Syntax</h2> <code class="syntax"> %s </code> """ % self.property_element.ToSyntax() return html_template
def contents_html_template(self): print "Generating page for enum %s" % self.type_element.ToString("f") type_kind = self.type_element.TypeKind has_flags = self.type_element.HasAttribute("System.FlagsAttribute") html_template = HtmlTemplate() html_template.title = "%s %s" % (self.type_element.ToString("f"), type_kind) html_template.h1 = "%s %s" % (self.type_element.ToString("s"), type_kind) html_template.main = fmt_non_empty(""" <h2>Summary</h2> <p>%s</p>""", self.type_element.XmlComment.Summary()) if has_flags: html_template.main += """ <p class="info">This is a flags enum; its members can be combined with bitwise operators.</p>""" html_template.main += self.__members_section() return html_template
def contents_html_template(self): print "Generating page for type %s" % self.type_element.ToString("f") type_kind = self.type_element.TypeKind html_template = HtmlTemplate() html_template.title = "%s %s" % (self.type_element.ToString("f"), type_kind) html_template.h1 = "%s %s" % (self.type_element.ToString("s"), type_kind) html_template.main = "\n".join([ fmt_non_empty(""" <h2>Summary</h2> <p>%s</p>""", self.type_element.XmlComment.Summary()), self.__base_type_section(), self.__interfaces_section(), self.__derived_types_section(), self.__syntax_section(), self.__constructors_section(), self.__properties_section(), self.__methods_section(), self.__extension_methods_section() ]) # TODO: operators # TODO: separate attribute template? return html_template