The selection list management functions provide the API calls necessary to create and edit selection lists. The selection lists contain information about each object the user selects for modification. These functions make it easy for your application to select objects and make modifications to the object attributes. |
|
CreateSelItemOutline(); Create Selection Item Outline |
|
DestroySelItemOutline(); Destroy Selection Item Outline |
|
GetFirstDetNodeRef(); Get First Detection Node Reference |
|
IsMarkerSelected(); Is marker selected? |
|
Item2DetRef(); Selection Item -to- Detection Reference conversion |
|
MoveSelectedItem(); Move a selected item to a new virtual location |
|
Remove(); Remove item(s) from a selection list |
|
RemoveItem(); Remove an item from a selection list |
|
Select_AddGroupsRelatedObjects(); Select Add Group-Related Objects to Selection List |
|
Select_AddHeightRelatedObjects(); Select Add Height-Related Objects to Selection List |
|
Select_AddItem(); Select Add Item to Selection List |
|
Select_AddRelatedItems(); Select Add Related Items to Selection List |
|
Select_AddSeriesRelatedObjects(); Select Add Series-Related Objects to Selection List |
|
Select_AllocList(); Select Allocate Selection List |
|
Select_CalcHandlesItem(); Select Calculate Handles Selection Item |
|
Select_CalcHandlesList(); Select Calculate Handles Selection List |
|
Select_ClearList(); Select Clear Selection List |
|
Select_DrawXorItem(); Select Draw Xor Selection Item |
|
Select_DrawXorList(); Select Draw Xor Selection List |
|
Select_DuplicateList(); Select Duplicate Selection List |
|
Select_FreeList(); Select Free Selection List |
|
Select_GetFirstItem(); Select Get First Item in Selection List |
|
Select_GetListBounds(); Select Get Selection List Bounds |
|
Select_GetListInfo(); Select Get Selection List Information |
|
Select_GetNextItem(); Select Get Next Item in Selection List |
|
Select_GetSelectedSeriesID(); Select Get Selected Series ID |
|
Select_Group(); Select Group in Selection List |
|
Select_HandleHitTest(); Select Selection List Handle Hit Text |
|
Select_IsEqual(); Select are two selection items equal? |
|
Select_IsObjectSelected(); Select is object selected in selection list? |
|
Select_IsSeriesRelatedObject(); Select is series-related object? |
|
Select_RebuildItem(); Select rebuild item in Selection list |
|
Select_RebuildList(); Select rebuild Selection list |
|
Select_RemoveItem(); Select remove item from Selection list |
|
Select_RemoveRelatedItems(); Select remove related items from Selection List |
|
Select_SearchList(); Select Search Selection list |
|
Select_SelectAllSeriesRelatedObjects(); Select all series-related objects in a chart |
|
Select_UnGroup(); Select Ungroup Selection list |
|
SelectDetNode(); Select Detection Node |
|
SelectDetNodesInRect(); Select Detection Nodes in a Rectangle |
This routine returns a list of points (in device coordinates) that form the outline of the object that is identified by pItem. This function is particularly useful for pie slices and other multi-point objects. |
|
Syntax: |
LPPOINT PUBLIC |
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
pItem: Pointer to an item in the selection list. See the SelItemRec in Appendix A. |
|
pnPoints: Place to store the list of points |
|
Return: |
LPPOINT: Pointer to a list of points on success, NULL on failure. |
Notes: |
IMPORTANT: This function allocates memory that the caller must free. To free, use DestroySelItemOutline(). |
Also See: |
|
This routine frees the pointer to the outline list that CreateSelItemOutline() created. |
|
Syntax: |
INT16 PUBLIC |
Input: |
ptData: Pointer created by CreateSelItemOutline() |
Return: |
INT16: E00_OK |
Also See: |
|
This function sets pDetRef to the first detection node reference in the selection list at pSelList. |
|
Syntax: |
void PUBLIC |
Input: |
pSelList: Pointer to a selection list. See the SelListRec structure in Appendix A. |
pDetRef: Place to store first detection node reference. See the DetNodeRef structure in Appendix A. |
|
Return: |
None |
Example: |
if (!pSelList) |
Notes: |
Also, see the PGSDK Programmer's Manual for more information about detection nodes and selection lists. |
Also See: |
GetDetNode(), GetNextDetNode() |
This function returns a BOOLEAN16 identifying whether or not a marker is selected in the selection list identified by pSelList. |
||
Syntax: |
BOOLEAN16 PUBLIC |
|
Input: |
pSelList: Pointer to a selection list. See the SelListRec structure in Appendix A. |
|
Return: |
BOOLEAN16; TRUE/FALSE |
|
TRUE= |
Marker is selected |
|
FALSE= |
Marker is not selected |
|
This function sets pDetRef to the detection node reference associated with the selection item at pItem. |
|
Syntax: |
void PUBLIC |
Input: |
pItem: Pointer to an item in a selection list. See the SelItemRec in Appendix A. |
pDetRef: Pointer to a detection node reference. See the DetNodeRef structure in Appendix A. |
|
Return: |
None |
Example: |
Item2DetRef ( pItem, &detRef ); |
Also See: |
This function moves a selected item to a new virtual location, invalidating the previous and new bounding rectangles. |
|
Syntax: |
void PUBLIC |
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
pGraph: Pointer to a graph object created by AllocGraphPtr() |
|
pSelItem: Pointer to an item in a selection list allocated by Select_AllocList(). See the SelItemRec in Appendix A. |
|
newBounds: Pointer to a rectangle that contains new virtual coordinates. See the Rect structure in Appendix A. |
|
Return: |
None |
Notes: |
This function has no effect on non-movable objects. It is a good short-cut for moving/resizing any movable item. You do not need to know which A_LOCATE_... attribute is appropriate for a selected item. |
Also See: |
Remove()
This function removes a selected annotation item or all annotation items. |
||
Syntax: |
int PUBLIC |
|
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
|
pSelList: Pointer to a selection list. See the SelListRec in Appendix A. |
||
all: TRUE/FALSE |
||
TRUE= |
remove all items |
|
FALSE= |
remove currently selected item only. |
|
Return: |
INT: E00_OK = successful, Any other value = error |
|
Also See: |
||
This function removes the object identified by pSelItem from the selection list. |
|
Syntax: |
int PUBLIC |
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
pSelList: Pointer to a selection item record identifying the item to remove from selection list. See the SelItemRec in Appendix A. |
|
Return: |
INT: E00_OK = successful, Any other value = error |
Also See: |
Remove(), Select_RemoveItem() |
Select_AddGroupsRelatedObjects()
This function adds all the items in the detection node list with the same group ID and with an object/group relation (like risers etc...) to a selection list. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pGraph; Pointer to the graph object created by AllocGraphPtr() |
|
pSelList; Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
nObjectID; Object to add |
||
nGroupID; Group to add |
||
bSelectAll; TRUE/FALSE |
||
TRUE= |
Select all group related items |
|
FALSE= |
Only select nObjectID |
|
Return: |
INT16; E00_OK=Success, -1=Error |
|
Also See: |
Select_AddHeightRelatedObjects(), Select_AddRelatedItems(), Select_AddSeriesRelatedObjects(), Select_RemoveRelatedItems() |
Select_AddHeightRelatedObjects()
This function adds all height-related objects to a selection list. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pGraph; Pointer to the graph object created by AllocGraphPtr() |
|
pSelList; Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. This parameter identifies the selection list to be updated. |
||
pSelItem: Pointer to an Item in a Selection List identifying the area to add. See the SelItemRec in Appendix A. |
||
Return: |
INT16; |
|
E00_OK= |
Success |
|
-1= |
Error |
|
Also See: |
Select_AddGroupsRelatedObjects(), Select_AddRelatedItems(), Select_AddSeriesRelatedObjects(), Select_RemoveRelatedItems() |
|
This function adds the item identified by pDetRef to the selection list (pSelList). |
|
Syntax: |
SelItemPtr |
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|
pDetRef: Pointer to a detection node to be added to the selection list. See the DetNodeRef structure in Appendix A. |
|
Return: |
SelItemPtr |
NULL = Item could not be added to list |
|
Non-Zero = Object ID of item added to the selection list |
|
Example: |
case WM_LBUTTONDOWN; |
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
Also See: |
This function adds items to the selection list (pSelList) that are related as identified by nRelation. For example, if nRelation is set to SLR_SAME_SERIES, all graph objects with the same series ID as the pDetRef would be added to the selection list. If bSelectTarget parameter is TRUE, the target detection node is also added to the selection list. |
||||
Syntax: |
INT16 PUBLIC |
|||
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
|||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||||
pDetRef: Pointer to a detection node to be added to the selection list. See the DetNodeRef structure in Appendix A. |
||||
nRelation: INT16 value from the SelListRelationIndexType enum that identifies the relationship of object to add: |
||||
SelListRelationIndexType |
Value |
Description |
||
SLR_SAME_OBJECT |
0= |
Detection nodes with the same object ID |
||
SLR_SAME_SERIES |
1= |
Detection nodes with the same series ID |
||
SLR_SAME_GROUP |
3= |
Detection nodes with the same group ID |
||
SLR_SAME_AREAINST |
4= |
Detection nodes with the same area instance |
||
SLR_SAME_LINEINST |
5= |
Detection nodes with the same line instance |
||
SLR_SAME_FONTINST |
6= |
Detection nodes with the same font instance |
||
SLR_SAME_SG |
7= |
Detection nodes with the same series/group |
||
SLR_DEFAULT |
8= |
Default |
||
bSelectTraget: TRUE/FALSE |
||||
TRUE= |
also add target detection node to list |
|||
FALSE= |
don't add target detection node |
|||
nObjectFilter: Specify an Object ID to select only the detection nodes with this object ID. Use -1 to match all object types. |
||||
Return: |
INT16: count of detection nodes added to the selection list (-1 = error) |
|||
Notes: |
This is a very useful function for creating a list of all of a certain class of objects when the user selects one of object. For example, if your user selects one of group label, this function will highlight ALL group labels. |
|||
Also See: |
||||
Select_AddSeriesRelatedObjects()
This function adds all the items in the detection node list with the same series ID and with an object/series relation (like risers etc...) to a selection list. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pGraph; Pointer to the graph object created by AllocGraphPtr() |
||
pSelList; Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. This parameter identifies the selection list to be updated. |
|||
nObjectID; Object to add |
|||
nGroupID; Series to add |
|||
bSelectAll; TRUE/FALSE |
|||
TRUE= |
Select all series-related items |
||
FALSE= |
Only select nObjectID |
||
Return: |
INT16; |
||
E00_OK= |
Success |
||
-1= |
Error |
||
Also See: |
Select_AddGroupsRelatedObjects(), Select_AddHeightRelatedObjects(), Select_AddRelatedItems(), Select_RemoveRelatedItems() |
||
This function allocates memory for a new selection list and returns a pointer to the master record. |
|
Syntax: |
SelListPtr PUBLIC |
Input: |
None |
Return: |
SelListPtr: Pointer to a Selection List. See the SelListRec in Appendix A. |
Example: |
CComSelList::CComSelList() |
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
Also See: |
This function calculates moving/sizing handles for the bounding rectangle of the selection item identified by pItem. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
||
pItem: Pointer to an Item in a Selection List. See the SelItemRec in Appendix A. |
|||
Return: |
INT16: |
||
Possible Values |
Description |
||
E00_OK = |
No Errors |
||
E00_INVALID_NULL_ARG |
pItem not specified |
||
Example: |
if(gpSelItem->nSeriesID >= 0 && |
||
Notes: |
1. |
This function can be called with the return value from Select_AddItem() to set up handles after a mouse click-select. Also note that this function does not draw the handles, it only calculates the handles. See Select_DrawXorItem() and Select_DrawXorList to draw handles. |
|
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
||
Also See: |
This function calculates moving/sizing handles for all items in the selection list identified by pSelList. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
||
pSelList: Pointer to a selection list. allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|||
Return: |
INT16: |
||
Possible Values |
Description |
||
E00_OK = |
No Errors |
||
E00_INVALID_NULL_ARG |
pItem not specified |
||
Example: |
/* Match up objects in selection |
||
Notes: |
1. |
Select_CalcHandleList should be called after a Select_RebuildList(). |
|
2. |
This function does not draw the moving/sizing handles, it simply calculates them. Use Select_DrawXorList() to draw the handles calculated by this function. |
||
3. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
||
Also See: |
Select_CalcHandlesItem(), Select_RebuildList(), Select_DrawXorList() |
This function clears all the items from the selection list identified by pSelList and releases the memory associated with each item in the list. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
Return: |
INT16: |
||
Possible Values |
Description |
||
E00_OK = |
No Errors |
||
E00_INVALID_NULL_ARG |
pSelList pointer is NULL |
||
Example: |
/* Get the mouse pointer */ |
||
Notes: |
1. |
This function clears the selection list, but it does not dispose of the list master itself, effectively clearing out the list to start with fresh selections. |
|
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
||
Also See: |
This function draws moving/sizing handles for the selection list item identified by pItem. If the object is NOT movable, the system will draw a solid XOR line around the selected object. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
||
pItem: Pointer to the item in a selection list to be XOR-ed. See the SelItemRec in Appendix A. |
|||
Return: |
INT16: |
||
Possible Values |
Description |
||
E00_OK = |
No Errors |
||
E00_INVALID_NULL_ARG |
pItem and/or pDE is NULL |
||
Example: |
gpSelItem = Select_AddItem( |
||
Notes: |
1. |
This function can be called with the return value from Select_AddItem() to draw handles after a click-select and a call to Select_CalcHandlesItem(). |
|
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
||
Also See: |
This function exclusive-or's the handles for every item in the selection list. This should be done after a graph redraw. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|||
Return: |
INT16: |
||
Possible Values |
Description |
||
E00_OK = |
No Errors |
||
E00_INVALID_NULL_ARG |
pItem and/or pDE is NULL |
||
Example: |
INT16 NEAR XOR_List ( |
||
Notes: |
1. |
Select_CalcHandlesList() and Select_DrawXorList() should be called after Select_RebuildList(), so that the handles also remain valid across redraws. |
|
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
||
Also See: |
Select_DrawXorItem(), Select_CalcHandlesList(), Select_RebuildList() |
This function creates a copy of the selection list identified by pSelList and returns a pointer to the duplicate list. |
||
Syntax: |
SelListPtr PUBLIC |
|
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|
Return: |
SelListPtr: Pointer to the duplicate selection list (SelListPtr) or NULL = Invalid pSelList or system was not able to allocate a new list. See the SelListRec in Appendix A. |
|
Example: |
pNewList = Select_DuplicateList ( pSelList ); |
|
Notes: |
1. |
The list duplicated by this function is a true copy and must be disposed of separately with Select_FreeList(). |
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
|
Also See: |
This function disposes of an entire selection list and any memory used by links in the list. |
|
Syntax: |
INT16 PUBLIC |
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
Return: |
Zero |
Example: |
CComSelList::~CComSelList() |
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
Also See: |
This function returns a pointer to the first item in Selection List (pSelList). |
|
Syntax: |
SelItemPtr PUBLIC |
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
goIntoGroups: Not Currently Used - Should Always be Zero |
|
Return: |
SelItemPtr: Non-Zero = Selection List Item Pointer, NULL = pSelList not specified |
Example: |
if( !pSelItem ) |
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
Also See: |
This function stores the bounding rectangle for all items in selection list (pSelList) in the rectangle data structure identified by pRect. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|
pRect: Pointer to a rectangle data structure |
||
Return: |
INT16: |
|
Possible Values |
Description |
|
E00_OK = |
No Errors |
|
E00_INVALID_NULL_ARG |
pSelList not specified |
|
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
This function returns information about a selection list according to nIndex. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
nIndex: Identifies the information to get from the selection list: |
|||
SelListInfoIndexType |
Value |
Description |
|
SLI_NUMSELECTED |
0= |
Number if items selected |
|
SLI_NUMANODESSELECTED |
1= |
Number of ANODES selected |
|
SLI_NUMGEODESSELECTED |
2= |
Number of GEODES selected |
|
SLI_NUMDETNODESSELECTED |
3= |
Number of detection nodes selected |
|
SLI_NUMGROUPSSELECTED |
4= |
Number of groups selected |
|
SLI_NUMMOVABLESELECTED |
5= |
Number of movable objects selected |
|
SLI_NUMTEXTBOXSELECTED |
6= |
Number of text boxes selected |
|
SLI_NUMNONDELETE |
7= |
Number of objects that can't be deleted |
|
SLI_NUMGROUPSATTACHED |
8= |
Number of attached groups |
|
SLI_NUMSELWITHLINE |
9= |
Number of selections with line instances |
|
SLI_NUMSELWITHAREA |
10= |
Number of selections with area instances |
|
SLI_NUMSELWITHFONT |
11= |
Number of selections with font instances |
|
Return: |
INT16: Zero if the selection list is not valid. Non-Zero identifies the number of items selected according to the value of nIndex. If nIndex is set to SLI_NUMSELWITHFONT, this value identifies the number of selections in the selection list with font instances. |
||
Example: |
INT16 CSelList::GetNumSelected() |
||
This function returns the SelItem in the passed selection list that comes after the given SelItem (pCurr). If there are no items in the selection list after then given item, NULL is returned. |
|
Syntax: |
SelItemPtr PUBLIC |
Input: |
pCurr: Pointer to an item in a selection list. See the SelItemRec in Appendix A. |
goIntoGroups: Not Currently Used - Should Always be Zero |
|
Return: |
SelItemPtr: NULL = No next items after pCurr, Non-Zero = Pointer to a Selection List Item |
Example: |
for (pCurr=Select_GetFirstItem(( |
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
Also See: |
|
This function returns the series ID of the first item in the selection list. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|
Return: |
INT16; |
|
Non-Zero = |
Series ID of the first item in pSelList |
|
-1 = |
Error |
|
This function puts all items in a passed selection (pSelList) list into a group. If compactNow is set to TRUE, the selection list is changed to contain only the Group ID of the newly created group. The compactNow parameter is normally set to TRUE. If your application needs to modify items in the selection list AFTER the grouping operation, you can set compactNow to FALSE. However, NOTE that the selection list will be invalid if this is done. You application should call Select_RebuildList() SOON after a Select_Group with compactNow set to FALSE! |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|||
compactNow: TRUE / FALSE |
|||
TRUE= |
Change selection list to contain only the group ID of the newly created group |
||
FALSE= |
Do not change selection list to contain only the group ID of the new group |
||
Return: |
INT16: |
||
Possible Values |
Description |
||
E00_OK = |
Success |
||
E00_INVALID_NULL_ARG= |
Selection list is invalid |
||
Also See: |
This function takes a point in destination coordinates (mousePt) and checks the moving/sizing handles of every object in the selection list (pSelList). |
|||
Syntax: |
SelItemPtr PUBLIC |
||
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
mousePt: Pointer to a point in destination coordinates |
|||
whichHandle: Pointer to INT16 where a value from the HandleType enum will be stored on return. |
|||
HandleType |
Value |
Description |
|
HTTopLeft |
0 |
Top-Left Handle |
|
HTTopRight |
1 |
Top-Right Handle |
|
HTBottomLeft |
2 |
Bottom-Left Handle |
|
HTBottomRight |
3 |
Bottom-Right Handle |
|
HTCenterTop |
4 |
Top-Center Handle |
|
HTCenterRight |
5 |
Right-Center Handle |
|
HTCenterLeft |
6 |
Left-Center Handle |
|
HTCenterBottom |
7 |
Bottom-Center Handle |
|
pItemRect: Pointer to RECT that defines the rectangle for the sizing handle |
|||
If the point (mousePt) lies on one of the handles, pItemRect is set to the objects bounding rectangle, whichHandle is set to the handle number clicked on, and the object's SelItemPtr is returned. |
|||
Return: |
SelItemPtr: NULL = pSelList not specified or mousePt is not on a handle, Non-Zero = Selection List Item Pointer |
||
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection list and selection items. |
This function compares the nLayer, nObjectID, nSeriesID, and nGroupID fields of the two selection item structures identified by pOne and pTwo. It returns TRUE if all fields are equal (i.e., the two passed SelItemPtrs represent the same object). |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pOne: Pointer to a Selection List Item. See the SelItemRec in Appendix A. |
|
pTwo: Pointer to a Selection List Item. See the SelItemRec in Appendix A. |
||
Return: |
INT16: Zero = pOne and pTwo are not equal, Non-Zero = pOne and pTwo are equal |
|
Example: |
bFound = Select_IsEqual ( pCurr, pItem ) ; |
|
Notes: |
1. |
The two selection list items need not be in the same selection list or even in a list at all. This is useful if you wish to implement your own Search List procedure or special cases on selections. |
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection lists and selection items. |
This function determines whether the object nObjectID is selected in the selection list identified by pSelList. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|
nObjectID: Object ID. |
||
Return: |
INT16: |
|
Possible Values |
Description |
|
NULL = |
pSelList not specified |
|
TRUE = |
Object is selected in pSelList |
|
FALSE = |
Object is not selected |
|
Example: |
Select_IsObjectSelected ( pInfo->pSelList, OAN_ARROW ); |
|
Notes: |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection lists and selection items. |
|
Select_IsSeriesRelatedObject()
This function returns a BOOLEAN16 identifying whether or not the object (nObjectID) is series-related. |
||
Syntax: |
BOOLEAN16 PUBLIC |
|
Input: |
nObjectID; Object ID |
|
Return: |
BOOLEAN16; TRUE/FALSE |
|
TRUE = |
nObjectID is series-related |
|
FALSE = |
nObjectID is not series-related |
|
This function checks the selection list item identified by pItem to see if it is still valid. |
|
Syntax: |
INT16 PUBLIC |
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
pItem: Pointer to an item in the selection list. See the SelItemRec in Appendix A. |
|
Return: |
INT16: TRUE if the item is valid |
Example: |
/* Go through selection list and |
Also See: |
This function rebuilds the selection list pSelList. It allows selection lists to maintain their integrity over graph redraws. After every redraw, Select_RebuildList() should be called for every selection list in use by the application. This will make sure the selection lists represent only valid detection nodes, and that each entry represents the same object, even if its detection node changed during the redraw. If any of the selections no longer have valid detection nodes, they will be removed from the list, and the number of SelItems removed will be returned. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
|
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
Return: |
INT16: Zero = pSelList is empty, Non-Zero = Number of items removed from the selection list |
|
Example: |
void CSelList::DrawSelection( CDrawEnv& de ) |
|
Notes: |
1. |
If standard selection list handles are used, Select_CalcHandlesList() and Select_DrawXorList() should be called after Select_RebuildList() so that the handles also remain valid across redraws. |
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection lists and selection items. |
|
Also See: |
Select_RebuildItem(), Select_CalcHandlesList(), Select_DrawXorList() |
This function removes the item pItem from the selection list pSelList. It updates the links in the list to reflect the removed item and releases memory allocated to the item. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
pItem: Pointer to a selection list item. See the SelItemRec in Appendix A. |
|||
Return: |
INT16: |
||
Possible Values |
Description |
||
E00_OK = |
pItem found and removed |
||
EDR_ITEM_NOT_FOUND = |
pItem was not in pSelList |
||
Example: |
if (bShiftKey) |
||
Notes: |
1. |
This function is normally used after a Select_SearchList() has returned a hit on an item that was shift-clicked on. |
|
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection lists and selection items. |
||
Also See: |
|||
This function will remove items from a selection list that are RELATED to a TARGET detection node in a certain way. The way selected nodes are chosen is based on the nRelation parameter. For example, using SLR_SAME_SERIES would remove all of the graph objects with the same series ID from the pSelList selection list. The nObjectFilter parameter constrains the selection of objects to those with this object ID (not applicable for SLR_SAME_OBJECT). If nObjectFilter is O2D_RISER (for example), only bar risers in the matching series would be selected. Set nObjectFilter to -1 to match all object types. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. This parameter identifies the selection list to update. |
|||
pItem: Pointer to a selection list item. See the SelItemRec in Appendix A. This parameter identifies the item in the selection list to remove. |
|||
nRelation: INT16 value from the SelListRelationIndexType enum that identifies the relationship of object to remove: |
|||
SelListRelationIndexType |
Value |
Description |
|
SLR_SAME_OBJECT |
0= |
Detection nodes with the same object ID |
|
SLR_SAME_SERIES |
1= |
Detection nodes with the same series ID |
|
SLR_SAME_GROUP |
3= |
Detection nodes with the same group ID |
|
SLR_SAME_AREAINST |
4= |
Detection nodes with the same area instance |
|
SLR_SAME_LINEINST |
5= |
Detection nodes with the same line instance |
|
SLR_SAME_FONTINST |
6= |
Detection nodes with the same font instance |
|
SLR_SAME_SG |
7= |
Detection nodes with the same series/group |
|
SLR_DEFAULT |
8= |
Default |
|
nObjectFilter; Object ID Filter. Use -1 to select all objects. |
|||
Return: |
INT16; Modifies the passed selection list accordingly and returns the number of items removed, or -1 if there is an error. |
||
Also See: |
This function checks the selection list (pSelList) for a match on the detection node pointer (pDetRef). If a match is found in the list, its SelItemPtr is returned. Otherwise, NULL is returned |
|||
Syntax: |
SelItemPtr PUBLIC |
||
Input: |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
pDetRef: Pointer to a detection node item. See the DetNodeRef structure in Appendix A. |
|||
Return: |
SelItemPtr: |
||
Possible Values |
Description |
||
NULL = |
pDetRef is not in pSelList |
||
Non-Zero= |
Selection List Item Pointer (SelItemPtr) |
||
Example: |
// if shift pressed, search to see |
||
Notes: |
1. |
This function is typically used after a user shift-clicks on a detection node. If a match is found, the clicked object should be removed from the selection list with Select_RemoveItem(). Otherwise, it should be added with Select_AddItem(). |
|
2. |
Also see the PGSDK Programmer's Manual for more information about this and other functions that manipulate selection lists and selection items. |
||
Also See: |
|||
Select_SelectAllSeriesRelatedObjects()
This function selects all series-related data objects present in the chart. |
|
Syntax: |
INT16 PUBLIC |
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|
bLegendMarkers: Not currently used. |
|
Return: |
INT16; E00_OK = Success, -1 = Failed |
This function expands any selected group items into component items. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
|
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
Return: |
INT16: |
|
Possible Values |
Description |
|
E00_OK = |
successful |
|
E00_INVALID_NULL_ARG= |
selection list is not valid |
|
Also See: |
||
This function adds or subtracts detection node reference pointers to/from the selection list (pSelList). If append is non-zero and the item (identified by pDetRef) already exists in the list, the selection item is removed. If append is non-zero and the item is not in the list, it is added. If append is zero, all items are cleared from the selection list and pDetRef is added as the first item in the selection list. |
||
Syntax: |
SelItemPtr PUBLIC |
|
Input: |
pGraph: Pointer to the graph object created by AllocGraphPtr() |
|
pDE: Pointer to the draw environment created by AllocDrawEnv() |
||
pSelList: Pointer to a selection list. See the SelListRec in Appendix A. |
||
pDetRef: Pointer to a detection node item. See the DetNodeRef structure in Appendix A. |
||
append: 0/1 |
||
Possible Values |
Description |
|
zero = |
clear list and add this item |
|
non-zero = |
delete the single item if it exists or add it if it doesn't exist |
|
Return: |
SelItemPtr: Pointer to the new selection item in the selection list |
|
Example: |
SelectDetNode ( gpGraph, pDE, pSelList, |
|
Notes: |
If the draw environment pointer (pDE) is not NULL, stretch-resize handles will be XOR-ed for the item/object (pDetRef). The pDE parameter can be set to NULL if stretch-resize handles are not desired. |
|
Also See: |
This function is a simple default marquee selection routine. Given a pointer to a rectangle (pBounds), this function adds or subtracts items lying within it from the selection list, possibly clearing the list, based on the append parameter. Set append to TRUE to provide shift-marquee functionality. Set append to FALSE to select only the items surrounded. If pDE is not NULL, stretch-resize handles will be XOR-ed. If handles are not desired, set pDE to NULL. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pGraph: Pointer to graph |
||
LayerID: Layer to search. |
|||
Possible Values |
Description |
||
ANNOTATION_LAYER |
Annotation Layer |
||
GRAPH_LAYER |
Graph Layer |
||
BACKGROUND_LAYER |
Background Layer |
||
pSelList: Pointer to the selection list to update. See the SelListRec in Appendix A. |
|||
pBounds: Bounds of marquee |
|||
pDE: Pointer to a draw environment. Set to NULL if stretch/size handles are not desired. |
|||
append:: TRUE/FALSE |
|||
TRUE= |
provide shift-marquee functionality |
||
FALSE= |
select only the items surrounded |
||
Return: |
INT16: |
||
Possible Values |
Description |
||
Zero = |
Success |
||
-1 = |
Error |
||
Also See: |