⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 advpreviewmenu.hpp

📁 TMS component pack v4.2 for delphi
💻 HPP
📖 第 1 页 / 共 3 页
字号:
	__property Graphics::TColor TextColorChecked = {read=FTextColorChecked, write=SetTextColorChecked, nodefault};
	__property Graphics::TColor TextColorDisabled = {read=FTextColorDisabled, write=SetTextColorDisabled, nodefault};
	__property bool Rounded = {read=FRounded, write=SetRounded, nodefault};
};


class DELPHICLASS TVistaBackground;
class PASCALIMPLEMENTATION TVistaBackground : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	int FSteps;
	Graphics::TColor FColor;
	Graphics::TColor FColorTo;
	Classes::TNotifyEvent FOnChange;
	Graphics::TColor FColorMirror;
	Graphics::TColor FColorMirrorTo;
	Graphics::TColor FBorderColor;
	Advglowbutton::TGDIPGradient FGradientMirror;
	Advglowbutton::TGDIPGradient FGradient;
	Graphics::TColor FCaptionBackground;
	void __fastcall SetColor(const Graphics::TColor Value);
	void __fastcall SetColorTo(const Graphics::TColor Value);
	void __fastcall SetSteps(const int Value);
	void __fastcall Changed(void);
	void __fastcall SetBorderColor(const Graphics::TColor Value);
	void __fastcall SetColorMirror(const Graphics::TColor Value);
	void __fastcall SetColorMirrorTo(const Graphics::TColor Value);
	void __fastcall SetGradient(const Advglowbutton::TGDIPGradient Value);
	void __fastcall SetGradientMirror(const Advglowbutton::TGDIPGradient Value);
	
