C# Class SIL.FieldWorks.Common.Framework.DetailControls.DataTree

A DataTree displays a tree diagram alongside a collection of controls. Each control is represented as a Slice, and typically contains and actual .NET control of some sort (most often, in FieldWorks, a subclass of SIL.FieldWorks.Common.Framework.RootSite). The controls are arranged vertically, one under the other, and the tree diagram is aligned with the controls. The creator of a DataTree is responsible to add items to it, though DataTree provide helpful methods for adding certain commonly useful controls. Additional items may be added as a result of user actions, typically expanding and contracting nodes. Much of the standard behavior of the DataTree is achieved by delegating it to virtual methods of Slice, which can be subclassed to specialize this behavior. Review JohnT: do I have the right superclass? This choice allows the window to have a scroll bar and to contain other controls, and seems to be the intended superclass for stuff developed by application programmers.
Inheritance: System.Windows.Forms.UserControl, IFWDisposable, IVwNotifyChange, IxCoreColleague
Mostrar archivo Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_autoCustomFieldNodesDocRoot XmlNode
m_autoCustomFieldNodesDocument XmlDocument
m_cDeepSuspendLayoutCount int
m_cache FdoCache
m_currentSlice Slice
m_descendant ICmObject
m_dxpLastRightPaneWidth int
m_fHasSplitter bool
m_fShowAllFields bool
m_layoutChoiceField string
m_layoutInventory Inventory
m_layoutState LayoutStates
m_listName string
m_mdc IFwMetaDataCache
m_mediator Mediator
m_monitoredProps int>>.HashSet
m_partInventory Inventory
m_persistenceProvider IPersistenceProvider
m_rch IRecordChangeHandler
m_rlu IRecordListUpdater
m_root ICmObject
m_rootLayoutName string
m_sliceFilter SliceFilter
m_sliceSplitPositionBase int
m_smallImages ImageCollection
m_stringTable StringTable
m_styleSheet FwStyleSheet
m_tooltip ToolTip
m_traceSwitch TraceSwitch

Private Properties

Property Type Description
AboutToCreateField void
AddAtomicNode NodeTestResult
AddAttribute void
AddSeqNode NodeTestResult
AddSimpleNode NodeTestResult
AdjustSliceSplitPosition void
CheckCustomFieldsSibling bool
ChooseNewOwner IRnGenericRec
ClearCurrentObjectFlids void
ConvertHvoListToString string
CreateAndAssociateNotebookRecord IRnGenericRec
CreateSlices void
DescendantForSlice ICmObject
DisplayJumpToToolAndFilterAnthroItem bool
DoPostponedFocusSlice bool
EnsureCustomFields void
EnsureValidIndexForReusedSlice void
EquivalentKeys bool
FieldAt Slice
FixRecordList void
FocusFirstPossibleSlice bool
ForceSliceIndex void
GetFlidFromNode int
GetFlidIfPossible int
GetGuidForJumpToTool Guid
GetLabel string
GetLabelAbbr string
GetMatchingSlice Slice
GetTemplateForObjLayout XmlNode
GotoNextSliceAfterIndex bool
HandlePaintLinesBetweenSlices void
HandleShowHiddenFields void
HeightOfSliceOrNullAt int
InsertSlice void
InsertSliceAndRegisterWithContextHelp void
InstallSlice void
InterpretLabelAttribute string
IsChildSlice bool
MakeSliceRealAt void
MakeSliceVisible void
MonoIgnoreUpdates void
MonoResumeUpdates void
NextFieldAtIndent int
NotebookRecordRefersToThisText bool
OnJumpToToolAndFilterAnthroItem void
OnShowContextMenu void
PersistPreferences void
PrevFieldAtIndent int
ProcessPartChildren NodeTestResult
ProcessPartRefNode NodeTestResult
ProcessSubpartNode NodeTestResult
RawSetSlice void
RefreshList void
RemoveDisposedSlice void
RemoveSlice void
RemoveSlice void
RemoveSlice void
RemoveSliceAt void
ResetRecordListUpdater void
ResetTabIndices void
RestorePreferences void
SameSourceObject bool
SelectFirstPossibleSlice void
SetCurrentObjectFlids void
SetCurrentSliceNewFromObject void
SetCurrentSlicePropertyNames void
SetNodeWeight void
SetTabIndex void
SetToolTip void
SetupContents int[]

Public Methods

Method Description
ApplyChildren ( ICmObject obj, Slice parentSlice, XmlNode template, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap ) : int

Calls ApplyLayout for each child of the argument node.

ApplyLayout ( ICmObject obj, Slice parentSlice, XmlNode template, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap ) : int

Apply a layout to an object, producing the specified slices.

BeginSequentialBlock ( ) : void

Begin a block of code which, even though it is not itself a message handler, should not be interrupted by other messages that need to be sequential. This may be called from within a message handler. EndSequentialBlock must be called without fail (use try...finally) at the end of the block that needs protection.

CheckDisposed ( ) : void

Throw if the IsDisposed property is true

