//---------------------------------------------------------------------------
#ifndef PreviewH
#define PreviewH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>

#include "QManager.h"
#include <ComCtrls.hpp>
#include <ToolWin.hpp>
//---------------------------------------------------------------------------
class TFPreview : public TForm {
__published:
  TImage *Image;
  TToolBar *TBRPreview;
  TToolButton *TBShowIndex;
  TButton *BOK;
  TButton *BCancel;
  TToolButton *ToolButton1;
  TToolButton *TBShowVG;
  TToolButton *ToolButton3;
  TToolButton *ToolButton2;
  TComboBox *CBZoom;
  TToolButton *ToolButton4;
  void __fastcall TBShowIndexClick(TObject *Sender);
  void __fastcall TBShowVGClick(TObject *Sender);
  void __fastcall CBZoomChange(TObject *Sender);
  void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  
private:
  QDraw *qDraw;
  QManager *qManager;
  void ClearCanvas(void);
  void DrawAll(void);
  void ChangeSize(void);
  static const int MAX_WIDTH;
  static const int MAX_HEIGHT;

public:

  void Execute(QManager *);
  __fastcall TFPreview(TComponent* Owner);
  
};
//---------------------------------------------------------------------------
const int TFPreview::MAX_WIDTH = 640;
const int TFPreview::MAX_HEIGHT = 400;
//---------------------------------------------------------------------------
extern PACKAGE TFPreview *FPreview;
//---------------------------------------------------------------------------
#endif
