//---------------------------------------------------------------------------
#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <FMX.Controls.hpp>
#include <FMX.Forms.hpp>
#include <FMX.Controls.Presentation.hpp>
#include <FMX.ListBox.hpp>
#include <FMX.Objects.hpp>
#include <FMX.StdCtrls.hpp>
#include <FMX.Types.hpp>
#include "FCamera.hpp"
#include <FMX.Layouts.hpp>
#include "Winsoft.FireMonkey.Obr.hpp"
//---------------------------------------------------------------------------
class TFormMain : public TForm
{
__published:  // IDE-managed Components
  TFCamera *FCamera;
  TLayout *Layout;
  TPaintBox *PaintBox;
  TPanel *PanelRight;
  TLabel *LabelBacklightCompensation;
  TCheckBox *CheckBoxBacklightCompensation;
  TTrackBar *TrackBarBacklightCompensation;
  TLabel *LabelBrightness;
  TTrackBar *TrackBarBrightness;
  TCheckBox *CheckBoxBrightness;
  TLabel *LabelColorEnable;
  TTrackBar *TrackBarColorEnable;
  TCheckBox *CheckBoxColorEnable;
  TLabel *LabelContrast;
  TTrackBar *TrackBarContrast;
  TCheckBox *CheckBoxContrast;
  TLabel *LabelExposure;
  TTrackBar *TrackBarExposure;
  TCheckBox *CheckBoxExposure;
  TLabel *LabelFocus;
  TTrackBar *TrackBarFocus;
  TCheckBox *CheckBoxFocus;
  TLabel *LabelGain;
  TTrackBar *TrackBarGain;
  TCheckBox *CheckBoxGain;
  TLabel *LabelGamma;
  TTrackBar *TrackBarGamma;
  TCheckBox *CheckBoxGamma;
  TLabel *LabelHue;
  TTrackBar *TrackBarHue;
  TCheckBox *CheckBoxHue;
  TLabel *LabelIris;
  TTrackBar *TrackBarIris;
  TCheckBox *CheckBoxIris;
  TLabel *LabelPan;
  TCheckBox *CheckBoxPan;
  TTrackBar *TrackBarPan;
  TLabel *LabelRoll;
  TTrackBar *TrackBarRoll;
  TCheckBox *CheckBoxRoll;
  TLabel *LabelSaturation;
  TTrackBar *TrackBarSaturation;
  TCheckBox *CheckBoxSaturation;
  TLabel *LabelSharpness;
  TTrackBar *TrackBarSharpness;
  TCheckBox *CheckBoxSharpness;
  TLabel *LabelTilt;
  TTrackBar *TrackBarTilt;
  TCheckBox *CheckBoxTilt;
  TLabel *LabelWhiteBalance;
  TTrackBar *TrackBarWhiteBalance;
  TCheckBox *CheckBoxWhiteBalance;
  TLabel *LabelZoom;
  TTrackBar *TrackBarZoom;
  TCheckBox *CheckBoxZoom;
  TButton *ButtonDefaultValues;
  TPanel *PanelTop;
  TLabel *LabelCamera;
  TComboBox *ComboBoxCamera;
  TLabel *LabelFormat;
  TComboBox *ComboBoxFormat;
  TButton *ButtonSaveCurrentImage;
  TTimer *Timer;
  TTimer *TimerObr;
  TFObr *FObr;
    TLabel *LabelBarcode;
  void __fastcall TimerTimer(TObject *Sender);
  void __fastcall FormCreate(TObject *Sender);
  void __fastcall ComboBoxFormatChange(TObject *Sender);
  void __fastcall ComboBoxCameraClick(TObject *Sender);
  void __fastcall ComboBoxCameraChange(TObject *Sender);
  void __fastcall ButtonSaveCurrentImageClick(TObject *Sender);
  void __fastcall ButtonDefaultValuesClick(TObject *Sender);
  void __fastcall TrackBarChange(TObject *Sender);
  void __fastcall CheckBoxChange(TObject *Sender);
  void __fastcall PaintBoxPaint(TObject *Sender, TCanvas *Canvas);
    void __fastcall FCameraImageAvailable(TObject *Sender, double SampleTime);
    void __fastcall TimerObrTimer(TObject *Sender);
private:  // User declarations
  void __fastcall SetDevices();
  void __fastcall SetFormats();
  void __fastcall SetTrackBars();
    void __fastcall StartDevice();
public:    // User declarations
  __fastcall TFormMain(TComponent* Owner);
  void __fastcall InvalidatePaintBox();
};
//---------------------------------------------------------------------------
extern PACKAGE TFormMain *FormMain;
//---------------------------------------------------------------------------
#endif
