[r5]: / trunk / Library / Libname / Function Blocks / VisuFbMaterialSwitch / ISelectable / SelectElement / svnobj  Maximize  Restore  History

Download this file

17 lines (16 with data), 7.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
SelectElement := VISU_SELECTION_NONE;
__QUERYINTERFACE(THIS^, thisAsVisualElem);
CASE dwSelectionType OF
	VISU_SELECTION_AT:
		IF pPosition^[iPositionIndex] = iElemId THEN
			bChangeSelection := TRUE;
		END_IF
	VISU_SELECTION_ELEMENT:
		IF iVisualElement = thisAsVisualElem THEN
	ELSE
IF bChangeSelection AND_THEN NOT EffectiveState.bInputDeactivated AND_THEN NOT EffectiveState.bInvisible THEN 
	pNewSelectionData^.SelectedElement := THIS^;
(* The selectable element sets the new selection TO the next SUB element OR itself in the pNewSelectionData.
In the case of VISU_SELECTION_AT the input variable pPosition should be considered.
	pCurrentSelectionData	: POINTER TO VisuElemBase.Visu_StructSelectionData;
	(* The new selection data*)