NX Open C++ Reference Guide
|
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::MenuButton * | GetButtonFromName (const NXString &name) |
Finds the MenuButton associated with the given name. More... | |
NXOpen::MenuBar::MenuButton * | GetButtonFromName (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... | |
Interface for the MenuBarManager object
To obtain an instance of this class, refer to NXOpen::UI
Created in NX6.0.0.
typedef NXOpen::Callback1<NXOpen::MenuBar::MenuBarManager::CallbackStatus, NXOpen::MenuBar::MenuButtonEvent *> NXOpen::MenuBar::MenuBarManager::ActionCallback |
Prototype for the action callbacks
Created in NX6.0.0.
License requirements : None
typedef NXOpen::Callback2<int, NXOpen::MenuBar::ContextMenu *, NXOpen::MenuBar::ContextMenuProperties *> NXOpen::MenuBar::MenuBarManager::ConfigureContextMenu |
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
Return values for action callbacks.
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
name | The name of the action. This name must match the string used in the .men file. |
actionCallback | The 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
name | The name of the action. This name must match the string used in the .men file. |
actionCallback | The 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.
Created in NX8.0.0.
License requirements : None
applicationName | Button 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.
Created in NX8.0.0.
License requirements : None
applicationName | Button name of requested application |
NXOpen::MenuBar::MenuButton* NXOpen::MenuBar::MenuBarManager::GetButtonFromName | ( | const NXString & | name | ) |
Finds the MenuButton associated with the given name.
name | The 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.
name | The 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.
name | The name of the application. This name must match the string used in the .men file. |
initializeCallback | The method used to initialize the application |
enterCallback | The method called when entering the application |
exitCallback | The method called when exiting the application |
supportsDrawings | Does this application support drawings? |
supportsDesignInContext | Does this application support design in context? |
supportsUndo | Does 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.
name | The name of the application. This name must match the string used in the .men file. |
initializeCallback | The method used to initialize the application |
enterCallback | The method called when entering the application |
exitCallback | The method called when exiting the application |
supportsDrawings | Does this application support drawings? |
supportsDesignInContext | Does this application support design in context? |
supportsUndo | Does 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.
name | A short string identifying the callback |
description | A longer string describing the operation of the callback |
configurePopupMenu | Callback 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.
name | A short string identifying the callback |
description | A longer string describing the operation of the callback |
configurePopupMenu | Callback 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
id | Identifier for callback to unregister |