ContainingXWindow ( ) : IxWindow
CreateSlicesFor ( ICmObject obj, Slice parentSlice, string layoutName, string layoutChoiceField, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap, XmlNode unifyWith ) : int

Create slices for the specified object by finding a relevant template in the spec.

DataTree ( ) : System
DeepResumeLayout ( ) : void

Resume the layout of this window and its immediate children. This version also maintains a count, and does not resume until the number of resume calls balances the number of suspend calls.

DeepSuspendLayout ( ) : void

Suspend the layout of this window and its immediate children. This version also maintains a count, and does not resume until the number of resume calls balances the number of suspend calls.

EndSequentialBlock ( ) : void

See BeginSequentialBlock.

FieldOrDummyAt ( int i ) : Slice

This version expands nulls but not dummy slices. Dummy slices should know their indent.

FindMatchingSlices ( ICmObject obj, object key, Type type, Slice &newCopy ) : Slice

Try to find a slice that matches the information gleaned from another slice, probably one that has been disposed since the information was obtained. If there's a following slice that matches except for the object id, return that slice as well.

This is used by DTMenuHandler.OnDataTreeCopy() whenever creating the copy causes the data tree to be rebuilt. See FWR-2123 for motivation.

GetClassId ( IFwMetaDataCache mdc, string stClassName ) : int

A rather inefficient way of finding the ID of the class that has a particular name. IFwMetaDataCache should be enhanced to provide this efficiently.

GetMessageTargets ( ) : IxCoreColleague[]
GetMinFieldHeight ( ) : int
GetSliceContextMenu ( Slice slice, bool fHotLinkOnly ) : ContextMenu

Get the context menu that would be displayed for a right click on the slice.

GotoFirstSlice ( ) : void

Moves the focus to the first visible slice in the tree

GotoNextSlice ( ) : void

Moves the focus to the next visible slice in the tree

GotoPreviousSliceBeforeIndex ( int index ) : bool

Moves the focus to the previous visible slice in the tree

IndexOfSliceAtY ( int yp ) : int

Return the index of the slice which contains the given y position.

Init ( Mediator mediator, XmlNode configurationParameters ) : void
Initialize ( FdoCache cache, bool fHasSplitter, Inventory layouts, Inventory parts ) : void

This is the initialize that is normally used. Others may not be extensively tested.

MakeEditorAt ( int i ) : Slice
MakeGhostSlice ( ArrayList path, XmlNode node, ObjSeqHashMap reuseMap, ICmObject obj, Slice parentSlice, int flidEmptyProp, XmlNode caller, int indent, int &insertPosition ) : void
MonitorProp ( int hvo, int flid ) : void

Set up monitoring, so that a change to this property will trigger reconstructing the current set of slices.

OnDelayedRefreshList ( object sentValue ) : void

Respond to a broadcast message. This is needed to fix LT-9713 and LT-9714.

OnDemoteItemInVector ( object argument ) : bool

Implement the "Demote..." command.

OnDisplayDemoteItemInVector ( object commandObject, UIItemDisplayProperties &display ) : bool

See if it makes sense to provide the "Demote..." command.

OnDisplayInsertItemViaBackrefVector ( object commandObject, UIItemDisplayProperties &display ) : bool

Influence the display of a particular command by giving an opinion on whether we are prepared to handle the corresponding "InsertItemViaBackrefVector" message.

OnDisplayJumpToLexiconEditFilterAnthroItems ( object commandObject, UIItemDisplayProperties &display ) : bool

Enable/Disable menu items for jumping to the Lexicon Edit tool and applying a column filter on the Anthropology Category the user has right clicked on.

OnDisplayJumpToNotebookEditFilterAnthroItems ( object commandObject, UIItemDisplayProperties &display ) : bool

Enable/Disable menu items for jumping to the Notebook Edit tool and applying a column filter on the Anthropology Category the user has right clicked on.

OnDisplayJumpToTool ( object commandObject, UIItemDisplayProperties &display ) : bool

Enable menu items for jumping to the concordance (or lexiconEdit) tool.

OnDisplayShowHiddenFields ( object commandObject, UIItemDisplayProperties &display ) : bool

This property may be turned on and off any time a DataTree is an active colleague.

OnFocusFirstPossibleSlice ( object arg ) : void

Called by reflection when a new object is inserted into the list. A change of current object should not ALWAYS make the data tree take focus, since that can be annoying when editing in the browse view (cf LT-8211). But we do want it for a new top-level list object (LT-8564). Also useful when we refresh the list after a major change to make sure something gets focused.

OnInsertItemViaBackrefVector ( object argument ) : bool

This is triggered by any command whose message attribute is "InsertItemViaBackrefVector"

OnJumpToLexiconEditFilterAnthroItems ( object commandObject ) : bool

Handle jumping to the lexiconEdit tool and filtering on the Anthropology Category the user has right clicked on.

OnJumpToNotebookEditFilterAnthroItems ( object commandObject ) : bool

Handle jumping to the NotebookEdit tool and filtering on the Anthropology Category the user has right clicked on.

