User Interface


Functions

void TecUtilInterfaceSuspend (Boolean_t DoSuspend)
  Suspends or un-suspends updates to the interface only (not including the status line).
void TecUtilDialogAllowDoubleClickLaunch (Dialog_e Dialog, Boolean_t DoAllow)
  Enables or disables a dialog's ability to be launched via a context sensitive double click.
Boolean_t TecUtilDialogLaunch (Dialog_e DialogToLaunch)
  Launch a Tecplot interface dialog.
Boolean_t TecUtilDialogDrop (Dialog_e DialogToDrop)
  Drop a Tecplot interface dialog.
Boolean_t TecUtilInterfaceWinAddPreMsgFn (PreTranslateMessage_pf PreTranslateMessageProc)
  Add a PreTranslateMessage function to Tecplot's message loop so that modeless dialogs messages can be dispatched correctly.
Boolean_t TecUtilDialogGetFolderName (const char *Title, char **FolderName)
  Launch a dialog to prompt the user for a folder name.
Boolean_t TecUtilDialogGetFolderNameX (ArgList_pa ArgList)
  Launch a dialog to prompt the user for a folder name.
Boolean_t TecUtilDialogGetFileName (SelectFileOption_e DialogOption, char **FileName, const char *FileTypeName, const char *DefaultFileName, const char *DefaultFilter)
  Launch a dialog to prompt the user for a file name.
Boolean_t TecUtilDialogGetFileNames (SelectFileOption_e DialogOption, StringList_pa *FileNames, const char *FileTypeName, StringList_pa DefaultFileNames, const char *DefaultFilter)
  Launch a dialog to prompt the user for one or more file names.
Boolean_t TecUtilDialogGetFileNamesX (ArgList_pa ArgList)
  Launch a dialog to prompt the user for one or more file names.
void TecUtilSidebarAutoSensitivity (Boolean_t DoAuto)
 
void TecUtilSidebarSetSensitivity (MouseButtonMode_e MouseMode, Boolean_t IsSensitive)
 
void TecUtilToolbarActivate (Boolean_t Activate)
  Specifies whether to show the Tecplot toolbar or not.
void TecUtilMenuActivate (Boolean_t Activate)
  Specifies whether to show the Tecplot menu or not.
Boolean_t TecUtilMenuAddOption (const char *MenuPath, const char *MenuLabel, char Mnemonic, DynamicMenuCallback_pf MenuOptionCallback)
  Create a simple menu option in Tecplot's main menu.
Boolean_t TecUtilMenuAddSeparator (const char *MenuPath)
  Adds menu separator to the end of the specified parent menu.
void TecUtilMenuAddStatusLineHelp (Menu_pa MenuItem, const char *StatusLineHelp)
  Registers a character string to be displayed on the status line for a menu item.
Boolean_t TecUtilMenuSetSensitivity (const char *MenuPath, const char *MenuLabel, Boolean_t IsSensitive)
 
Menu_pa TecUtilMenuGetMain (void)
  Gets the menu handle for Tecplot's main menu.
Menu_pa TecUtilMenuGetStandard (StandardMenu_e StandardMenu)
  Gets the menu handle for a top-level standard Tecplot menu.
Menu_pa TecUtilMenuInsertSubMenu (Menu_pa ParentMenu, int InsertPos, const char *SubMenuLabel)
  Inserts a submenu into a menu.
Menu_pa TecUtilMenuInsertOption (Menu_pa ParentMenu, int InsertPos, const char *OptionLabel, MenuActivateCallback_pf ActivateCallback, ArbParam_t ActivateClientData)
  Inserts a menu option into a menu.
Menu_pa TecUtilMenuInsertToggle (Menu_pa ParentMenu, int InsertPos, const char *ToggleLabel, MenuActivateCallback_pf ActivateCallback, ArbParam_t ActivateClientData, MenuGetToggleStateCallback_pf GetToggleStateCallback, ArbParam_t GetToggleStateClientData)
  Inserts a menu toggle into a menu.
Menu_pa TecUtilMenuInsertSeparator (Menu_pa ParentMenu, int InsertPos)
  Inserts a separator into a menu.
void TecUtilMenuInsertStandard (Menu_pa ParentMenu, int InsertPos, StandardMenu_e StandardMenu)
  Inserts a standard Tecplot menu into another menu as a submenu.
void TecUtilMenuRegisterSensitivityCallback (Menu_pa MenuItem, MenuGetSensitivityCallback_pf GetSensitivityCallback, ArbParam_t GetSensitivityClientData)
  Registers a function that will determine the sensitivity of a menu item (i.e., whether the item is enabled for user input or grayed out).
void TecUtilMenuDelete (Menu_pa *MenuItemPtr)
  Deletes a menu item.
void TecUtilMenuClearAll (void)
  Remove all menus, submenus, and menu items from the Tecplot menu bar.
void TecUtilDialogErrMsg (const char *Message)
  Launch a dialog with an error message.
void TecUtilDialogLaunchPercentDone (const char *Label, Boolean_t ShowTheScale)
  Launch the Percent Done dialog.
void TecUtilDialogSetPercentDoneText (const char *Text)
  Update the text in the Percent Done dialog.
Boolean_t TecUtilDialogCheckPercentDone (int PercentDone)
  Set the current value of the Percent Done dialog and check to see if the user has clicked Cancel.
void TecUtilDialogDropPercentDone (void)
  Drop the Percent Done dialog.
char * TecUtilLastErrorMessage (void)
  Returns the last recorded error message by Tecplot.
void TecUtilLastErrorMessageClear (void)
  Clears the last error message queue such that immediately calling TecUtilLastErrorMessage() will return NULL.
Boolean_t TecUtilDialogMessageBox (const char *Message, MessageBoxType_e MessageBoxType)
  Display a message to the user and, if desired, prompt for yes or no input.
Boolean_t TecUtilDialogGetIndexRange (LgIndex_t MaxRangeValue, LgIndex_t *Min, LgIndex_t *Max, LgIndex_t *Skip)
  Launch a dialog that prompts the user for the minimum, maximum, and skip values of a range.
Boolean_t TecUtilDialogGetVariables (const char *Instructions, const char *TextField1Label, const char *TextField2Label, const char *TextField3Label, EntIndex_t *Var1, EntIndex_t *Var2, EntIndex_t *Var3)
  Launch a dialog that prompts the user for one, two, or three variables.
Boolean_t TecUtilDialogGetColor (Boolean_t AllowMultiColor, ColorIndex_t *Color)
  Launch a dialog that prompts the user for a color or for a multi-color setting.
Boolean_t TecUtilDialogGetSimpleText (const char *Instructions, const char *DefaultText, char **Text)
  Launch a dialog to prompt the user to input into a simple text field.
void TecUtilInterfaceGetDotsPerInch (double *VDotsPerInch, double *HDotsPerInch)
 
void TecUtilDialogSetLaunchPosition (Widget W, int DialogWidth, int DialogHeight, AnchorAlignment_e DialogAnchor, LgIndex_t IOffset, LgIndex_t JOffset)
 


Function Documentation

void TecUtilDialogAllowDoubleClickLaunch ( Dialog_e  Dialog,
Boolean_t  DoAllow 
)

Enables or disables a dialog's ability to be launched via a context sensitive double click.

Note:
Not all dialogs can be launched via a double click. This function is primarily used for disabling and re-enabling dialogs that can be launched via a double click.
Since:
11.0-3-006
Parameters:
Dialog Dialog to enable or disable double click launching.
DoAllow If the dialog can be launched via a double click this control whether this ability is enabled or disabled.
See also:
TecUtilDialogLaunch, TecUtilDialogDrop
Python Syntax:
  Results = TecUtil.DialogAllowDoubleClickLaunch(Dialog, DoAllow)

  Input:
                  Dialog               Dialog_e  (defined in TecVals.py)
                  DoAllow              boolean
  Output:
    Results[0]    ReturnVal            NONE

Boolean_t TecUtilDialogCheckPercentDone ( int  PercentDone  ) 

Set the current value of the Percent Done dialog and check to see if the user has clicked Cancel.

Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
PercentDone Value to which Percent Done dialog is to be set. If the TecUtilDialogLaunchPercentDone() call had ShowTheScale set to FALSE, then this parameter is ignored.
Returns:
Returns TRUE if the user has not clicked Cancel (that is, it is OK to continue processing). Returns FALSE if Cancel has been clicked.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogCheckPercentDone(PercentDone)
    INTEGER*4 PercentDone

Python Syntax:

  Results = TecUtil.DialogCheckPercentDone(PercentDone)

  Input:
                  PercentDone          int
  Output:
    Results[0]    ReturnVal            boolean

Launch, check, and destroy Percent Done dialog.

   TecUtilDialogLaunchPercentDone("Calculate",TRUE);
   // do some processing
   if (!TecUtilDialogCheckPercentDone(35))
     {
       // user pressed cancel button
     }
   else
     {
       // do some more processing
     }
   // finished processing
   TecUtilDialogDropPercentDone();

