#ifndef __ALFFKPAD_H
#define __ALFFKPAD_H
/*  Project Biblio-Tec

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

	 OVERVIEW:
	 ALFFChooseKeyPad and ALFFKeyPad Classes definition. They
    are the Key Pad format choosing dialog and the Key Pad
    itself.

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

    LICENSE:      Biblio-Tec license (BiblTec.txt)
*/

#include "teclall.h"

/*----------------------------------------------------------------------*
 *	 Definitions for ALFFKeyPad - Smart Pad                              *
 *----------------------------------------------------------------------*/
#define HORIZKPAD      1
#define VERTKPAD       2

//{{ALFFDialog = ALFFKeyPad}}
class _TECLIBCLASS ALFFKeyPad : public ALFFDialog
{
 public:
  ALFFKeyPad (TWindow* parent, TResId idDlg, TModule* = 0,
				  bool scrCenter = true, TPoint wCenter = TPoint(0,0));
  ~ALFFKeyPad();
  char far* GetClassName() {return "ALFFKeyPad";}

  bool       IsVertical()   {return (kPadType == VERTKPAD);}
  bool       IsHorizontal() {return (kPadType == HORIZKPAD);}
  void       Destroy(int retValue);

 protected:
	 LRESULT    	EvCommand(uint controlId, HWND , uint notifyCode);
	 TWindow*      kpParent;
	 int           kPadType;
    TPoint        mainCenter;
};

//{{ALFFDialog = ALFFChooseKPad}}
class _TECLIBCLASS ALFFChooseKeyPad : public ALFFDialog
{
 public:
	 ALFFChooseKeyPad (TWindow* parent, TResId idDlg,
							 ALFFKeyPad** kPad, int kType=0,
							 TModule* module=0);
	 ~ALFFChooseKeyPad();
    char far* GetClassName() {return "ALFFChooseKeyPad";}

	 void          GetKeyPad(TPoint* pos);

 protected:
	 void 			SetupWindow();
	 void          CmOk();
	 void          CmCancel();
	 void          CmHelp();
	 LRESULT    	EvCommand(uint controlId, HWND , uint notifyCode);
	 TWindow*      ckpParent;
	 ALFFMsgs*     pMsgs;
	 ALFFKeyPad**  keyPad;
    ALFFHelp*     helpFile;
	 int           kPadType;
	 TGroupBox*    chooseKPad;
	 TRadioButton* horizKPad;
	 TRadioButton* vertKPad;
	 TPoint        kPadPos;
    bool          kpCenter;
};
#endif