OnJumpToTool ( object commandObject ) : bool

Handle enabled menu items for jumping to another tool, or another location in the current tool.

OnPropertyChanged ( string name ) : void

Receives the broadcast message "PropertyChanged"

OnReadyToSetCurrentSlice ( object parameter ) : bool

Process the message to allow setting/focusing CurrentSlice.

PrepareToGoAway ( ) : bool
PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
RefreshDisplay ( ) : bool

This method is the implementation of IRefreshableRoot, which FwXWindow calls on all children to implement Refresh. The DataTree needs to reconstruct the list of controls, and returns true to indicate that children need not be refreshed.

RefreshList ( bool differentObject ) : void

Refresh your contents. We try to re-use as many slices as possible, both to improve performance, and so as to preserve expansion state as much as possible.

If the DataTree's slices call this method, they should use 'false', or they will be disposed when this call returns to them.

Reset ( ) : void
ScrollCurrentAndIfPossibleSectionIntoView ( ) : void

For sure make the CurrentSlice if any visible. If possible also make the prececing summary slice visible. Then make as many as possible of the slices which are children of that summary visible.

SetContextMenuHandler ( SliceShowMenuRequestHandler handler ) : void

Set the handler which will be invoked when the user right-clicks on the TreeNode portion of a slice, or for some other reason we need the context menu.

ShowObject ( ICmObject root, string layoutName, string layoutChoiceField, ICmObject descendant, bool suppressFocusChange ) : void

Shows the specified object and makes the slices for the descendant object visible.

m_rch_Disposed ( object sender, EventArgs e ) : void
slice_SplitterMoved ( object sender, SplitterEventArgs e ) : void

Protected Methods

Method Description
ApplyLayout ( ICmObject obj, Slice parentSlice, XmlNode template, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap, bool isTestOnly, NodeTestResult &testResult ) : int

This is the guts of ApplyLayout, but it has extra arguments to allow it to be used both to actually produce slices, and just to query whether any slices will be produced.

Dispose ( bool disposing ) : void

Clean up any resources being used.

HandleLayout1 ( bool fFull, Rectangle clipRect ) : int

Used both by main layout routine and also by OnPaint to make sure all visible slices are real. For full layout, clipRect is meaningless.

InitializeBasic ( FdoCache cache, bool fHasSplitter ) : void

initialization for when you don't actually know what you want to show yet (and aren't going to use XML)

InitializeComponent ( ) : void

InitializeComponentBasic ( ) : void
InsertSliceRange ( int insertPosition, Set slices ) : void
OnControlAdded ( ControlEventArgs e ) : void
OnControlRemoved ( ControlEventArgs e ) : void
OnLayout ( LayoutEventArgs levent ) : void
OnPaint ( PaintEventArgs e ) : void
OnSizeChanged ( EventArgs e ) : void
SetDefaultCurrentSlice ( bool suppressFocusChange ) : void

subclasses override for setting a default current slice.

TraceInfoLine ( string s ) : void
TraceVerbose ( string s ) : void
TraceVerboseLine ( string s ) : void

Private Methods

Method Description
AboutToCreateField ( ) : void

Intended to be called by Datatree.FieldAt just before it creates a new slice.

AddAtomicNode ( ArrayList path, XmlNode node, ObjSeqHashMap reuseMap, int flid, ICmObject obj, Slice parentSlice, int indent, int &insertPosition, bool fTestOnly, string layoutName, bool fVisIfData, XmlNode caller ) : NodeTestResult
AddAttribute ( XmlNode node, string name, string value ) : void
AddSeqNode ( ArrayList path, XmlNode node, ObjSeqHashMap reuseMap, int flid, ICmObject obj, Slice parentSlice, int indent, int &insertPosition, bool fTestOnly, string layoutName, bool fVisIfData, XmlNode caller ) : NodeTestResult
AddSimpleNode ( ArrayList path, XmlNode node, ObjSeqHashMap reuseMap, string editor, int flid, ICmObject obj, Slice parentSlice, int indent, int &insPos, bool fTestOnly, bool fVisIfData, XmlNode caller ) : NodeTestResult

Tests to see if it should add the field (IfData), then adds the field.

AdjustSliceSplitPosition ( Slice otherSlice ) : void
CheckCustomFieldsSibling ( XmlNode sibling, string target ) : bool
ChooseNewOwner ( IRnGenericRec records, string sTitle ) : IRnGenericRec
ClearCurrentObjectFlids ( ) : void
ConvertHvoListToString ( List hvoList ) : string

Converts a List of integers into a comma-delimited string of numbers.

CreateAndAssociateNotebookRecord ( ) : IRnGenericRec
CreateSlices ( bool differentObject ) : void

Create slices appropriate for current root object and layout, reusing any existing slices, and clearing out any that remain unused. If it is for a different object, reuse is more limited.

DescendantForSlice ( Slice slice ) : ICmObject
DisplayJumpToToolAndFilterAnthroItem ( UIItemDisplayProperties display, object commandObject, string cmd ) : bool
DoPostponedFocusSlice ( object parameter ) : bool
EnsureCustomFields ( ICmObject obj, XmlNode template, XmlNode insertAfter ) : void

