	#if !defined(__alffndlg_h)              // Sentry, use file only if it's not already included.
#define __alffndlg_h
/*  Project Tec3270

	 SUBSYSTEM:    Tec3270.exe (Tec3270 application)
	 FILE:         alffndlg.h
	 AUTHOR:       Alcindo Ferreira Filho

	 OVERVIEW:

    ALFFColorSelect, ALFFConnectDlg, ALFFRemotePrinterDlg
    Classes Definition, Tec3270 session specific dialogs.

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

    LICENSE:      Tec3270_License (docs/Tec3270_License.txt)
*/
#include "alffnaux.h"
#include "alffmsgs.h"   	//* TecLib Message Object Include
#include "alffinif.h"   	//* TecLib Ini File Object Include
#include "alffnmdc.h"
#include "alfflogf.h"   	//* TecLib Log File Object Include
#include "alffnttl.h"
#include "alff3270.h"
#include "alffntsc.h"
#include "alffstat.h"   	//* Teclib Static Control
#include "tec3270.rh"   	//* Definition of all resources.
#include "alffx509.h"  		//* Definition of X509 Certificate classes
#include "alffsslcomm.h"   //* Definition of SSL Comm class
#include "alffutil.h"
#include <owl/notetab.h>   //* TNoteTab definition

/////////////////////////////////////////////////////////////////////
// ALFFMDIChild Dialogs
//
//{{ALFFDialog = ALFFColorSelect}}
class ALFFColorSelect : public ALFFDialog
{
 public:
  ALFFColorSelect (TWindow* parent, ALFFConnData* cnnData,
						 TResId idDlg=IDD_ALFFCOLORS, bool sessCol=true);
  ~ALFFColorSelect();
  char far* GetClassName() {return "ALFFColorSelect";}
 protected:
	 void 		SetupWindow();
	 void       CmOk();
	 void       CmHelp();
	 COLORREF   SelectColor(const COLORREF initColor);
	 LRESULT    EvCommand(uint controlId, HWND , uint notifyCode);
	 TWindow*       	clParent;
	 ALFFIniFile*     iniFile;
	 ALFFMsgs*        pMsgs;
	 ALFFConnData*  	connData;
	 bool             sessColors;
	 TGroupBox*       virtTerm;

	 // Colors Examples Static Text
	 ALFFStatic*      normalText;
	 ALFFStatic*      bkgdColor;
	 ALFFStatic*      bkgd3270Color;
	 ALFFStatic*      nProtNormText;
	 ALFFStatic*      nProtHighText;
	 ALFFStatic*      protNormText;
	 ALFFStatic*      protHighText;
	 ALFFStatic*  		neutral;
	 ALFFStatic*  		blue;
	 ALFFStatic*  		red;
	 ALFFStatic*  		pink;
	 ALFFStatic*  		green;
	 ALFFStatic*  		turquoise;
	 ALFFStatic*  		yellow;
	 ALFFStatic*  		inverseNeutral; // (white on displays, black on printers)
	 ALFFStatic* 		black;
	 ALFFStatic*  		deepBlue;
	 ALFFStatic*  		orange;
	 ALFFStatic*  		purple;
	 ALFFStatic*  		paleGreen;
	 ALFFStatic*  		paleTurquoise;
	 ALFFStatic*  		gray;
	 ALFFStatic*  		white;
};

/* Connection Dialog */
class ALFFConnectDlg : public ALFFDialog
{
 public:
    ALFFConnectDlg (TWindow* parent, ALFFConnData* cnnData,
                  TResId idDlg, int config=SESSCONNECT);
    ~ALFFConnectDlg();
    char far* GetClassName() {return "ALFFConnectDlg";}
  	 bool       LoadConnection(const char* connName);
    int        GetButtonPressed() { return buttonPressed; }
 protected:
	 void 		SetupWindow();
	 bool       AddConnection(const char* connName);
	 bool       DeleteConnection(const char* connName);
    void			SaveConnection(const char* connName);
	 void       UpdateDialog();
	 void       CmHelp();

    //void       Destroy(int retValue=IDCANCEL);
    
	 TResult    EvCommand(uint controlId, THandle handle , uint notifyCode);
	 TWindow*       	cdParent;
	 ALFFIniFile*     iniFile;
	 ALFFMsgs*        pMsgs;
	 ALFFConnData*  	connData;
	 short*           connIndex;
    int              cdOpt;
    bool					newConn;
    int              buttonPressed;
    
	 /* Def PushButton Control */
	 TButton*      closeButton;
	 TButton*      addButton;
	 TButton*      delButton;
	 TButton*      updButton;

	 /* Connection List */
	 TComboBox*    connListBox;
	 char*         connList;
	 int           connSelIndex;
    int           connQuantity;

