All Frameworks Class Hierarchy This Framework Previous Next Indexes
CATIAApplicationFrame Class CATExtIContextualMenu
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATExtIContextualMenu
Usage: you can derive this class.
public class CATExtIContextualMenu
Adapter class of the CATIContextualMenu interface.
Two ways to implement this interface:
- You want to customize a default menu which contains these commands: Cut, Copy, Paste,
PasteSpecial, Delete, Open Properties, Selection Sets, Define Selection Sets , Hide/Show and
some commands about the graph if your window contains one.
So in the constructor of your data extension you
retrieve the default contextual menu, thanks to GetContextualMenu, and you create several items, that you chain to it. It is not necessary to overwrite the
GetContextualMenu method.
Example of constructor:
MyDataExtentiobnClass::MyDataExtentionClass
{
CATCmdContainer * pMenu = NULL ;
CATExtIContextualMenu::GetContextualMenu(pMenu);
CATCmdStarter * pst1 = new CATCmdStarter ("xxx");
.....
pMenu->AddChild(pst1);
}
- You want a specific contextual menu.
So you write a data extension in overwriting
GetContextualMenu to return your own menu. Your extension creates a
CATCmdContainer (the menu) and manages completely its content and its destruction.
- See also:
- CATIContextualSubMenu, CATCmdAccess, CATCmdStarter
Constructor and Destructor Index
- o
CATExtIContextualMenu()
- Default constructor.
- o
~CATExtIContextualMenu()
-
Method Index
- o
GetContextualMenu(CATCmdContainer*&)
- Returns the contextual menu.
Constructor and Destructor
o CATExtIContextualMenu
public CATExtIContextualMenu( | ) |
-
Default constructor.
Note:Initializes the contextual menu with commands defined at the top of
this page.
o ~CATExtIContextualMenu
public ~CATExtIContextualMenu( | ) |
-
Methods
o GetContextualMenu
-
Returns the contextual menu.
Note:This method returns the contextual menu. Its content can change between
two calls.
This object is included in the file: CATExtIContextualMenu.h
If needed, your Imakefile.mk should include the module: CATIAApplicationFrame