//---------------------------------------------------------------------------
#ifndef Demo2FrmH
#define Demo2FrmH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include "RichView.hpp"
#include "RVScroll.hpp"
#include "RVStyle.hpp"
#include <vcl\Dialogs.hpp>
#include <vcl\Menus.hpp>
#include <Graphics.hpp>
#include <ImgList.hpp>
//---------------------------------------------------------------------------
class TfrmDemo2 : public TForm
{
__published:	// IDE-managed Components
    TRichView *rv;
    TRVStyle *rvs;
    TFontDialog *fdlg;
    TColorDialog *cdlg;
    TPopupMenu *pm;
    TMenuItem *mitBack;
    TMenuItem *mitBreak;
    TMenuItem *mitText;
    TMenuItem *mitHighlight;
    TImageList *il;
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
    void __fastcall rvRVMouseDown(TCustomRichView *Sender, TMouseButton Button,
    TShiftState Shift, int ItemNo, int X, int Y);
    void __fastcall rvRVMouseUp(TCustomRichView *Sender, TMouseButton Button,
    TShiftState Shift, int ItemNo, int X, int Y);
    void __fastcall mitBackClick(TObject *Sender);
    void __fastcall mitBreakClick(TObject *Sender);
    void __fastcall mitTextClick(TObject *Sender);
    void __fastcall mitHighlightClick(TObject *Sender);
private:	// User declarations
    void ChangeBackgroundColor();
    void ChangeTextStyle(int StyleNo);
    void ChangeBreakColor(int ItemNo);
    void ChangeHighlightColor(int StyleNo);
public:		// User declarations
    __fastcall TfrmDemo2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern TfrmDemo2 *frmDemo2;
//---------------------------------------------------------------------------
#endif
