FEDEM Solver  R8.0
Source code of the dynamics solver
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
FFaMsg Class Reference

Interface class for various user feedback. More...

#include <FFaMsg.H>

Inheritance diagram for FFaMsg:
Inheritance graph
[legend]

Public Types

enum  FFaDialogType {
  DISMISS_WARNING , DISMISS_ERROR , DISMISS_INFO , WARNING ,
  ERROR , OK , OK_CANCEL , YES_NO ,
  YES_NO_CANCEL , _ALL_ , OK_ALL_CANCEL , YES_ALL_NO ,
  YES_ALL_NO_ALL , YES_ALL_NO_CANCEL , YES_ALL_NO_ALL_CANCEL , YES_NO_ALL ,
  YES_NO_ALL_CANCEL , GENERIC
}
 Enums defining various dialog box types. More...
 

Public Member Functions

 FFaMsg ()
 Default constructor. More...
 
virtual ~FFaMsg ()
 Empty destructor. More...
 
virtual bool openListFile (const char *=NULL, bool=false)
 Opens a list file containing a copy of the output list window. More...
 
virtual void closeListFile ()
 Closes the list file. More...
 

Static Public Member Functions

static void setMessager (FFaMsg *messager=NULL)
 Sets the real messager object to be used. More...
 
static FFaMsg & getMessager ()
 Returns the current messager object. More...
 
static bool usingDefault ()
 Returns true if we are using the default messager. More...
 
static void resetToAllAnswer (const FFaDialogType type=_ALL_)
 Clears the multiple query answer given dialog type or all. More...
 
static int dialog (const std::string &message, const FFaDialogType type=DISMISS_WARNING, const char **genericButtons=(const char **) NULL)
 Shows a dialog according to the dialog type. More...
 
static int dialog (int &returnedSelectionIdx, const std::string &message, const FFaDialogType type, const std::vector< std::string > &buttonTexts, const std::vector< std::string > &selectionList)
 Overloaded method with additional selection from a list. More...
 
static void list (const std::string &str, bool onScreen=false)
 Prints a message to the Output List GUI (or console). More...
 
static void tip (const std::string &str)
 Updates the tip message in the GUI (or prints it to console). More...
 
static void setStatus (const std::string &statusText)
 Sets the status message, but only the the status stack is empty. More...
 
static void changeStatus (const std::string &statusText)
 Replaces the top message of the status stack. More...
 
static void pushStatus (const std::string &statusText)
 Pushes a new message to the status stack. More...
 
static void popStatus ()
 Pops the status stack such that the previous message appears. More...
 
static void enableSubSteps (int steps)
 Enables substep counting in the GUI, in the range 1 to steps. More...
 
static void setSubStep (int step)
 Assigns the substep counter. More...
 
static void disableSubSteps ()
 Clears the substep counter. More...
 
static void displayTime (int hour, int min, int sec)
 Displays the elapsed time of a solver process in the GUI. More...
 
static void clearTime ()
 Clears the elapsed time display. More...
 
static void setSubTask (const std::string &taskText)
 Sets the subtask message in the GUI. More...
 
static void enableProgress (int nSteps)
 Enables a progress bar in the GUI, in range 1 to nSteps. More...
 
static void setProgress (int progressStep)
 Updates the progress counter. More...
 
static void disableProgress ()
 Clears the progress counter. More...
 

Protected Member Functions

virtual int dialogVt (const std::string &message, const FFaDialogType type, const char **genericButtons)
 Shows a dialog according to the dialog type. More...
 
virtual int dialogVt (const std::string &message, const FFaDialogType type, const std::vector< std::string > &buttonTexts)
 Shows a dialog according to the dialog type. More...
 
virtual int dialogVt (int &returnedSelectionIdx, const std::string &message, const FFaDialogType type, const std::vector< std::string > &buttonTexts, const std::vector< std::string > &selectionList)
 Overloaded method with additional selection from a list. More...
 
virtual void listVt (const std::string &str, bool onScreen=false)
 Prints a message to the console. More...
 
virtual void tipVt (const std::string &str)
 Prints tip message to the console. More...
 
virtual void setStatusVt (const std::string &)
 GUI interface for setting the status message. More...
 
virtual void changeStatusVt (const std::string &)
 GUI interface for changing the status message. More...
 
virtual void pushStatusVt (const std::string &)
 GUI interface for pushing a new status message. More...
 
virtual void popStatusVt ()
 GUI interface for popping the status message stack. More...
 
virtual void enableSubStepsVt (int)
 GUI interface for enabling substep counting. More...
 
virtual void setSubStepVt (int)
 GUI interface for assigning the substep counter. More...
 
