NXOpen .NET Reference  12.0.0
Classes | Public Types | Public Member Functions | Properties | List of all members
NXOpen.MenuBar.MenuBarManager Class Reference

Interface for the MenuBarManager object More...

Inheritance diagram for NXOpen.MenuBar.MenuBarManager:

Classes

class  _MenuBarManagerActionCallbackAdapter
 
class  _MenuBarManagerConfigureContextMenuAdapter
 
class  _MenuBarManagerEnterMenuApplicationAdapter
 
class  _MenuBarManagerExitMenuApplicationAdapter
 
class  _MenuBarManagerInitializeMenuApplicationAdapter
 

Public Types

enum  CallbackStatus {
  Continue, Cancel, OverrideStandard, Warning,
  Error
}
 Return values for action callbacks More...
 

Public Member Functions

delegate
NXOpen.MenuBar.MenuBarManager.CallbackStatus 
ActionCallback (NXOpen.MenuBar.MenuButtonEvent buttonEvent)
 Prototype for the action callbacks More...
 
delegate int InitializeMenuApplication ()
 Prototype for application initialization callback More...
 
delegate int EnterMenuApplication ()
 Prototype for callback called whenever the application is entered More...
 
delegate int ExitMenuApplication ()
 Prototype for callback called whenever the application is exited More...
 
delegate int ConfigureContextMenu (NXOpen.MenuBar.ContextMenu menu, NXOpen.MenuBar.ContextMenuProperties props)
 Prototype for the callback used to configure a context menu. More...
 
unsafe void AddMenuAction (string name, NXOpen.MenuBar.MenuBarManager.ActionCallback actionCallback)
 Adds the action callback. More...
 
unsafe NXOpen.MenuBar.MenuButton GetButtonFromName (string name)
 Finds the MenuButton associated with the given name More...
 
unsafe int RegisterApplication (string name, NXOpen.MenuBar.MenuBarManager.InitializeMenuApplication initializeCallback, NXOpen.MenuBar.MenuBarManager.EnterMenuApplication enterCallback, NXOpen.MenuBar.MenuBarManager.ExitMenuApplication exitCallback, bool supportsDrawings, bool supportsDesignInContext, bool supportsUndo)
 Registers the application More...
 
unsafe void ApplicationSwitchRequest (string applicationName)
 Registers a request to switch to specified application and open the corresponding user environment. More...
 
unsafe int RegisterConfigureContextMenuCallback (string name, string description, NXOpen.MenuBar.MenuBarManager.ConfigureContextMenu configurePopupMenu)
 Registers a callback that is called whenever a customizable context menu is about to be displayed. More...
 
unsafe void UnregisterConfigureContextMenuCallback (int id)
 Unregisters a callback for customizing context menus. More...
 

Properties

Tag Tag [get]
 Returns the tag of this object. More...
 

Detailed Description

Interface for the MenuBarManager object

To obtain an instance of this class, refer to NXOpen.UI

Created in NX6.0.0

Member Enumeration Documentation

Return values for action callbacks

Enumerator
Continue 

Continue performing the menu item's actions.

Cancel 

User interaction requested inhibiting the menu item's actions.

OverrideStandard 

Inhibit further actions because a pre action took the place of the standard action for a standard NX menu item.

Warning 

Inhibit further actions because a warning condition was raised.

Error 

Inhibit further actions because a error condition was raised.

Member Function Documentation

delegate NXOpen.MenuBar.MenuBarManager.CallbackStatus NXOpen.MenuBar.MenuBarManager.ActionCallback ( NXOpen.MenuBar.MenuButtonEvent  buttonEvent)

Prototype for the action callbacks

Created in NX6.0.0

License requirements: None.

Parameters
buttonEventThe reason for executing the callback
unsafe void NXOpen.MenuBar.MenuBarManager.AddMenuAction ( string  name,
NXOpen.MenuBar.MenuBarManager.ActionCallback  actionCallback 
)

Adds the action callback.

Created in NX6.0.0

License requirements: None.