Append to the part refs of template a suitable one for each custom field of the class of obj.

EnsureValidIndexForReusedSlice ( Slice slice, int insertPosition ) : void

Ensure that the reused slice is in the re-generated position. if not, it may have shifted position as a result of changing its sequence order in the database (e.g. via OnMoveUpObjectInSequence).

EquivalentKeys ( object newKey, object oldKey, bool fCheckInts ) : bool
FieldAt ( int i ) : Slice
FixRecordList ( ) : void

Fixes the record list to cope with operations in detail pane that radically changes the current record.

FocusFirstPossibleSlice ( ) : bool
ForceSliceIndex ( Slice slice, int index ) : void

For some strange reason, the first Controls.SetChildIndex doesn't always put it in the specified index. The second time seems to work okay though.

GetFlidFromNode ( XmlNode node, ICmObject obj ) : int
GetFlidIfPossible ( int clid, string fieldName, IFwMetaDataCacheManaged mdc ) : int

This seems a bit clumsy, but the metadata cache now throws an exception if the class id/field name pair isn't valid for GetFieldId2(). Limiting this to only one throw per class/field pair seems a reasonable compromise. To avoid all throws would require duplicating much of the metadata cache locally.

GetGuidForJumpToTool ( Command cmd, bool forEnableOnly, string &tool ) : Guid

Common logic shared between OnDisplayJumpToTool and OnJumpToTool. forEnableOnly is true when called from OnDisplayJumpToTool.

GetLabel ( XmlNode caller, XmlNode node, ICmObject obj, string attr ) : string

Get a label-like attribute for the slice.

GetLabelAbbr ( XmlNode caller, XmlNode node, ICmObject obj, string label, string attr ) : string

Find a suitable abbreviation for the given label.

GetMatchingSlice ( ArrayList path, ObjSeqHashMap reuseMap ) : Slice

Look for a reusable slice that matches the current path. If found, remove from map and return; otherwise, return null.

GetTemplateForObjLayout ( ICmObject obj, string layoutName, string layoutChoiceField ) : XmlNode

Get the template that should be used to display the specified object using the specified layout.

GotoNextSliceAfterIndex ( int index ) : bool
HandlePaintLinesBetweenSlices ( PaintEventArgs pea ) : void
HandleShowHiddenFields ( bool newShowValue ) : void
HeightOfSliceOrNullAt ( int iSlice ) : int

Answer the height that the slice at index ind is considered to have. If it is null return the default size.

InsertSlice ( int index, Slice slice ) : void
InsertSliceAndRegisterWithContextHelp ( int index, Slice slice ) : void
InstallSlice ( Slice slice, int index ) : void
InterpretLabelAttribute ( string label, ICmObject obj ) : string

This parses the label attribute in order to return a label from a specified field name. Currently only recognizes "$owner" to recognize the owning object, this could be expanded to include $obj or other references.

IsChildSlice ( Slice first, Slice second ) : bool

Answer true if the second slice is a 'child' of the first (common key)

MakeSliceRealAt ( int i ) : void
MakeSliceVisible ( Slice tci ) : void

Make a slice visible, either because it needs to be drawn, or because it needs to be focused.

MonoIgnoreUpdates ( ) : void
MonoResumeUpdates ( ) : void
NextFieldAtIndent ( int nInd, int iStart ) : int
NotebookRecordRefersToThisText ( IText text, IRnGenericRec &referringRecord ) : bool
OnJumpToToolAndFilterAnthroItem ( string linkSetupInfo, string toolToJumpTo ) : void
OnShowContextMenu ( object sender, TreeNodeEventArgs e ) : void
PersistPreferences ( ) : void
PrevFieldAtIndent ( int nInd, int iStart ) : int
ProcessPartChildren ( XmlNode part, ArrayList path, ObjSeqHashMap reuseMap, ICmObject obj, Slice parentSlice, int indent, int &insPos, bool isTestOnly, string parameter, bool fVisIfData, XmlNode caller ) : NodeTestResult
ProcessPartRefNode ( XmlNode partRef, ArrayList path, ObjSeqHashMap reuseMap, ICmObject obj, Slice parentSlice, int indent, int &insPos, bool isTestOnly ) : NodeTestResult

Process a top-level child of a layout (other than a comment). Currently these are part nodes (with ref= indicating the part to use) and sublayout nodes.

ProcessSubpartNode ( XmlNode node, ArrayList path, ObjSeqHashMap reuseMap, ICmObject obj, Slice parentSlice, int indent, int &insertPosition, bool fTestOnly, string parameter, bool fVisIfData, XmlNode caller ) : NodeTestResult

Handle one (non-comment) child node of a template (or other node) being used to create slices. Update insertPosition to indicate how many were added (it also specifies where to add). If fTestOnly is true, do not update insertPosition, just return true if any slices would be created. Note that this method is recursive indirectly through ProcessPartChildren().

