// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ahmmenu.pas' rev: 6.00

#ifndef ahmmenuHPP
#define ahmmenuHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <ahmtmhkclass.hpp>	// Pascal unit
#include <ActnList.hpp>	// Pascal unit
#include <ImgList.hpp>	// Pascal unit
#include <ComCtrls.hpp>	// Pascal unit
#include <ShellAPI.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Ahmmenu
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS EAHMMenuError;
class PASCALIMPLEMENTATION EAHMMenuError : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall EAHMMenuError(const AnsiString Msg) : Sysutils::Exception(Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EAHMMenuError(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EAHMMenuError(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EAHMMenuError(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EAHMMenuError(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EAHMMenuError(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EAHMMenuError(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EAHMMenuError(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EAHMMenuError(void) { }
	#pragma option pop
	
};


class DELPHICLASS EDuplicateMainMenu;
class PASCALIMPLEMENTATION EDuplicateMainMenu : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall EDuplicateMainMenu(const AnsiString Msg) : Sysutils::Exception(Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EDuplicateMainMenu(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EDuplicateMainMenu(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EDuplicateMainMenu(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EDuplicateMainMenu(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EDuplicateMainMenu(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EDuplicateMainMenu(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EDuplicateMainMenu(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EDuplicateMainMenu(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TAHMBackgroundType { btCenter, btTiled };
#pragma option pop

typedef Shortint TAHMBarWidth;

class DELPHICLASS TAHMBitmapItem;
class PASCALIMPLEMENTATION TAHMBitmapItem : public Graphics::TGraphicsObject 
{
	typedef Graphics::TGraphicsObject inherited;
	
private:
	Graphics::TColor FTransparentColor;
	Graphics::TBitmap* FBitmap;
	bool FCaptionOnTop;
	void __fastcall SetBitmap(Graphics::TBitmap* Value);
	void __fastcall BitmapChange(System::TObject* Sender);
	void __fastcall SetTransparentColor(Graphics::TColor Value);
	void __fastcall SetCaptionOnTop(bool Value);
	
public:
	bool __fastcall HasBitmap(void);
	__fastcall TAHMBitmapItem(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMBitmapItem(void);
	
__published:
	__property bool CaptionOnTop = {read=FCaptionOnTop, write=SetCaptionOnTop, default=0};
	__property Graphics::TBitmap* Bitmap = {read=FBitmap, write=SetBitmap};
	__property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor, default=536870911};
};


class DELPHICLASS TAHMMenuGradient;
class DELPHICLASS TAHMSubMenu;
class DELPHICLASS TAHMMenuItem;
#pragma option push -b-
enum TAHMMenuBreak { mbNone, mbBreak, mbBarBreak };
#pragma option pop

class DELPHICLASS TAHMMenuActionLink;
class PASCALIMPLEMENTATION TAHMMenuActionLink : public Actnlist::TActionLink 
{
	typedef Actnlist::TActionLink inherited;
	
protected:
	Menus::TMenuItem* FClient;
	virtual void __fastcall AssignClient(System::TObject* AClient);
	virtual bool __fastcall IsCaptionLinked(void);
	virtual bool __fastcall IsCheckedLinked(void);
	virtual bool __fastcall IsEnabledLinked(void);
	virtual bool __fastcall IsHelpContextLinked(void);
	virtual bool __fastcall IsHintLinked(void);
	virtual bool __fastcall IsImageIndexLinked(void);
	virtual bool __fastcall IsShortCutLinked(void);
	virtual bool __fastcall IsVisibleLinked(void);
	virtual bool __fastcall IsOnExecuteLinked(void);
	virtual void __fastcall SetCaption(const AnsiString Value);
	virtual void __fastcall SetChecked(bool Value);
	virtual void __fastcall SetEnabled(bool Value);
	virtual void __fastcall SetHelpContext(Classes::THelpContext Value);
	virtual void __fastcall SetHint(const AnsiString Value);
	virtual void __fastcall SetImageIndex(int Value);
	virtual void __fastcall SetShortCut(Classes::TShortCut Value);
	virtual void __fastcall SetVisible(bool Value);
	virtual void __fastcall SetOnExecute(Classes::TNotifyEvent Value);
public:
	#pragma option push -w-inl
	/* TBasicActionLink.Create */ inline __fastcall virtual TAHMMenuActionLink(System::TObject* AClient) : Actnlist::TActionLink(AClient) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBasicActionLink.Destroy */ inline __fastcall virtual ~TAHMMenuActionLink(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMMenu;
#pragma option push -b-
enum TAHMSelectType { selNormal, selRaised, selSunken };
#pragma option pop

typedef void __fastcall (__closure *TAHMOnHint)(System::TObject* Sender, AnsiString LongHint, AnsiString Hint);

#pragma option push -b-
enum TAHMFindItemKind { fkCommand, fkHandle, fkShortCut };
#pragma option pop

class PASCALIMPLEMENTATION TAHMMenu : public Menus::TPopupMenu 
{
	typedef Menus::TPopupMenu inherited;
	
private:
	bool FAutoPopup;
	Ahmtmhkclass::TAHMMenuHookClass* FHookClass;
	TAHMSelectType FSelectType;
	TAHMOnHint FOnHint;
	TAHMMenuItem* FItems;
	Controls::TCursor FCursor;
	bool FNewStyles;
	HWND FWindowHandle;
	AnsiString FMenuImage;
	Graphics::TFont* FFont;
	Controls::TImageList* FImages;
	Imglist::TChangeLink* FImageChangeLink;
	Graphics::TFont* FSelectedFont;
	Graphics::TColor FSelectedColor;
	Graphics::TFont* FDividerFont;
	Classes::TNotifyEvent FOnPopup;
	bool fFullSelect;
	Menus::TPopupAlignment FAlignment;
	AnsiString FAboutMenus;
	void __fastcall SetSelectType(TAHMSelectType Value);
	void __fastcall SetNewStyles(bool Value);
	void __fastcall SetSelectedColor(Graphics::TColor Value);
	void __fastcall SetMenuFont(Graphics::TFont* Value);
	void __fastcall SetSelectedFont(Graphics::TFont* Value);
	void __fastcall FontChange(System::TObject* Sender);
	HIDESBASE void __fastcall SetImages(Controls::TImageList* Value);
	HIDESBASE void __fastcall ImageListChange(System::TObject* Sender);
	HIDESBASE void __fastcall SetWindowHandle(HWND Value);
	HIDESBASE bool __fastcall UpdateImage(void);
	void __fastcall SetDividerFont(Graphics::TFont* Value);
	void __fastcall ReloadHook(System::TObject* Sender);
	void __fastcall BeforeReloadHook(System::TObject* Sender);
	
protected:
	virtual void __fastcall DoPopup(System::TObject* Item);
	virtual void __fastcall MenuChanged(System::TObject* Sender, Menus::TMenuItem* Source, bool Rebuild);
	HWND __fastcall GetWindowHandle(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
	virtual HMENU __fastcall GetHandle(void);
	DYNAMIC void __fastcall SetChildOrder(Classes::TComponent* Child, int Order);
	void __fastcall WndProc(Messages::TMessage &Message, bool &Handled);
	virtual void __fastcall SetOwnerDrawAll(void);
	void __fastcall SetMenu(void);
	
public:
	virtual void __fastcall Popup(int X, int Y);
	__fastcall virtual TAHMMenu(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMMenu(void);
	virtual void __fastcall Loaded(void);
	HIDESBASE bool __fastcall DispatchCommand(Word ACommand);
	HIDESBASE bool __fastcall DispatchPopup(HMENU AHandle);
	HIDESBASE TAHMMenuItem* __fastcall FindItem(int Value, TAHMFindItemKind Kind);
	HIDESBASE Classes::THelpContext __fastcall GetHelpContext(int Value, bool ByCommand);
	DYNAMIC bool __fastcall IsShortCut(Messages::TWMKey &Message);
	__property HMENU Handle = {read=GetHandle, nodefault};
	__property HWND WindowHandle = {read=GetWindowHandle, write=SetWindowHandle, nodefault};
	
__published:
	__property AnsiString AboutMenus = {read=FAboutMenus, write=FAboutMenus};
	__property bool AutoPopup = {read=FAutoPopup, write=FAutoPopup, default=1};
	__property Menus::TPopupAlignment PopupAlignment = {read=FAlignment, write=FAlignment, default=0};
	__property Controls::TCursor Cursor = {read=FCursor, write=FCursor, default=0};
	__property bool FullSelect = {read=fFullSelect, write=fFullSelect, default=1};
	__property Graphics::TFont* SelectedFont = {read=FSelectedFont, write=SetSelectedFont};
	__property Graphics::TColor SelectedColor = {read=FSelectedColor, write=SetSelectedColor, nodefault};
	__property bool NewStyles = {read=FNewStyles, write=SetNewStyles, default=1};
	__property TAHMSelectType SelectType = {read=FSelectType, write=SetSelectType, default=0};
	__property Graphics::TFont* MenuFont = {read=FFont, write=SetMenuFont};
	__property Graphics::TFont* DividerFont = {read=FDividerFont, write=SetDividerFont};
	__property Controls::TImageList* Images = {read=FImages, write=SetImages};
	__property TAHMMenuItem* Items = {read=FItems};
	__property Classes::TNotifyEvent OnPopup = {read=FOnPopup, write=FOnPopup};
	__property TAHMOnHint OnHint = {read=FOnHint, write=FOnHint};
};


typedef void __fastcall (__closure *TAHMMenuChangeEvent)(System::TObject* Sender, Menus::TMenuItem* Source, bool Rebuild);

#pragma option push -b-
enum TAHMSystemItem { sicNone, sicRestore, sicMaximize, sicMinimize, sicSize, sicMove, sicClose, sicContextHelp, sicTaskList, sicMonitorPower };
#pragma option pop

typedef TMetaClass*TAHMMenuActionLinkClass;

class PASCALIMPLEMENTATION TAHMMenuItem : public Menus::TMenuItem 
{
	typedef Menus::TMenuItem inherited;
	
public:
	TAHMMenuItem* operator[](int Index) { return Items[Index]; }
	
private:
	AnsiString FCaption;
	HMENU FHandle;
	bool FEnabled;
	bool FDefault;
	bool FRadioItem;
	TAHMSubMenu* FSubMenuDetails;
	TAHMMenuBreak FBreak;
	Classes::TNotifyEvent FOnSelect;
	bool FVisible;
	Word FCommand;
	Classes::TList* FItems;
	TAHMMenuActionLink* FActionLink;
	Classes::TShortCut FShortCut;
	TAHMMenuItem* FParent;
	TAHMMenuItem* FMerged;
	TAHMMenuItem* FMergedWith;
	TAHMMenu* FMenu;
	Classes::THelpContext FHelpContext;
	AnsiString FHint;
	TAHMMenuChangeEvent FOnChange;
	Classes::TNotifyEvent FOnClick;
	int FImageIndex;
	int FCheckedIndex;
	int FDisabledImageIndex;
	bool FChecked;
	bool FDivider;
	int FItemWidth;
	int FItemHeight;
	TAHMBitmapItem* FAsBitmapItem;
	TAHMSystemItem FSystemItem;
	bool FDestroy;
	void __fastcall SystemClick(System::TObject* Sender);
	HIDESBASE void __fastcall SetVisible(bool Value);
	HIDESBASE void __fastcall DoActionChange(System::TObject* Sender);
	void __fastcall SetSystemItem(TAHMSystemItem Value);
	void __fastcall SetAsBitmapItem(TAHMBitmapItem* Value);
	HIDESBASE Classes::TBasicAction* __fastcall GetAction(void);
	HIDESBASE void __fastcall SetAction(Classes::TBasicAction* Value);
	HIDESBASE void __fastcall InitiateActions(void);
	HIDESBASE bool __fastcall IsCaptionStored(void);
	HIDESBASE bool __fastcall IsCheckedStored(void);
	HIDESBASE bool __fastcall IsEnabledStored(void);
	HIDESBASE bool __fastcall IsHelpContextStored(void);
	HIDESBASE bool __fastcall IsHintStored(void);
	HIDESBASE bool __fastcall IsImageIndexStored(void);
	HIDESBASE bool __fastcall IsOnClickStored(void);
	HIDESBASE bool __fastcall IsShortCutStored(void);
	HIDESBASE bool __fastcall IsVisibleStored(void);
	HIDESBASE void __fastcall AppendTo(HMENU Menu);
	void __fastcall ClearHandles(void);
	HIDESBASE void __fastcall ReadShortCutText(Classes::TReader* Reader);
	HIDESBASE void __fastcall MergeWith(TAHMMenuItem* Menu);
	HIDESBASE void __fastcall RebuildHandle(void);
	HIDESBASE void __fastcall PopulateMenu(void);
	HIDESBASE void __fastcall SubItemChanged(System::TObject* Sender, Menus::TMenuItem* Source, bool Rebuild);
	HIDESBASE void __fastcall TurnSiblingsOff(void);
	void __fastcall WriteShortCutText(Classes::TWriter* Writer);
	HIDESBASE void __fastcall VerifyGroupIndex(int Position, Byte Value);
	HIDESBASE void __fastcall SetImageIndex(int Value);
	void __fastcall SetCheckedIndex(int Value);
	void __fastcall SetDisabledImageIndex(int Value);
	void __fastcall SetDivider(bool Value);
	void __fastcall SubMenuChange(System::TObject* Sender);
	
protected:
	DYNAMIC void __fastcall ActionChange(System::TObject* Sender, bool CheckDefaults);
	DYNAMIC TMetaClass* __fastcall GetAHMActionLinkClass(void);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	TAHMMenu* __fastcall GetAHMMenu(void);
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
	HIDESBASE HMENU __fastcall GetHandle(void);
	HIDESBASE int __fastcall GetCount(void);
	DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
	HIDESBASE TAHMMenuItem* __fastcall GetItem(int Index);
	HIDESBASE int __fastcall GetMenuIndex(void);
	virtual void __fastcall MenuChanged(bool Rebuild);
	HIDESBASE void __fastcall SetBreak(TAHMMenuBreak Value);
	HIDESBASE void __fastcall SetMenuIndex(int Value);
	HIDESBASE void __fastcall SetCaption(const AnsiString Value);
	DYNAMIC void __fastcall SetChildOrder(Classes::TComponent* Child, int Order);
	HIDESBASE void __fastcall SetDefault(bool Value);
	HIDESBASE void __fastcall SetEnabled(bool Value);
	DYNAMIC void __fastcall SetParentComponent(Classes::TComponent* Value);
	HIDESBASE void __fastcall SetRadioItem(bool Value);
	HIDESBASE void __fastcall SetShortCut(Classes::TShortCut Value);
	void __fastcall DrawMenuItem(Messages::TWMDrawItem &ADrawItem);
	void __fastcall MeasureMenuItem(Messages::TWMMeasureItem &AMeasureItem);
	bool __fastcall ValidateType(void);
	__property TAHMMenuActionLink* ActionLink = {read=FActionLink, write=FActionLink};
	
public:
	virtual void __fastcall InitiateAction(void);
	DYNAMIC bool __fastcall HasParent(void);
	DYNAMIC Classes::TComponent* __fastcall GetParentComponent(void);
	Types::TPoint __fastcall GetSubSize();
	bool __fastcall HasImage(void);
	bool __fastcall ImageInMenuNoRoot(void);
	__fastcall virtual TAHMMenuItem(Classes::TComponent* AOwner);
	virtual void __fastcall Loaded(void);
	__fastcall virtual ~TAHMMenuItem(void);
	HIDESBASE void __fastcall Insert(int Index, TAHMMenuItem* Item);
	HIDESBASE void __fastcall Delete(int Index);
	virtual void __fastcall Click(void);
	HIDESBASE void __fastcall SetChecked(bool Value);
	HIDESBASE int __fastcall IndexOf(TAHMMenuItem* Item);
	HIDESBASE void __fastcall Add(TAHMMenuItem* Item);
	HIDESBASE void __fastcall Remove(TAHMMenuItem* Item);
	__property Word Command = {read=FCommand, nodefault};
	__property HMENU Handle = {read=GetHandle, nodefault};
	__property int Count = {read=GetCount, nodefault};
	__property TAHMMenuItem* Parent = {read=FParent};
	__property TAHMMenuItem* Items[int Index] = {read=GetItem/*, default*/};
	__property int MenuIndex = {read=GetMenuIndex, write=SetMenuIndex, nodefault};
	
__published:
	__property Classes::TBasicAction* Action = {read=GetAction, write=SetAction};
	__property Classes::THelpContext HelpContext = {read=FHelpContext, write=FHelpContext, stored=IsHelpContextStored, default=0};
	__property AnsiString Hint = {read=FHint, write=FHint, stored=IsHintStored};
	__property TAHMSystemItem SystemItem = {read=FSystemItem, write=SetSystemItem, default=0};
	__property TAHMBitmapItem* AsBitmapItem = {read=FAsBitmapItem, write=SetAsBitmapItem};
	__property TAHMSubMenu* SubMenuDetails = {read=FSubMenuDetails, write=FSubMenuDetails};
	__property bool Divider = {read=FDivider, write=SetDivider, default=0};
	__property TAHMMenuBreak Break = {read=FBreak, write=SetBreak, default=0};
	__property AnsiString Caption = {read=FCaption, write=SetCaption, stored=IsCaptionStored};
	__property bool Checked = {read=FChecked, write=SetChecked, stored=IsCheckedStored, default=0};
	__property bool Visible = {read=FVisible, write=SetVisible, stored=IsVisibleStored, default=1};
	__property bool Default = {read=FDefault, write=SetDefault, default=0};
	__property bool Enabled = {read=FEnabled, write=SetEnabled, stored=IsEnabledStored, default=1};
	__property bool RadioItem = {read=FRadioItem, write=SetRadioItem, default=0};
	__property Classes::TShortCut ShortCut = {read=FShortCut, write=SetShortCut, stored=IsShortCutStored, default=0};
	__property Classes::TNotifyEvent OnClick = {read=FOnClick, write=FOnClick, stored=IsOnClickStored};
	__property Classes::TNotifyEvent OnSelect = {read=FOnSelect, write=FOnSelect};
	__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, stored=IsImageIndexStored, default=-1};
	__property int CheckedIndex = {read=FCheckedIndex, write=SetCheckedIndex, stored=true, default=-1};
	__property int DisabledImageIndex = {read=FDisabledImageIndex, write=SetDisabledImageIndex, stored=true, default=-1};
};


class PASCALIMPLEMENTATION TAHMSubMenu : public Graphics::TGraphicsObject 
{
	typedef Graphics::TGraphicsObject inherited;
	
private:
	TAHMMenuItem* FOwnerMenu;
	bool FEnabled;
	Graphics::TBitmap* FBarBackground;
	bool FBarEnabled;
	Classes::TComponent* FParentComponent;
	AnsiString FBarCaption;
	TAHMBarWidth FBarWidth;
	Graphics::TColor FBarColor;
	AnsiString FBarFontName;
	Byte FBarFontSize;
	Graphics::TColor FBarFontColor;
	Graphics::TColor FColor;
	Graphics::TColor FTransparentColor;
	TAHMBackgroundType FBackgroundType;
	Graphics::TBitmap* FBackground;
	TAHMMenuGradient* FBarAsGradient;
	void __fastcall SetBackgroundType(TAHMBackgroundType Value);
	void __fastcall SetBackground(Graphics::TBitmap* Value);
	void __fastcall SetTransparentColor(Graphics::TColor Value);
	void __fastcall SetColor(Graphics::TColor Value);
	void __fastcall SetBarFontColor(Graphics::TColor value);
	void __fastcall SetBarAsGradient(TAHMMenuGradient* Value);
	void __fastcall SetBarFontSize(Byte value);
	void __fastcall SetBarFontName(AnsiString Value);
	void __fastcall SetBarColor(Graphics::TColor Value);
	void __fastcall SetBarBackground(Graphics::TBitmap* Value);
	void __fastcall SubMenuChange(System::TObject* Sender);
	void __fastcall SetBarWidth(TAHMBarWidth Value);
	void __fastcall SetBarEnabled(bool Value);
	void __fastcall SetBarCaption(AnsiString Value);
	void __fastcall SetEnabled(bool Value);
	
protected:
	__fastcall TAHMSubMenu(Classes::TComponent* AOwner, TAHMMenuItem* AHMMenu);
	
__published:
	__fastcall virtual ~TAHMSubMenu(void);
	__property TAHMBackgroundType BackgroundType = {read=FBackgroundType, write=SetBackgroundType, default=1};
	__property Graphics::TBitmap* Background = {read=FBackground, write=SetBackground, stored=true};
	__property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor, default=536870911};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, default=-2147483644};
	__property bool Enabled = {read=FEnabled, write=SetEnabled, default=0};
	__property bool BarEnabled = {read=FBarEnabled, write=SetBarEnabled, default=0};
	__property Graphics::TBitmap* BarBackground = {read=FBarBackground, write=SetBarBackground, stored=true};
	__property AnsiString BarFontname = {read=FBarFontName, write=SetBarFontName};
	__property TAHMMenuGradient* BarAsGradient = {read=FBarAsGradient, write=SetBarAsGradient};
	__property Byte BarFontSize = {read=FBarFontSize, write=SetBarFontSize, default=8};
	__property Graphics::TColor BarFontColor = {read=FBarFontColor, write=SetBarFontColor, default=-2147483640};
	__property Graphics::TColor BarColor = {read=FBarColor, write=SetBarColor, default=8388608};
	__property TAHMBarWidth BarWidth = {read=FBarWidth, write=SetBarWidth, default=15};
	__property AnsiString BarCaption = {read=FBarCaption, write=SetBarCaption};
};


class PASCALIMPLEMENTATION TAHMMenuGradient : public Graphics::TGraphicsObject 
{
	typedef Graphics::TGraphicsObject inherited;
	
private:
	Graphics::TColor FFadeToColor;
	bool FActive;
	Byte FColorCount;
	TAHMSubMenu* FOwner;
	void __fastcall SetFadeToColor(Graphics::TColor value);
	void __fastcall SetColorCount(Byte Value);
	void __fastcall SetActive(bool Value);
	
public:
	__fastcall virtual TAHMMenuGradient(TAHMSubMenu* Owner);
	void __fastcall Draw(const HDC Cdc, int iWidth, int iHeight);
	
__published:
	__property bool Active = {read=FActive, write=SetActive, default=0};
	__property Graphics::TColor FadeToColor = {read=FFadeToColor, write=SetFadeToColor, default=0};
	__property Byte ColorCount = {read=FColorCount, write=SetColorCount, default=32};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TAHMMenuGradient(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMMainMenu;
class PASCALIMPLEMENTATION TAHMMainMenu : public TAHMMenu 
{
	typedef TAHMMenu inherited;
	
private:
	HMENU FOle2Menu;
	bool FAutoMerge;
	void __fastcall ItemChanged(void);
	void __fastcall SetAutoMerge(bool Value);
	
protected:
	virtual HMENU __fastcall GetHandle(void);
	
public:
	virtual void __fastcall MenuChanged(System::TObject* Sender, Menus::TMenuItem* Source, bool Rebuild);
	void __fastcall Merge(TAHMMainMenu* Menu);
	void __fastcall Unmerge(TAHMMainMenu* Menu);
	void __fastcall PopulateOle2Menu(HMENU SharedMenu, const int * Groups, const int Groups_Size, int * Widths, const int Widths_Size);
	void __fastcall GetOle2AcceleratorTable(HACCEL &AccelTable, int &AccelCount, const int * Groups, const int Groups_Size);
	void __fastcall SetOle2MenuHandle(HMENU Handle);
	virtual void __fastcall Loaded(void);
	
__published:
	__property bool AutoMerge = {read=FAutoMerge, write=SetAutoMerge, default=0};
public:
	#pragma option push -w-inl
	/* TAHMMenu.Create */ inline __fastcall virtual TAHMMainMenu(Classes::TComponent* AOwner) : TAHMMenu(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TAHMMenu.Destroy */ inline __fastcall virtual ~TAHMMainMenu(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAHMPopupMenu;
class PASCALIMPLEMENTATION TAHMPopupMenu : public TAHMMenu 
{
	typedef TAHMMenu inherited;
	
private:
	TAHMSubMenu* OSubMenu;
	TAHMSubMenu* FPopupDetails;
	HIDESBASE Classes::THelpContext __fastcall GetHelpContext(void);
	HIDESBASE void __fastcall SetHelpContext(Classes::THelpContext Value);
	void __fastcall ChangeSubMenu(System::TObject* Sender);
	
public:
	__fastcall virtual TAHMPopupMenu(Classes::TComponent* AOwner);
	virtual void __fastcall Loaded(void);
	__fastcall virtual ~TAHMPopupMenu(void);
	
__published:
	__property TAHMSubMenu* PopupDetails = {read=FPopupDetails, write=FPopupDetails};
	__property Classes::THelpContext HelpContext = {read=GetHelpContext, write=SetHelpContext, default=0};
};


class DELPHICLASS TAHMFormMenu;
class PASCALIMPLEMENTATION TAHMFormMenu : public TAHMPopupMenu 
{
	typedef TAHMPopupMenu inherited;
	
public:
	__fastcall virtual TAHMFormMenu(Classes::TComponent* AOwner);
	virtual void __fastcall Loaded(void);
	__fastcall virtual ~TAHMFormMenu(void);
};


class DELPHICLASS TAHMApplicationMenu;
class PASCALIMPLEMENTATION TAHMApplicationMenu : public TAHMPopupMenu 
{
	typedef TAHMPopupMenu inherited;
	
public:
	__fastcall virtual TAHMApplicationMenu(Classes::TComponent* AOwner);
	virtual void __fastcall Loaded(void);
	__fastcall virtual ~TAHMApplicationMenu(void);
};


//-- var, const, procedure ---------------------------------------------------
static const Word scShift = 0x2000;
static const Word scCtrl = 0x4000;
static const Word scAlt = 0x8000;
static const Shortint scNone = 0x0;

}	/* namespace Ahmmenu */
using namespace Ahmmenu;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// ahmmenu
