advsmartmessagebox.hpp

来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 393 行 · 第 1/2 页

HPP
393
字号
	void __fastcall SetStyle(const Advstyleif::TTMSStyle Value);
	bool __fastcall GetMessageVisible(void);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation);
	TAdvSmartMessageForm* __fastcall CreateMsgForm(TAdvSmartMessage* Msg);
	void __fastcall DestroyMsgForm(TAdvSmartMessage* Msg);
	void __fastcall Show(TAdvSmartMessage* Msg)/* overload */;
	void __fastcall Show(int Index)/* overload */;
	void __fastcall ShowAll(void);
	void __fastcall InitializeMsg(TAdvSmartMessage* Msg);
	void __fastcall CheckKeyDown(Word Key);
	void __fastcall CheckMouseMoved(const Types::TPoint &p);
	void __fastcall CheckMouseClicked(void);
	
public:
	__fastcall virtual TAdvSmartMessageBox(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvSmartMessageBox(void);
	void __fastcall Hide(TAdvSmartMessage* Msg)/* overload */;
	void __fastcall Hide(int Index)/* overload */;
	virtual int __fastcall GetVersionNr(void);
	void __fastcall SetComponentStyle(Advstyleif::TTMSStyle AStyle);
	__property bool MessageVisible = {read=GetMessageVisible, nodefault};
	
__published:
	__property bool AutoDestroyMessage = {read=FAutoDestroyMessage, write=FAutoDestroyMessage, default=1};
	__property TDefaultSmartMessage* DefaultMessage = {read=FDefaultMessage, write=SetDefaultMessage};
	__property TAdvSmartMessages* Messages = {read=FMessages, write=SetMessages};
	__property int DisplayOffsetX = {read=FDisplayOffsetX, write=SetDisplayOffsetX, default=10};
	__property int DisplayOffsetY = {read=FDisplayOffsetY, write=SetDisplayOffsetY, default=10};
	__property TDisplayStyle DisplayStyle = {read=FDisplayStyle, write=SetDisplayStyle, default=0};
	__property TDisplayType DisplayType = {read=FDisplayType, write=SetDisplayType, default=0};
	__property TDisplayLocation DisplayLocation = {read=FDisplayLocation, write=SetDisplayLocation, default=7};
	__property int DisplayPointX = {read=FDisplayPointX, write=FDisplayPointX, nodefault};
	__property int DisplayPointY = {read=FDisplayPointY, write=FDisplayPointY, nodefault};
	__property TDisplayRelative DisplayRelative = {read=FDisplayRelative, write=FDisplayRelative, nodefault};
	__property Controls::TImageList* Images = {read=FImages, write=SetImages};
	__property Picturecontainer::TPictureContainer* PictureContainer = {read=FContainer, write=FContainer};
	__property int DisplayMarginX = {read=FDisplayMarginX, write=FDisplayMarginX, default=0};
	__property int DisplayMarginY = {read=FDisplayMarginY, write=FDisplayMarginY, default=0};
	__property Advstyleif::TTMSStyle Style = {read=FStyle, write=SetStyle, default=0};
	__property AnsiString Version = {read=GetVersion, write=SetVersion};
	__property TMsgClickEvent OnClick = {read=FOnClick, write=FOnClick};
private:
	void *__ITMSStyle;	/* Advstyleif::ITMSStyle */
	
public:
	operator ITMSStyle*(void) { return (ITMSStyle*)&__ITMSStyle; }
	
};