Parameters
nameThe name of the action. This name must match the string used in the .men file.
actionCallbackThe method to execute for this action
unsafe void NXOpen.MenuBar.MenuBarManager.ApplicationSwitchRequest ( string  applicationName)

Registers a request to switch to specified application and open the corresponding user environment.

When the running journal or program finishes, the system will attempt to switch into the target application. The current application does not change immediately. The argument is an application button name as specified and registered in the ug_main.men file. For example specify UG_APP_MODELING to try to enter the modeling application. Button names registered for custom application as described in "Adding Custom Applications to NX" chapter of the NX Open Programmer's Guide can also be used.

Created in NX8.0.0

Deprecated in NX11.0.0. Use NXOpen.Session.ApplicationSwitchImmediate instead.

License requirements: None.

Parameters
applicationNameButton name of requested application
delegate int NXOpen.MenuBar.MenuBarManager.ConfigureContextMenu ( NXOpen.MenuBar.ContextMenu  menu,
NXOpen.MenuBar.ContextMenuProperties  props 
)

Prototype for the callback used to configure a context menu.

Return 0 to indicate successful processing of the menu. Any other value will be treated as an error condition.

Created in NX8.5.0

License requirements: None.

Parameters
menuThe menu
propsThe properties of this menu
delegate int NXOpen.MenuBar.MenuBarManager.EnterMenuApplication ( )

Prototype for callback called whenever the application is entered

Created in NX6.0.0

License requirements: None.

delegate int NXOpen.MenuBar.MenuBarManager.ExitMenuApplication ( )

Prototype for callback called whenever the application is exited

Created in NX6.0.0

License requirements: None.

unsafe NXOpen.MenuBar.MenuButton NXOpen.MenuBar.MenuBarManager.GetButtonFromName ( string  name)

Finds the MenuButton associated with the given name

Created in NX6.0.0

License requirements: None.

Parameters
nameThe name of the button. This name must match the button name used in the .men file.
Returns
The button associated with the given name
delegate int NXOpen.MenuBar.MenuBarManager.InitializeMenuApplication ( )

Prototype for application initialization callback

Created in NX6.0.0

License requirements: None.

unsafe int NXOpen.MenuBar.MenuBarManager.RegisterApplication ( string  name,
NXOpen.MenuBar.MenuBarManager.InitializeMenuApplication  initializeCallback,
NXOpen.MenuBar.MenuBarManager.EnterMenuApplication  enterCallback,
NXOpen.MenuBar.MenuBarManager.ExitMenuApplication  exitCallback,
bool  supportsDrawings,
bool  supportsDesignInContext,
bool  supportsUndo 
)

Registers the application

Created in NX6.0.0

License requirements: None.

Parameters
nameThe name of the application. This name must match the string used in the .men file.
initializeCallbackThe method used to initialize the application
enterCallbackThe method called when entering the application
exitCallbackThe method called when exiting the application
supportsDrawingsDoes this application support drawings?
supportsDesignInContextDoes this application support design in context?
supportsUndoDoes this application support undo?
Returns
Unique identifier for the registered application
unsafe int NXOpen.MenuBar.MenuBarManager.RegisterConfigureContextMenuCallback ( string  name,
string  description,
NXOpen.MenuBar.MenuBarManager.ConfigureContextMenu  configurePopupMenu 
)

Registers a callback that is called whenever a customizable context menu is about to be displayed.

Each callback is registered with a short name and a longer description which is used to identify the callback for debugging purposes.

Created in NX8.5.0

License requirements: None.

Parameters
nameA short string identifying the callback
descriptionA longer string describing the operation of the callback
configurePopupMenuCallback to register
Returns
Identifier of registered callback
unsafe void NXOpen.MenuBar.MenuBarManager.UnregisterConfigureContextMenuCallback ( int  id)

Unregisters a callback for customizing context menus.

Created in NX8.5.0

License requirements: None.

Parameters
idIdentifier for callback to unregister

Property Documentation

Tag NXOpen.MenuBar.MenuBarManager.Tag
get

Returns the tag of this object.


The documentation for this class was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.