//---------------------------------------------------------------------------
#ifndef lebcb_5aH
#define lebcb_5aH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\Dialogs.hpp>
#include "LEDlp32.hpp"
//---------------------------------------------------------------------------
class TCppPasForm : public TForm
{
__published:	// IDE-managed Components
	TLEdit *WndCPP;
	TLEdit *WndPAS;
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall WndCPPControlHighlight(TObject *Sender, WORD WordType,
	long WordValue, AnsiString WordStr, TColor &ForeClr, TColor &BackClr);
	void __fastcall WndCPPFindBrace(TObject *Sender, WORD WordType, long WordValue,
	AnsiString WordStr, TLEBraceStyle &BraceType);
	void __fastcall WndCPPWordClick(TObject *Sender, WORD WordType, long WordValue,
	AnsiString WordStr, bool &WordHandled);
	void __fastcall WndPASControlHighlight(TObject *Sender, WORD WordType,
	long WordValue, AnsiString WordStr, TColor &ForeClr, TColor &BackClr);
	void __fastcall WndPASFindBrace(TObject *Sender, WORD WordType, long WordValue,
	AnsiString WordStr, TLEBraceStyle &BraceType);
	void __fastcall WndPASWordClick(TObject *Sender, WORD WordType, long WordValue,
	AnsiString WordStr, bool &WordHandled);
private:	// User declarations
public:		// User declarations
	__fastcall TCppPasForm(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TCppPasForm *CppPasForm;
//---------------------------------------------------------------------------

#define CPP_WORDS        14
#define PAS_WORDS        29
#define PAS_LEFT_BRACE   "begin"
#define PAS_RIGHT_BRACE  "end"
  // Actually "end" has multiple braces such as "case" or
  // "record", but multiple braces aren't supported now
  // Pascal source is written without such words and therefore
  // Find Brace will work properly on it

static LPSTR CPPWords[CPP_WORDS] = {  // Small subset of C++ keywords
  "switch","case","default","break","return","if","else","while","for",
  "#define","#include","#ifdef","#else","#endif"};

static LPSTR PASWords[PAS_WORDS] = {  // Small subset of Pascal keywords
    "begin","end","case","break","exit","if","then","while","for","do",
    "uses","type","const","var","function","class","private","public",
    "published","procedure","implementation","interface","or","and","div",
    "unit","mod","shl","shr"};

#endif