public:
	__fastcall TVistaBackground(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=SetBorderColor, nodefault};
	__property Graphics::TColor CaptionBackground = {read=FCaptionBackground, write=FCaptionBackground, nodefault};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
	__property Graphics::TColor ColorTo = {read=FColorTo, write=SetColorTo, nodefault};
	__property Graphics::TColor ColorMirror = {read=FColorMirror, write=SetColorMirror, nodefault};
	__property Graphics::TColor ColorMirrorTo = {read=FColorMirrorTo, write=SetColorMirrorTo, nodefault};
	__property Advglowbutton::TGDIPGradient Gradient = {read=FGradient, write=SetGradient, nodefault};
	__property Advglowbutton::TGDIPGradient GradientMirror = {read=FGradientMirror, write=SetGradientMirror, nodefault};
	__property int Steps = {read=FSteps, write=SetSteps, default=64};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TVistaBackground(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAdvCustomPreviewMenuStyler : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Advglowbutton::TGlowButtonAppearance* FButtonAppearance;
	TSelectionAppearance* FMenuItemAppearance;
	TVistaBackground* FFrameAppearance;
	Graphics::TColor FRightFrameColor;
	Graphics::TColor FLeftFrameColor;
	Graphics::TColor FRightFrameBorderColor;
	void __fastcall SetButtonAppearance(const Advglowbutton::TGlowButtonAppearance* Value);
	void __fastcall SetFrameAppearance(const TVistaBackground* Value);
	void __fastcall SetMenuItemAppearance(const TSelectionAppearance* Value);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	void __fastcall Change(int PropID = 0x0);
	__property TVistaBackground* FrameAppearance = {read=FFrameAppearance, write=SetFrameAppearance};
	__property Graphics::TColor LeftFrameColor = {read=FLeftFrameColor, write=FLeftFrameColor, nodefault};
	__property Graphics::TColor RightFrameColor = {read=FRightFrameColor, write=FRightFrameColor, nodefault};
	__property Graphics::TColor RightFrameBorderColor = {read=FRightFrameBorderColor, write=FRightFrameBorderColor, nodefault};
	__property TSelectionAppearance* MenuItemAppearance = {read=FMenuItemAppearance, write=SetMenuItemAppearance};
	__property Advglowbutton::TGlowButtonAppearance* ButtonAppearance = {read=FButtonAppearance, write=SetButtonAppearance};
	
public:
	__fastcall virtual TAdvCustomPreviewMenuStyler(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvCustomPreviewMenuStyler(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
};


class DELPHICLASS TPreviewMenuWindow;
class DELPHICLASS TAdvCustomPreviewMenuPanel;
class PASCALIMPLEMENTATION TAdvCustomPreviewMenuPanel : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	Classes::TComponent* FOwner;
	Classes::TNotifyEvent FOnShouldHide;
	bool FShowBorder;
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	
protected:
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	__property Classes::TNotifyEvent OnShouldHide = {read=FOnShouldHide, write=FOnShouldHide};
	__property bool ShowBorder = {read=FShowBorder, write=FShowBorder, nodefault};
	virtual void __fastcall InitializeAndUpdate(void);
	
public:
	__fastcall virtual TAdvCustomPreviewMenuPanel(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvCustomPreviewMenuPanel(void);
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAdvCustomPreviewMenuPanel(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TPreviewMenuWindow : public Forms::TCustomForm 
{
	typedef Forms::TCustomForm inherited;
	
private:
	bool FHideOnDeActivate;
	Classes::TComponent* FOwner;
	bool FShowBorder;
	Extctrls::TTimer* FHideTimer;
	Graphics::TColor FBorderColor;
	TAdvCustomPreviewMenuPanel* FPreviewMenuPanel;
	HIDESBASE MESSAGE void __fastcall WMActivate(Messages::TWMActivate &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	HIDESBASE MESSAGE void __fastcall WMKeyDown(Messages::TWMKey &Message);
	HIDESBASE MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
	void __fastcall HideTimerOnTime(System::TObject* Sender);
	
protected:
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall Paint(void);
	HWND __fastcall GetParentWnd(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	void __fastcall UpdateSize(void);
	__property bool HideOnDeActivate = {read=FHideOnDeActivate, write=FHideOnDeActivate, nodefault};
	__property bool ShowBorder = {read=FShowBorder, write=FShowBorder, nodefault};
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=FBorderColor, nodefault};
	__property TAdvCustomPreviewMenuPanel* PreviewMenuPanel = {read=FPreviewMenuPanel, write=FPreviewMenuPanel};
	
public:
	__fastcall virtual TPreviewMenuWindow(Classes::TComponent* AOwner);
	__fastcall virtual TPreviewMenuWindow(Classes::TComponent* AOwner, int Dummy);
	__fastcall virtual ~TPreviewMenuWindow(void);
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TPreviewMenuWindow(HWND ParentWindow) : Forms::TCustomForm(ParentWindow) { }
	#pragma option pop
	
};


class DELPHICLASS TAdvPreviewMenuPanel;
class DELPHICLASS TMenuItemScroller;
class PASCALIMPLEMENTATION TMenuItemScroller : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	int FMin;
	int FMax;
	int FPosition;
	void __fastcall SetMax(const int Value);
	void __fastcall SetMin(const int Value);
	void __fastcall SetPosition(const int Value);
	bool __fastcall GetVisible(void);
	
public:
	__fastcall TMenuItemScroller(void);
	bool __fastcall CanGoForward(void);
	bool __fastcall CanGoBack(void);
	__property int Min = {read=FMin, write=SetMin, nodefault};
	__property int Max = {read=FMax, write=SetMax, nodefault};
	__property int Position = {read=FPosition, write=SetPosition, nodefault};
	__property bool Visible = {read=GetVisible, nodefault};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TMenuItemScroller(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAdvPreviewMenuPanel : public TAdvCustomPreviewMenuPanel 
{
	typedef TAdvCustomPreviewMenuPanel inherited;
	
private:
	Classes::TComponent* FOwner;
	TAdvPreviewMenu* FAdvPreviewMenu;
	#pragma pack(push,1)
	Types::TRect FLeftFrameRect;
	#pragma pack(pop)
	#pragma pack(push,1)
	Types::TRect FRightFrameRect;
	#pragma pack(pop)
	int FItemIndex;
	int FItemHot;
	int FItemDown;
	int FItemHeight;
	int FImageSpace;
	int FLineSpace;
	Classes::TList* FButtonList;
	int FSubMenuItem;
	int FSubMenuItemHeight;
	int FSubMenuItemHot;
	int FSubMenuItemDown;
	int FSubMenuCaptionHeight;
	Menus::TPopupMenu* FSubMenuPopup;
	bool FInternalHideSubMenuPopup;
	int FHintItemIndex;
	int FHintSubMenuItemIndex;
	Advhintinfo::TAdvHintInfo* FOfficeHint;
	bool FIgnoreMouseMove;
	bool FShortCutItemHintShowing;
	bool FShortCutSubMenuItemHintShowing;
	AnsiString FShortCutChars;
	bool FButtonPartHot;
	bool FDropDownPartHot;
	bool FInternalClick;
	Extctrls::TTimer* FMouseTimer;
	bool FMouseSetHot;
	int FMouseItemHot;
	TMenuItemScroller* FSubMenuScroller;
	int FSubMenuVisibleItemCount;
	int FTopSubMenuItem;
	bool FSubMenuScollUpHot;
	bool FSubMenuScollUpDown;
	bool FSubMenuScollDownHot;
	bool FSubMenuScollDownDown;
	bool FSubMenuScrolling;
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
	void __fastcall OnButtonClick(System::TObject* Sender);
	void __fastcall OnMouseTimer(System::TObject* Sender);
	void __fastcall SetItemHot(const int Value);
	void __fastcall SetSubMenuItemHot(const int Value);
	void __fastcall SetSubMenuItem(const int Value);
	void __fastcall SetOfficeHint(const Advhintinfo::TAdvHintInfo* Value);
	
protected:
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	void __fastcall DrawItems(void);
	void __fastcall DrawItem(int Index, bool RefreshItem = false);
	void __fastcall DrawSubMenuItems(Graphics::TCanvas* ACanvas = (Graphics::TCanvas*)(0x0));
	void __fastcall DrawSubMenuItem(int AIndex, bool RefreshItem = false, Graphics::TCanvas* ACanvas = (Graphics::TCanvas*)(0x0));
	void __fastcall DrawRightFrame(bool WithItems = true);
	void __fastcall DrawUpScrollBtn(void);
	void __fastcall DrawDownScrollBtn(void);
	int __fastcall ItemAtPos(int X, int Y);
	void __fastcall SelectItem(int Index);
	TAdvPreviewSubMenuItems* __fastcall GetSubMenuItems(void);
	int __fastcall SubMenuItemAtPos(int X, int Y)/* overload */;
	int __fastcall SubMenuItemAtPos(int X, int Y, TAdvPreviewSubMenuItem* &SubItem)/* overload */;
	void __fastcall SelectSubMenuItem(int Index);
	void __fastcall HideMenuWindow(void);
	void __fastcall InternalClickSubItem(int SubIndex);
	void __fastcall CheckKeyPress(Word Key);
	void __fastcall CheckMouseMove(int X, int Y);
	void __fastcall ShowSubMenuPopup(int AIndex);
	void __fastcall HideSubMenuPopup(void);
	void __fastcall ItemHotNext(void);
	void __fastcall ItemHotPrevious(void);
	void __fastcall SubMenuItemHotNext(void);
	void __fastcall SubMenuItemHotPrevious(void);
	void __fastcall ShowAllItemsShortCutHint(void);
	void __fastcall HideAllItemsShortCutHint(void);
	void __fastcall ShowItemShortCutHint(int Index);
	void __fastcall HideItemShortCutHint(int Index);
	void __fastcall DrawItemShortCutHint(int Index);
	void __fastcall DrawItemSubItemShortCutHint(int Index);
	void __fastcall ShowItemSubItemShortCutHint(int Index);
	void __fastcall HideItemSubItemShortCutHint(int Index);
	void __fastcall ShowAllSubMenuItemsShortCutHint(void);
	void __fastcall HideAllSubMenuItemsShortCutHint(void);
	void __fastcall DrawSubMenuItemShortCutHint(int Index);
	void __fastcall ShowSubMenuItemShortCutHint(int Index);
	void __fastcall HideSubMenuItemShortCutHint(int Index);
	void __fastcall InvalidateTopFrame(void);
	void __fastcall InvalidateLeftFrame(void);
	void __fastcall InvalidateRightFrame(void);
	Types::TRect __fastcall GetTopFrameRect();
	Types::TRect __fastcall GetItemFramesRect();
	Types::TRect __fastcall GetLeftFrameRect();
	Types::TRect __fastcall GetRightFrameRect();
	Types::TRect __fastcall GetItemRect(int Index);
	Types::TRect __fastcall GetItemDropDownRect(int Index);
	int __fastcall GetItemHeight(void);
	void __fastcall GetMaxItemSize(int &AHeight, int &AWidth);
	int __fastcall RealIndexToVisItemIndex(int Index);
	int __fastcall VisIndexToRealItemIndex(int Index);
	int __fastcall VisibleItemsCount(void);
	Types::TRect __fastcall GetUpScrollBtnRect();
	Types::TRect __fastcall GetDownScrollBtnRect();
	Types::TRect __fastcall GetSubMenuCaptionRect();
	Types::TRect __fastcall GetSubMenuItemRect(int Index);
	int __fastcall GetSubMenuItemHeight(void);
	void __fastcall GetSubMenuMaxItemSize(int Index, int &AHeight, int &AWidth, TAdvPreviewSubMenuItems* SubMenuItems = (TAdvPreviewSubMenuItems*)(0x0))/* overload */;
	void __fastcall GetSubMenuMaxItemSize(int &AHeight, int &AWidth)/* overload */;
	void __fastcall CalculateSubMenuItemSize(void);
	int __fastcall RealIndexToVisSubItemIndex(int Index);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -