Class HitByNameDlgCallback
See Also: Class Interface.
class HitByNameDlgCallback
Description:
This is the callback object used with Interface::DoHitByNameDialog().
Methods:
Prototype:
virtual TCHAR *dialogTitle()
Remarks:
Implemented by the Plug-In.
Returns the title string displayed in the dialog.
Default Implementation:
{ return _T(""); }
Prototype:
virtual TCHAR *buttonText()
Remarks:
Implemented by the Plug-In.
Returns the text displayed in the 'Select' or 'Pick' button.
Default Implementation:
{ return _T(""); }
Prototype:
virtual BOOL singleSelect()
Remarks:
Implemented by the Plug-In.
Returns TRUE if the user may only make a single selection in the list at one time; otherwise FALSE.
Default Implementation:
{ return FALSE; }
Prototype:
virtual BOOL useFilter()
Remarks:
Implemented by the Plug-In.
This gives the callback the opportunity to filter out items from the list. This is called before the dialog is presented. It returns TRUE if the filter() method (below) should be called; otherwise FALSE.
Default Implementation:
{ return TRUE; }
Prototype:
virtual int filter(INode *node)
Remarks:
Implemented by the Plug-In.
This method will be called if useFilter() above returned TRUE. This gives the callback the chance to filter out items from the list before they are presented to the user in the dialog. This is called once for each node that would otherwise be presented. Return nonzero to accept the item and zero to skip it.
Parameters:
INode *node
The node to check for inclusion in the list.
Return Value:
Nonzero to accept the item and zero to skip it.
Default Implementation:
{ return TRUE; }
Prototype:
virtual BOOL useProc()
Remarks:
Implemented by the Plug-In.
Normally, when the user selects OK from the dialog, the system selects all the chosen nodes in the scene. At times a developer may want to do something other than select the chosen nodes. If this method returns TRUE then the nodes in the list will not be selected, but the proc() method is called instead (see below). If this method returns FALSE, then the nodes are selected in the scene and proc() is not called.
Default Implementation:
{ return TRUE; }
Prototype:
virtual void proc(INodeTab &nodeTab)
Remarks:
Implemented by the Plug-In.
This allows the plug-in to process the nodes chosen from the dialog in any manner. For example if the developer wanted to delete the nodes chosen using this dialog, they would implement useProc() to return TRUE and this method to delete all the nodes in the table passed.
Parameters:
INodeTab &nodeTab
A table of those nodes selected by the user. See Template Class Tab.
Default Implementation:
{}
Prototype:
virtual BOOL doCustomHilite()
Remarks:
Implemented by the Plug-In.
Normally, when the dialog is entered, the nodes in the scene that are selected are highlighted in the list. If this method returns TRUE, the developer may control which items are hightlighted by implementing doHilite() (see below). If this method returns FALSE the selected nodes will have their names highlighted in the list.
Default Implementation:
{ return FALSE; }
Prototype:
virtual BOOL doHilite(INode *node)
Remarks:
Implemented by the Plug-In.
This method is called for each item in the list if doCustomHilite() returns TRUE. This method returns TRUE or FALSE to control if each item is highlighted.
Parameters:
INode *node
The node to check.
Return Value:
TRUE to highlight the node in the list; FALSE to not highlight it.
Default Implementation:
{ return FALSE; }
Prototype:
virtual BOOL showHiddenAndFrozen();
Remarks:
This method is available in release 2.0 and later only.
This defaults to returning FALSE, which means that hidden and frozen objects will not be included in the select by name dialog list. If this method is overridden to return TRUE, then hidden and frozen nodes will be sent through the user-supplied filter as in version 1.x. (Note that, apart from Unhide by Name and Unfreeze by Name, the new default behavior is likely to be correct for all uses of this class.)
Default Implementation:
{ return FALSE; }