//---------------------------------------------------------------------------
/*
Remote Train Control Program for Windows

© Copyright 2015 by Mark DiVecchio

    This file is part of Remote Train Control.

    Remote Train Control is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Remote Train Control is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Remote Train Control.  If not, see <http://www.gnu.org/licenses/>.

*/
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#ifndef Engine_CommandsH
#define Engine_CommandsH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "_GClass.hpp"
#include "AbSwitch.hpp"
#include "AbVSlide.hpp"
#include "HideButton.h"
#include <ExtCtrls.hpp>
#include <Grids.hpp>
#include "AbCBitBt.hpp"
#include "AbDial.hpp"
#include <Graphics.hpp>
#include "ColorButton.hpp"

//---------------------------------------------------------------------------
class TEngineCommands : public TForm
{
__published:	// IDE-managed Components
	TAbRockerSwitch *ProtoWhistleSwitch;
	TAbRockerSwitch *SmokeWhistleSwitch;
	TAbRockerSwitch *SwingingBellSwitch;
	TAbVSlider *WhistleSlider;
	TAbRockerSwitch *ab3ab2Switch;
	TAbRockerSwitch *ab5ab4Switch;
	TAbRockerSwitch *ab7ab6Switch;
	TLabel *Operation_Controls_Label;
	THideButton *HideButton;
	TAbRockerSwitch *ab1C1DSwitch;
	TAbRockerSwitch *AltHornSwitch;
	TLabel *Label1;
	TLabel *Label2;
	TLabel *Label3;
	TLabel *Label4;
	TLabel *Label5;
	TLabel *Label6;
	TShape *Shape1;
	TAbRockerSwitch *ab1E1FSwitch;
	TStaticText *StaticText1;
	TAbRockerSwitch *ab9ab8Switch;
	TAbRockerSwitch *abBabASwitch;
	TAbRockerSwitch *abDabCSwitch;
	TAbRockerSwitch *abFabESwitch;
	TLabel *Label7;
	TLabel *Label8;
	TLabel *Label9;
	TAbColBitBtn *SXSButton;
	TImage *Copyright;
	TGroupBox *CoorsGroupBox;
	TColorButton *CoorsColorButton;
	TButton *CoorsDoorsOpen;
	TButton *CoorsDoorsClose;
	TButton *AllLightsOffButton;
    TButton *DefaultLightsButton;
	TLabel *Label10;
	TLabel *Label11;
	TLabel *Label12;
	TLabel *Label13;
	TLabel *Label14;
	TLabel *Label15;
	TShape *Shape2;
    TEdit *CommandLine;
    TShape *Shape3;
    TButton *SendButton;
    TLabel *Label16;
    TShape *Shape4;
    TAbRockerSwitch *ab1ab0Switch;
    TLabel *Label17;
    TLabel *Label18;
    TLabel *Label19;
    TLabel *Label20;
    TLabel *Label21;
	void __fastcall SwingingBellSwitchStatusChanged(TObject *Sender);
	void __fastcall SmokeWhistleSwitchStatusChanged(TObject *Sender);
	void __fastcall ProtoWhistleSwitchStatusChanged(TObject *Sender);
	void __fastcall HideButtonClick(TObject *Sender);
	void __fastcall ab3ab2SwitchStatusChanged(TObject *Sender);
	void __fastcall ab5ab4SwitchStatusChanged(TObject *Sender);
	void __fastcall ab7ab6SwitchStatusChanged(TObject *Sender);
	void __fastcall WhistleSliderValueChange(TObject *Sender);
	void __fastcall ab1C1DSwitchStatusChanged(TObject *Sender);
	void __fastcall ab1E1FSwitchStatusChanged(TObject *Sender);
	void __fastcall AltHornSwitchStatusChanged(TObject *Sender);
	void __fastcall ab9ab8SwitchStatusChanged(TObject *Sender);
	void __fastcall abBabASwitchStatusChanged(TObject *Sender);
	void __fastcall abDabCSwitchStatusChanged(TObject *Sender);
	void __fastcall abFabESwitchStatusChanged(TObject *Sender);
	void __fastcall SXSButtonMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
	void __fastcall CoorsDoorsOpenClick(TObject *Sender);
	void __fastcall CoorsDoorsCloseClick(TObject *Sender);
	void __fastcall CoorsColorButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall AllLightsOffButtonClick(TObject *Sender);
	void __fastcall DefaultLightsButtonClick(TObject *Sender);
	void __fastcall CopyrightClick(TObject *Sender);
	void __fastcall Operation_Controls_LabelClick(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall FormDeactivate(TObject *Sender);
    void __fastcall SendButtonClick(TObject *Sender);
    void __fastcall CommandLineKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
    void __fastcall ab1ab0SwitchStatusChanged(TObject *Sender);
    
private:	// User declarations
    int RemoteNo, ConsistNo, TIUNo;
    String ConsistName;
    char * LashUpEngineListOp;
	__fastcall TEngineCommands(TComponent* Owner);
    bool LocalTransparencyOverride;    

public:		// User declarations
    __fastcall TEngineCommands(TComponent* Owner, int, int, int, String, char *);
    __fastcall ~TEngineCommands(void);
	HWND ParentHandle;	// accessed by Train_Control.cpp
};
//---------------------------------------------------------------------------
extern PACKAGE TEngineCommands *EngineCommands;
//---------------------------------------------------------------------------
#endif