See also:
TecUtilMacroIsBatchModeActive()

Boolean_t TecUtilDialogDrop ( Dialog_e  DialogToDrop  ) 

Drop a Tecplot interface dialog.

Parameters:
DialogToDrop To remove Dialog from the screen. See Dialog in GLOBAL.h (or FGLUE.INC) for possible values.
Returns:
TRUE if successful, FALSE if not.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogDrop(DialogToDrop)
    INTEGER*4 DialogToDrop

Python Syntax:

  Results = TecUtil.DialogDrop(DialogToDrop)

  Input:
                  DialogToDrop         Dialog_e  (defined in TecVals.py)
  Output:
    Results[0]    ReturnVal            boolean

Drop the Color Map dialog:

See also:
TecUtilDialogLaunch

void TecUtilDialogDropPercentDone ( void   ) 

Drop the Percent Done dialog.

Fortran Syntax:

Python Syntax:

  Results = TecUtil.DialogDropPercentDone()

  Output:
    Results[0]    ReturnVal            NONE

void TecUtilDialogErrMsg ( const char *  Message  ) 

Launch a dialog with an error message.

This function is Thread Safe.

Parameters:
Message String containing the error message.
Precondition:
Message String must have a valid address and non-zero length.
Fortran Syntax:
    SUBROUTINE TecUtilDialogErrMsg(Message)
    CHARACTER*(*) Message

Python Syntax:

  Results = TecUtil.DialogErrMsg(Message)

  Input:
                  Message              string
  Output:
    Results[0]    ReturnVal            NONE

Display an error message:

   TecUtilDialogErrMsg("File not found.");

Boolean_t TecUtilDialogGetColor ( Boolean_t  AllowMultiColor,
ColorIndex_t Color 
)

Launch a dialog that prompts the user for a color or for a multi-color setting.

Since:
10.0-3-129
Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
AllowMultiColor Set to TRUE if you wish to allow the user to select RGB or multi-color.
Color The returned color value. If AllowMultiColor is FALSE then this is in the range between Black_C and Custom56_C (See GLOBAL.h). If AllowMultiColor is TRUE then the following constants may also be returned:
     MultiColor_C             The user selected the first "MultiColor" option
                              which implies they want the object colored by
                              the contour variable used by contour group 1.

     MultiColor2_C            The user selected the "C2" button
                              which implies they want the object colored by
                              the contour variable used by contour group 2.

     MultiColor3_C            The user selected the "C3" button
                              which implies they want the object colored by
                              the contour variable used by contour group 3.

     MultiColor4_C            The user selected the "C4" button
                              which implies they want the object colored by
                              the contour variable used by contour group 4.

     MultiColor5_C            The user selected the "C5" button
                              which implies they want the object colored by
                              the contour variable used by contour group 5.

     MultiColor6_C            The user selected the "C6" button
                              which implies they want the object colored by
                              the contour variable used by contour group 6.

     MultiColor7_C            The user selected the "C7" button
                              which implies they want the object colored by
                              the contour variable used by contour group 7.

     MultiColor8_C            The user selected the "C8" button
                              which implies they want the object colored by
                              the contour variable used by contour group 8.

     RGBColor_C               The user selected the "RGB" button
                              which implies they want the object colored by
                              RGB.
   

Returns:
TRUE if successful, FALSE if the user pressed the "Cancel" button in the dialog.
Precondition:
VALID_REF(BColor) Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetColor(
   &                   AllowMultiColor,
   &                   Color)
    INTEGER*4       AllowMultiColor
    INTEGER*4       Color

Python Syntax:

  Results = TecUtil.DialogGetColor(AllowMultiColor)

  Input:
                  AllowMultiColor      boolean
  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    Color                TecVals color constant

Prompt the user for a basic color (no multi-color options):

   ColorIndex_t Color;
   if (TecUtilDialogGetColor(FALSE, // AllowMultiColor
                             &Color))
     {
       // Do something with Color.
     }

See also:
TecUtilMacroIsBatchModeActive()

Boolean_t TecUtilDialogGetFileName ( SelectFileOption_e  DialogOption,
char **  FileName,
const char *  FileTypeName,
const char *  DefaultFileName,
const char *  DefaultFilter 
)

Launch a dialog to prompt the user for a file name.

Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
DialogOption Choose the mode of operation for the dialog. The possible values are: SelectFileOption_ReadSingleFile (allows you to read a file). SelectFileOption_WriteFile (allows you to bring up single file selection dialog to choose a file to write to).
FileName Returns an allocated string containing the name of the file selected or NULL if one was not selected. If TecUtilDialogGetFileName() returns TRUE, you must call TecUtilStringDealloc() when it is no longer needed.
FileTypeName A string describing the file type. Example: "Text file." Must not be NULL.
DefaultFileName The initial file name. May be NULL. A full or partial path may be supplied to indicate the folder to be initially displayed in the browse dialog. If a partial path is used, it is relative to the folder most recently used in a Tecplot file or folder browser dialog.
DefaultFilter The default filter (that is, extension). Example: "*.txt." May be NULL
Returns:
TRUE if a file name was successfully entered, FALSE otherwise. FALSE usually indicates that Cancel on the dialog was clicked.
Precondition:
FileName Pointer must be a valid address and non-NULL.

FileTypeName Pointer must be a valid address and non-NULL.

DefaultFileName Pointer must be a valid address or NULL.

DefaultFilter Pointer must be a valid address or NULL.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetFileName(
   &                   DialogOption,
   &                   FileName,
   &                   FileNameLength,
   &                   FileTypeName,
   &                   DefaultFileName,
   &                   DefaultFilter)
    INTEGER*4       DialogOption
    CHARACTER*(*)   FileName
    INTEGER*4       FileNameLength
    CHARACTER*(*)   FileTypeName
    CHARACTER*(*)   DefaultFileName
    CHARACTER*(*)   DefaultFilter

Python Syntax:

  Results = TecUtil.DialogGetFileName(DialogOption, FileTypeName, DefaultFileName, DefaultFilter)

  Input:
                  DialogOption         SelectFileOption_e  (defined in TecVals.py)
                  FileTypeName         string
                  DefaultFileName      string
                  DefaultFilter        string
  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    FileName             string

Prompt the user for a single file to read:

   char *FileName;
   if (TecUtilDialogGetFileName(SelectFileOption_ReadSingleFile,
                                &FileName, "Text Files", "myfile.txt", "*.txt"))
     {
         .
         .
         .
         do something with FileName
         .
         .
         .
       // free Tecplot's copy
       TecUtilStringDealloc(&FileName);
     }

See also:
TecUtilMacroIsBatchModeActive()

Boolean_t TecUtilDialogGetFileNames ( SelectFileOption_e  DialogOption,
StringList_pa FileNames,
const char *  FileTypeName,
StringList_pa  DefaultFileNames,
const char *  DefaultFilter 
)

Launch a dialog to prompt the user for one or more file names.

It is assumed that the files selected will be opened only for reading. Use TecUtilGetFileName() to open a file for writing.

Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
DialogOption Choose the mode of operation for the dialog. The possible values are: SelectFileOption_ReadMultiFile (brings up the multi-file section dialog), SelectFileOption_AllowMultiFileRead (brings up single file section to start with but includes a button the user can press to get a multi-file selection dialog)
FileNames Returns an allocated string list containing the names of the files selected or NULL if none were selected. If TecUtilDialogGetFileNames() returns TRUE, you must call TecUtilStringDealloc() when it is no longer needed.
FileTypeName A string describing the file type. Example: "Text file." Must not be NULL.
DefaultFileNames A string list containing the default file name(s). May be NULL. Full or partial paths may be supplied to indicate the folder to be initially displayed in the browse dialog. All the files should be in the same folder. If a partial path is used, it is relative to the folder most recently used in a Tecplot file or folder browser dialog.
DefaultFilter The default filter (that is, extension). Example: "*.txt." May be NULL
Returns:
TRUE if a file name was successfully entered, FALSE otherwise. FALSE usually indicates that Cancel on the dialog was clicked.
Precondition:
FileTypeName Pointer must be a valid address and non-NULL.

DefaultFilter Pointer must be a valid address or NULL.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetFileNames(
   &                   DialogOption,
   &                   FileNamesPtr,
   &                   FileTypeName,
   &                   DefaultFileNamesPtr,
   &                   DefaultFilter)
    INTEGER*4       DialogOption
    POINTER         (FileNamesPtr, FileNames)
    CHARACTER*(*)   FileTypeName
    POINTER         (DefaultFileNamesPtr, DefaultFileNames)
    CHARACTER*(*)   DefaultFilter

Python Syntax:

  Results = TecUtil.DialogGetFileNames(DialogOption, FileTypeName, DefaultFileNames, DefaultFilter)

  Input:
                  DialogOption         SelectFileOption_e  (defined in TecVals.py)
                  FileTypeName         string
                  DefaultFileNames     sequence of strings
                  DefaultFilter        string
  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    FileNames            sequence of strings

