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

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

Created in NX6.0.0. More...

List of all members.

Public Types

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

Public Member Functions

void AddMenuAction (const NXString &name, const NXOpen::MenuBar::MenuBarManager::ActionCallback &actionCallback)
 Adds the action callback.
void ApplicationSwitchRequest (const NXString &applicationName)
 Registers a request to switch to specified application and open the corresponding user environment.
NXOpen::MenuBar::MenuButtonGetButtonFromName (const NXString &name)
 Finds the MenuButton associated with the given name.
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.
tag_t Tag () const
 Returns the tag of this object.

Detailed Description

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

Created in NX6.0.0.



Member Typedef Documentation

Prototype for the action callbacks
Created in NX6.0.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

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.
NOTE: The full Unicode character set is not supported for this parameter.
actionCallbackThe method to execute for this action

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

Parameters:
applicationNameButton name of requested application
NOTE: The full Unicode character set is not supported for this parameter.

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.
NOTE: The full Unicode character set is not supported for this parameter.
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.
NOTE: The full Unicode character set is not supported for this parameter.
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 the tag of this object.


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