C# Class SIL.FieldWorks.TE.TeNotesVc

This class displays the notes (annotations) view.
Inheritance: SIL.FieldWorks.TE.TeStVc, IDisposable
Datei anzeigen Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
CollapseAllAnnotations ( IVwRootBox rootbox ) : void

Collapses all annotations.

Display ( IVwEnv vwenv, int hvo, int frag ) : void

This is the main interesting method of displaying objects and fragments of them. Scripture Footnotes are displayed by displaying each footnote's reference and text. The text is displayed using the standard view constructor for StText.

DisplayVariant ( IVwEnv vwenv, int tag, int frag ) : ITsString

Handle display of a Scripture reference or range.

DisplayVec ( IVwEnv vwenv, int hvo, int tag, int frag ) : void

Display the categories as a comma-separated string

Dispose ( ) : void
EstimateHeight ( int hvo, int frag, int dxAvailWidth ) : int

Estimate the height of a lazy box

ExpandItem ( int hvo, IVwRootBox root ) : void

Expand the item if it is collapsed.

IsExpanded ( int hvo ) : bool

Returns whether or not the given hvo is in an expanded state

TeNotesVc ( SIL.FieldWorks.FDO.FdoCache cache, float initialZoom ) : System

Initializes a new instance of the TeNotesVc class

ToggleItemExpansion ( int hvo, IVwRootBox rootbox ) : bool

Toggle the expansion state of the given item

Protected Methods

Method Description
Dispose ( bool fDisposing ) : void
InsertNoteSeparator ( IVwEnv vwenv ) : void

Insert a bar to separate this note from the following note (unless this is the first note being displayed).

IsParaRightToLeft ( IStTxtPara para ) : bool

Indicates whether the given paragraph should be laid out as right-to-left (depending on the value of BaseDirectionOnParaContents, this can be based on the paragraph itself or simply derived from the VC).

MakeLabelFromText ( string labelText, string styleName, IScrScriptureNote ann ) : ITsString

Make a label string to use in the view.

Private Methods

Method Description
CloseTableRow ( IVwEnv vwenv, IScrScriptureNote ann ) : void

Closes the table row.

DisplayAnnotation ( IVwEnv vwenv, IScrScriptureNote ann, bool expanded ) : void

Displays an annotation expanded or contracted

DisplayAnnotationFragment ( IVwEnv vwenv, int hvo ) : void

Displays the annotation fragment.

DisplayExpandableAnnotation ( IVwEnv vwenv, IScrScriptureNote ann, int tag, int hvo, IStJournalText paras, ITsString label ) : void

Displays an expandable annotation of the specified type.

DisplayExpandableAnnotation ( IVwEnv vwenv, IScrScriptureNote ann, int tag, int hvo, IStJournalText paras, ITsString label, bool readOnly ) : void

Displays an expandable annotation of the specified type.

DisplayPicture ( IVwEnv vwenv, int hvo, int tag, int val, int frag ) : IPicture
DisplayResponse ( IVwEnv vwenv, IStJournalText text, bool expanded ) : void

Display a response to an annotation.

DisplayResponseFragment ( IVwEnv vwenv, int hvo ) : void

Displays the response fragment.

GetChooserImage ( ) : IPicture
GetNoteBackgroundColor ( IScrScriptureNote ann ) : Color

Gets the color of the note background.

MakeLabelFromStringID ( string stid ) : ITsString

Make a label string to use in the view.

MakeLabelFromText ( string labelText, IScrScriptureNote ann ) : ITsString

Make a label string to use in the view.

OpenNoteFieldsWithContent ( int hvo, IVwRootBox rootbox ) : void

Opens annotation fields that have content.

OpenTableRow ( IVwEnv vwenv, IScrScriptureNote ann ) : void

Opens the table row.

SetBackgroundColorForNote ( IScrScriptureNote ann, IVwEnv vwenv ) : void

Set the background color based on the type of annotation

SetDisabledColorForNote ( IVwEnv vwenv ) : void

Set the foreground color to gray for a disabled feature

SetEditBackground ( IVwEnv vwenv ) : void

Sets the background color for editable fields

TeNotesVc ( SIL.FieldWorks.FDO.FdoCache cache ) : System

Method Details

CollapseAllAnnotations() public method

Collapses all annotations.
public CollapseAllAnnotations ( IVwRootBox rootbox ) : void
rootbox IVwRootBox The rootbox of the caller, which will be notified of the change /// (hence causing the appropriate fragments in this VC to get laid out)
return void

Display() public method

This is the main interesting method of displaying objects and fragments of them. Scripture Footnotes are displayed by displaying each footnote's reference and text. The text is displayed using the standard view constructor for StText.
public Display ( IVwEnv vwenv, int hvo, int frag ) : void
vwenv IVwEnv
hvo int
frag int
return void

DisplayVariant() public method

Handle display of a Scripture reference or range.
public DisplayVariant ( IVwEnv vwenv, int tag, int frag ) : ITsString
vwenv IVwEnv View environment
tag int Tag
frag int Fragment to identify what type of prompt should be created.
return ITsString

DisplayVec() public method

Display the categories as a comma-separated string
public DisplayVec ( IVwEnv vwenv, int hvo, int tag, int frag ) : void
vwenv IVwEnv
hvo int
tag int
frag int
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool fDisposing ) : void
fDisposing bool
return void

EstimateHeight() public method

Estimate the height of a lazy box
public EstimateHeight ( int hvo, int frag, int dxAvailWidth ) : int
hvo int
frag int
dxAvailWidth int
return int

ExpandItem() public method

Expand the item if it is collapsed.
public ExpandItem ( int hvo, IVwRootBox root ) : void
hvo int hvo of the item to expand
root IVwRootBox The rootbox.
return void

InsertNoteSeparator() protected method

Insert a bar to separate this note from the following note (unless this is the first note being displayed).
protected InsertNoteSeparator ( IVwEnv vwenv ) : void
vwenv IVwEnv View environment
return void

IsExpanded() public method

Returns whether or not the given hvo is in an expanded state
public IsExpanded ( int hvo ) : bool
hvo int hvo of the item to check
return bool

IsParaRightToLeft() protected method

Indicates whether the given paragraph should be laid out as right-to-left (depending on the value of BaseDirectionOnParaContents, this can be based on the paragraph itself or simply derived from the VC).
protected IsParaRightToLeft ( IStTxtPara para ) : bool
para IStTxtPara The paragraph.
return bool

MakeLabelFromText() protected method

Make a label string to use in the view.
protected MakeLabelFromText ( string labelText, string styleName, IScrScriptureNote ann ) : ITsString
labelText string text to put in the label
styleName string style name to use for the character style on the text
ann IScrScriptureNote The annotation
return ITsString

TeNotesVc() public method

Initializes a new instance of the TeNotesVc class
public TeNotesVc ( SIL.FieldWorks.FDO.FdoCache cache, float initialZoom ) : System
cache SIL.FieldWorks.FDO.FdoCache
initialZoom float
return System

ToggleItemExpansion() public method

Toggle the expansion state of the given item
public ToggleItemExpansion ( int hvo, IVwRootBox rootbox ) : bool
hvo int The ID of the object to expand/collapse
rootbox IVwRootBox The rootbox of the caller, which will be notified of the change /// (hence causing the appropriate fragments in this VC to get laid out)
return bool