
/*********************************************************************
 ** Copyright (c) 1992-2022 MAK Technologies, Inc.
 ** All rights reserved.
 *********************************************************************/

/*********************************************************************
 **
 *t  diguyInfoPopup
 **
 *b    Link against: libdiguy
 */

#ifndef __diguyInfoPopup_H
#define __diguyInfoPopup_H

#ifdef SWIG
%module diguyInfoPopup
#else
#define CPLUSPLUS_ONLY
#endif

#ifdef CPLUSPLUS_ONLY

class bdiScenarioInfoPopup;
class diguyInfoPopup;

#endif /* CPLUSPLUS_ONLY */


#include <declspec_diguy.h>

/****************************************************************************/
class BDI_DECLSPEC_diguy diguyInfoPopup
{

public:

   /*l
    *b  Description:
    **
    **    Returns the name of the info popup.  This pointer will
    **    never be NULL.
    **
    *b  Returns:
    **
    **    name of the info popup
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    */
   const char* get_name();

   /*l
    *b  Description:
    **
    **    This function sets the name of this object.
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    */
   int set_name(const char* name);

   /*l
    *b  Description:
    **
    **    This function shows the info popup.
    **
    *b  Arguments:
    **
    *a    duration - length of time in seconds to show to the info popup;
    *a               the default argument of -1 will show the info popup
    *a               indefinitely, until the hide() function is called
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    *-    - Decision Bead
    */
   int show(float show_duration = -1.0f);

   /*l
    *b  Description:
    **
    **    This function hides the info popup, if it is currently shown.
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    *-    - Decision Bead
    */
   int hide();

   /*l
    *b  Returns:
    **
    **    Returns 1 if the info popup is showing, 0 if not.
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    *-    - Decision Bead
    */
   int is_showing();

   /*l
    *b  Description:
    **
    **    This function clears the contents of the info popup.
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    */
   int clear();

   /*l
    *b  Description:
    **
    **    This function appends the contents of the file identified
    **    by filename to the info popup.
    **
    *b  Arguments:
    **
    *a    filename - name of the file
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    */
   int append_file(const char* filename);

   /*l
    *b  Description:
    **
    **    This function appends a string to the info popup.
    **
    *b  Arguments:
    **
    *a    string - string to append
    **
    *b  Returns:
    **
    **    0 on success, -1 on failure
    **
    *b  Callable From:
    **
    *-    - C++
    *-    - Script
    */
   int append_string(const char* string);


/**
 *x  The functions and variables past this point are for internal use only.
 **   No external access to them is expected or necessary.
 */
#ifdef CPLUSPLUS_ONLY

private:

   /*l
    **    A private constructor.
    */
   diguyInfoPopup(bdiScenarioInfoPopup* info_popup);

   /*l
    **    A pointer to internal data.
    */
   bdiScenarioInfoPopup* m_scripted_object;

   friend class bdiScenarioInfoPopup;

#endif /* CPLUSPLUS_ONLY */

};

#endif /* __diguyInfoPopup_H */
