1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | {attribute 'VisualElement'} {attribute 'Name' := 'MaterialSwitch'} {attribute 'initfromstyle1' := 'm_TrackColor.ActiveColor.dwFrameColor|Color|M4-MA-SW-TRACK-ACTIVE-FRAME|16#896200ee'} {attribute 'initfromstyle3' := 'm_TrackColor.InactiveColor.dwFrameColor|Color|M4-MA-SW-TRACK-INACTIVE-FRAME|16#61000000'} {attribute 'initfromstyle5' := 'm_ThumbColor.ActiveColor.dwFrameColor|Color|M4-MA-SW-THUMB-ACTIVE-FRAME|16#FF6200ee'} {attribute 'initfromstyle7' := 'm_ThumbColor.InactiveColor.dwFrameColor|Color|M4-MA-SW-THUMB-INACTIVE-FRAME|16#33000000'} {attribute 'initfromstyle9' := 'm_ThumbColor.HoverActiveColor.dwFrameColor|Color|M4-MA-SW-THUMB-HOVER-ACTIVE-FRAME|16#1E6200ee'} {attribute 'initfromstyle11' := 'm_ThumbColor.HoverInactiveColor.dwFrameColor|Color|M4-MA-SW-THUMB-HOVER-INACTIVE-FRAME|16#1E000000'} FUNCTION_BLOCK VisuFbMaterialSwitch EXTENDS VisuFbRectangularElement IMPLEMENTS IVisualElement, ISelectable VAR_INPUT {attribute 'Animation'} {attribute 'UseOnlyVarAccess'} {attribute 'Category' := 'Simple|Standard'} {attribute 'DisplayTextId' := 'TL_ElementProperties.Variable'} {attribute 'DescriptionTextId' := 'TL_ElementProperties.Desc_VariableValue'} m_pValue : POINTER TO VisuFbAnalyzeBoolVar; {attribute 'Category' := 'Color|Standard'} {attribute 'DescriptionTextId' := 'TL_ElementProperties.Desc_TrackColor'} m_TrackColor : VisuStructTrackColor; {attribute 'DescriptionTextId' := 'TL_ElementProperties.Desc_ThumbColor'} m_ThumbColor : VisuStructThumbColor; {attribute 'Category' := 'Standard'} {attribute 'DescriptionTextId' := 'TL_ElementProperties.Desc_StateVariables'} m_pStateVariables : POINTER TO VisuFbAnalyzeStateVars; END_VAR VAR_OUTPUT EffectiveState : VisuStructElementState; VAR m_bToggleState : BOOL := FALSE; _currentPart : REAL; {attribute 'visucodeconversion_clientspecificdata'} |