All Frameworks Class Hierarchy This Framework Indexes
DialogEngine Interface CATICmdSwitchAgent
System.IUnknown
|
+---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 CATCmdSwitchAgent. 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
-
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 = "....";
- xxxxx: First parameter of the
CmdDeclareResource macro or first and second parameters of the
CmdDeclareResourceFile macro
- iAgentResID : Second parameter of the
CATCmdSwitchAgent.CATCmdSwitchAgent
- iSwitchResID : First parameter of this method
- yyy
- In the CATRsc file:
- In the CATNls file:
- Title : When there is no icon
- ShortHelp: Text that appears, in balloons, in the toolbar when the mouse moves over the icon
- Help: Text that appears in the status bar
- LongHelp: Text that appears in balloon when you select the help icon
- Parameters:
-
- iSwitchResID
- Nls identificator of the switch.
- iNoActive
- Legal values:
FALSE :The first switch is the active switch.
TRUE :Any switch is activated, call the
SetActiveSwitch method
- oIdxSwitch
- Index of the created switch
- Returns:
- S_OK
o GetActiveSwitch
public virtual HRESULT GetActiveSwitch( | int& | oIndex) = 0 |
-
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 HRESULT LockSwitch( | int | iIndex) = 0 |
-
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 HRESULT SetActiveSwitch( | int | iIndex) = 0 |
-
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 HRESULT UnlockSwitch( | int | iIdx) = 0 |
-
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 HRESULT UnsetActiveSwitch( | )= 0 |
-
Deactivates the active switch.
This object is included in the file: CATICmdSwitchAgent.h
If needed, your Imakefile.mk should include the module: CATDialogEngine