	 /* Connection Host Name and Port Number */
	 TEdit*        hostName;
	 TEdit*        portNumber;
	 TCheckBox* 	useSSLV2;
  	 TCheckBox* 	useSSLV3;

	 /* Connection Disconnect Options */
	 TGroupBox*    whenDiscGrp;
	 TRadioButton* connReconn;
	 TRadioButton* connExit;
	 TRadioButton* doNothing;

	 /* Connection Time Programming Options */
	 TGroupBox*    connTimeGrp;
	 TRadioButton* timeOutOpt;
	 TRadioButton* idleTimeOpt;
	 TRadioButton* pressKeyOpt;
	 TRadioButton* noActionOpt;
	 TStatic*      intvTimeTit;
	 TEdit* 			intvTime;
	 TStatic*      pressKeyTit;
	 TComboBox*    pressKey;

	 /* Connection Special Options */
	 TCheckBox* 	bringTop;
	 TCheckBox*		actYale;
	 TCheckBox*		connLog;
	 TCheckBox*		soundAlm;
	 TEdit* 			monTime;

	 /* Connection Terminal Type and Code Page */
	 TComboBox*    termType;
    TEdit*        terminalNetName;
	 TComboBox*    codePage;
    TButton*      connRemPrt;
    
	 /* Connection Script Processing Options */
	 TGroupBox*    scriptGrp;
	 TRadioButton*	scriptOn;
	 TStatic*      scriptTit;
	 TEdit*        scriptFile;
    TButton*      scriptBrowse;
};


//{{ALFFDialog = ALFFRemotePrinterDlg}}
class ALFFRemotePrinterDlg : public ALFFDialog
{
 public:
  ALFFRemotePrinterDlg (TWindow* parent, ALFFConnData* cnnData);
  ~ALFFRemotePrinterDlg();
  char far* GetClassName() {return "ALFFRemotePrinterDlg";}
 protected:
	 void 		SetupWindow();
    void       SetInact();
	 void       CmOk();
	 void       CmHelp();
	 LRESULT    EvCommand(uint controlId, HWND , uint notifyCode);
	 TWindow*       	clParent;
	 ALFFIniFile*     iniFile;
	 ALFFMsgs*        pMsgs;
	 ALFFConnData*  	connData;

    /* Temporary Fields: Info are valid on OK Button pressed */
    char*            tempPrinterNetName;
    bool             tempPrinterAssociated;
    bool             tempPrinterOnly;
	 bool    			tempPrinterInact;
	 bool    			tempPrinterOnColor;
	 bool    			tempPrinterDimen;
	 bool    			tempPrinterIgnoreFF;
	 bool    			tempPrinterBreakLine;
	 int     			tempPrinterTabWidth;
	 int					tempPrinterCharPerInch;
	 int					tempPrinterLinePerInch;
	 int					tempPrinterCharPerLine;
	 int					tempPrinterLinePerPage;
	 int					tempPrinterTimeInact;
	 int					tempPrinterTimeConcat;
 	 int					tempPrinterTimeEnd;
	 bool					tempPrinterNullLine;
	 bool					tempPrinterNullAsSpace;
	 bool					tempPrinterIgnoreAttr;
	 bool					tempPrinterFFAsSpace;
	 bool	   			tempPrinterFFAnyPos;
	 bool					tempPrinterEndLineNL;
	 bool					tempPrinterEndLineCR;
	 bool					tempPrinterSCSErr;
	 bool					tempprinterInheritParm;

	 // Remote Printer Dialog Controls
    TEdit*      printerNetName;
    TCheckBox*  printerInact;
    TCheckBox*  printerAssociated;
    TCheckBox*  printerOnly;
	 TCheckBox*	 printerOnColor;
	 TCheckBox*	 printerDimen;
	 TCheckBox*	 printerIgnoreFF;
	 TCheckBox*  printerBreakLine;
	 TEdit*   	 printerTabWidth;
	 TComboBox*	 printerCharPerInch;
	 TComboBox*	 printerLinePerInch;
	 TEdit*   	 printerCharPerLine;
	 TEdit*   	 printerLinePerPage;
	 TEdit*   	 printerTimeInact;
	 TEdit*  	 printerTimeConcat;
	 TEdit*  	 printerTimeEnd;
	 TCheckBox*	 printerNullLine;
	 TCheckBox*	 printerNullAsSpace;
	 TCheckBox*	 printerIgnoreAttr;
	 TCheckBox*	 printerFFAsSpace;
	 TCheckBox*	 printerFFAnyPos;
	 TCheckBox*	 printerEndLineNL;
	 TCheckBox*	 printerEndLineCR;
	 TCheckBox*	 printerSCSErr;
	 TCheckBox*	 printerInheritParm;
};

#endif    // __alffndlg_h sentry.