RawSetSlice ( int index, Slice slice ) : void

Use with care...if it's a real slice, or a real one being replaced, there are other things to do like adding to or removing from container. This is mainly for messing with dummy slices.

RefreshList ( int hvo, int tag ) : void

Go through each slice until we find one that needs to update its display. Helpful for reusable slices that don't get updated through RefreshList();

RemoveDisposedSlice ( Slice gonner ) : void

this should ONLY be called from slice.Dispose(). It makes sure that when a slice is removed by disposing it directly it gets removed from the Slices collection.

RemoveSlice ( Slice gonner ) : void

Removes a slice but does NOT clean up tooltips; caller should do that.

RemoveSlice ( Slice gonner, int index ) : void
RemoveSlice ( Slice gonner, int index, bool fixToolTips ) : void
RemoveSliceAt ( int index ) : void
ResetRecordListUpdater ( ) : void
ResetTabIndices ( int startingIndex ) : void

Resets the TabIndex for all slices that are located at, or above, the startingIndex.

RestorePreferences ( ) : void
SameSourceObject ( Slice first, Slice second ) : bool

Answer true if the two slices are displaying fields of the same object. Review: should we require more strictly, that the full path of objects in their keys are the same?

SelectFirstPossibleSlice ( List closeSlices ) : void

Find the first slice in the list which is (still) one of your current, valid slices and which is able to take focus, and give it the focus.

SetCurrentObjectFlids ( int hvoOwner, int flidOwning ) : void

Build a list of flids needed to expand to the slice displaying hvoOwner.

Owning Flids may not be enough. We may need reference flids as well. This is tricky, since this is called where the slice itself isn't known.

SetCurrentSliceNewFromObject ( ICmObject obj ) : void
SetCurrentSlicePropertyNames ( ) : void
SetNodeWeight ( XmlNode node, Slice slice ) : void
SetTabIndex ( int index ) : void
SetToolTip ( Slice slice ) : void
SetupContents ( int flid, ICmObject obj ) : int[]

Method Details

ApplyChildren() public method

Calls ApplyLayout for each child of the argument node.
public ApplyChildren ( ICmObject obj, Slice parentSlice, XmlNode template, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap ) : int
obj ICmObject The obj.
parentSlice Slice The parent slice.
template XmlNode The template.
indent int The indent.
insertPosition int The insert position.
path ArrayList The path.
reuseMap ObjSeqHashMap The reuse map.
return int

ApplyLayout() public method

Apply a layout to an object, producing the specified slices.
public ApplyLayout ( ICmObject obj, Slice parentSlice, XmlNode template, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap ) : int
obj ICmObject The object we want a detai view of
parentSlice Slice The parent slice.
template XmlNode the 'layout' element
indent int How deeply indented the tree is at this point.
insertPosition int index in slices where we should insert nodes
path ArrayList sequence of nodes and HVOs inside which this is nested
reuseMap ObjSeqHashMap map of key/slice combinations from a DataTree being refreshed. Exact matches may be /// reused, and also, the expansion state of exact matches is preserved.
return int

ApplyLayout() protected method

This is the guts of ApplyLayout, but it has extra arguments to allow it to be used both to actually produce slices, and just to query whether any slices will be produced.
protected ApplyLayout ( ICmObject obj, Slice parentSlice, XmlNode template, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap, bool isTestOnly, NodeTestResult &testResult ) : int
obj ICmObject The obj.
parentSlice Slice The parent slice.
template XmlNode The template.
indent int The indent.
insertPosition int The insert position.
path ArrayList The path.
reuseMap ObjSeqHashMap The reuse map.
isTestOnly bool if set to true [is test only].
testResult NodeTestResult The test result.
return int

BeginSequentialBlock() public method

Begin a block of code which, even though it is not itself a message handler, should not be interrupted by other messages that need to be sequential. This may be called from within a message handler. EndSequentialBlock must be called without fail (use try...finally) at the end of the block that needs protection.
public BeginSequentialBlock ( ) : void
return void

CheckDisposed() public method

Throw if the IsDisposed property is true
public CheckDisposed ( ) : void
return void

ContainingXWindow() public method

public ContainingXWindow ( ) : IxWindow
return IxWindow

CreateSlicesFor() public method

Create slices for the specified object by finding a relevant template in the spec.
public CreateSlicesFor ( ICmObject obj, Slice parentSlice, string layoutName, string layoutChoiceField, int indent, int insertPosition, ArrayList path, ObjSeqHashMap reuseMap, XmlNode unifyWith ) : int
obj ICmObject The object to make slices for.
parentSlice Slice The parent slice.
layoutName string Name of the layout.
layoutChoiceField string The layout choice field.
indent int The indent.
insertPosition int The insert position.
path ArrayList sequence of nodes and HVOs inside which this is nested
reuseMap ObjSeqHashMap map of key/slice combinations from a DataTree being refreshed. Exact matches may be /// reused, and also, the expansion state of exact matches is preserved.
unifyWith XmlNode If not null, this is a node to be 'unified' with the one looked up /// using the layout name.
return int

