NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::MenuBar::MenuBarManager Class Reference

Interface for the MenuBarManager object
To obtain an instance of this class, refer to NXOpen::UI

Created in NX6.0.0. More...

Public Types

typedef NXOpen::Callback1
< NXOpen::MenuBar::MenuBarManager::CallbackStatus,
NXOpen::MenuBar::MenuButtonEvent * > 
ActionCallback
 Prototype for the action callbacks
Created in NX6.0.0. More...
 
enum  CallbackStatus {
  CallbackStatusContinue, CallbackStatusCancel, CallbackStatusOverrideStandard, CallbackStatusWarning,
  CallbackStatusError
}
 Return values for action callbacks. More...
 
typedef NXOpen::Callback2< int,
NXOpen::MenuBar::ContextMenu
*, NXOpen::MenuBar::ContextMenuProperties * > 
ConfigureContextMenu
 Prototype for the callback used to configure a context menu. More...
 
typedef NXOpen::Callback0< int > EnterMenuApplication
 Prototype for callback called whenever the application is entered
Created in NX6.0.0. More...
 
typedef NXOpen::Callback0< int > ExitMenuApplication
 Prototype for callback called whenever the application is exited
Created in NX6.0.0. More...
 
typedef NXOpen::Callback0< int > InitializeMenuApplication
 Prototype for application initialization callback
Created in NX6.0.0. More...
 

Public Member Functions

void AddMenuAction (const NXString &name, const NXOpen::MenuBar::MenuBarManager::ActionCallback &actionCallback)
 Adds the action callback. More...
 
void AddMenuAction (const char *name, const NXOpen::MenuBar::MenuBarManager::ActionCallback &actionCallback)
 Adds the action callback. More...
 
void ApplicationSwitchRequest (const NXString &applicationName)
 Registers a request to switch to specified application and open the corresponding user environment. More...
 
void ApplicationSwitchRequest (const char *applicationName)
 Registers a request to switch to specified application and open the corresponding user environment. More...
 
NXOpen::MenuBar::MenuButtonGetButtonFromName (const NXString &name)
 Finds the MenuButton associated with the given name. More...
 
NXOpen::MenuBar::MenuButtonGetButtonFromName (const char *name)
 Finds the MenuButton associated with the given name. More...
 
int RegisterApplication (const NXString &name, const NXOpen::MenuBar::MenuBarManager::InitializeMenuApplication &initializeCallback, const NXOpen::MenuBar::MenuBarManager::EnterMenuApplication &enterCallback, const NXOpen::MenuBar::MenuBarManager::ExitMenuApplication &exitCallback, bool supportsDrawings, bool supportsDesignInContext, bool supportsUndo)
 Registers the application. More...
 
int RegisterApplication (const char *name, const NXOpen::MenuBar::MenuBarManager::InitializeMenuApplication &initializeCallback, const NXOpen::MenuBar::MenuBarManager::EnterMenuApplication &enterCallback, const NXOpen::MenuBar::MenuBarManager::ExitMenuApplication &exitCallback, bool supportsDrawings, bool supportsDesignInContext, bool supportsUndo)
 Registers the application. More...
 
int RegisterConfigureContextMenuCallback (const NXString &name, const NXString &description, const NXOpen::MenuBar::MenuBarManager::ConfigureContextMenu &configurePopupMenu)
 Registers a callback that is called whenever a customizable context menu is about to be displayed. More...
 
int RegisterConfigureContextMenuCallback (const char *name, const char *description, const NXOpen::MenuBar::MenuBarManager::ConfigureContextMenu &configurePopupMenu)
 Registers a callback that is called whenever a customizable context menu is about to be displayed. More...
 
tag_t Tag () const
 Returns the tag of this object. More...
 
void UnregisterConfigureContextMenuCallback (int id)
 Unregisters a callback for customizing context menus. 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 Typedef Documentation

Prototype for the action callbacks
Created in NX6.0.0.



License requirements : None

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

Prototype for callback called whenever the application is entered
Created in NX6.0.0.



License requirements : None

Prototype for callback called whenever the application is exited
Created in NX6.0.0.



License requirements : None

Prototype for application initialization callback
Created in NX6.0.0.



License requirements : None

Member Enumeration Documentation

Return values for action callbacks.

Enumerator
CallbackStatusContinue 

Continue performing the menu item's actions.

CallbackStatusCancel 

User interaction requested inhibiting the menu item's actions.

CallbackStatusOverrideStandard 

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

CallbackStatusWarning 

Inhibit further actions because a warning condition was raised.

CallbackStatusError 

Inhibit further actions because a error condition was raised.

Member Function Documentation

void NXOpen::MenuBar::MenuBarManager::AddMenuAction ( const NXString name,
const 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
void NXOpen::MenuBar::MenuBarManager::AddMenuAction ( const char *  name,
const 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
void NXOpen::MenuBar::MenuBarManager::ApplicationSwitchRequest ( const NXString 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.


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


Created in NX8.0.0.

License requirements : None

Parameters
applicationNameButton name of requested application
void NXOpen::MenuBar::MenuBarManager::ApplicationSwitchRequest ( const char *  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.


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


Created in NX8.0.0.

License requirements : None

Parameters
applicationNameButton name of requested application
NXOpen::MenuBar::MenuButton* NXOpen::MenuBar::MenuBarManager::GetButtonFromName ( const NXString name)

Finds the MenuButton associated with the given name.

Returns
The button 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.
NXOpen::MenuBar::MenuButton* NXOpen::MenuBar::MenuBarManager::GetButtonFromName ( const char *  name)

Finds the MenuButton associated with the given name.

Returns
The button 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.
int NXOpen::MenuBar::MenuBarManager::RegisterApplication ( const NXString name,
const NXOpen::MenuBar::MenuBarManager::InitializeMenuApplication initializeCallback,
const NXOpen::MenuBar::MenuBarManager::EnterMenuApplication enterCallback,
const NXOpen::MenuBar::MenuBarManager::ExitMenuApplication exitCallback,
bool  supportsDrawings,
bool  supportsDesignInContext,
bool  supportsUndo 
)

Registers the application.

Returns
Unique identifier for the registered 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?
int NXOpen::MenuBar::MenuBarManager::RegisterApplication ( const char *  name,
const NXOpen::MenuBar::MenuBarManager::InitializeMenuApplication initializeCallback,
const NXOpen::MenuBar::MenuBarManager::EnterMenuApplication enterCallback,
const NXOpen::MenuBar::MenuBarManager::ExitMenuApplication exitCallback,
bool  supportsDrawings,
bool  supportsDesignInContext,
bool  supportsUndo 
)

Registers the application.

Returns
Unique identifier for the registered 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?
int NXOpen::MenuBar::MenuBarManager::RegisterConfigureContextMenuCallback ( const NXString name,
const NXString description,
const 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.

Returns
Identifier of registered callback
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
int NXOpen::MenuBar::MenuBarManager::RegisterConfigureContextMenuCallback ( const char *  name,
const char *  description,
const 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.

Returns
Identifier of registered callback
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
tag_t NXOpen::MenuBar::MenuBarManager::Tag ( ) const

Returns the tag of this object.

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

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