//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "RichView.hpp"
#include "RVScroll.hpp"
#include "RVStyle.hpp"
#include "CRVFData.hpp"
#include "RVTable.hpp"
#include <Graphics.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
	TRichView *RichView1;
	TRVStyle *RVStyle1;
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall RichView1MouseMove(TObject *Sender, TShiftState Shift, int X,
	int Y);
	void __fastcall RichView1RVMouseUp(TCustomRichView *Sender,
	TMouseButton Button, TShiftState Shift, int ItemNo, int X, int Y);
	void __fastcall RichView1Jump(TObject *Sender, int id);
private:	// User declarations
    TCustomRVFormattedData* HighlightedRVData; // highlighted cell
    int AnsweredCount; // number of answered count
    bool Ready; // "ready!" is clicked
    void BuildQuiz();
    void FillQuestion(TStringList* sl, const UnicodeString arr[], int& CorrectAnswer);
    void AddTable(const UnicodeString Question, TStringList* Answers,
      int CorrectAnswer);
	void HighlightCell(TCustomRVFormattedData* RVData);
    void SelectCell(TCustomRVFormattedData* RVData);          
public:		// User declarations
	__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
 