//---------------------------------------------------------------------------

#ifndef MenuBarH
#define MenuBarH

#define MENU_POP			0
#define MENU_FILE			1
#define MENU_EDIT			2
#define MENU_VIEW			3
#define MENU_TRACK			4
#define MENU_TOOL			5
#define MENU_HELP			6
#define SYS_MENU_NUM 		6

#define MENUBAR_LEFT	50
#define MENUBAR_TOP		4
#define OFFSET_BR		12

#define CLR_TEXT_NOR RGB( 156, 170, 189 )
#define CLR_TEXT_HOT RGB( 201, 214, 229 )

#include <Vcl.AppEvnts.hpp>
//---------------------------------------------------------------------------
class TTextMenu
{
private:
	String m_strCaption, m_strShortCut;
public:
	int Left, Width, iState, iType;

	__fastcall TTextMenu( String caption, String shortcut, int type );

	void __fastcall Draw( TCanvas* pCanvas );
	void __fastcall ShowMenu( bool bShow );
	void __fastcall Invalidate();
};

class TMenuBar
{
private:
	TTextMenu* m_aTextMenu[SYS_MENU_NUM];
	TCanvas* m_pCanvas;

	int m_nMenuCount;
	bool m_bMenuShow;
	int m_iSelMenu;
public:
	int Width;

	__fastcall TMenuBar( TComponent* Owner,TCanvas* pCanvas );
	__fastcall ~TMenuBar();

	void AddMenu( String caption, String shortcut, int iType );
	bool __fastcall HitTest( int XPos, int YPos, bool bLBDown=false );
	void __fastcall DrawMenuBar();
	void __fastcall Reset();

	int GetHeight();
	void ShowMenu( int iType );
};
//---------------------------------------------------------------------------
#endif