DataTree() public method

public DataTree ( ) : System
return System

DeepResumeLayout() public method

Resume the layout of this window and its immediate children. This version also maintains a count, and does not resume until the number of resume calls balances the number of suspend calls.
public DeepResumeLayout ( ) : void
return void

DeepSuspendLayout() public method

Suspend the layout of this window and its immediate children. This version also maintains a count, and does not resume until the number of resume calls balances the number of suspend calls.
public DeepSuspendLayout ( ) : void
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged /// resources; false to release only unmanaged resources. ///
return void

EndSequentialBlock() public method

See BeginSequentialBlock.
public EndSequentialBlock ( ) : void
return void

FieldOrDummyAt() public method

This version expands nulls but not dummy slices. Dummy slices should know their indent.
public FieldOrDummyAt ( int i ) : Slice
i int
return Slice

FindMatchingSlices() public method

Try to find a slice that matches the information gleaned from another slice, probably one that has been disposed since the information was obtained. If there's a following slice that matches except for the object id, return that slice as well.
This is used by DTMenuHandler.OnDataTreeCopy() whenever creating the copy causes the data tree to be rebuilt. See FWR-2123 for motivation.
public FindMatchingSlices ( ICmObject obj, object key, Type type, Slice &newCopy ) : Slice
obj ICmObject
key object
type Type
newCopy Slice
return Slice

GetClassId() public static method

A rather inefficient way of finding the ID of the class that has a particular name. IFwMetaDataCache should be enhanced to provide this efficiently.
public static GetClassId ( IFwMetaDataCache mdc, string stClassName ) : int
mdc IFwMetaDataCache
stClassName string
return int

GetMessageTargets() public method

public GetMessageTargets ( ) : IxCoreColleague[]
return IxCoreColleague[]

GetMinFieldHeight() public method

public GetMinFieldHeight ( ) : int
return int

GetSliceContextMenu() public method

Get the context menu that would be displayed for a right click on the slice.
public GetSliceContextMenu ( Slice slice, bool fHotLinkOnly ) : ContextMenu
slice Slice The slice.
fHotLinkOnly bool if set to true [f hot link only].
return ContextMenu

GotoFirstSlice() public method

Moves the focus to the first visible slice in the tree
public GotoFirstSlice ( ) : void
return void

GotoNextSlice() public method

Moves the focus to the next visible slice in the tree
public GotoNextSlice ( ) : void
return void

GotoPreviousSliceBeforeIndex() public method

Moves the focus to the previous visible slice in the tree
public GotoPreviousSliceBeforeIndex ( int index ) : bool
index int
return bool

HandleLayout1() protected method

Used both by main layout routine and also by OnPaint to make sure all visible slices are real. For full layout, clipRect is meaningless.
protected HandleLayout1 ( bool fFull, Rectangle clipRect ) : int
fFull bool if set to true [f full].
clipRect Rectangle The clip rect.
return int

IndexOfSliceAtY() public method

Return the index of the slice which contains the given y position.
public IndexOfSliceAtY ( int yp ) : int
yp int Measured from top of whole area scrolled over.
return int

Init() public method

public Init ( Mediator mediator, XmlNode configurationParameters ) : void
mediator Mediator
configurationParameters XmlNode
return void

Initialize() public method

This is the initialize that is normally used. Others may not be extensively tested.
public Initialize ( FdoCache cache, bool fHasSplitter, Inventory layouts, Inventory parts ) : void
cache FdoCache The cache.
fHasSplitter bool if set to true [f has splitter].
layouts Inventory The layouts.
parts Inventory The parts.
return void

InitializeBasic() protected method

initialization for when you don't actually know what you want to show yet (and aren't going to use XML)
protected InitializeBasic ( FdoCache cache, bool fHasSplitter ) : void
cache FdoCache
fHasSplitter bool
return void

InitializeComponent() protected method

protected InitializeComponent ( ) : void
return void

InitializeComponentBasic() protected method

protected InitializeComponentBasic ( ) : void
return void

InsertSliceRange() protected method

protected InsertSliceRange ( int insertPosition, Set slices ) : void
insertPosition int
slices Set
return void

MakeEditorAt() public method

public MakeEditorAt ( int i ) : Slice
i int
return Slice

MakeGhostSlice() public method

public MakeGhostSlice ( ArrayList path, XmlNode node, ObjSeqHashMap reuseMap, ICmObject obj, Slice parentSlice, int flidEmptyProp, XmlNode caller, int indent, int &insertPosition ) : void
path ArrayList
node XmlNode
reuseMap ObjSeqHashMap
obj ICmObject
parentSlice Slice
flidEmptyProp int
caller XmlNode
indent int
insertPosition int
return void

MonitorProp() public method

Set up monitoring, so that a change to this property will trigger reconstructing the current set of slices.
public MonitorProp ( int hvo, int flid ) : void
hvo int
flid int
return void

OnControlAdded() protected method

protected OnControlAdded ( ControlEventArgs e ) : void
e ControlEventArgs
return void

OnControlRemoved() protected method