virtual void disableSubStepsVt ()
 GUI interface for clearing the substep counter. More...
 
virtual void displayTimeVt (int, int, int)
 GUI interface for displaying the elapsed time of a solver process. More...
 
virtual void clearTimeVt ()
 GUI interface for clearing the elapsed time display. More...
 
virtual void setSubTaskVt (const std::string &)
 GUI interface for setting the subtask message. More...
 
virtual void enableProgressVt (int)
 GUI interface for enabling the progress bar. More...
 
virtual void setProgressVt (int)
 GUI interface for updating the progress counter. More...
 
virtual void disableProgressVt ()
 GUI interface for clearing the progress counter. More...
 

Detailed Description

Interface class for various user feedback.

Member Enumeration Documentation

◆ FFaDialogType

Enums defining various dialog box types.

Enumerator
DISMISS_WARNING 

Non-modal warning dialog.

DISMISS_ERROR 

Non-modal error dialog.

DISMISS_INFO 

Non-modal information dialog.

WARNING 

Modal warning dialog.

ERROR 

Modal error dialog.

OK 

Modal info dialog.

OK_CANCEL 

Modal info dialog with cancel option.

YES_NO 

Modal info dialog with yes/no options.

YES_NO_CANCEL 

Modal info dialog with yes/no and cancel options.

_ALL_ 

Separator for the "to all" dialog types.

OK_ALL_CANCEL 

Ok to all similar queries, or cancel the operation.

YES_ALL_NO 

Yes to all similar queries, or no for this only.

YES_ALL_NO_ALL 

Yes or no to all similar queries.

YES_ALL_NO_CANCEL 

Yes to all similar queries, or no for this or cancel.

YES_ALL_NO_ALL_CANCEL 

Yes or no to all similar queries, or cancel.

YES_NO_ALL 

Yes to this or no to all similar queries.

YES_NO_ALL_CANCEL 

Yes to this or no to all similar queries, or cancel.

GENERIC 

Generic modal dialog with user-provided button texts.

Constructor & Destructor Documentation

◆ FFaMsg()

FFaMsg::FFaMsg ( )
inline

Default constructor.

◆ ~FFaMsg()

virtual FFaMsg::~FFaMsg ( )
inlinevirtual

Empty destructor.

Member Function Documentation

◆ changeStatus()

void FFaMsg::changeStatus ( const std::string &  statusText)
static

Replaces the top message of the status stack.

◆ changeStatusVt()

virtual void FFaMsg::changeStatusVt ( const std::string &  )
inlineprotectedvirtual

GUI interface for changing the status message.

◆ clearTime()

void FFaMsg::clearTime ( )
static

Clears the elapsed time display.

◆ clearTimeVt()

virtual void FFaMsg::clearTimeVt ( )
inlineprotectedvirtual

GUI interface for clearing the elapsed time display.

◆ closeListFile()

virtual void FFaMsg::closeListFile ( )
inlinevirtual

Closes the list file.

◆ dialog() [1/2]

int FFaMsg::dialog ( const std::string &  statusText,
const FFaDialogType  type = DISMISS_WARNING,
const char **  genericButtons = (const char**)NULL 
)
static

Shows a dialog according to the dialog type.

Returns
For the OK_CANCEL dialog: 1 for "Ok" and 0 for "Cancel".
For the YES_NO dialog: 1 for "Yes" and 0 for "No".
For the YES_NO_CANCEL dialog: 1, 0 and 2, respectively.
For a GENERIC dialog: The index of the pushed button (maximum 3).
For all other dialogs: Always 0.

◆ dialog() [2/2]

int FFaMsg::dialog ( int &  returnedSelectionIdx,
const std::string &  message,
const FFaDialogType  type,
const std::vector< std::string > &  buttonTexts,
const std::vector< std::string > &  selectionList 
)
static

Overloaded method with additional selection from a list.

◆ dialogVt() [1/3]

int FFaMsg::dialogVt ( const std::string &  message,
const FFaDialogType  type,
const char **  genericButtons 
)
protectedvirtual

Shows a dialog according to the dialog type.

◆ dialogVt() [2/3]

int FFaMsg::dialogVt ( const std::string &  message,
const FFaDialogType  type,
const std::vector< std::string > &  buttonTexts 
)
protectedvirtual

Shows a dialog according to the dialog type.

◆ dialogVt() [3/3]

int FFaMsg::dialogVt ( int &  returnedSelectionIdx,
const std::string &  message,
const FFaDialogType  type,
const std::vector< std::string > &  buttonTexts,
const std::vector< std::string > &  selectionList 
)
protectedvirtual