class PASCALIMPLEMENTATION TAdvSmartMessageForm : public Forms::TCustomForm 
{
	typedef Forms::TCustomForm inherited;
	
private:
	Extctrls::TTimer* FMinShowTimer;
	Extctrls::TTimer* FMaxShowTimer;
	int FOldXCoOrd;
	int FOldYCoOrd;
	TAdvSmartMessage* FSmartMsg;
	TAdvSmartMessageBox* FAdvSmartMessageBox;
	bool FLockHiding;
	bool FDisplayed;
	void __fastcall MinShowTimerTimer(System::TObject* Sender);
	void __fastcall MaxShowTimerTimer(System::TObject* Sender);
	void __fastcall SetAdvSmartMessageBox(const TAdvSmartMessageBox* Value);
	void __fastcall SetSmartMsg(const TAdvSmartMessage* Value);
	HIDESBASE MESSAGE void __fastcall WMEraseBkGnd(Messages::TWMEraseBkgnd &Message);
	HIDESBASE MESSAGE void __fastcall WMActivate(Messages::TWMActivate &Message);
	HIDESBASE MESSAGE void __fastcall WMMouseActivate(Messages::TMessage &Message);
	
protected:
	HWND __fastcall GetParentWnd(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	DYNAMIC void __fastcall Activate(void);
	virtual void __fastcall DoCreate(void);
	virtual void __fastcall DoDestroy(void);
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall Paint(void);
	DYNAMIC void __fastcall DoHide(void);
	DYNAMIC void __fastcall DoShow(void);
	DYNAMIC void __fastcall Click(void);
	void __fastcall Animate(BOOL DoSetVisible = false);
	tagSIZE __fastcall GetMsgSize(TAdvSmartMessage* Msg);
	void __fastcall UpdateWindow(void);
	void __fastcall HideEx(void);
	__property TAdvSmartMessage* SmartMsg = {read=FSmartMsg, write=SetSmartMsg};
	__property TAdvSmartMessageBox* AdvSmartMessageBox = {read=FAdvSmartMessageBox, write=SetAdvSmartMessageBox};
public:
	#pragma option push -w-inl
	/* TCustomForm.Create */ inline __fastcall virtual TAdvSmartMessageForm(Classes::TComponent* AOwner) : Forms::TCustomForm(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomForm.CreateNew */ inline __fastcall virtual TAdvSmartMessageForm(Classes::TComponent* AOwner, int Dummy) : Forms::TCustomForm(AOwner, Dummy) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomForm.Destroy */ inline __fastcall virtual ~TAdvSmartMessageForm(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAdvSmartMessageForm(HWND ParentWindow) : Forms::TCustomForm(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAdvSmartMessage : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	Graphics::TColor FColor;
	Graphics::TColor FColorTo;
	bool FRounded;
	bool FShadow;
	Byte FOpacity;
	AnsiString FText;
	Graphics::TColor FMirrorColorTo;
	Graphics::TColor FMirrorColor;
	Graphics::TColor FBorderColor;
	Graphics::TFont* FFont;
	TAdvSmartMessageForm* FMsgWindow;
	int FMarginY;
	int FMarginX;
	TGradientDirection FGradient;
	int FMinDuration;
	int FMaxDuration;
	void __fastcall SetColor(const Graphics::TColor Value);
	void __fastcall SetColorTo(const Graphics::TColor Value);
	void __fastcall SetBorderColor(const Graphics::TColor Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetMirrorColor(const Graphics::TColor Value);
	void __fastcall SetMirrorColorTo(const Graphics::TColor Value);
	void __fastcall SetOpacity(const Byte Value);
	void __fastcall SetRounded(const bool Value);
	void __fastcall SetShadow(const bool Value);
	void __fastcall SetText(const AnsiString Value);
	void __fastcall SetMarginX(const int Value);
	void __fastcall SetMarginY(const int Value);
	void __fastcall SetGradient(const TGradientDirection Value);
	void __fastcall SetMaxDuration(const int Value);
	void __fastcall SetMinDuration(const int Value);
	bool __fastcall GetVisible(void);
	
protected:
	bool FDestorying;
	HIDESBASE void __fastcall Changed(void);
	__property TAdvSmartMessageForm* MsgWindow = {read=FMsgWindow, write=FMsgWindow};
	__property Graphics::TColor MirrorColor = {read=FMirrorColor, write=SetMirrorColor, nodefault};
	__property Graphics::TColor MirrorColorTo = {read=FMirrorColorTo, write=SetMirrorColorTo, nodefault};
	
public:
	__fastcall virtual TAdvSmartMessage(Classes::TCollection* Collection);
	__fastcall virtual ~TAdvSmartMessage(void);
	void __fastcall Show(void);
	void __fastcall Hide(void);
	__property bool Visible = {read=GetVisible, nodefault};
	
__published:
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
	__property Graphics::TColor ColorTo = {read=FColorTo, write=SetColorTo, nodefault};
	__property TGradientDirection Gradient = {read=FGradient, write=SetGradient, nodefault};
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=SetBorderColor, nodefault};
	__property int MarginX = {read=FMarginX, write=SetMarginX, nodefault};
	__property int MarginY = {read=FMarginY, write=SetMarginY, nodefault};
	__property bool Rounded = {read=FRounded, write=SetRounded, nodefault};
	__property bool Shadow = {read=FShadow, write=SetShadow, nodefault};
	__property Byte Opacity = {read=FOpacity, write=SetOpacity, nodefault};
	__property AnsiString Text = {read=FText, write=SetText};
	__property int MaxDuration = {read=FMaxDuration, write=SetMaxDuration, nodefault};
	__property int MinDuration = {read=FMinDuration, write=SetMinDuration, nodefault};
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x1;
static const Shortint REL_VER = 0x1;
static const Shortint BLD_VER = 0x1;
static const Shortint MinWin_Width = 0x64;
static const Shortint MinWin_Height = 0x32;

}	/* namespace Advsmartmessagebox */
using namespace Advsmartmessagebox;
#pragma pack(pop)
#pragma option pop

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

⌨️ 快捷键说明

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