protected OnControlRemoved ( ControlEventArgs e ) : void
e ControlEventArgs
return void

OnDelayedRefreshList() public method

Respond to a broadcast message. This is needed to fix LT-9713 and LT-9714.
public OnDelayedRefreshList ( object sentValue ) : void
sentValue object
return void

OnDemoteItemInVector() public method

Implement the "Demote..." command.
public OnDemoteItemInVector ( object argument ) : bool
argument object
return bool

OnDisplayDemoteItemInVector() public method

See if it makes sense to provide the "Demote..." command.
public OnDisplayDemoteItemInVector ( object commandObject, UIItemDisplayProperties &display ) : bool
commandObject object
display UIItemDisplayProperties
return bool

OnDisplayInsertItemViaBackrefVector() public method

Influence the display of a particular command by giving an opinion on whether we are prepared to handle the corresponding "InsertItemViaBackrefVector" message.
public OnDisplayInsertItemViaBackrefVector ( object commandObject, UIItemDisplayProperties &display ) : bool
commandObject object
display UIItemDisplayProperties
return bool

OnDisplayJumpToLexiconEditFilterAnthroItems() public method

Enable/Disable menu items for jumping to the Lexicon Edit tool and applying a column filter on the Anthropology Category the user has right clicked on.
public OnDisplayJumpToLexiconEditFilterAnthroItems ( object commandObject, UIItemDisplayProperties &display ) : bool
commandObject object
display UIItemDisplayProperties
return bool

OnDisplayJumpToNotebookEditFilterAnthroItems() public method

Enable/Disable menu items for jumping to the Notebook Edit tool and applying a column filter on the Anthropology Category the user has right clicked on.
public OnDisplayJumpToNotebookEditFilterAnthroItems ( object commandObject, UIItemDisplayProperties &display ) : bool
commandObject object
display UIItemDisplayProperties
return bool

OnDisplayJumpToTool() public method

Enable menu items for jumping to the concordance (or lexiconEdit) tool.
public OnDisplayJumpToTool ( object commandObject, UIItemDisplayProperties &display ) : bool
commandObject object
display UIItemDisplayProperties
return bool

OnDisplayShowHiddenFields() public method

This property may be turned on and off any time a DataTree is an active colleague.
public OnDisplayShowHiddenFields ( object commandObject, UIItemDisplayProperties &display ) : bool
commandObject object
display UIItemDisplayProperties
return bool

OnFocusFirstPossibleSlice() public method

Called by reflection when a new object is inserted into the list. A change of current object should not ALWAYS make the data tree take focus, since that can be annoying when editing in the browse view (cf LT-8211). But we do want it for a new top-level list object (LT-8564). Also useful when we refresh the list after a major change to make sure something gets focused.
public OnFocusFirstPossibleSlice ( object arg ) : void
arg object
return void

OnInsertItemViaBackrefVector() public method

This is triggered by any command whose message attribute is "InsertItemViaBackrefVector"
public OnInsertItemViaBackrefVector ( object argument ) : bool
argument object
return bool

OnJumpToLexiconEditFilterAnthroItems() public method

Handle jumping to the lexiconEdit tool and filtering on the Anthropology Category the user has right clicked on.
public OnJumpToLexiconEditFilterAnthroItems ( object commandObject ) : bool
commandObject object
return bool

OnJumpToNotebookEditFilterAnthroItems() public method

Handle jumping to the NotebookEdit tool and filtering on the Anthropology Category the user has right clicked on.
public OnJumpToNotebookEditFilterAnthroItems ( object commandObject ) : bool
commandObject object
return bool

OnJumpToTool() public method

Handle enabled menu items for jumping to another tool, or another location in the current tool.
public OnJumpToTool ( object commandObject ) : bool
commandObject object
return bool

OnLayout() protected method

protected OnLayout ( LayoutEventArgs levent ) : void
levent LayoutEventArgs
return void

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnPropertyChanged() public method

Receives the broadcast message "PropertyChanged"
public OnPropertyChanged ( string name ) : void
name string
return void

OnReadyToSetCurrentSlice() public method

Process the message to allow setting/focusing CurrentSlice.
public OnReadyToSetCurrentSlice ( object parameter ) : bool
parameter object The parameter.
return bool

OnSizeChanged() protected method

protected OnSizeChanged ( EventArgs e ) : void
e EventArgs
return void

PrepareToGoAway() public method

public PrepareToGoAway ( ) : bool
return bool

PropChanged() public method

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
return void

RefreshDisplay() public method

This method is the implementation of IRefreshableRoot, which FwXWindow calls on all children to implement Refresh. The DataTree needs to reconstruct the list of controls, and returns true to indicate that children need not be refreshed.
public RefreshDisplay ( ) : bool
return bool

RefreshList() public method

Refresh your contents. We try to re-use as many slices as possible, both to improve performance, and so as to preserve expansion state as much as possible.
If the DataTree's slices call this method, they should use 'false', or they will be disposed when this call returns to them.
public RefreshList ( bool differentObject ) : void
differentObject bool /// True to not recycle any slices. /// False to try and recycle them. ///
return void

