NaturalDocs::Builder::HTMLBase |
A base package for all the shared functionality in NaturalDocs::Builder::HTML and NaturalDocs::Builder::FramedHTML.
NaturalDocs:: | A base package for all the shared functionality in NaturalDocs::Builder::HTML and NaturalDocs::Builder::FramedHTML. |
Object Variables | |
Members | The object is implemented as a blessed arrayref, with the follow constants as indexes. |
NDMarkupToHTML Styles | These are the styles used with NDMarkupToHTML(). |
Package Variables | These variables are shared by all instances of the package so don’t change them. |
FH_CSS_FILE | The file handle to use when updating CSS files. |
abbreviations | An existence hash of acceptable abbreviations. |
indexHeadings | An array of the headings of all the index sections. |
indexAnchors | An array of the HTML anchors of all the index sections. |
searchExtensions | An array of the search file name extensions for all the index sections. |
saidUpdatingCSSFile | Whether the status message “Updating CSS file...” |
ADD_HIDDEN_BREAKS | Just a synonym for “1” so that setting the flag on StringToHTML() is clearer in the calling code. |
ToolTip Package Variables | These variables are for the tooltip generation functions only. |
tooltipLinkNumber | A number used as part of the ID for each link that has a tooltip. |
tooltipNumber | A number used as part of the ID for each tooltip. |
tooltipSymbolsToNumbers | A hash that maps the tooltip symbols to their assigned numbers. |
tooltipHTML | The generated tooltip HTML. |
Menu Package Variables | These variables are for the menu generation functions only. |
prebuiltMenus | A hash that maps output directonies to menu HTML already built for it. |
menuNumbersAndLengthsDone | Set when the variables that only need to be calculated for the menu once are done. |
menuGroupNumber | The current menu group number. |
menuLength | The length of the entire menu, fully expanded. |
menuGroupLengths | A hash of the length of each group, not including any subgroup contents. |
menuGroupNumbers | A hash of the number of each group, as managed by menuGroupNumber. |
menuRootLength | The length of the top-level menu entries without expansion. |
Menu Length Constants | Constants used to approximate the lengths of the menu or its groups. |
Image Package Variables | These variables are for the image generation functions only. |
imageAnchorNumber | Incremented for each image link in the file that requires an anchor. |
imageContent | The actual embedded image HTML for all image links. |
Search Package Variables | These variables are for the search generation functions only. |
searchResultIDs | A hash mapping lowercase-only search result IDs to the number of times they’ve been used. |
Object Functions | |
New | Creates and returns a new object. |
MadeEmptySearchResultsPage | Returns whether the empty search results page was created or not. |
SetMadeEmptySearchResultsPage | Sets whether the empty search results page was created or not. |
Implemented Interface Functions | The behavior of these functions is shared between HTML output formats. |
UpdateImage | Define this function to add or update the passed image in the output. |
PurgeFiles | Deletes the output files associated with the purged source files. |
PurgeIndexes | Deletes the output files associated with the purged source files. |
PurgeImages | Define this function to make the package remove all output related to the passed image files. |
BeginBuild | Creates the necessary subdirectories in the output directory. |
EndBuild | Synchronizes the projects CSS and JavaScript files. |
Section Functions | |
BuildTitle | Builds and returns the HTML page title of a file. |
BuildMenu | Builds and returns the side menu of a file. |
BuildMenuSegment | A recursive function to build a segment of the menu. |
BuildContent | Builds and returns the main page content. |
BuildSummary | Builds a summary, either for the entire file or the current class/section. |
BuildPrototype | Builds and returns the prototype as HTML. |
BuildFooter | Builds and returns the HTML footer for the page. |
BuildToolTip | Builds the HTML for a symbol’s tooltip and stores it in tooltipHTML. |
BuildToolTips | Builds and returns the tooltips for the page in HTML. |
BuildClassHierarchy | Builds and returns a class hierarchy diagram for the passed class, if applicable. |
BuildClassHierarchyEntry | Builds and returns a single class hierarchy entry. |
OpeningBrowserStyles | Returns the JavaScript that will add opening browser styles if necessary. |
ClosingBrowserStyles | Returns the JavaScript that will close browser styles if necessary. |
StandardComments | Returns the standard HTML comments that should be included in every generated file. |
IEWebMark | Returns the HTML comment necessary to get around the security warnings in IE starting with Windows XP Service Pack 2. |
Index Functions | |
BuildIndexPages | Builds an index file or files. |
BuildIndexSections | Builds and returns the index and search results sections in HTML. |
BuildIndexElement | Converts a NaturalDocs::SymbolTable::IndexElement to HTML and returns it. |
BuildIndexLink | Builds and returns the HTML associated with an index link. |
BuildIndexNavigationBar | Builds a navigation bar for a page of the index. |
File Functions | |
PurgeIndexFiles | Removes all or some of the output files for an index. |
OutputFileOf | Returns the output file name of the source file. |
OutputImageOf | Returns the output image file name of the source image file. |
IndexDirectory | Returns the directory of the index files. |
IndexFileOf | Returns the output file name of the index file. |
RelativeIndexFileOf | Returns the output file name of the index file, relative to other index files. |
SearchResultsDirectory | Returns the directory of the search results files. |
SearchResultsFileOf | Returns the output file name of the search result file. |
CSSDirectory | Returns the directory of the CSS files. |
MainCSSFile | Returns the location of the main CSS file. |
JavaScriptDirectory | Returns the directory of the JavaScript files. |
MainJavaScriptFile | Returns the location of the main JavaScript file. |
SearchDataJavaScriptFile | Returns the location of the search data JavaScript file. |
Support Functions | |
IndexTitleOf | Returns the page title of the index file. |
MakeRelativeURL | Returns a relative path between two files in the output tree and returns it in URL format. |
StringToHTML | Converts a text string to HTML. |
SymbolToHTMLSymbol | Converts a SymbolString to a HTML symbol, meaning one that is safe to include in anchor and link tags. |
StringToSearchResultID | Takes a text string and translates it into something that can be used as a CSS ID. |
NDMarkupToHTML | Converts a block of NDMarkup to HTML. |
BuildTextLink | Creates a HTML link to a symbol, if it exists. |
BuildURLLink | Creates a HTML link to an external URL. |
BuildEMailLink | Creates a HTML link to an e-mail address. |
BuildImage | Builds the HTML for an image. |
BuildToolTipLinkProperties | Returns the properties that should go in the link tag to add a tooltip to it. |
AddDoubleSpaces | Adds second spaces after the appropriate punctuation with so they show up in HTML. |
ConvertAmpChars | Converts certain characters to their HTML amp char equivalents. |
RestoreAmpChars | Restores all amp characters to their original state. |
AddHiddenBreaks | Adds hidden breaks to symbols. |
FindFirstFile | A function that finds and returns the first file entry in the menu, or undef if none. |
ExpandMenu | Determines which groups should be expanded. |
GetMenuSelectionHierarchy | Finds the sequence of menu groups that contain the current selection. |
FindMenuSelection | A recursive function that deterimes if it or any of its sub-groups has the menu selection. |
ResetToolTips | Resets the ToolTip Package Variables for a new page. |
These are the styles used with NDMarkupToHTML().
NDMARKUPTOHTML_GENERAL | General style. |
NDMARKUPTOHTML_SUMMARY | For summaries. |
NDMARKUPTOHTML_TOOLTIP | For tooltips. |
my %abbreviations
An existence hash of acceptable abbreviations. These are words that AddDoubleSpaces() won’t put a second space after when followed by period-whitespace-capital letter. Yes, this is seriously over-engineered.
Just a synonym for “1” so that setting the flag on StringToHTML() is clearer in the calling code.
These variables are for the tooltip generation functions only. Since they’re reset on every call to BuildContent() and BuildIndexSections(), and are only used by them and their support functions, they can be shared by all instances of the package.
These variables are for the menu generation functions only. Since they’re reset on every call to BuildMenu() and are only used by it and its support functions, they can be shared by all instances of the package.
my $menuNumbersAndLengthsDone
Set when the variables that only need to be calculated for the menu once are done. This includes menuGroupNumber, menuLength, menuGroupLengths, and menuGroupNumbers, and menuRootLength.
my $menuLength
The length of the entire menu, fully expanded. The value is computed from the Menu Length Constants.
my %menuGroupLengths
A hash of the length of each group, not including any subgroup contents. The keys are references to each groups’ NaturalDocs::Menu::Entry object, and the values are their lengths computed from the Menu Length Constants.
my %menuGroupNumbers
A hash of the number of each group, as managed by menuGroupNumber. The keys are references to each groups’ NaturalDocs::Menu::Entry object, and the values are the number.
my $menuRootLength
The length of the top-level menu entries without expansion. The value is computed from the Menu Length Constants.
Constants used to approximate the lengths of the menu or its groups.
These variables are for the image generation functions only. Since they’re reset on every call to BuildContent(), and are only used by it and its support functions, they can be shared by all instances of thepackage.
my $imageContent
The actual embedded image HTML for all image links. When generating an image link, the link HTML is returned and the HTML for the target image is added here. Periodically, such as after the end of the paragraph, this content should be added to the page and the variable set to undef.
These variables are for the search generation functions only. Since they’re reset on every call to BuildIndexSections() and are only used by them and their support functions, they can be shared by all instances of the package.
sub UpdateImage #( file )
Define this function to add or update the passed image in the output.
file | The image FileName |
sub PurgeIndexes #( indexes )
Deletes the output files associated with the purged source files.
indexes | An existence hashref of the index types to purge. The keys are the TopicTypes or * for the general index. |
sub PurgeImages #( files )
Define this function to make the package remove all output related to the passed image files. These files are no longer used by the documentation.
files | An existence hashref of the image FileNames to purge. |
sub BuildTitle #( sourceFile )
Builds and returns the HTML page title of a file.
sourceFile | The source FileName to build the title of. |
The source file’s title in HTML.
sub BuildMenu #( FileName sourceFile, TopicType indexType ) -> string htmlMenu
Builds and returns the side menu of a file.
sourceFile | The source FileName to use if you’re looking for a source file. |
indexType | The index TopicType to use if you’re looking for an index. |
Both sourceFile and indexType may be undef.
The side menu in HTML.
sub BuildMenuSegment #( outputDirectory, menuSegment, topLevel )
A recursive function to build a segment of the menu. Remember to reset the Menu Package Variables before calling this for the first time.
outputDirectory | The output directory the menu is being built for. |
menuSegment | An arrayref specifying the segment of the menu to build. Either pass the menu itself or the contents of a group. |
topLevel | Whether the passed segment is the top level segment or not. |
The array ( menuHTML, length ).
menuHTML | The menu segment in HTML. |
groupLength | The length of the group, not including the contents of any subgroups, as computed from the Menu Length Constants. |
sub BuildContent #( sourceFile, parsedFile )
Builds and returns the main page content.
sourceFile | The source FileName. |
parsedFile | The parsed source file as an arrayref of NaturalDocs::Parser::ParsedTopic objects. |
The page content in HTML.
sub BuildSummary #( sourceFile, parsedFile, index )
Builds a summary, either for the entire file or the current class/section.
sourceFile | The source FileName the summary appears in. |
parsedFile | A reference to the parsed source file. |
index | The index into the parsed file to start at. If undef or zero, it builds a summary for the entire file. If it’s the index of a TopicType that starts or ends a scope, it builds a summary for that scope |
The summary in HTML.
sub BuildFooter #( bool multiline )
Builds and returns the HTML footer for the page.
multiline | Whether it should be formatted on multiple lines or not. |
Builder::HTML::UpdateFile() and Builder::HTML::UpdateIndex() require this section to be surrounded with the exact strings “<div id=Footer>” and “</div><!--Footer-->”.
sub BuildToolTip #( symbol, file, type, prototype, summary )
Builds the HTML for a symbol’s tooltip and stores it in tooltipHTML.
symbol | The target SymbolString. |
file | The FileName the target’s defined in. |
type | The symbol TopicType. |
prototype | The target prototype, or undef for none. |
summary | The target summary, or undef for none. |
If a tooltip is necessary for the link, returns the tooltip ID. If not, returns undef.
sub BuildClassHierarchy #( file, symbol )
Builds and returns a class hierarchy diagram for the passed class, if applicable.
file | The source FileName. |
class | The class SymbolString to build the hierarchy of. |
sub BuildClassHierarchyEntry #( file, symbol, style, link )
Builds and returns a single class hierarchy entry.
file | The source FileName. |
symbol | The class SymbolString whose entry is getting built. |
style | The style to apply to the entry, such as CHParent. |
link | Whether to build a link for this class or not. When building the selected class’ entry, this should be false. It will automatically handle whether the symbol is defined or not. |
sub StandardComments
Returns the standard HTML comments that should be included in every generated file. This includes IEWebMark(), so this really is required for proper functionality.
sub IEWebMark
Returns the HTML comment necessary to get around the security warnings in IE starting with Windows XP Service Pack 2.
With this mark, the HTML page is treated as if it were in the Internet security zone instead of the Local Machine zone. This prevents the lockdown on scripting that causes an error message to appear with each page.
sub BuildIndexPages #( TopicType type, NaturalDocs::SymbolTable:: IndexElement[] indexSections, string beginIndexPage, string endIndexPage, string beginSearchResultsPage, string endSearchResultsPage ) => int
Builds an index file or files.
type | The TopicType the index is limited to, or undef for none. |
indexSections | An arrayref of sections, each section being an arrayref NaturalDocs::SymbolTable::IndexElement objects. The first section is for symbols, the second for numbers, and the rest for A through Z. |
beginIndexPage | All the content of the HTML page up to where the index content should appear. |
endIndexPage | All the content of the HTML page past where the index should appear. |
beginSearchResultsPage | All the content of the HTML page up to where the search results content should appear. |
endSearchResultsPage | All the content of the HTML page past where the search results content should appear. |
The number of pages in the index.
sub BuildIndexSections #( NaturalDocs::SymbolTable:: IndexElement[] index ) => ( string[], string[], string[] )
Builds and returns the index and search results sections in HTML.
index | An arrayref of sections, each section being an arrayref NaturalDocs::SymbolTable::IndexElement objects. The first section is for symbols, the second for numbers, and the rest for A through Z. |
The arrayref ( indexSections, tooltipSections, searchResultsSections ).
Index 0 is the symbols, index 1 is the numbers, and each following index is A through Z. The content of each section is its HTML, or undef if there is nothing for that section.
sub BuildIndexElement #( NaturalDocs::SymbolTable:: IndexElement element, string cssID, SymbolString symbol, SymbolString package, bool hasPackage ) => ( string, string )
Converts a NaturalDocs::SymbolTable::IndexElement to HTML and returns it. It will handle all sub-elements automatically.
element | The NaturalDocs::SymbolTable::IndexElement to build. |
cssID | The CSS ID to apply to the prefix. |
These parameters are used internally for recursion, and should not be set.
symbol | If the element is below symbol level, the SymbolString to use. |
package | If the element is below package level, the package SymbolString to use. |
hasPackage | Whether the element is below package level. Is necessary because package may need to be undef. |
The array ( indexHTML, searchResultHTML ) which is the element in the respective HTML forms.
sub BuildIndexLink #( string text, SymbolString symbol, SymbolString package, FileName file, TopicType type, string prototype, string summary, string style ) => ( string, string )
Builds and returns the HTML associated with an index link. The HTML will be the a href tag, the text, and the closing tag.
text | The text of the link in HTML. Use <IndexSymbolToHTML()> if necessary. |
symbol | The partial SymbolString to link to. |
package | The package SymbolString of the symbol. |
file | The FileName the symbol is defined in. |
type | The TopicType of the symbol. |
prototype | The prototype of the symbol, or undef if none. |
summary | The summary of the symbol, or undef if none. |
style | The CSS style to apply to the link. |
The array ( indexHTML, searchResultHTML ) which is the link in the respective forms.
sub BuildIndexNavigationBar #( type, page, locations )
Builds a navigation bar for a page of the index.
type | The TopicType of the index, or undef for general. |
page | The page of the index the navigation bar is for. |
locations | An arrayref of the locations of each section. Index 0 is for the symbols, index 1 for the numbers, and the rest for each letter. The values are the page numbers where the sections are located. |
sub PurgeIndexFiles #( TopicType type, optional NaturalDocs::SymbolTable:: IndexElement[] indexSections, optional int startingPage )
Removes all or some of the output files for an index.
type | The index TopicType. |
indexSections | An arrayref of sections, each section being an arrayref NaturalDocs::SymbolTable::IndexElement objects. The first section is for symbols, the second for numbers, and the rest for A through Z. May be undef. |
startingPage | If defined, only pages starting with this number will be removed. Otherwise all pages will be removed. |
sub IndexFileOf #( type, page )
Returns the output file name of the index file.
type | The TopicType of the index. |
page | The page number. Undef is the same as one. |
sub RelativeIndexFileOf #( type, page )
Returns the output file name of the index file, relative to other index files.
type | The TopicType of the index. |
page | The page number. Undef is the same as one. |
sub SearchResultsFileOf #( TopicType type, string extra )
Returns the output file name of the search result file.
type | The TopicType of the index. |
extra | The string to add to the end of the file name, such as “A” or “Symbols”. |
sub MakeRelativeURL #( FileName baseFile, FileName targetFile, bool baseHasFileName ) -> string relativeURL
Returns a relative path between two files in the output tree and returns it in URL format.
baseFile | The base FileName in local format, not in URL format. |
targetFile | The target FileName of the link in local format, not in URL format. |
baseHasFileName | Whether baseFile has a file name attached or is just a path. |
The relative URL to the target.
sub StringToHTML #( string, addHiddenBreaks )
Converts a text string to HTML. Does not apply paragraph tags or accept formatting tags.
string | The string to convert. |
addHiddenBreaks | Whether to add hidden breaks to the string. You can use ADD_HIDDEN_BREAKS for this parameter if you want to make the calling code clearer. |
The string in HTML.
sub SymbolToHTMLSymbol #( symbol )
Converts a SymbolString to a HTML symbol, meaning one that is safe to include in anchor and link tags. You don’t need to pass the result to ConvertAmpChars().
sub StringToSearchResultID #( string string, bool dontIncrement = 0 ) => string
Takes a text string and translates it into something that can be used as a CSS ID.
string | The string to convert |
dontIncrement | If set, it reuses the last generated ID. Otherwise it generates a new one if it matches a previously generated one in a case-insensitive way. |
sub NDMarkupToHTML #( sourceFile, text, symbol, package, type, using, style )
Converts a block of NDMarkup to HTML.
sourceFile | The source FileName the NDMarkup appears in. |
text | The NDMarkup text to convert. |
symbol | The topic SymbolString the NDMarkup appears in. |
package | The package SymbolString the NDMarkup appears in. |
type | The TopicType the NDMarkup appears in. |
using | An arrayref of scope SymbolStrings the NDMarkup also has access to, or undef if none. |
style | Set to one of the NDMarkupToHTML Styles or leave undef for general. |
The text in HTML.
sub BuildTextLink #( target, name, original, package, using, sourceFile )
Creates a HTML link to a symbol, if it exists.
target | The link text. |
name | The link name. |
original | The original text as it appears in the source. |
package | The package SymbolString the link appears in, or undef if none. |
using | An arrayref of additional scope SymbolStrings the link has access to, or undef if none. |
sourceFile | The FileName the link appears in. |
Target, name, and original are assumed to still have NDMarkup amp chars.
The link in HTML, including tags. If the link doesn’t resolve to anything, returns the HTML that should be substituted for it.
sub BuildURLLink #( target, name )
Creates a HTML link to an external URL. Long URLs will have hidden breaks to allow them to wrap.
target | The URL to link to. |
name | The label of the link. |
Both are assumed to still have NDMarkup amp chars.
The HTML link, complete with tags.
sub BuildEMailLink #( target, name )
Creates a HTML link to an e-mail address. The address will be transparently munged to protect it (hopefully) from spambots.
target | The e-mail address. |
name | The label of the link. |
Both are assumed to still have NDMarkup amp chars.
The HTML e-mail link, complete with tags.
sub BuildImage #( sourceFile, mode, target, original )
Builds the HTML for an image.
sourceFile | The source FileName this image appears in. |
mode | Either “inline” or “link”. |
target | The target. |
original | The original text. |
All are assumed to still have NDMarkup amp chars.
The result in HTML. If the mode was “link”, the target image’s HTML is added to imageContent.
sub BuildToolTipLinkProperties #( toolTipID )
Returns the properties that should go in the link tag to add a tooltip to it. Because the function accepts undef, you can call it without checking if BuildToolTip() returned undef or not.
toolTipID | The ID of the tooltip. If undef, the function will return undef. |
The properties that should be put in the link tag, or undef if toolTipID wasn’t specified.
sub AddDoubleSpaces #( text )
Adds second spaces after the appropriate punctuation with so they show up in HTML. They don’t occur if there isn’t at least one space after the punctuation, so things like class.member notation won’t be affected.
text | The text to convert. |
The text with double spaces as necessary.
sub RestoreAmpChars #( text )
Restores all amp characters to their original state. This works with both NDMarkup amp chars and fancy quotes.
text | The text to convert. |
The converted text.
sub ExpandMenu #( FileName sourceFile, TopicType indexType, NaturalDocs::Menu:: Entry[] selectionHierarchy, int rootLength ) -> int[] groupsToExpand
Determines which groups should be expanded.
sourceFile | The source FileName to use if you’re looking for a source file. |
indexType | The index TopicType to use if you’re looking for an index. |
selectionHierarchy | The FileName the menu is being built for. Does not have to be on the menu itself. |
rootLength | The length of the menu’s root group, not including the contents of subgroups. |
An arrayref of all the group numbers that should be expanded. At minimum, it will contain the numbers of the groups present in <menuSelectionHierarchy>, though it may contain more.
sub GetMenuSelectionHierarchy #( FileName sourceFile, TopicType indexType ) -> NaturalDocs::Menu::Entry[] selectionHierarchy
Finds the sequence of menu groups that contain the current selection.
sourceFile | The source FileName to use if you’re looking for a source file. |
indexType | The index TopicType to use if you’re looking for an index. |
An arrayref of the NaturalDocs::Menu::Entry objects of each group surrounding the selected menu item. First entry is the group immediately encompassing it, and each subsequent entry works its way towards the outermost group.
sub FindMenuSelection #( FileName sourceFile, TopicType indexType, NaturalDocs::Menu:: Entry[] hierarchyRef, NaturalDocs::Menu:: Entry[] entries ) -> bool hasSelection
A recursive function that deterimes if it or any of its sub-groups has the menu selection.
sourceFile | The source FileName to use if you’re looking for a source file. |
indexType | The index TopicType to use if you’re looking for an index. |
hierarchyRef | A reference to the menu selection hierarchy. |
entries | An arrayref of NaturalDocs::Menu::Entries to search. |
Whether this group or any of its subgroups had the selection. If true, it will add any subgroups to the menu selection hierarchy but not itself. This prevents the topmost entry from being added.
sub ResetToolTips #( samePage )
Resets the ToolTip Package Variables for a new page.
samePage | Set this flag if there’s the possibility that the next batch of tooltips may be on the same page as the last. |
Converts a block of NDMarkup to HTML.
sub NDMarkupToHTML #( sourceFile, text, symbol, package, type, using, style )
An existence hash of acceptable abbreviations.
my %abbreviations
An array of the headings of all the index sections.
my @indexHeadings
An array of the HTML anchors of all the index sections.
my @indexAnchors
An array of the search file name extensions for all the index sections.
my @searchExtensions
Whether the status message “Updating CSS file...”
my $saidUpdatingCSSFile
Converts a text string to HTML.
sub StringToHTML #( string, addHiddenBreaks )
A number used as part of the ID for each link that has a tooltip.
my $tooltipLinkNumber
A number used as part of the ID for each tooltip.
my $tooltipNumber
A hash that maps the tooltip symbols to their assigned numbers.
my %tooltipSymbolsToNumbers
The generated tooltip HTML.
my $tooltipHTML
A hash that maps output directonies to menu HTML already built for it.
my %prebuiltMenus
Set when the variables that only need to be calculated for the menu once are done.
my $menuNumbersAndLengthsDone
The current menu group number.
my $menuGroupNumber
The length of the entire menu, fully expanded.
my $menuLength
A hash of the length of each group, not including any subgroup contents.
my %menuGroupLengths
A hash of the number of each group, as managed by menuGroupNumber.
my %menuGroupNumbers
The length of the top-level menu entries without expansion.
my $menuRootLength
Incremented for each image link in the file that requires an anchor.
my $imageAnchorNumber
The actual embedded image HTML for all image links.
my $imageContent
A hash mapping lowercase-only search result IDs to the number of times they’ve been used.
my %searchResultIDs
Creates and returns a new object.
sub New
Define this function to add or update the passed image in the output.
sub UpdateImage #( file )
Deletes the output files associated with the purged source files.
sub PurgeFiles #( filesToPurge )
Deletes the output files associated with the purged source files.
sub PurgeIndexes #( indexes )
Define this function to make the package remove all output related to the passed image files.
sub PurgeImages #( files )
Creates the necessary subdirectories in the output directory.
sub BeginBuild #( hasChanged )
Synchronizes the projects CSS and JavaScript files.
sub EndBuild #( hasChanged )
Builds and returns the HTML page title of a file.
sub BuildTitle #( sourceFile )
Builds and returns the side menu of a file.
sub BuildMenu #( FileName sourceFile, TopicType indexType ) -> string htmlMenu
A recursive function to build a segment of the menu.
sub BuildMenuSegment #( outputDirectory, menuSegment, topLevel )
Builds and returns the main page content.
sub BuildContent #( sourceFile, parsedFile )
Builds a summary, either for the entire file or the current class/section.
sub BuildSummary #( sourceFile, parsedFile, index )
Builds and returns the prototype as HTML.
sub BuildPrototype #( type, prototype, file )
Builds and returns the HTML footer for the page.
sub BuildFooter #( bool multiline )
Builds the HTML for a symbol’s tooltip and stores it in tooltipHTML.
sub BuildToolTip #( symbol, file, type, prototype, summary )
Builds and returns the tooltips for the page in HTML.
sub BuildToolTips
Builds and returns a class hierarchy diagram for the passed class, if applicable.
sub BuildClassHierarchy #( file, symbol )
Builds and returns a single class hierarchy entry.
sub BuildClassHierarchyEntry #( file, symbol, style, link )
Returns the JavaScript that will add opening browser styles if necessary.
sub OpeningBrowserStyles
Returns the JavaScript that will close browser styles if necessary.
sub ClosingBrowserStyles
Returns the standard HTML comments that should be included in every generated file.
sub StandardComments
Returns the HTML comment necessary to get around the security warnings in IE starting with Windows XP Service Pack 2.
sub IEWebMark
Builds an index file or files.
sub BuildIndexPages #( TopicType type, NaturalDocs::SymbolTable:: IndexElement[] indexSections, string beginIndexPage, string endIndexPage, string beginSearchResultsPage, string endSearchResultsPage ) => int
Builds and returns the index and search results sections in HTML.
sub BuildIndexSections #( NaturalDocs::SymbolTable:: IndexElement[] index ) => ( string[], string[], string[] )
Converts a NaturalDocs::SymbolTable::IndexElement to HTML and returns it.
sub BuildIndexElement #( NaturalDocs::SymbolTable:: IndexElement element, string cssID, SymbolString symbol, SymbolString package, bool hasPackage ) => ( string, string )
Builds and returns the HTML associated with an index link.
sub BuildIndexLink #( string text, SymbolString symbol, SymbolString package, FileName file, TopicType type, string prototype, string summary, string style ) => ( string, string )
Builds a navigation bar for a page of the index.
sub BuildIndexNavigationBar #( type, page, locations )
Removes all or some of the output files for an index.
sub PurgeIndexFiles #( TopicType type, optional NaturalDocs::SymbolTable:: IndexElement[] indexSections, optional int startingPage )
Returns the output file name of the source file.
sub OutputFileOf #( sourceFile )
Returns the output image file name of the source image file.
sub OutputImageOf #( sourceImageFile )
Returns the directory of the index files.
sub IndexDirectory
Returns the output file name of the index file.
sub IndexFileOf #( type, page )
Returns the output file name of the index file, relative to other index files.
sub RelativeIndexFileOf #( type, page )
Returns the directory of the search results files.
sub SearchResultsDirectory
Returns the output file name of the search result file.
sub SearchResultsFileOf #( TopicType type, string extra )
Returns the directory of the CSS files.
sub CSSDirectory
Returns the location of the main CSS file.
sub MainCSSFile
Returns the directory of the JavaScript files.
sub JavaScriptDirectory
Returns the location of the main JavaScript file.
sub MainJavaScriptFile
Returns the location of the search data JavaScript file.
sub SearchDataJavaScriptFile
Returns the page title of the index file.
sub IndexTitleOf #( type )
Returns a relative path between two files in the output tree and returns it in URL format.
sub MakeRelativeURL #( FileName baseFile, FileName targetFile, bool baseHasFileName ) -> string relativeURL
Converts a SymbolString to a HTML symbol, meaning one that is safe to include in anchor and link tags.
sub SymbolToHTMLSymbol #( symbol )
Takes a text string and translates it into something that can be used as a CSS ID.
sub StringToSearchResultID #( string string, bool dontIncrement = 0 ) => string
Creates a HTML link to a symbol, if it exists.
sub BuildTextLink #( target, name, original, package, using, sourceFile )
Creates a HTML link to an external URL.
sub BuildURLLink #( target, name )
Creates a HTML link to an e-mail address.
sub BuildEMailLink #( target, name )
Builds the HTML for an image.
sub BuildImage #( sourceFile, mode, target, original )
Returns the properties that should go in the link tag to add a tooltip to it.
sub BuildToolTipLinkProperties #( toolTipID )
Adds second spaces after the appropriate punctuation with so they show up in HTML.
sub AddDoubleSpaces #( text )
Converts certain characters to their HTML amp char equivalents.
sub ConvertAmpChars #( text )
Restores all amp characters to their original state.
sub RestoreAmpChars #( text )
Adds hidden breaks to symbols.
sub AddHiddenBreaks #( string )
A function that finds and returns the first file entry in the menu, or undef if none.
sub FindFirstFile
Determines which groups should be expanded.
sub ExpandMenu #( FileName sourceFile, TopicType indexType, NaturalDocs::Menu:: Entry[] selectionHierarchy, int rootLength ) -> int[] groupsToExpand
Finds the sequence of menu groups that contain the current selection.
sub GetMenuSelectionHierarchy #( FileName sourceFile, TopicType indexType ) -> NaturalDocs::Menu::Entry[] selectionHierarchy
A recursive function that deterimes if it or any of its sub-groups has the menu selection.
sub FindMenuSelection #( FileName sourceFile, TopicType indexType, NaturalDocs::Menu:: Entry[] hierarchyRef, NaturalDocs::Menu:: Entry[] entries ) -> bool hasSelection
Resets the ToolTip Package Variables for a new page.
sub ResetToolTips #( samePage )
Updates an output file.
sub UpdateFile #( sourceFile )
Updates an index’s output file.
sub UpdateIndex #( type )