Project Provider Framework/Item Interface Methods

From LabVIEW Wiki
Jump to: navigation, search

Item Interface Methods define events that occur to individual items in the project tree.

Method Definition
CanDelete Description: Determines if the project item can be deleted

Inputs:

  • Object (ItemRef) - Reference to the project item

Outputs:

  • CanDelete (Boolean)- Controls whether the item can be deleted (true) or not (false)
CanDoHelp Description: Determines if the project item supports help.

Inputs:

  • Object (ItemRef) - Reference to the project item

Outputs:

  • CanDoHelp (Boolean) - Controls if help is supported (true) or not (false)
CanDoProperties Description: Determines if the project item supports properties.

Inputs:

  • Object (ItemRef) - Reference to the project item

Outputs:

  • Boolean CanDoProperties Controls whether properties are supported (true) or not (false)
CanDragToExternalWindow Description: Called when the project item is dragged to an external window.

Inputs:

  • Object (ItemRef) - Reference to the project item

Outputs:

  • CanDrag (Boolean) - Controls whether the item can be dragged to an external window.
CanDragToProjectWindow Description: Called when an item is dragged into the project window.

Inputs:

  • Object (ItemRef) - Reference to the project item
  • ItemRef DropTarget Reference to the item being dropped on

Outputs:

  • CanDrag (Boolean) - Controls whether DropTarget can be dragged to project window
CanDropExternalData Description: Called when an item from an external window is dragged onto this item.

Inputs:

  • Object (ItemRef) - Reference to the project item

Outputs:

  • CanDrop (Boolean) - Controls if the project item is available for dropping an external item. (Setting it to true does not drop the external item on the project item though)
CanDropItem Description: Called when another project item is dragged to the item.

Inputs:

  • Object (ItemRef) - Reference to the project item
  • DropItem - (ItemRef) - Reference to the item being dragged

Outputs:

  • CanDrop (Boolean) - Controls whether DropItem can be dropped on Object
CanRename Description: Determines if the project item can be renamed.

Inputs:

  • Object (ItemRef) - Reference to the project item

Outputs:

  • Boolean CanRename Controls whether rename is supported (true) or not (false)
Exit Description: Not currently called.

Inputs:

  • ItemRef Object Reference to the project item

Outputs: None

GetAddCategories Description: TBD

Inputs: None Outputs: None

GetCreateNewCategories Description: TBD

Inputs: None Outputs: None

Init Description: Called when initializing a single item in the project.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

NotifyChanged Description: Called when the item is modified (item created or modified, file created or modified, item added or renamed, item added to or modified for SCC).

Inputs:

  • ItemRef (Object) - Reference to the project item
  • ChangeType (mxLvChangeType) - Type of change

Outputs: None

OnCommand Description: Called when a menu entry installed by the provider is selected on a single item.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • CommandID (String) - Menu tag defined when the command was registered

Outputs: None

OnDblClick Description: Called when the user double-clicks on an item in the project tree.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

OnDelete Description: Called when the project item is deleted.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • Silently (Boolean) - Controls whether the provider's delete method should display any UI (false) or not (true)

Outputs: None

OnDoHelp Description: Called when Help... is selected from the popup menu for the project item.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

OnDoProperties Description: Called when Properties is selected from the popup menu for an item.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

OnDropFiles Description: Called when one or more files are dragged from the explorer and dropped on a project item.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • DropFilesList (Path[]) - List of files

Outputs: None

OnDropItem Description: Called when another project item is dropped on the item.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • DropItem (ItemRef) - Reference to the item being dropped

Outputs: None

OnPopupMenu Description: Called right before the project item's popup menu is displayed—menu can be modified before display.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

OnRename Description: Called when the item is renamed.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • New Name (String) - New name of the item.

Outputs: None

OnSelect Description: Called when the project item is selected in the project tree.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

OnUnselect Description: Called when the project item is unselected in the project tree.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

OnUpdateCommand Description: Called to update the specified command right before it is about to be displayed in a menu or popup.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • Command ID (String) - Menu tag of the command being updated (defined when registered)

Outputs:

  • Menu Item Out (mxLvMenuItem)
OnWizardComplete Description: Notifies the project item that the Create New Wizard process is finished.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs: None

PrefersFPHeap Description: Determines if item wants the VI Front Panel or Block Diagram reference when WasDroppedOnVI is called.

Inputs:

  • ItemRef (Object) - Reference to the project item

Outputs:

  • Prefers FP (Boolean) - True if Front Panel reference, false if Block Diagram reference
ValidateRename Description: Determines if the new name is valid for the project item.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • New Name (String) - New name of item

Outputs:

  • Can Rename (Boolean) - Controls whether the new name is valid (true) or not (false)
WasDroppedOnItem Description: Called when the project item was dropped on another project item in the tree.

Inputs:

  • ItemRef (Object) - Reference to the project item
  • Drop Item (ItemRef) - The item that the project item was dropped on

Outputs: None

WasDroppedOnVI Description: Called when the project item is dropped on an open VI (either front panel or block diagram).

Inputs:

  • ItemRef (Object) - Reference to the project item
  • X (I32) - X-coordinate of drop
  • Y (I32) - Y-coordinate of drop
  • VI (Diagram Refnum) - Front panel or Block Diagram reference (determined by PrefersFPHeap method)
  • Front Panel? (Boolean) - Specifies whether item has been dropped on Front Panel (true) or not (false)
  • Flags (I32) - NOTE: REFER TO _lvProjectDragDropFlags IN LvProject.h

Outputs:

  • Can Drop (Boolean) - Controls whether object can be dropped or not
  • Result (lvProjectDropresults) - NOTE: REFER TO lvProjectDropResults IN LvProject.h