KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > General > IMenuItem_KC
IMenuItem_KC Interface

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