Class Index | File Index

Modules


Panels


Templates


Services (XPCOM)


Libraries


All Classes


Report Doc Issue | How To Comment Firebug Code

Class Firebug.SourceBoxPanel

Firebug.SourceBoxPanel: Intermediate level class for showing lines of source, eg Script Panel Implements a 'viewport' to render only the lines the user is viewing or has recently viewed. Scroll events or scrollToLine calls are converted to viewableRange line number range. The range of lines is rendered, skipping any that have already been rendered. Then if the new line range overlaps the old line range, done; else delete the old range. That way the lines kept contiguous. The rendering details are delegated to SourceBoxDecorator; each source line may be expanded into more rendered lines.

Defined in: sourceBox.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
Firebug.SourceBoxPanel.createSourceBox(compilationUnit)
Private, do not call outside of this object A sourceBox is a div with additional operations and state.
<static>  
Firebug.SourceBoxPanel.getAverageLineHeight(sourceBox)
The virtual sourceBox height is the averageLineHeight * max lines
<static>  
Firebug.SourceBoxPanel.getScrollTopFromViewRange(sourceBox, viewRange)
inverse of the getViewRangeFromScrollTop.
<static>  
Firebug.SourceBoxPanel.getSourceLink(lineNo)
<static>  
Firebug.SourceBoxPanel.getTotalPadding(sourceBox)
The virtual sourceBox = topPadding + sourceBox.viewport + bottomPadding The viewport grows as more lines are added to the cache The virtual sourceBox height is estimated from the average height lines in the viewport cache
<static>  
Firebug.SourceBoxPanel.getViewRangeFromScrollTop(sourceBox, scrollTop)
Use the average height of source lines in the cache to estimate where the scroll bar points based on scrollTop
<static>  
Firebug.SourceBoxPanel.jumpHighlightFactory(lineNo, context)
<static>  
Firebug.SourceBoxPanel.scrollToLine(href, lineNo, highlighter)
Select sourcebox with href, scroll lineNo into center, highlight lineNo with highlighter given
<static>  
Firebug.SourceBoxPanel.showSourceLink(sourceLink)
Assumes that locations are compilationUnits, TODO lower class
<static>  
Firebug.SourceBoxPanel.updateSourceBox(sourceBox)
Panel extension point.
Class Detail
Firebug.SourceBoxPanel()
Method Detail
<static> Firebug.SourceBoxPanel.createSourceBox(compilationUnit)
Private, do not call outside of this object A sourceBox is a div with additional operations and state.
Parameters:
compilationUnit
there is at most one sourceBox for each compilationUnit

<static> Firebug.SourceBoxPanel.getAverageLineHeight(sourceBox)
The virtual sourceBox height is the averageLineHeight * max lines
Parameters:
sourceBox
Returns:
float

<static> Firebug.SourceBoxPanel.getScrollTopFromViewRange(sourceBox, viewRange)
inverse of the getViewRangeFromScrollTop. If the viewRange was set by targetLineNumber, then this value become the new scroll top else the value will be the same as the scrollbar's given value of scrollTop.
Parameters:
sourceBox
viewRange

<static> Firebug.SourceBoxPanel.getSourceLink(lineNo)
Parameters:
lineNo
Returns:
SourceLink to currently selected source file

<static> Firebug.SourceBoxPanel.getTotalPadding(sourceBox)
The virtual sourceBox = topPadding + sourceBox.viewport + bottomPadding The viewport grows as more lines are added to the cache The virtual sourceBox height is estimated from the average height lines in the viewport cache
Parameters:
sourceBox

<static> Firebug.SourceBoxPanel.getViewRangeFromScrollTop(sourceBox, scrollTop)
Use the average height of source lines in the cache to estimate where the scroll bar points based on scrollTop
Parameters:
sourceBox
scrollTop

<static> Firebug.SourceBoxPanel.jumpHighlightFactory(lineNo, context)
Parameters:
lineNo
context
Returns:
a highlighter function(sourceBox) that puts a class on the line for a time slice

<static> Firebug.SourceBoxPanel.scrollToLine(href, lineNo, highlighter)
Select sourcebox with href, scroll lineNo into center, highlight lineNo with highlighter given
Parameters:
href
a Url, null means the selected compilationUnit
lineNo
integer 1 - maximumLineNumber
highlighter
callback, a function(sourceBox). sourceBox.centralLine will be lineNo

<static> Firebug.SourceBoxPanel.showSourceLink(sourceLink)
Assumes that locations are compilationUnits, TODO lower class
Parameters:
sourceLink

<static> Firebug.SourceBoxPanel.updateSourceBox(sourceBox)
Panel extension point. Called just before box is shown
Parameters:
sourceBox

Documentation generated by JsDoc Toolkit 2.3.0 on Sat Jan 05 2013 23:10:39 GMT+0100 (CET)