Prompt the user for one or more files to read:

   StringList_pa FileNames;
   StringList_pa DefaultFileNames = TecUtilStringListAlloc();

   TecUtilStringListAppendString(DefaultFileNames,"myfile.txt");

   if (TecUtilDialogGetFileNames(SelectFileOption_ReadMultiFile,
                                 &FileNames,
                                 "Text Files",
                                 DefaultFileNames,
                                 "*.txt"))
     {
       // get the first file name
       char *FName = TecUtilStringListGetString(FileNames,1);

       ... do something with FName...

       TecUtilStringDealloc(&FName); // and free Tecplot's copy

       .
       .
       .
       do some more things with FileNames
       .
       .
       .
       TecUtilStringListDealloc(FileNames);// done with file name list
     }

   TecUtilStringListDealloc(&DefaultFileNames); // done with file name list

See also:
TecUtilMacroIsBatchModeActive()

Boolean_t TecUtilDialogGetFileNamesX ( ArgList_pa  ArgList  ) 

Launch a dialog to prompt the user for one or more file names.

It is assumed that the files selected will be opened only for reading. Use TecUtilGetFileName() to open a file for writing.

Parameters:
ArgList Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions.

Arglist Values

SV_FILESELECTDIALOGTYPE
Type: SelectFileOption_e
Arg Function: TecUtilArgListAppendInt()
Required: Yes
Notes: Choose the mode of operation for the dialog. The possible values are: SelectFileOption_ReadSingleFile (allows you to read a file). SelectFileOption_ReadMultiFile (brings up the multi-file section dialog), SelectFileOption_AllowMultiFileRead (brings up single file section to start with but includes a button the user can press to get a multi-file selection dialog)

SV_FILESELECTDIALOGDEFAULTFILENAMES
Type: StringList_pa
Arg Function: TecUtilArgListAppendStringList()
Default: NULL
Required: No
Notes: Default file names to display in the dialog. All files should be in the same folder. Full or partial paths may be supplied to indicate the folder to be initially displayed. If a partial path is used, it is relative to the folder most recently used in a Tecplot file or folder browser dialog.

SV_FILESELECTDIALOGFILTEREXTENSIONS
Type: StringList_pa
Arg Function: TecUtilArgListAppendStringList()
Default: NULL
Required: No
Notes: StringList contianing filter extensions.

SV_FILESELECTDIALOGFILTERTITLES
Type: StringList_pa
Arg Function: TecUtilArgListAppendStringList()
Default: NULL
Required: No
Notes: StringList contianing type of files corresponding to filter extensions in SV_FILESELECTDIALOGFILTEREXTENSIONS argument.

SV_FILESELECTDIALOGDEFAULTFILTERINDEX
Type: int
Arg Function: TecUtilArgListAppendInt()
Default: 1
Required: No
Notes: Index of the filter to be selected by default.

SV_FILESELECTDIALOGRETURNFILENAMES
Type: StringList_pa *
Arg Function: TecUtilArgListAppendArbParamPtr()
Required: Yes
Notes: Pointer to the StringList_pa that will be populated with selected file names. If TecUtilDialogGetFileNamesX() returns TRUE, you must call TecUtilStringListDealloc() after using this parameter. If the return value is FALSE, FileNames is not changed and should not be deallocated.

SV_FILESELECTDIALOGRETURNFILTERINDEX
Type: int *
Arg Function: TecUtilArgListAppendArbParamPtr()
Default: NULL
Required: No
Notes: Returned index of the filer selected by the user.


Precondition:
ArgList Argument list must be valid or NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetFileNamesX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

    This function is not supported in Python.

 StringList_pa  ReturnFiles       = NULL;
 int            ReturnFilterIndex = 0;
 bool           Result            = TRUE;
 ArgList_pa     argList           = TecUtilArgListAlloc();

 TecUtilArgListAppendInt(argList, SV_FILESELECTDIALOGTYPE, SelectFileOption);
 TecUtilArgListAppendStringList(argList, SV_FILESELECTDIALOGDEFAULTFILENAMES, DefaultFileNames);
 TecUtilArgListAppendStringList(argList, SV_FILESELECTDIALOGFILTEREXTENSIONS, FilterExtensions);
 TecUtilArgListAppendStringList(argList, SV_FILESELECTDIALOGFILTERTITLES, FilterTitles);
 TecUtilArgListAppendInt(argList, SV_FILESELECTDIALOGDEFAULTFILTERINDEX, DefaultFilterIndex);
 TecUtilArgListAppendArbParamPtr(argList, SV_FILESELECTDIALOGRETURNFILENAMES, (ArbParam_t *)ReturnFiles);
 TecUtilArgListAppendArbParamPtr(argList, SV_FILESELECTDIALOGRETURNFILTERINDEX, (ArbParam_t *)ReturnFilterIndex);
 Result = TecUtilDialogGetFileNamesX(argList);

 TecUtilArgListDealloc(&argList);
 if (Result)
  TecUtilStringListDealloc(&ReturnFiles);

Since:
11.0-0-275

Boolean_t TecUtilDialogGetFolderName ( const char *  Title,
char **  FolderName 
)

Launch a dialog to prompt the user for a folder name.

Parameters:
Title Zero-terminated string that is displayed above the tree view control in the dialog box. This string can be used to specify instructions to the user.
FolderName Returns an allocated string containing the name of the folder selected or NULL if one was not selected. If TecUtilDialogGetFolderName() returns TRUE, you must call TecUtilStringDealloc() when it is no longer needed.
Returns:
TRUE if a folder name was successfully entered. FALSE if there was an error or if the user cancelled.
Precondition:
Title Pointer must be a valid address or NULL.

FolderName Pointer must be a valid address and non-NULL.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetFolderName(
   &                   Title,
   &                   FolderName)
    CHARACTER*(*)   Title
    CHARACTER*(*)   FileName

Python Syntax:

  Results = TecUtil.DialogGetFolderName(Title)

  Input:
                  Title                string
  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    FolderName           string

Prompt the user for a single folder to read:

   char *FolderName;
   if (TecUtilDialogGetFolderName("Please select a folder",
                                  &FolderName))
     {
         .
         .
         .
         do something with FolderName
         .
         .
         .
       // free Tecplot's copy
       TecUtilStringDealloc(&FolderName);
     }

Boolean_t TecUtilDialogGetFolderNameX ( ArgList_pa  ArgList  ) 

Launch a dialog to prompt the user for a folder name.

Parameters:
ArgList Set of Arglist entries. This is built using calls to TecUtilArgListAppendXXXX functions.

Arglist Values

SV_FILESELECTDIALOGRETURNFILENAMES
Type: char **
Arg Function: TecUtilArgListAppendArbParamPtr()
Required: Yes
Notes: Returns an allocated string containing the name of the folder selected or NULL if one was not selected. If TecUtilDialogGetFolderNameX() returns TRUE, you must call TecUtilStringDealloc() when it is no longer needed.

SV_DIALOGTITLE
Type: char *
Arg Function: TecUtilArgListAppendString()
Required: Yes
Notes: Zero-terminated string that is displayed above the tree view control in the dialog box. This string can be used to specify instructions to the user.

SV_DEFAULTFNAME
Type: char *
Arg Function: TecUtilArgListAppendString()
Default: NULL
Required: No
Notes: If non-NULL it must be a zero-terminated string that specifies the default folder to select in the dialog. A full or partial path may be supplied. If a partial path is used, it is relative to the folder most recently used in a Tecplot file or folder browser dialog.


Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetFolderNameX(ArgListPtr)
    POINTER (ArgListPtr, ArgList)

Python Syntax:

  Results = TecUtil.DialogGetFolderNameX(ArgList)

  Input:
                  ArgList              dictionary
  Output:
    Results[0]    ReturnVal            boolean

 char*      FolderName        = NULL;
 Boolean_t  FolderSelected    = FALSE;
 ArgList_pa ArgList           = TecUtilArgListAlloc();

 TecUtilArgListAppendArbParamPtr(ArgList, SV_FILESELECTDIALOGRETURNFILENAMES, (ArbParam_t*)&FolderName);
 TecUtilArgListAppendString     (ArgList, SV_DIALOGTITLE,   "Select a folder");
 TecUtilArgListAppendString     (ArgList, SV_DEFAULTFNAME,  "/usr/data/");
 FolderSelected = TecUtilDialogGetFileNamesX(ArgList);

 if (FolderSelected)
   {
       .
       .
       .
       do something with FolderName
       .
       .
       .
     // free the string Tecplot allocated
     TecUtilStringDealloc(&FolderName);
   }

 TecUtilArgListDealloc(&ArgList);

Since:
11.2-0-430

Boolean_t TecUtilDialogGetIndexRange ( LgIndex_t  MaxRangeValue,
LgIndex_t Min,
LgIndex_t Max,
LgIndex_t Skip 
)

