#if !defined(__alffinput_h) // Sentry, use file only if it's not already included.
#define __alffinput_h
/*  Project Biblio-Tec

	 SUBSYSTEM:    TEC30r.dll Library (TecLib)
	 FILE:         alffinpt.h
	 AUTHOR:       Alcindo Ferreira Filho

	 OVERVIEW:
	 ALFFInputDialog Class definition, used for getting text and
    password input.

    COPYRIGHT:    © 1998-2005
                  Alcindo Ferreira Filho
                  <alcindo@inttec.com.br>

    LICENSE:      Biblio-Tec license (BiblTec.txt)
*/
#include <owl/owlall.h>
#include "alffdlg.h"    /* TECLib Dialog Object           */
#include "teclib.rh"   /* TECLib Defines                 */

class _TECLIBCLASS ALFFInputDialog : public ALFFDialog
{
  public:
    ALFFInputDialog(TWindow*        parent,
                 const char far* title,
                 const char far* prompt,
                 char far*       buffer,
                 int             bufferSize,
                 bool            pwd = false,
                 char            pwdChar = '*',
                 TModule*        module = 0,
                 TValidator*     valid = 0);  // Optional validator

   ~ALFFInputDialog();
    char far* GetClassName() {return "ALFFInputDialog";}

    // Override TWindow virtual member functions
    //
    void TransferData(TTransferDirection);

    const char far* GetPrompt() const;
    const char far* GetBuffer() const;
    int             GetBufferSize() const;

  protected:
    // Override TWindow virtual member functions
    //
    void   SetupWindow();
    TEdit* input;

  public_data:
    char far* Prompt;
    char far* Buffer;
    int       BufferSize;

  private:
    // Hidden to prevent accidental copying or assignment
    //
    ALFFInputDialog(const TInputDialog&);
    ALFFInputDialog& operator=(const ALFFInputDialog&);
};


//----------------------------------------------------------------------------
// Inline implementations
//

//
// Return the prompt for the dialog.
//
inline const char far* ALFFInputDialog::GetPrompt() const
{
  return Prompt;
}

//
// Return the buffer.
//
inline const char far* ALFFInputDialog::GetBuffer() const
{
  return Buffer;
}

//
// Return the size of the buffer.
//
inline int ALFFInputDialog::GetBufferSize() const
{
  return BufferSize;
}


#endif  //
