C# Class SIL.FieldWorks.Common.Controls.LabelNode

This override to TreeNode handles the displaying of an ObjectLabel in a custom way
Inheritance: System.Windows.Forms.TreeNode
Mostra file Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_stylesheet IVwStylesheet

Public Methods

Method Description
AddChildren ( bool recursively, IEnumerable chosenObjs ) : void

Add the children nodes of a particular node in the tree. Do this recursively if that parameter is set to true. Also set the node as Checked if is it in the set or chosenObjs.

AddChildrenAndLookForSelected ( ICmObject objToSelect, Stack ownershipStack, IEnumerable chosenObjs ) : LabelNode

Add the children nodes of a particular node in the tree. While adding nodes if a match is found for objToSelect then nodeRepresentingCurrentChoice assigned to it and is returned. Otherwise if no node in the tree matches objToSelect this method returns null.

AddSecondaryNodes ( LabelNode node, TreeNodeCollection nodes, IEnumerable chosenObjs ) : void

Adds the secondary nodes.

AddSecondaryNodesAndLookForSelected ( LabelNode node, TreeNodeCollection nodes, LabelNode nodeRepresentingCurrentChoice, ICmObject objToSelect, Stack ownershipStack, IEnumerable chosenObjs ) : LabelNode

Add secondary nodes to tree at nodes (and check any that occur in rghvoChosen), and return the one whose hvo is hvoToSelect, or nodeRepresentingCurrentChoice if none match.

LabelNode ( ObjectLabel label, IVwStylesheet stylesheet, bool displayUsage ) : System.Collections.Generic

Initializes a new instance of the LabelNode class.

ResetVernacularFont ( ILgWritingSystemFactory wsf, int wsVern, IVwStylesheet stylesheet ) : void

Resets the vernacular font.

WantNodeForLabel ( ObjectLabel label ) : bool

Wants the node for label.

Protected Methods

Method Description
CheckForSelection ( ObjectLabel label, ICmObject objToSelect, LabelNode node, LabelNode nodeRepresentingCurrentChoice ) : LabelNode

Checks for selection.

CountUsages ( ) : int

Count how many references this item has. Virtual so a subclass can use a different algorithm (c.f. SemanticDomainsChooser's DomainNode).

Create ( ObjectLabel nol, IVwStylesheet stylesheet, bool displayUsage ) : LabelNode

Creates the specified LabelNode from the ObjectLabel.

Private Methods

Method Description
GetVernacularFont ( ILgWritingSystemFactory wsf, int wsVern, IVwStylesheet stylesheet ) : Font
HasVernacularText ( ITsString tss, IEnumerable vernWses, int &wsVern ) : bool
SetNodeText ( ) : void

Method Details

AddChildren() public method

Add the children nodes of a particular node in the tree. Do this recursively if that parameter is set to true. Also set the node as Checked if is it in the set or chosenObjs.
public AddChildren ( bool recursively, IEnumerable chosenObjs ) : void
recursively bool
chosenObjs IEnumerable
return void

AddChildrenAndLookForSelected() public method

Add the children nodes of a particular node in the tree. While adding nodes if a match is found for objToSelect then nodeRepresentingCurrentChoice assigned to it and is returned. Otherwise if no node in the tree matches objToSelect this method returns null.
public AddChildrenAndLookForSelected ( ICmObject objToSelect, Stack ownershipStack, IEnumerable chosenObjs ) : LabelNode
objToSelect ICmObject
ownershipStack Stack
chosenObjs IEnumerable
return LabelNode

AddSecondaryNodes() public method

Adds the secondary nodes.
public AddSecondaryNodes ( LabelNode node, TreeNodeCollection nodes, IEnumerable chosenObjs ) : void
node LabelNode The node.
nodes System.Windows.Forms.TreeNodeCollection The nodes.
chosenObjs IEnumerable The chosen objects.
return void

AddSecondaryNodesAndLookForSelected() public method

Add secondary nodes to tree at nodes (and check any that occur in rghvoChosen), and return the one whose hvo is hvoToSelect, or nodeRepresentingCurrentChoice if none match.
public AddSecondaryNodesAndLookForSelected ( LabelNode node, TreeNodeCollection nodes, LabelNode nodeRepresentingCurrentChoice, ICmObject objToSelect, Stack ownershipStack, IEnumerable chosenObjs ) : LabelNode
node LabelNode node to be added
nodes System.Windows.Forms.TreeNodeCollection where to add it
nodeRepresentingCurrentChoice LabelNode The node representing current choice.
objToSelect ICmObject The obj to select.
ownershipStack Stack The ownership stack.
chosenObjs IEnumerable The chosen objects.
return LabelNode

CheckForSelection() protected method

Checks for selection.
protected CheckForSelection ( ObjectLabel label, ICmObject objToSelect, LabelNode node, LabelNode nodeRepresentingCurrentChoice ) : LabelNode
label ObjectLabel The label.
objToSelect ICmObject The obj to select.
node LabelNode The node.
nodeRepresentingCurrentChoice LabelNode The node representing current choice.
return LabelNode

CountUsages() protected method

Count how many references this item has. Virtual so a subclass can use a different algorithm (c.f. SemanticDomainsChooser's DomainNode).
protected CountUsages ( ) : int
return int

Create() protected method

Creates the specified LabelNode from the ObjectLabel.
protected Create ( ObjectLabel nol, IVwStylesheet stylesheet, bool displayUsage ) : LabelNode
nol ObjectLabel
stylesheet IVwStylesheet
displayUsage bool true if usage statistics will be displayed; otherwise, false.
return LabelNode

LabelNode() public method

Initializes a new instance of the LabelNode class.
public LabelNode ( ObjectLabel label, IVwStylesheet stylesheet, bool displayUsage ) : System.Collections.Generic
label ObjectLabel The label.
stylesheet IVwStylesheet The stylesheet.
displayUsage bool true if usage statistics will be displayed; otherwise, false.
return System.Collections.Generic

ResetVernacularFont() public method

Resets the vernacular font.
public ResetVernacularFont ( ILgWritingSystemFactory wsf, int wsVern, IVwStylesheet stylesheet ) : void
wsf ILgWritingSystemFactory The WSF.
wsVern int The ws vern.
stylesheet IVwStylesheet The stylesheet.
return void

WantNodeForLabel() public method

Wants the node for label.
public WantNodeForLabel ( ObjectLabel label ) : bool
label ObjectLabel The label.
return bool

Property Details

m_stylesheet protected_oe property

protected IVwStylesheet m_stylesheet
return IVwStylesheet