Overloaded method with additional selection from a list.

◆ disableProgress()

void FFaMsg::disableProgress ( )
static

Clears the progress counter.

◆ disableProgressVt()

virtual void FFaMsg::disableProgressVt ( )
inlineprotectedvirtual

GUI interface for clearing the progress counter.

◆ disableSubSteps()

void FFaMsg::disableSubSteps ( )
static

Clears the substep counter.

◆ disableSubStepsVt()

virtual void FFaMsg::disableSubStepsVt ( )
inlineprotectedvirtual

GUI interface for clearing the substep counter.

◆ displayTime()

void FFaMsg::displayTime ( int  hour,
int  min,
int  sec 
)
static

Displays the elapsed time of a solver process in the GUI.

◆ displayTimeVt()

virtual void FFaMsg::displayTimeVt ( int  ,
int  ,
int   
)
inlineprotectedvirtual

GUI interface for displaying the elapsed time of a solver process.

◆ enableProgress()

void FFaMsg::enableProgress ( int  nSteps)
static

Enables a progress bar in the GUI, in range 1 to nSteps.

◆ enableProgressVt()

virtual void FFaMsg::enableProgressVt ( int  )
inlineprotectedvirtual

GUI interface for enabling the progress bar.

◆ enableSubSteps()

void FFaMsg::enableSubSteps ( int  steps)
static

Enables substep counting in the GUI, in the range 1 to steps.

◆ enableSubStepsVt()

virtual void FFaMsg::enableSubStepsVt ( int  )
inlineprotectedvirtual

GUI interface for enabling substep counting.

◆ getMessager()

FFaMsg & FFaMsg::getMessager ( )
static

Returns the current messager object.

◆ list()

void FFaMsg::list ( const std::string &  str,
bool  onScreen = false 
)
static

Prints a message to the Output List GUI (or console).

◆ listVt()

void FFaMsg::listVt ( const std::string &  str,
bool  onScreen = false 
)
protectedvirtual

Prints a message to the console.

Reimplemented in F90Msg.

◆ openListFile()

virtual bool FFaMsg::openListFile ( const char *  = NULL,
bool  = false 
)
inlinevirtual

Opens a list file containing a copy of the output list window.

◆ popStatus()

void FFaMsg::popStatus ( )
static

Pops the status stack such that the previous message appears.

◆ popStatusVt()

virtual void FFaMsg::popStatusVt ( )
inlineprotectedvirtual

GUI interface for popping the status message stack.

◆ pushStatus()

void FFaMsg::pushStatus ( const std::string &  statusText)
static

Pushes a new message to the status stack.

◆ pushStatusVt()

virtual void FFaMsg::pushStatusVt ( const std::string &  )
inlineprotectedvirtual

GUI interface for pushing a new status message.

◆ resetToAllAnswer()

void FFaMsg::resetToAllAnswer ( const FFaDialogType  type = _ALL_)
static

Clears the multiple query answer given dialog type or all.

◆ setMessager()

void FFaMsg::setMessager ( FFaMsg *  messager = NULL)
static

Sets the real messager object to be used.

◆ setProgress()

void FFaMsg::setProgress ( int  progressStep)
static

Updates the progress counter.

◆ setProgressVt()

virtual void FFaMsg::setProgressVt ( int  )
inlineprotectedvirtual

GUI interface for updating the progress counter.

◆ setStatus()

void FFaMsg::setStatus ( const std::string &  statusText)
static

Sets the status message, but only the the status stack is empty.

◆ setStatusVt()

virtual void FFaMsg::setStatusVt ( const std::string &  )
inlineprotectedvirtual

GUI interface for setting the status message.

◆ setSubStep()

void FFaMsg::setSubStep ( int  step)
static

Assigns the substep counter.

◆ setSubStepVt()

virtual void FFaMsg::setSubStepVt ( int  )
inlineprotectedvirtual

GUI interface for assigning the substep counter.

◆ setSubTask()

void FFaMsg::setSubTask ( const std::string &  taskText)
static

Sets the subtask message in the GUI.

◆ setSubTaskVt()

virtual void FFaMsg::setSubTaskVt ( const std::string &  )
inlineprotectedvirtual

GUI interface for setting the subtask message.

◆ tip()

void FFaMsg::tip ( const std::string &  str)
static

Updates the tip message in the GUI (or prints it to console).

◆ tipVt()

void FFaMsg::tipVt ( const std::string &  str)
protectedvirtual

Prints tip message to the console.

◆ usingDefault()

bool FFaMsg::usingDefault ( )
static

Returns true if we are using the default messager.


The documentation for this class was generated from the following files: