//---------------------------------------------------------------------------
#ifndef TMCC_ControlH
#define TMCC_ControlH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "_GClass.hpp"
#include "AbCBitBt.hpp"
#include "AbLED.hpp"
#include "AbNumEdit.hpp"
#include "AbSwitch.hpp"
#include "AbVSlide.hpp"
#include "HideButton.h"
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include "ColorButton.hpp"
//---------------------------------------------------------------------------
class TTMCCOp : public TForm
{
__published:	// IDE-managed Components
	TLabel *Operation_Controls_Label;
	TAbColBitBtn *ESTOP;
	THideButton *HideButton;
	TButton *OpShutdown;
	TTimer *BoostBrakeTimer;
	TTimer *SpeedStepTimer;
	TPanel *Panel1;
	TAbRockerSwitch *BellSwitch;
	TAbRockerSwitch *HDLTSwitch;
	TAbRockerSwitch *LINSwitch;
	TAbRockerSwitch *SmokeSwitch;
	TAbRockerSwitch *AXLightsSwitch;
	TAbRockerSwitch *SpeedStepSwitch;
	TAbRockerSwitch *ChuffRateSwitch;
	TAbRockerSwitch *ProtoChuffSwitch;
	TAbRockerSwitch *BrakesSwitch;
	TAbRockerSwitch *CabChatterSwitch;
	TAbRockerSwitch *ClickClackSwitch;
	TAbRockerSwitch *AutoCouplerSwitch;
	TAbRockerSwitch *AutoBellWhistleSwtich;
	TLabel *Label1;
	TAbVSlider *StepSlider;
	TAbColBitBtn *BoostButton;
	TAbColBitBtn *BrakeButton;
	TAbColBitBtn *VolUpButton;
	TAbColBitBtn *VolDnButton;
	TAbColBitBtn *WhistleButton;
	TAbColBitBtn *BellButton;
	TAbColBitBtn *CPLRFButton;
	TAbColBitBtn *CPLRRButton;
	TAbLED *EngineTypeLED;
	TComboBox *EngineTypeComboBox;
	TAbColBitBtn *LaborRevUpButton;
	TAbColBitBtn *DriftRevDnButton;
	TAbColBitBtn *HeadlightButton;
	TRadioGroup *MOMGroup;
	TLabel *Label5;
	TLabel *Label9;
	TLabel *Label2;
	TLabel *Label10;
	TLabel *Label7;
	TLabel *Label6;
	TLabel *Label11;
	TAbColBitBtn *DIRButton;
	TAbLED *MotionSoundRequest;
	TColorButton *StopButtonOp;
	TAbColBitBtn *SpeedUpButton;
	TAbColBitBtn *SpeedDnButton;
	TAbRockerSwitch *ab3ab2Switch;
	TAbRockerSwitch *ab5ab4Switch;
	TAbRockerSwitch *ab7ab6Switch;
	TImage *Copyright;
	void __fastcall WhistleButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall WhistleButtonMouseUp(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
	void __fastcall DIRButtonClick(TObject *Sender);
	void __fastcall CPLRFButtonMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
	void __fastcall CPLRRButtonMouseDown(TObject *Sender, TMouseButton Button,
          TShiftState Shift, int X, int Y);
	void __fastcall SmokeSwitchStatusChanged(TObject *Sender);
	void __fastcall BoostButtonStatusChanged(TObject *Sender);
	void __fastcall BoostBrakeTimerTimer(TObject *Sender);
	void __fastcall OpShutdownClick(TObject *Sender);
	void __fastcall BellButtonClick(TObject *Sender);
	void __fastcall HeadlightButtonClick(TObject *Sender);
	void __fastcall StopButtonOpMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall MOMGroupClick(TObject *Sender);
	void __fastcall AUXLightsSwitchStatusChanged(TObject *Sender);
	void __fastcall VolUpButtonClick(TObject *Sender);
	void __fastcall VolDnButtonClick(TObject *Sender);
	void __fastcall LaborRevUpButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall DriftRevDnButtonMouseDown(TObject *Sender,
          TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall SpeedStepSwitchStatusChanged(TObject *Sender);
	void __fastcall StepSliderValueChange(TObject *Sender);
	void __fastcall EngineTypeComboBoxClick(TObject *Sender);
	void __fastcall EngineTypeLEDClick(TObject *Sender);
	void __fastcall BrakeButtonStatusChanged(TObject *Sender);
	void __fastcall SpeedUpButtonStatusChanged(TObject *Sender);
	void __fastcall SpeedDnButtonStatusChanged(TObject *Sender);
	void __fastcall SpeedStepTimerTimer(TObject *Sender);
	void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall Operation_Controls_LabelClick(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall FormDeactivate(TObject *Sender);
	void __fastcall CopyrightClick(TObject *Sender);

protected:
    void __fastcall CMWhistle(TMessage &Message);
    void __fastcall CMCPLRF(TMessage &Message);
    void __fastcall CMCPLRR(TMessage &Message);
    void __fastcall CMBell(TMessage &Message);
    void __fastcall CMDir(TMessage &Message);

    BEGIN_MESSAGE_MAP
        MESSAGE_HANDLER(CM_WHISTLE, TMessage, CMWhistle)
        MESSAGE_HANDLER(CM_CPLRF, TMessage, CMCPLRF)
        MESSAGE_HANDLER(CM_CPLRR, TMessage, CMCPLRR)
        MESSAGE_HANDLER(CM_BELL, TMessage, CMBell)
        MESSAGE_HANDLER(CM_DIR, TMessage, CMDir)
    END_MESSAGE_MAP(TForm)

private:	// User declarations
    int RemoteNo, ConsistNo, TIUNo;
    String ConsistName;
	char * LashUpEngineList;
    int Speed_Steps;
    int SpeedUp1x, SpeedDn1x, SpeedUp2x, SpeedDn2x;
    bool LocalTransparencyOverride;    

public:		// User declarations
	__fastcall TTMCCOp(TComponent* Owner);
    __fastcall TTMCCOp(TComponent* Owner, int, int, int, String, char *);
    __fastcall ~TTMCCOp(void);
    bool Boosting, Braking;
    HWND ParentHandle;
};
//---------------------------------------------------------------------------
extern PACKAGE TTMCCOp *TMCCOp;
//---------------------------------------------------------------------------
#endif
