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 ore 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.
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.
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.
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
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.
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.
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.
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.

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.


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.
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.


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.
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.
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.
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:

  Results = TecUtil.DialogGetVariables(Instructions, TextField1Label, TextField2Label, TextField3Label)

  Input:
                  Instructions         string
                  TextField1Label      string
                  TextField2Label      string
                  TextField3Label      string
  Output:
    Results[0]    ReturnVal            boolean
    Results[1]    Var1                 int
    Results[2]    Var2                 int
    Results[3]    Var3                 int

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
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:MessageBox_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.
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?",
                               MessageBox_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.
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.
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);

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.