NXOpen C++ Reference Guide
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
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...
 
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...
 
NXOpen::MenuBar::ApplicationPropertiesNewApplicationProperties ()
 Constructs a new ApplicationProperties object. 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 RegisterApplication (const NXString &name, const NXOpen::MenuBar::MenuBarManager::InitializeMenuApplication &initializeCallback, const NXOpen::MenuBar::MenuBarManager::EnterMenuApplication &enterCallback, const NXOpen::MenuBar::MenuBarManager::ExitMenuApplication &exitCallback, NXOpen::MenuBar::ApplicationProperties *application)
 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, NXOpen::MenuBar::ApplicationProperties *application)
 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
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.
NXOpen::MenuBar::ApplicationProperties* NXOpen::MenuBar::MenuBarManager::NewApplicationProperties ( )

Constructs a new ApplicationProperties object.

Returns

Created in NX1847.0.0.

License requirements : None
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::RegisterApplication ( const NXString name,
const NXOpen::MenuBar::MenuBarManager::InitializeMenuApplication initializeCallback,
const NXOpen::MenuBar::MenuBarManager::EnterMenuApplication enterCallback,
const NXOpen::MenuBar::MenuBarManager::ExitMenuApplication exitCallback,
NXOpen::MenuBar::ApplicationProperties application 
)

Registers the application.

Returns
Unique identifier for the registered application
Created in NX1847.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
applicationThe application properties
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,
NXOpen::MenuBar::ApplicationProperties application 
)

Registers the application.

Returns
Unique identifier for the registered application
Created in NX1847.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
applicationThe application properties
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 2019 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.