Launch a dialog that prompts the user for the minimum, maximum, and skip values of a range.

Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
MaxRangeValue Maximum value for the range. Currently, this value is displayed at the top of the Enter Index Range dialog and also used to interpret zero and negative values for the other parameters, but it does not limit what values the user can enter. You must check the values of the other parameters upon return and check their validity in your code. A value of zero for MaxRangeValue will turn off the maximum value processing
Min The value passed in is the default value displayed in the minimum text field. Upon return, this value holds the user-specified minimum value. If MaxRangeValue is not zero, a Min of zero is interpreted as MaxRangeValue, and negative values of Min are interpreted as subtracted from MaxRangeValue
Max The value passed in is the default value displayed in the maximum text field. Upon return, this value holds the user-specified maximum value. Zero and negative values are interpreted as with Min above
Skip The value passed in is the default value displayed in the skip text field. Upon return, this value holds the user-specified skip value. Zero and negative values are interpreted as with Min above
Returns:
TRUE if successful, FALSE if not. FALSE usually indicates that Cancel on the dialog was clicked.
Precondition:
Min Pointer must be a valid address and non-NULL.

Max Pointer must be a valid address and non-NULL.

Skip Pointer must be a valid address and non-NULL.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetIndexRange(
   &                   MaxRangeValue,
   &                   Min,
   &                   Max,
   &                   Skip)
    INTEGER*4       MaxRangeValue
    INTEGER*4       Min
    INTEGER*4       Max
    INTEGER*4       Skip

Python Syntax:

  Results = TecUtil.DialogGetIndexRange(MaxRangeValue)

  Input:
                  MaxRangeValue        int
  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    Min                  int
    Results[2]    Max                  int
    Results[3]    Skip                 int

Launch a dialog that prompts the user for the minimum, maximum, and skip values of a range:

   LgIndex_t Min = 0, Max = 100, Skip = 1;
   TecUtilDialogGetIndexRange(100,&Min,&Max,&Skip);
   // values returned in Min,Max, and skip

See also:
TecUtilMacroIsBatchModeActive()

Boolean_t TecUtilDialogGetSimpleText ( const char *  Instructions,
const char *  DefaultText,
char **  Text 
)

Launch a dialog to prompt the user to input into a simple text field.

Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
Instructions String containing the instructions for the user. Tecplot will wrap the instructions for you. However, if you include a newline in the string it will force a new line. Under Windows you are limited to three lines of text
DefaultText Set DefaultText to NULL if you want the default text to be blank, otherwise pass a default string. If you pass DefaultText you must deallocate Text no matter what the return value is.
Text The resulting text string is placed here.
Returns:
TRUE if the user enters text and clicks OK.
Precondition:
Instructions Pointer must be a valid address and non-NULL.

DefaultText Pointer must be a valid address or NULL.

Text Pointer must be a valid address and non-NULL.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetSimpleText(
   &                   Instructions,
   &                   DefaultText,
   &                   Text,
   &                   TextLength)
    CHARACTER*(*)   Instructions
    CHARACTER*(*)   DefaultText
    CHARACTER*(*)   Text
    INTEGER*4       TextLength

Python Syntax:

  Results = TecUtil.DialogGetSimpleText(Instructions, DefaultText)

  Input:
                  Instructions         string
                  DefaultText          string
  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    Text                 string

Prompt the user for text:

   char *Text = NULL;

   if (TecUtilDialogGetSimpleText("Enter your name","Fred",&Text))
     {
       // Do somthing with Text
     }
   if ( Text )
     TecUtilStringDealloc(&Text);

See also:
TecUtilMacroIsBatchModeActive()

Boolean_t TecUtilDialogGetVariables ( const char *  Instructions,
const char *  TextField1Label,
const char *  TextField2Label,
const char *  TextField3Label,
EntIndex_t Var1,
EntIndex_t Var2,
EntIndex_t Var3 
)

Launch a dialog that prompts the user for one, two, or three variables.

Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
Instructions Character string displayed at the top of the dialog. Must not be NULL
TextField1Label Character string displayed to the left of the first variable's selection menu. May be NULL
TextField2Label Character string displayed to the left of the second variable's selection menu. Only used if Var2 is not NULL. May be NULL
TextField3Label Character string displayed to the left of the third variable's selection menu. Only used if Var3 is not NULL. May be NULL.
Var1 Value passed in is the default value displayed in the first variable's selection menu. Must not be NULL, and must be a valid variable number. Upon return, this value holds the user-selected first variable value
Var2 Value passed in is the default value displayed in the second variable's selection menu. Use NULL to prompt for only one variable. May be NULL, but if not NULL, must be a valid variable number. Upon return, this value holds the user-selected second variable value
Var3 Value passed in is the default value displayed in the third variable's selection menu. Use NULL to prompt for only one or two variables. May be NULL, but if not NULL, must be a valid variable number. Upon return, this value holds the user-selected third variable value.
Returns:
TRUE if successful, FALSE if not. FALSE usually indicates that Cancel on the dialog was clicked.
Precondition:
Instructions Pointer must be a valid address and non-NULL.

TextField1Label Pointer must be a valid address or NULL.

TextField2Label Pointer must be a valid address or NULL.

TextField3Label Pointer must be a valid address or NULL.

Var1 Pointer must be a valid address and non-NULL.

Var2 Pointer must be a valid address or NULL.

Var3 Pointer must be a valid address or NULL.

Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogGetVariables(
   &                   Instructions,
   &                   TextField1Label,
   &                   TextField2Label,
   &                   TextField3Label,
   &                   Var1,
   &                   Var2,
   &                   Var3)
    CHARACTER*(*)   Instructions
    CHARACTER*(*)   TextField1Label
    CHARACTER*(*)   TextField2Label
    CHARACTER*(*)   TextField3Label
    INTEGER*4       Var1
    INTEGER*4       Var2
    INTEGER*4       Var3

Python Syntax:

    This function is not supported in Python.