Reset() public method

public Reset ( ) : void
return void

ScrollCurrentAndIfPossibleSectionIntoView() public method

For sure make the CurrentSlice if any visible. If possible also make the prececing summary slice visible. Then make as many as possible of the slices which are children of that summary visible.
public ScrollCurrentAndIfPossibleSectionIntoView ( ) : void
return void

SetContextMenuHandler() public method

Set the handler which will be invoked when the user right-clicks on the TreeNode portion of a slice, or for some other reason we need the context menu.
public SetContextMenuHandler ( SliceShowMenuRequestHandler handler ) : void
handler SliceShowMenuRequestHandler
return void

SetDefaultCurrentSlice() protected method

subclasses override for setting a default current slice.
protected SetDefaultCurrentSlice ( bool suppressFocusChange ) : void
suppressFocusChange bool
return void

ShowObject() public method

Shows the specified object and makes the slices for the descendant object visible.
public ShowObject ( ICmObject root, string layoutName, string layoutChoiceField, ICmObject descendant, bool suppressFocusChange ) : void
root ICmObject The root.
layoutName string Name of the layout.
layoutChoiceField string The layout choice field.
descendant ICmObject The descendant.
suppressFocusChange bool if set to true focus changes will be suppressed.
return void

TraceInfoLine() protected method

protected TraceInfoLine ( string s ) : void
s string
return void

TraceVerbose() protected method

protected TraceVerbose ( string s ) : void
s string
return void

TraceVerboseLine() protected method

protected TraceVerboseLine ( string s ) : void
s string
return void

m_rch_Disposed() public method

public m_rch_Disposed ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

slice_SplitterMoved() public method

public slice_SplitterMoved ( object sender, SplitterEventArgs e ) : void
sender object
e SplitterEventArgs
return void

Property Details

m_autoCustomFieldNodesDocRoot protected_oe property

protected XmlNode m_autoCustomFieldNodesDocRoot
return XmlNode

m_autoCustomFieldNodesDocument protected_oe property

This XML document object holds the nodes that we create on-the-fly to represent custom fields.
protected XmlDocument m_autoCustomFieldNodesDocument
return XmlDocument

m_cDeepSuspendLayoutCount protected_oe property

protected int m_cDeepSuspendLayoutCount
return int

m_cache protected_oe property

protected FdoCache m_cache
return FdoCache

m_currentSlice protected_oe property

protected Slice m_currentSlice
return Slice

m_descendant protected_oe property

the descendent object that is being displayed
protected ICmObject m_descendant
return ICmObject

m_dxpLastRightPaneWidth protected_oe property

protected int m_dxpLastRightPaneWidth
return int

m_fHasSplitter protected_oe property

protected bool m_fHasSplitter
return bool

m_fShowAllFields protected_oe property

protected bool m_fShowAllFields
return bool

m_layoutChoiceField protected_oe property

protected string m_layoutChoiceField
return string

m_layoutInventory protected_oe property

protected Inventory m_layoutInventory
return Inventory

m_layoutState protected_oe property

protected LayoutStates m_layoutState
return LayoutStates

m_listName protected_oe property

protected string m_listName
return string

m_mdc protected_oe property

protected IFwMetaDataCache m_mdc
return IFwMetaDataCache

m_mediator protected_oe property

protected Mediator m_mediator
return Mediator

m_monitoredProps protected_oe property

Set of KeyValuePair objects (hvo, flid), properties for which we must refresh if altered.
protected HashSet> m_monitoredProps
return int>>.HashSet

m_partInventory protected_oe property

protected Inventory m_partInventory
return Inventory

m_persistenceProvider protected_oe property

protected IPersistenceProvider m_persistenceProvider
return IPersistenceProvider

m_rch protected_oe property

protected IRecordChangeHandler m_rch
return IRecordChangeHandler

m_rlu protected_oe property

protected IRecordListUpdater m_rlu
return IRecordListUpdater

m_root protected_oe property

protected ICmObject m_root
return ICmObject

m_rootLayoutName protected_oe property

protected string m_rootLayoutName
return string

m_sliceFilter protected_oe property

protected SliceFilter m_sliceFilter
return SliceFilter

m_sliceSplitPositionBase protected_oe property

This is the position a splitter would be if we had a single one, the actual position of the splitter in a zero-indent slice. This is persisted, and can also be controlled by the XML file; the value here is a last-resort default.
protected int m_sliceSplitPositionBase
return int

m_smallImages protected_oe property

protected ImageCollection m_smallImages
return ImageCollection

m_stringTable protected_oe property

protected StringTable m_stringTable
return StringTable

m_styleSheet protected_oe property

protected FwStyleSheet m_styleSheet
return FwStyleSheet

m_tooltip protected_oe property

protected ToolTip m_tooltip
return ToolTip

m_traceSwitch protected_oe property

Control how much output we send to the application's listeners (e.g. visual studio output window)
protected TraceSwitch m_traceSwitch
return TraceSwitch