DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


IMenuItem_KC Interface

GetText
SetText
IsEnabled
Enable
GetIndex
SetIndex
IsChecked
SetChecked
IsSeparator
SetSeparator
IsSubMenu
GetPrevLevel
Execute

The interface gives access to properties of individual items in a menu. IMenuItem_KC interface is retuned from methods of  IMenu_KC interface. It is recommended to reacquire IMenuItem_KC after modifications of structure of the menu (items removed or added).

The menu where an item belongs can be obtained via query for IMenu_KC from IMenuItem_KC.

A menu item can represent a submenu, This can be detected with IsSubMenu() method.

A menu item can belong to a submenu. In this case the parent item can be obtained with a GetPrevLevel() call. Query IMenu_KC from the returned interface to get the parent menu and possibly access siblings of this item

See also Light SampleMenu topic


HRESULT GetText(BSTR *text)

Parameters

text - [out, retval] Text of the item


HRESULT SetText(char* text)

Parameters

text - [in] Text of the item

Remarks:

Returns hash code, which is a piece of data which identifies the instance. Two objects are identical if and only if their hash codes coincide.


HRESULT IsEnabled(VARIANT_BOOL *enabled)

Parameters

enabled - [out, retval] The current Enabled status.


HRESULT Enable(VARIANT_BOOL enable)

Parameters

enabled - [in] New Enabled status


HRESULT GetIndex(int *index)

Parameters

index - [out, retval] - The returned 0-based index of the item in the parent menu


HRESULT SetIndex(int index)

TThe method is not implemented in this release.


HRESULT IsChecked(VARIANT_BOOL *checked)

Parameters

checked - [out, retval] - The current Checked status of the item. See SetChecked below


HRESULT SetChecked(VARIANT_BOOL checked)

Remarks:

Sets or removes check sign on the menu item


HRESULT IsSeparator(VARIANT_BOOL *separator)

Parameters

separator - [out, retval] - True if the item is a separator


HRESULT SetSeparator(VARIANT_BOOL separator)

Remarks:

Call this method to convert the item into a separator


HRESULT IsSubMenu(VARIANT_BOOL *submenu)

Remarks:

Returns true is this item is actually a submenu


HRESULT GetPrevLevel(IMenuItem_KC** parent)

Remarks:

When this item belongs to a submenu this method returns the submenu as an item of the previous (higher) level menu. Query IMenu_KC from the returned interface to get the parent menu and possibly access siblings of this item


HRESULT Execute()

Performs the action associated with the item programmatically