Prompt the user for two variables:

   EntIndex_t Var1 = 1,Var2 = 1;
   if (TecUtilDialogGetVariables("Enter the values for V1 and V2:",
        "V1:", "V2:", NULL, &Var1, &Var2, NULL)
   {
     // values successfully entered
   }

FORTRAN Example.

   INTEGER*4 IErr
   INTEGER*4 Var1
   INTEGER*4 Var2
   POINTER   (NullPntr, Null)
   INTEGER*4 Null

   NullPntr = 0

   Call TecUtilLockStart(AddOnID)

   Var1 = 1
   Var2 = 1

   IErr = TecUtilDialogGetVariables(
  &       'Get some variables'//char(0),
  &       'label 1'//char(0),
  &       'label 2'//char(0),
  &       char(0),
  &       Var1,
  &       Var2,
  &       Null)

  .... do something with Var1 and Var2 .....

  Call TecUtilLockFinish(AddOnID)

See also:
TecUtilMacroIsBatchModeActive()

Boolean_t TecUtilDialogLaunch ( Dialog_e  DialogToLaunch  ) 

Launch a Tecplot interface dialog.

Note:
This function cannot be called when Tecplot is running in batch mode.
Parameters:
DialogToLaunch Dialog to launch. See Dialog_e for list of dialogs that you may launch.
Returns:
For modeless dialogs TRUE is returned if the dialog was launched or FALSE if the dialog could not be launched programmatically in the given context. For modal dialogs TRUE is returned, if the dialog was launched and the action was performed, or FALSE, if the user canceled the operation or the dialog could not be launched programmatically in the given context.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogLaunch(DialogToLaunch)
    INTEGER*4 DialogToLaunch

Python Syntax:

  Results = TecUtil.DialogLaunch(DialogToLaunch)

  Input:
                  DialogToLaunch       Dialog_e  (defined in TecVals.py)
  Output:
    Results[0]    ReturnVal            boolean

Launch the Color Map dialog:

See also:
TecUtilDialogDrop

void TecUtilDialogLaunchPercentDone ( const char *  Label,
Boolean_t  ShowTheScale 
)

Launch the Percent Done dialog.

Parameters:
Label Text to describe the action about to be performed.
ShowTheScale Set to TRUE if you want the scale to be used, otherwise set to FALSE
Precondition:
Label String must have a valid address and non-zero length.
Fortran Syntax:
    SUBROUTINE TecUtilDialogLaunchPercentDone(
   &           Label,
   &           ShowTheScale)
    CHARACTER*(*)   Label
    INTEGER*4       ShowTheScale

Python Syntax:

  Results = TecUtil.DialogLaunchPercentDone(Label, ShowTheScale)

  Input:
                  Label                string
                  ShowTheScale         boolean
  Output:
    Results[0]    ReturnVal            NONE

Boolean_t TecUtilDialogMessageBox ( const char *  Message,
MessageBoxType_e  MessageBoxType 
)

Display a message to the user and, if desired, prompt for yes or no input.

Note:
If this function is called when Tecplot is running in batch mode, then it will return right away and return TRUE;
Parameters:
Message Character string to display at the top of the dialog. Must not be NULL
MessageBoxType The possible values are: Buttons Included:MessageBoxType_Error : OKMessageBox_Warning : OKMessageBox_Information : OKMessageBox_Question : OK, CancelMessageBox_YesNo : Yes, No
Returns:
TRUE if the OK or Yes is clicked, FALSE if Cancel or No is clicked.
Precondition:
Message Pointer must be a valid address and non-NULL.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilDialogMessageBox(
   &                   Message,
   &                   MessageBoxType)
    CHARACTER*(*)   Message
    INTEGER*4       MessageBoxType

Python Syntax:

  Results = TecUtil.DialogMessageBox(Message, MessageBoxType)

  Input:
                  Message              string
                  MessageBoxType       MessageBoxType_e  (defined in TecVals.py)
  Output:
    Results[0]    ReturnVal            boolean

Prompt the user for a response to a question:

   if (TecUtilDialogMessageBox("Do you like green eggs and ham?",
                               MessageBoxType_Question))
    {
      // do something here...
    }

See also:
TecUtilMacroIsBatchModeActive()

void TecUtilDialogSetLaunchPosition ( Widget  W,
int  DialogWidth,
int  DialogHeight,
AnchorAlignment_e  DialogAnchor,
LgIndex_t  IOffset,
LgIndex_t  JOffset 
)

Deprecated:
No substitute.

Python Syntax:

    This function is not supported in Python.

void TecUtilDialogSetPercentDoneText ( const char *  Text  ) 

Update the text in the Percent Done dialog.

Parameters:
Text Text to display in the percent done dialog.
Precondition:
Text String must have a valid address and non-zero length.
Fortran Syntax:
    SUBROUTINE TecUtilDialogSetPercentDoneText(Text)
    CHARACTER*(*) Text

Python Syntax:

  Results = TecUtil.DialogSetPercentDoneText(Text)

  Input:
                  Text                 string
  Output:
    Results[0]    ReturnVal            NONE

Update the text in the Percent Done dialog to say "Phase II."

void TecUtilInterfaceGetDotsPerInch ( double *  VDotsPerInch,
double *  HDotsPerInch 
)

Get the number of pixels per inch in the vertical and horizontal directions on the screen.

Parameters:
VDotsPerInch The number of pixels per inch in the vertical direction
HDotsPerInch The number of pixels per inch in the horizontal direction.
Precondition:
VDotsPerInch Pointer must be a valid address and non-NULL.

HDotsPerInch Pointer must be a valid address and non-NULL.

Fortran Syntax:
    SUBROUTINE TecUtilInterfaceGetDotsPerInch(
   &           VDotsPerInch,
   &           HDotsPerInch)
    REAL*8          VDotsPerInch
    REAL*8          HDotsPerInch

Python Syntax:

  Results = TecUtil.InterfaceGetDotsPerInch()

  Output:
    Results[0]    VDotsPerInch         double
    Results[1]    HDotsPerInch         double

Get the pixels per inch values:

   double VertPixels, HorzPixels;
   TecUtilInterfaceGetDotsPerInch(&VertPixels, &HorzPixels);

void TecUtilInterfaceSuspend ( Boolean_t  DoSuspend  ) 

Suspends or un-suspends updates to the interface only (not including the status line).

Updates to the work area and status line are still preformed unless suspended via a call to TecUtilDrawGraphics(), TecUtilWorkAreaSuspend() or TecUtilStatusSuspend().

Since:
11.0-3-010
Parameters:
DoSuspend Indicates if Tecplot should suspend or un-suspend making updates to the interface.
See also:
TecUtilDrawGraphics, TecUtilWorkAreaSuspend, TecUtilStatusSuspend
Python Syntax:
  Results = TecUtil.InterfaceSuspend(DoSuspend)

  Input:
                  DoSuspend            boolean
  Output:
    Results[0]    ReturnVal            NONE

Boolean_t TecUtilInterfaceWinAddPreMsgFn ( PreTranslateMessage_pf  PreTranslateMessageProc  ) 

Add a PreTranslateMessage function to Tecplot's message loop so that modeless dialogs messages can be dispatched correctly.

See the ADK User's Manual for information on using TecUtilInterfaceWinAddPreMsgFn(). This function is only available under Windows.

Parameters:
PreTranslateMessageProc Function to call to pretranslate messages. The PreTranslateMessage function you provide will have the following syntax: Boolean_t PreTranslateMessage(MSG *pMsg)Where pMsg is the message to preprocess
Returns:
TRUE if successfully installed, FALSE otherwise.
Python Syntax:
    This function is not supported in Python.

Install a PreTranslateMessage function for modeless dialogs for an add-on written in MFC:

   Boolean_t PreTranslateMessage(MSG *pMsg)
   {
     AFX_MANAGE_STATE(AfxGetStaticModuleState());
     return AfxGetApp()->PreTranslateMessage(pMsg);
   }
   .
   .
   .

     // In InitTecAddon Function
     TecUtilInterfaceWinAddPreMsgFn(PreTranslateMessage);

char* TecUtilLastErrorMessage ( void   ) 

Returns the last recorded error message by Tecplot.

The operation does not modify Tecplot's internal state.

Returns:
Returns a copy of the error message. This string must be deallocated when you are done using it. NULL is a valid return value and indicates no error was recorded.
Since:
14.1
See also:
TecUtilStyleGetLastErrorString, TecUtilStyleSetLowLevel, TecUtilStyleSetLowLevelX
Python Syntax:
  Results = TecUtil.LastErrorMessage()

  Output:
    Results[0]    ReturnVal            string

void TecUtilLastErrorMessageClear ( void   ) 

Clears the last error message queue such that immediately calling TecUtilLastErrorMessage() will return NULL.

If you intend on calling TecUtilLastErrorMessage() after calling another TecUtil function you should call TecUtilLastErrorMessageClear() prior to making the TecUtil call.

Since:
14.1
   {
       TecUtilLastErrorMessageClear();
       Boolean_t isOk = TecUtilDataSetDeleteZone(zoneList);
       if (!isOk)
       {
           char* errorMessage = TecUtilLastErrorMessage();
           if (errorMessage != 0)
           {
               ...
           }
       }
   }

See also:
TecUtilLastErrorMessage, TecUtilStyleGetLastErrorString, TecUtilStyleSetLowLevel, TecUtilStyleSetLowLevelX
Python Syntax:
  Results = TecUtil.LastErrorMessageClear()

  Output:
    Results[0]    ReturnVal            NONE

void TecUtilMenuActivate ( Boolean_t  Activate  ) 

Specifies whether to show the Tecplot menu or not.

Parameters:
Activate Set to TRUE to show the menu, FALSE to hide it
Fortran Syntax:
   SUBROUTINE TecUtilMenuActivate(
  &           Activate)
   INTEGER*4      Activate

Python Syntax:

    This function is not supported in Python.

Since:
12.2-1-9808

Boolean_t TecUtilMenuAddOption ( const char *  MenuPath,
const char *  MenuLabel,
char  Mnemonic,
DynamicMenuCallback_pf  MenuOptionCallback 
)

Create a simple menu option in Tecplot's main menu.

For more options when adding menu options use TecUtilMenuInsertOption() instead.

Parameters:
MenuPath This is used to specify where you want your menu option placed in Tecplot's menu structure. You cannot put menu options in the File, View, or Plot menus unless you first call TecUtilMenuClearAll(). Use the newline character ('\n') to create options in sub-menu. Each sub-menu may have a mnemonic specified by putting a '&' in front of the desired letter. The mnemonic is used only if the sub-menu does not already exist, and thus is created by this call. (A mnemonic is a keyboard short-cut to access the menu.)
MenuLabel Text to put on the menu option. You may specify a mnemonic for the option by putting a '&' in front of the desired letter. If you want to specify a '&' in the menu option itself, use "&&". (A mnemonic is a keyboard short-cut to access the menu.) You may specify an accelerator key by separating it from the MenuLabel with a tab ('\t'). An accelerator key is a key that can be used from within Tecplot to perform the function without going through the menu system. Accelerators should be of the form "Ctrl+L" or "Shift+L" or "Alt+L" or a combination such as "Ctrl+Shift+L" where "L" can be any letter or number.
Mnemonic Should be set to TECUTILAUTOMNEMONIC. (If set to any other value, Mnemonic is assumed to be the character in MenuLabel that should be used as a mnemonic, and Tecplot will change the string accordingly. If set to '\0', the MenuLabel string is used unaltered.)
MenuOptionCallback Function you create which will be called when the new menu option is selected. See DynamicMenuCallback_pf.
Returns:
Returns TRUE if the menu option was successfully installed.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilMenuAddOption(
   &                   MenuPath,
   &                   MenuLabel,
   &                   Mnemonic,
   &                   MenuOptionCallback)
    CHARACTER*(*)   MenuPath
    CHARACTER*(*)   MenuLabel
    CHARACTER*(*)   Mnemonic
    EXTERNAL        MenuOptionCallback

Python Syntax:

    This function is not supported in Python.

Add an option to the Tools menu in Tecplot called "Banana." When selected, have Tecplot call the function BananaCallback.

First create the BananaCallback function:

   void BananaCallback(void)
   {
      // code executed when "Banana" is selected in the
      // "Tools" menu.
   }

In the initialization code for the add-on add:

    IsOk = TecUtilMenuAddOption("Tools",
                                "&Banana",
                                TECUTILAUTOMNEMONIC,
                                BananaCallback);

To put the menu item in a sub-menu of Tools called "Fruit" use:

   IsOk = TecUtilMenuAddOption("Tools\n&Fruit", "&Banana", TECUTILAUTOMNEMONIC, BananaCallback);

The sub-menu "Fruit" of "Tools" will be created if necessary, and if it is created, it will be given a mnemonic of 'F'.

To install an accelerator of Shift+B for this option, use:

   IsOk = TecUtilMenuAddOption("Tools\n&Fruit", "&Banana\tShift+B", TECUTILAUTOMNEMONIC, BananaCallback);

The user can then invoke the BananaCallback without using the menu system. Hitting Shift+B in the work area of Tecplot will call BananaCallback.

Boolean_t TecUtilMenuAddSeparator ( const char *  MenuPath  ) 

Adds menu separator to the end of the specified parent menu.

For more options when adding separators use TecUtilMenuInsertSeparator() instead.

Parameters:
MenuPath Specify the path to where the separator should be placed.
Returns:
Returns TRUE if the menu separator was successfully added, FALSE otherwise.
Fortran Syntax:
    INTEGER*4 FUNCTION TecUtilMenuAddSeparator(MenuPath)
    CHARACTER*(*) MenuPath

Python Syntax:

    This function is not supported in Python.

void TecUtilMenuAddStatusLineHelp ( Menu_pa  MenuItem,
const char *  StatusLineHelp 
)

Registers a character string to be displayed on the status line for a menu item.

If called again on the same menu item, the new string replaces the old one.

Since:
11.2-0-391
Parameters:
MenuItem Specify the menu item for which to register status line help. This item can be an option, toggle, or submenu, but it cannot be a separator.
StatusLineHelp Specify the text shown on the status line for a menu item.
Precondition:
StatusLineHelp String must have a valid address and non-zero length.
Fortran Syntax:
    SUBROUTINE TecUtilMenuAddStatusLineHelp(
   &           MenuItemPtr,
   &           StatusLineHelp)
    POINTER         (MenuItemPtr, MenuItem)
    CHARACTER*(*)   StatusLineHelp

Python Syntax:

    This function is not supported in Python.

Set the status line help for an existing menu item.

   extern Menu_pa DoSomething1Option; // created elsewhere
   TecUtilMenuAddStatusLineHelp(DoSomething1Option,
                                "Do Something New");

void TecUtilMenuClearAll ( void   ) 

Remove all menus, submenus, and menu items from the Tecplot menu bar.

This will clear menu items added by other add-ons, making those add-ons inaccessible. The add-on containing this call should either be the only add-on loaded into Tecplot, or it should be loaded into Tecplot first and it should clear the menus during initialization before the other add-ons are loaded. For more control over which menu items are deleted, use TecUtilMenuDelete() instead.

Note:
This function should not be called as a direct response to a menu selection event as it will delete the menu system out from under it and produce unpredictable results. To handle this case register an on-idle callback to clear the menu system. See TecUtilOnIdleQueueAddCallback for registering an on-idle callback.
Fortran Syntax:
    SUBROUTINE TecUtilMenuClearAll()

Python Syntax:

    This function is not supported in Python.

To wipe out Tecplot's standard menu and replace it with a single option called "Banana" which is located under a menu called "Go":

   TecUtilMenuClearAll():
   IsOk = TecUtilMenuAddOption("&Go", "Banana", 'B', BananaCallBack);

void TecUtilMenuDelete ( Menu_pa MenuItemPtr  ) 

Deletes a menu item.

If that menu item is a submenu, all of its sub menu items are deleted as well. Deleting submenus can delete the menu items of other add-ons and may make those add-ons inaccessible.

Note:
This function should not be called as a direct response to a menu selection event as it will delete the menu system out from under it and produce unpredictable results. To handle this case register an on-idle callback to clear the menu system. See TecUtilOnIdleQueueAddCallback for registering an on-idle callback.
Parameters:
MenuItemPtr Specify a pointer to the menu item to delete. This item can be an option, toggle, submenu, or separator.
Fortran Syntax:
    SUBROUTINE TecUtilMenuDelete(MenuItemPtr)
    POINTER (MenuItemPtr, MenuItem)

Python Syntax:

    This function is not supported in Python.

To delete the File menu.

This code does the same thing using as TecUtilMenuClearAll(). The main menu always exists, so TecUtilMenuDelete() on the main menu only deletes the submenus of the main menu.

   Menu_pa MainMenu = TecUtilMenuGetMain();
   TecUtilMenuDelete(&MainMenu);
   // main menu is still around, so add an item to it
   TecUtilMenuInsertOption(MainMenu,
                           MENU_POSITION_FIRST,
                           "Do Something &1\tAlt+1",
                           DoSomethingCallback,
                           1);

Menu_pa TecUtilMenuGetMain ( void   ) 

Gets the menu handle for Tecplot's main menu.

This handle may then be used with other functions such as TecUtilMenuInsertSubMenu().

Returns:
Returns menu handle for Tecplot's main menu, or NULL if there is no main menu (as happens when Tecplot is running in batch mode).
Fortran Syntax:
    SUBROUTINE TecUtilMenuGetMain(ResultPtr)
    POINTER (ResultPtr, Result)

Python Syntax:

    This function is not supported in Python.

See also:
TecUtilMenuInsertSubMenu() for an example of TecUtilMenuGetMain().

Menu_pa TecUtilMenuGetStandard ( StandardMenu_e  StandardMenu  ) 

Gets the menu handle for a top-level standard Tecplot menu.

This handle may then be used with other functions such as TecUtilMenuInsertOption().

Parameters:
StandardMenu Specify the top-level menu for which to get the handle.
Returns:
Returns menu handle for the specified top-level menu, or NULL if there is no such menu (as happens when Tecplot is running in batch mode or when the menu has been deleted). Also will return NULL if Tecplot is run with the -nomainmenu command line options.
IMPORTANT: You MUST check the return value of this function for NULL, and ensure that you do not call any TecUtilMenu functions with a NULL Menu_pa parameter. Calling a TecUtilMenu function with a NULL Menu_pa will cause a runtime error.

Fortran Syntax:

    SUBROUTINE TecUtilMenuGetStandard(
   &           StandardMenu,
   &           ResultPtr)
    INTEGER*4       StandardMenu
    POINTER         (ResultPtr, Result)

Python Syntax:

    This function is not supported in Python.

See also:
TecUtilMenuInsertOption() for an example of TecUtilMenuGetStandard().

Menu_pa TecUtilMenuInsertOption ( Menu_pa  ParentMenu,
int  InsertPos,
const char *  OptionLabel,
MenuActivateCallback_pf  ActivateCallback,
ArbParam_t  ActivateClientData 
)

Inserts a menu option into a menu.

A menu option performs some action when selected in the menu system.

Parameters:
ParentMenu Specify the menu in which to insert the new option.
InsertPos Specify the position in the parent menu for the new option. MENU_POSITION_FIRST will put the new option first in the parent menu. MENU_POSITION_LAST will put the new option last in the parent menu.
OptionLabel Specify the text for the new option. You may specify a mnemonic for the option by putting a '&' in front of the desired letter. If you want to specify a '&' in the menu option itself, use "&&". (A mnemonic is a keyboard short-cut to access the menu.) You may specify an accelerator key at the end of the label by separating it from the rest with a tab ('\t'). An accelerator key is a key that can be used from within Tecplot to activate the optionwithout going through the menu system. Accelerators should be of the form "Ctrl+L" or "Shift+L" or "Alt+L" or a combination such as "Ctrl+Shift+L" where "L" can be any letter or number.
ActivateCallback Specify callback function to call when new menu option is activated.
ActivateClientData Specify data to send to ActivateCallback when called for this new menu option.
Returns:
Returns menu handle for the new menu option, or NULL if creating the menu option failed (as happens when Tecplot is running in batch mode).
Fortran Syntax:
 C
 C  Note: Only one menu option callback function can active for each FORTRAN add-on.
 C  Registering another menu option callback function overwrites the first.
 C  You may use ClientData to differentiate between different menu options.
 C
    SUBROUTINE TecUtilMenuInsertOption(
   &           ParentMenuPtr,
   &           InsertPos,
   &           OptionLabel,
   &           ActivateCallback,
   &           ActivateClientDataPtr,
   &           ResultPtr)
    POINTER         (ParentMenuPtr, ParentMenu)
    INTEGER*4       InsertPos
    CHARACTER*(*)   OptionLabel
    EXTERNAL        ActivateCallback
    POINTER         (ActivateClientDataPtr, ActivateClientData)
    POINTER         (ResultPtr, Result)

Python Syntax:

    This function is not supported in Python.

Insert into the Tools menu two new options called "Do Something 1" and "Do Something 2". These menu options will appear as the first two options in the Tools menu.

First create a DoSomethingCallback function:

   void DoSomethingCallback(ArbParam_t ClientData)
   {
      // code executed when one of the "Do Something" options is selected in the
      // "Tools" menu.  ClientData will be 1 for the "Do Something 1" menu option,
      // and ClientData will be 2 for the "Do Something 2" menu option.
   }

Elsewhere (probably in the initialization of the add-on) add the menu items to the "Tools" menu.

   Menu_pa ToolsMenu, DoSomething1Option, DoSomething2Option;
   ToolsMenu = TecUtilMenuGetStandard(StandardMenu_Tools);
   DoSomething1Option = TecUtilMenuInsertOption(ToolsMenu,
                                                MENU_POSITION_FIRST,
                                                "Do Something 1",
                                                DoSomethingCallback,
                                                1);
   DoSomething2Option = TecUtilMenuInsertOption(ToolsMenu,
                                                2, // second item in menu
                                                "Do Something 2",
                                                DoSomethingCallback,
                                                2);

To assign keyboard short-cuts to the menu options, use the following code instead. "Do Something 1" has a keyboard short-cut of '1'. That is, it can be accessed quickly while in the "Tools" menu by simply pressing one. Likewise "Do Something 2" has a keyboard short-cut of '2'.

   DoSomething1Option = TecUtilMenuInsertOption(ToolsMenu,
                                                MENU_POSITION_FIRST,
                                                "Do Something &1",
                                                DoSomethingCallback,
                                                1);
   DoSomething2Option = TecUtilMenuInsertOption(ToolsMenu,
                                                2, // second item in menu
                                                "Do Something &2",
                                                DoSomethingCallback,
                                                2);
To assign keyboard accelerators to the menu option, use the following code instead. "Do Something 1" still has the keyboard short-cut, but it also has an accelerator key of "Alt+1". An accelerator key allows the user to activate the menu option without accessing the menu. Pressing "Alt+1" while in the Tecplot main menu will activate the "Do Something 1" menu option. Likewise, "Alt+2" activates the "Do Something 2" menu option.

   DoSomething1Option = TecUtilMenuInsertOption(ToolsMenu,
                                                MENU_POSITION_FIRST,
                                                "Do Something &1\tAlt+1",
                                                DoSomethingCallback,
                                                1);
   DoSomething2Option = TecUtilMenuInsertOption(ToolsMenu,
                                                2, // second item in menu
                                                "Do Something &2\tAlt+2",
                                                DoSomethingCallback,
                                                2);

Menu_pa TecUtilMenuInsertSeparator ( Menu_pa  ParentMenu,
int  InsertPos 
)

Inserts a separator into a menu.

A separator is a line displayed between menu items, it cannot be selected from the menu system.

Parameters:
ParentMenu Specify the menu in which to insert the new separator.
InsertPos Specify the position in the parent menu for the new separator. MENU_POSITION_FIRST will put the new separator first in the parent menu. MENU_POSITION_LAST will put the new separator last in the parent menu.
Returns:
Returns menu handle for the new separator, or NULL if creating the separator failed (as happens when Tecplot is running in batch mode).
Fortran Syntax:
    SUBROUTINE TecUtilMenuInsertSeparator(
   &           ParentMenuPtr,
   &           InsertPos,
   &           ResultPtr)
    POINTER         (ParentMenuPtr, ParentMenu)
    INTEGER*4       InsertPos
    POINTER         (ResultPtr, Result)

Python Syntax:

    This function is not supported in Python.

First create a DoSomethingCallback function:

   void DoSomethingCallback(ArbParam_t ClientData)
   {
      // code executed when one of the "Do Something" options is selected in the
      // "Tools" menu.  ClientData will be 1 for the "Do Something 1" menu option,
      // and ClientData will be 2 for the "Do Something 2" menu option.
   }

Add some options to the top of the "Tools" menu and then separate them from the rest of that menu by including a separator.

   Menu_pa ToolsMenu, DoSomething1Option, DoSomething2Option, Separator;
   ToolsMenu = TecUtilMenuGetStandard(StandardMenu_Tools);
   DoSomething1Option = TecUtilMenuInsertOption(ToolsMenu,
                                                MENU_POSITION_FIRST,
                                                "Do Something 1",
                                                DoSomethingCallback,
                                                1);
   DoSomething2Option = TecUtilMenuInsertOption(ToolsMenu,
                                                2, // second item in menu
                                                "Do Something 2",
                                                DoSomethingCallback,
                                                2);
   Separator = TecUtilMenuItemInsertSeparator(ToolsMenu,
                                              3); // third item in the menu

void TecUtilMenuInsertStandard ( Menu_pa  ParentMenu,
int  InsertPos,
StandardMenu_e  StandardMenu 
)

Inserts a standard Tecplot menu into another menu as a submenu.

Parameters:
ParentMenu Specify the menu in which to insert the standard menu.
InsertPos Specify the position in the parent menu for the standard menu. MENU_POSITION_FIRST will put the standard menu first in the parent menu. MENU_POSITION_LAST will put the standard menu last in the parent menu.
StandardMenu Specify the top-level menu for which to get the handle. This menu cannot exist already in Tecplot.
Fortran Syntax:
    SUBROUTINE TecUtilMenuInsertStandard(
   &           ParentMenuPtr,
   &           InsertPos,
   &           ResultPtr)
    POINTER         (ParentMenuPtr, ParentMenu)
    INTEGER*4       InsertPos
    INTEGER*4       StandardMenu

Python Syntax:

    This function is not supported in Python.

Move the Edit menu to be the first menu in the system. First delete the Edit menu if it exists, then readd it to the menu system as the first item in the main menu.

   Menu_pa MainMenu, EditMenu;
   MainMenu = TecUtilMenuGetMain();
   EditMenu = TecUtilMenuGetStandard(StandardMenu_Edit);
   if ( EditMenu != NULL )
     TecUtilMenuDelete(&EditMenu);
   TecUtilMenuInsertStandard(MainMenu,
                             MENU_POSITION_FIRST,
                             StandardMenu_Edit);

Menu_pa TecUtilMenuInsertSubMenu ( Menu_pa  ParentMenu,
int  InsertPos,
const char *  SubMenuLabel 
)

Inserts a submenu into a menu.

A submenu displays other menu items when it is selected in the menu system.

Parameters:
ParentMenu Specify the menu in which to insert the new submenu.
InsertPos Specify the position in the parent menu for the new submenu. MENU_POSITION_FIRST will put the new submenu first in the parent menu. MENU_POSITION_LAST will put the new submenu last in the parent menu.
SubMenuLabel Specify the text for the new submenu. You may specify a mnemonic for the submenu option by putting a '&' in front of the desired letter. If you want to specify a '&' in the submenu itself, use "&&". (A mnemonic is a keyboard short-cut to access the menu.)
Returns:
Returns menu handle for the new submenu, or NULL if creating the submenu failed (as happens when Tecplot is running in batch mode). Also will return NULL if Tecplot is run with the -nomainmenu command line options.
IMPORTANT: You MUST check the return value of this function for NULL, and ensure that you do not call any TecUtilMenu functions with a NULL Menu_pa parameter. Calling a TecUtilMenu function with a NULL Menu_pa will cause a runtime error.

Fortran Syntax:

    SUBROUTINE TecUtilMenuInsertSubMenu(
   &           ParentMenuPtr,
   &           InsertPos,
   &           SubMenuLabel,
   &           ResultPtr)
    POINTER         (ParentMenuPtr, ParentMenu)
    INTEGER*4       InsertPos
    CHARACTER*(*)   SubMenuLabel
    POINTER         (ResultPtr, Result)

Python Syntax:

    This function is not supported in Python.

Insert a submenu in the main menu called "Extras". This submenu will appear first in the main menu. This submenu has a keyboard short-cut of "X". That is, the user can activate this submenu by simply pressing the letter "X" while in the main menu. Since the option is in the main menu, "Alt+X" will work on some systems as well.

    Menu_pa MainMenu = TecUtilMenuGetMain();
    IsOk = TecUtilMenuInsertSubMenu(MainMenu,
                                    MENU_POSITION_FIRST,
                                    "E&xtras");

Menu_pa TecUtilMenuInsertToggle ( Menu_pa  ParentMenu,
int  InsertPos,
const char *  ToggleLabel,
MenuActivateCallback_pf  ActivateCallback,
ArbParam_t  ActivateClientData,
MenuGetToggleStateCallback_pf  GetToggleStateCallback,
ArbParam_t  GetToggleStateClientData 
)

Inserts a menu toggle into a menu.

Like a menu option, a menu toggle performs some action when selected in the menu system, but a menu toggle also displays an on/off state.

Parameters:
ParentMenu Specify the menu in which to insert the new toggle.
InsertPos Specify the position in the parent menu for the new toggle. MENU_POSITION_FIRST will put the new toggle first in the parent menu. MENU_POSITION_LAST will put the new toggle last in the parent menu.
ToggleLabel Specify the text for the new toggle. You may specify a mnemonic for the toggle by putting a '&' in front of the desired letter. If you want to specify a '&' in the menu toggle itself, use "&&". (A mnemonic is a keyboard short-cut to access the menu.) You may specify an accelerator key at the end of the label by separating it from the rest with a tab ('\t'). An accelerator key is a key that can be used from within Tecplot to activate the menu toggle without going through the menu system. Accelerators should be of the form "Ctrl+L" or "Shift+L" or "Alt+L" or a combination such as "Ctrl+Shift+L" where "L" can be any letter or number.
ActivateCallback Specify callback function to call when new menu toggle is activated (either to turn it on or to turn it off).
ActivateClientData Specify data to send to ActivateCallback when called for this new menu toggle.
GetToggleStateCallback Specify callback function that will return the current state of the new menu toggle. This callback is called whenever Tecplot needs to know the checked/unchecked stated of the toggle. If the callback returns TRUE, the toggle is checked. If the callback returns FALSE, the toggle is unchecked.
GetToggleStateClientData Specify data to send to GetToggleStateCallback when called for this new menu toggle.
Returns:
Returns menu handle for the new menu toggle, or NULL if creating the menu toggle failed (as happens when Tecplot is running in batch mode).
Fortran Syntax:
 C
 C  Note: Only one menu toggle activate callback function can active for each FORTRAN add-on.
 C  Registering another menu toggle activate callback function overwrites the first.
 C  You may use ClientData to differentiate between different menu toggles.
 C  Likewise, only one menu toggle get-state callback can be active for each FORTRAN add-on.
 C
    SUBROUTINE TecUtilMenuInsertToggle(
   &           ParentMenuPtr,
   &           InsertPos,
   &           ToggleLabel,
   &           ActivateCallback,
   &           ActivateClientDataPtr,
   &           GetToggleStateCallback,
   &           GetToggleStateClientDataPtr,
   &           ResultPtr)
    POINTER         (ParentMenuPtr, ParentMenu)
    INTEGER*4       InsertPos
    CHARACTER*(*)   ToggleLabel
    EXTERNAL        ActivateCallback
    POINTER         (ActivateClientDataPtr, ActivateClientData)
    EXTERNAL        GetToggleStateCallback
    POINTER         (GetToggleStateClientDataPtr, GetToggleStateClientData)
    POINTER         (ResultPtr, Result)

Python Syntax:

    This function is not supported in Python.

Insert into the Tools menu a toggle menu item called "Simple Toggle". This toggle will appear last in the Tools menu.

First create a SimpleToggleActivate callback function. This is called whenever the toggle is selected.

   // global variable to track the state of the toggle
   static Boolean_t SimpleToggleState = TRUE; // checked by default

   void SimpleToggleActivate(ArbParam_t ClientData)
   {
      // code executed when the "Simple Toggle" is selected in the
      // "Tools" menu.  ClientData will be 0 because that is what was
      // past in the call to TeCUtilMenuInsertToggle() below.
      //
      // For this simple case, we just invert a global variable.
      //
      SimpleToggleState = !SimpleToggleState;
   }

Next create a SimpleToggleActivate callback function. This is called whenever the state of the toggle is needed.

   Boolean_t GetSimpleToggleState(ArbParam_t ClientData)
   {
      // code executed whenever the state of the "Simple Toggle" is needed.
      // ClientData will be 1 because that is what was past in the call
      // to TeCUtilMenuInsertToggle() below.
      //
      // For this simple case, we just look at the value of a global variable.
      //
      return SimpleToggleState;
   }

Elsewhere (probably in the initialization of the add-on) add the toggle to the "Tools" menu.

   Menu_pa ToolsMenu, SimpleToggle;
   ToolsMenu = TecUtilMenuGetStandard(StandardMenu_Tools);
   SimpleToggle = TecUtilMenuInsertToggle(ToolsMenu,
                                          MENU_POSITION_FIRST,
                                          "Simple Toggle",
                                          SimpleToggleActivate,
                                          0, //ActivateClientData
                                          GetSimpleToggleState,
                                          1); //GetToggleStateClientData

Note:
Menu toggles can have keyboard short-cuts and accelerators just like menu options.
See also:
TecUtilMenuInsertOption() for examples.

void TecUtilMenuRegisterSensitivityCallback ( Menu_pa  MenuItem,
MenuGetSensitivityCallback_pf  GetSensitivityCallback,
ArbParam_t  GetSensitivityClientData 
)

Registers a function that will determine the sensitivity of a menu item (i.e., whether the item is enabled for user input or grayed out).

If this function is not used for a particular menu item, the item will always be available. If called again on the same menu item, the new function replaces the old one.

Parameters:
MenuItem Specify the menu item for which to register a sensitivity function. This item can be a option, toggle, or submenu, but it cannot be a separator.
GetSensitivityCallback Specify callback function to call to determine the sensitivity of the menu item. This function returns TRUE if the menu is sensitive, and FALSE if the menu is insensive (gray).
GetSensitivityClientData Specify data to send to GetSensitivityCallback when called for the specified menu item.
Fortran Syntax:
 C
 C  Note: Only one menu sensitivity callback function can active for each FORTRAN add-on.
 C  Registering another menu sensitivity callback callback function overwrites the first.
 C  You may use ClientData to differentiate between different menu items.
 C
    SUBROUTINE TecUtilMenuRegisterSensitivityCallback(
   &           MenuItemPtr,
   &           InsertPos,
   &           ToggleLabel,
   &           ActivateCallback,
   &           ActivateClientDataPtr,
   &           GetToggleStateCallback,
   &           GetToggleStateClientDataPtr,
   &           ResultPtr)
    POINTER         (MenuItemPtr, MenuItem)
    EXTERNAL        GetSensitivityCallback
    POINTER         (GetSensitivityClientDataPtr, GetSensitivityClientData)

Python Syntax:

    This function is not supported in Python.

Set the sensitivities of two menu items. The first will be available only when the frame is 3D. The second will be available only when the frame is a polar line plot.

First create a sensitivity callback function. This one uses the ClientData parameter to check different plot types.

   Boolean_t CheckIfCurrentFrameIsOfType(ArbParam_t ClientData)
   {
     PlotType_e PlotType = (PlotType_e)ClientData;
     return TecUtilFrameGetPlotType()==PlotType;
   }

Then add the sensitivity callback to the menu item. Usually this is done when the item is created.

   extern Menu_pa DoSomething1Option, DoSomething2Option; // created elsewhere
   TecUtilMenuRegisterSensitivityCallback(DoSomething1Option,
                                          CheckIfCurrentFrameIsOfType,
                                          (ArbParam_t)PlotType_Cartesian3D);
   TecUtilMenuRegisterSensitivityCallback(DoSomething2Option,
                                          CheckIfCurrentFrameIsOfType,
                                          (ArbParam_t)PlotType_PolarLine);

Boolean_t TecUtilMenuSetSensitivity ( const char *  MenuPath,
const char *  MenuLabel,
Boolean_t  IsSensitive 
)

Deprecated:
This function was never implemented. Please use TecUtilMenuRegisterSensitivityCallback() instead.

Python Syntax:

    This function is not supported in Python.

void TecUtilSidebarAutoSensitivity ( Boolean_t  DoAuto  ) 

Deprecated:
exclude_python;exclude_sdkdoc

Python Syntax:

  Results = TecUtil.SidebarAutoSensitivity(DoAuto)

  Input:
                  DoAuto               boolean
  Output:
    Results[0]    ReturnVal            NONE

void TecUtilSidebarSetSensitivity ( MouseButtonMode_e  MouseMode,
Boolean_t  IsSensitive 
)

Deprecated:
Please use TecUtilMouseSetMode() and TecUtilMouseIsValidMode() instead.

Python Syntax:

  Results = TecUtil.SidebarSetSensitivity(MouseMode, IsSensitive)

  Input:
                  MouseMode            MouseButtonMode_e  (defined in TecVals.py)
                  IsSensitive          boolean
  Output:
    Results[0]    ReturnVal            NONE

void TecUtilToolbarActivate ( Boolean_t  Activate  ) 

Specifies whether to show the Tecplot toolbar or not.

Parameters:
Activate Set to TRUE to show the toolbar, FALSE to hide it
Fortran Syntax:
   SUBROUTINE TecUtilToolbarActivate(
  &           Activate)
   INTEGER*4      Activate

Python Syntax:

  Results = TecUtil.ToolbarActivate(Activate)

  Input:
                  Activate             boolean
  Output:
    Results[0]    ReturnVal            NONE


Generated on Tue Mar 12 02:24:45 2013 for Tecplot by  doxygen 1.5.5