DialogEngine Interface CATICmdSwitchAgent

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATICmdSwitchAgent

Interface to define an acquisition agent visualizable in a toolbar.
Role: Interface implemented by . This interface allows you to add switches to the agent.


Method Index


o AddSwitch(CATString&,CATBoolean,int&)
Adds a switch to a switch agent.
o GetActiveSwitch(int&)
Returns the index of the active switch.
o LockSwitch(int)
Locks a switch.
o SetActiveSwitch(int)
Activates a switch without triggering a transition.
o UnlockSwitch(int)
Unlocks a switch.
o UnsetActiveSwitch()
Deactivates the active switch.

Methods


o AddSwitch
public virtual AddSwitch( const iSwitchResID,
iNoActive,
oIdxSwitch)
Adds a switch to a switch agent.
Role: The first switch is the default active switch if iNoActive is FALSE.

In the .CATNls or .CATRsc files dedicated to your state command you can define Nls and icons resources:
 
      (xxxxx).iAgentResId.iSwitchResID.yyyy = "....";
 
Parameters:
iSwithResID
Nls identificator of the switch.
iNoActive
Legal values:
FALSE :The first switch is the active switch.
TRUE :Any switch is activated, call the
method
oIdxSwitch
Index of the created switch
Returns:
S_OK
o GetActiveSwitch
public virtual GetActiveSwitch( oIndex)
Returns the index of the active switch.
Parameters:
oIndex
The index of the active switch.
Legal values:zero the switch is inactiv, else the switch is activ.
Returns:
S_OK
There is an active switch
S_FALSE
No switch is active
o LockSwitch
public virtual LockSwitch( iIndex)
Locks a switch.
Parameters:
iIndex
The index of the switch is to lock, it cannot be more actived.
Returns:
S_OK
The index is valid and the corresponding switch is not yet locked
E_FAIL
The index is invalid or the corresponding switch is yet locked
o SetActiveSwitch
public virtual SetActiveSwitch( iIndex)
Activates a switch without triggering a transition.
Parameters:
iIndex
The index of the switch to activate.
Returns:
oResult
S_OK
The switch is successfully activated.
S_FALSE
The switch is locked.
E_FAIL
Cookie invalide.
o UnlockSwitch
public virtual UnlockSwitch( iIdx)
Unlocks a switch.
Parameters:
iIdx
Position of the switch to unlock.
Returns:
S_OK
iIdx is valid and locked
E_FAIL
iIdx is invalid or switch yet unlocked
o UnsetActiveSwitch
public virtual UnsetActiveSwitch()
Deactivates the active switch.

This object is included in the file: CATICmdSwitchAgent.h
If needed, your Imakefile.mk should include the module: CATDialogEngine

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.