📄 advalertwindow.hpp
字号:
void __fastcall DrawScrollDnBtn(void);
HIDESBASE void __fastcall Hide(void);
void __fastcall SetAlertMessages(const Classes::TStringList* Value);
void __fastcall SetGlyphDelete(const Graphics::TBitmap* Value);
void __fastcall SetGlyphNext(const Graphics::TBitmap* Value);
void __fastcall GlyphNextOnChange(System::TObject* Sender);
void __fastcall SetGlyphPrev(const Graphics::TBitmap* Value);
void __fastcall GlyphPrevOnChange(System::TObject* Sender);
void __fastcall SetGlyphClose(const Graphics::TBitmap* Value);
void __fastcall SetAutoDelete(const bool Value);
void __fastcall SetShowDelete(const bool Value);
Types::TRect __fastcall GetCloseRect();
Types::TRect __fastcall GetLeftScrollBtnRect();
Types::TRect __fastcall GetRightScrollBtnRect();
Types::TRect __fastcall GetDeleteBtnRect();
int __fastcall ScrollTextWidth(void);
Types::TRect __fastcall GetPopupBtnRect();
Types::TRect __fastcall GetScrollUpBtnRect();
Types::TRect __fastcall GetScrollDnBtnRect();
bool __fastcall PtOnDeleteBtn(int X, int Y);
bool __fastcall PtOnPopupBtn(int X, int Y);
bool __fastcall PtOnLeftScrollBtn(int X, int Y);
bool __fastcall PtOnRightScrollBtn(int X, int Y);
bool __fastcall PtOnScrollUpBtn(int X, int Y);
bool __fastcall PtOnScrollDnBtn(int X, int Y);
int __fastcall GetWidthFromTextWidth(int w);
int __fastcall GetHeightFromTextHeight(int H);
bool __fastcall PtOnCaption(int X, int Y);
int __fastcall MinWindowWidth(void);
int __fastcall MinWindowHeight(void);
int __fastcall GetPopupBtnWidth(void);
__property int BorderSize = {read=FBorderSize, write=FBorderSize, nodefault};
int __fastcall GetActiveMessage(void);
void __fastcall SetActiveMessage(const int Value);
void __fastcall SetPositionFormat(const AnsiString Value);
void __fastcall SetShowPopup(const bool Value);
void __fastcall SetGlyphPopup(const Graphics::TBitmap* Value);
void __fastcall SetBackground(const Graphics::TPicture* Value);
void __fastcall PositionChanged(System::TObject* Sender);
void __fastcall TimerMessage(System::TObject* Sender);
protected:
virtual void __fastcall Paint(void);
virtual void __fastcall Loaded(void);
virtual void __fastcall WndProc(Messages::TMessage &Message);
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 AlertMessagesOnChange(System::TObject* Sender);
bool __fastcall PtOnClose(int X, int Y);
int __fastcall GetMessageHeight(int Index);
Types::TRect __fastcall GetTextRect();
__property Graphics::TColor SelectedColor = {read=FSelectedColor, write=FSelectedColor, nodefault};
__property TMsgCollection* AlertMessagesInfo = {read=FAlertMessagesInfo, write=FAlertMessagesInfo};
__property bool AutoHiding = {read=FAutoHiding, write=FAutoHiding, nodefault};
public:
__fastcall virtual TAlertWindow(Classes::TComponent* AOwner);
__fastcall virtual ~TAlertWindow(void);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
void __fastcall Next(void);
void __fastcall Previous(void);
void __fastcall First(void);
void __fastcall Last(void);
void __fastcall Delete(int index)/* overload */;
void __fastcall Delete(void)/* overload */;
__property int ActiveMessage = {read=GetActiveMessage, write=SetActiveMessage, nodefault};
__published:
__property Classes::TStringList* AlertMessages = {read=FAlertMessages, write=SetAlertMessages};
__property bool AlwaysOnTop = {read=FAlwaysOnTop, write=SetAlwaysOnTop, nodefault};
__property bool AutoHide = {read=FAutoHide, write=FAutoHide, nodefault};
__property bool AutoSize = {read=FAutoSize, write=SetAutoSizeEx, nodefault};
__property bool AutoDelete = {read=FAutoDelete, write=SetAutoDelete, nodefault};
__property Graphics::TPicture* Background = {read=FBackground, write=SetBackground};
__property Graphics::TColor BorderColor = {read=FBorderColor, write=FBorderColor, nodefault};
__property Graphics::TColor BtnHoverColor = {read=FBtnHoverColor, write=FBtnHoverColor, nodefault};
__property Graphics::TColor BtnHoverColorTo = {read=FBtnHoverColorTo, write=FBtnHoverColorTo, nodefault};
__property Graphics::TColor BtnDownColor = {read=FBtnDownColor, write=FBtnDownColor, nodefault};
__property Graphics::TColor BtnDownColorTo = {read=FBtnDownColorTo, write=FBtnDownColorTo, nodefault};
__property Graphics::TColor CaptionColor = {read=FCaptionColor, write=FCaptionColor, nodefault};
__property Graphics::TColor CaptionColorTo = {read=FCaptionColorTo, write=FCaptionColorTo, nodefault};
__property TGradientDirection GradientDirection = {read=FGradientDir, write=FGradientDir, nodefault};
__property Graphics::TBitmap* GlyphPrev = {read=FGlyphPrev, write=SetGlyphPrev};
__property Graphics::TBitmap* GlyphNext = {read=FGlyphNext, write=SetGlyphNext};
__property Graphics::TBitmap* GlyphDelete = {read=FGlyphDelete, write=SetGlyphDelete};
__property Graphics::TBitmap* GlyphClose = {read=FGlyphClose, write=SetGlyphClose};
__property Graphics::TBitmap* GlyphPopup = {read=FGlyphPopup, write=SetGlyphPopup};
__property AnsiString HintNextBtn = {read=FHintNextBtn, write=FHintNextBtn};
__property AnsiString HintPrevBtn = {read=FHintPrevBtn, write=FHintPrevBtn};
__property AnsiString HintCloseBtn = {read=FHintCloseBtn, write=FHintCloseBtn};
__property AnsiString HintDeleteBtn = {read=FHintDeleteBtn, write=FHintDeleteBtn};
__property AnsiString HintPopupBtn = {read=FHintPopupBtn, write=FHintPopupBtn};
__property bool Hover = {read=FHover, write=SetHover, nodefault};
__property Controls::TImageList* Images = {read=FImages, write=FImages};
__property int MarginX = {read=FMarginX, write=FMarginX, nodefault};
__property int MarginY = {read=FMarginY, write=FMarginY, nodefault};
__property int MaxWidth = {read=FMaxWidth, write=FMaxWidth, default=0};
__property int MaxHeight = {read=FMaxHeight, write=FMaxHeight, default=0};
__property Picturecontainer::TPictureContainer* PictureContainer = {read=FContainer, write=FContainer};
__property AnsiString PositionFormat = {read=FPositionFormat, write=SetPositionFormat};
__property bool ShowScrollers = {read=FShowScrollers, write=FShowScrollers, nodefault};
__property bool ShowDelete = {read=FShowDelete, write=SetShowDelete, nodefault};
__property bool ShowPopup = {read=FShowPopup, write=SetShowPopup, nodefault};
__property Graphics::TColor URLColor = {read=FURLColor, write=FURLColor, nodefault};
__property Graphics::TColor WindowColor = {read=FWindowColor, write=FWindowColor, nodefault};
__property Graphics::TColor WindowColorTo = {read=FWindowColorTo, write=FWindowColorTo, nodefault};
__property Classes::TNotifyEvent OnAlertClick = {read=FOnAlertClick, write=FOnAlertClick};
__property TAnchorClickEvent OnAnchorClick = {read=FOnAnchorClick, write=FOnAnchorClick};
__property TDeleteMessageEvent OnDeleteMessage = {read=FOnDeleteMessage, write=FOnDeleteMessage};
__property Classes::TNotifyEvent OnMouseLeave = {read=FOnMouseLeave, write=FOnMouseLeave};
__property Classes::TNotifyEvent OnWindowMoved = {read=FOnWindowMoved, write=FOnWindowMoved};
__property Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
__property TCanCloseEvent OnCanClose = {read=FOnCanClose, write=FOnCanClose};
__property Classes::TNotifyEvent OnNextMessage = {read=FOnNextMessage, write=FOnNextMessage};
__property Classes::TNotifyEvent OnPrevMessage = {read=FOnPrevMessage, write=FOnPrevMessage};
__property Classes::TNotifyEvent OnPopupbtnClick = {read=FOnPopupbtnClick, write=FOnPopupbtnClick};
__property TCustomPaintEvent OnCustomPaint = {read=FOnCustomPaint, write=FOnCustomPaint};
__property Classes::TNotifyEvent OnDestroy = {read=FOnDestroy, write=FOnDestroy};
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TAlertWindow(HWND ParentWindow) : Controls::THintWindow(ParentWindow) { }
#pragma option pop
};
typedef void __fastcall (__closure *TFadeThreadDone)(System::TObject* Sender);
#pragma option push -b-
enum TFadeAction { faNone, faShow, faHide };
#pragma option pop
class DELPHICLASS TFadeThread;
class DELPHICLASS TAdvAlertWindow;
typedef void __fastcall (__closure *TOnAnchorClickEvent)(System::TObject* Sender, AnsiString Anchor, TMsgCollectionItem* Item);
#pragma option push -b-
enum TWindowPosition { wpLeftTop, wpRightTop, wpLeftBottom, wpRightBottom, wpPreset, wpCenter };
#pragma option pop
class PASCALIMPLEMENTATION TAdvAlertWindow : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Controls::TWinControl* FOwner;
TAlertWindow* FAlertWindow;
Picturecontainer::TPictureContainer* FContainer;
bool FHover;
TOnAnchorClickEvent FOnAnchorClick;
Byte FAlphaActual;
Byte FAlphaStart;
Byte FAlphaEnd;
bool FFadeIn;
bool FFading;
int FHeight;
int FWidth;
int FLeft;
int FTop;
Controls::TImageList* FImages;
Graphics::TColor FWindowColor;
Graphics::TColor FWindowColorTo;
Graphics::TFont* FFont;
TGradientDirection FGradientDirection;
bool FAutoHide;
bool FAutoSize;
int FBorderSize;
bool FAlwaysOnTop;
int FMarginY;
int FMarginX;
Byte FFadeStep;
int FFadeTime;
TFadeThread* FFadeThread;
bool FShowFullAlpha;
Extctrls::TTimer* FTimer;
TMsgCollection* FAlertMessages;
int FDisplayTime;
int FDisplayCounter;
TWindowPosition FWindowPosition;
Graphics::TColor FCaptionColorTo;
Graphics::TColor FCaptionColor;
AnsiString FHintNextBtn;
AnsiString FHintPrevBtn;
AnsiString FHintCloseBtn;
TAdvAlertWindowStyle FStyle;
Graphics::TColor FBtnHoverColor;
Graphics::TColor FBtnDownColor;
Graphics::TColor FBtnHoverColorTo;
Graphics::TColor FBtnDownColorTo;
Graphics::TColor FBorderColor;
Graphics::TBitmap* FGlyphNext;
Graphics::TBitmap* FGlyphPrev;
Graphics::TBitmap* FGlyphDelete;
bool FAutoDelete;
TDeleteMessageEvent FOnDeleteMessage;
TCanDeleteEvent FOnCanDeleteMessage;
Classes::TNotifyEvent FOnShowMessage;
Classes::TNotifyEvent FOnAutoHide;
Classes::TNotifyEvent FOnClose;
TCanCloseEvent FOnCanClose;
Classes::TNotifyEvent FOnNextMessage;
Classes::TNotifyEvent FOnPrevMessage;
bool FShowDelete;
AnsiString FHintDeleteBtn;
Graphics::TBitmap* FGlyphClose;
AnsiString FPositionFormat;
int FMaxWidth;
int FMaxHeight;
bool FAutoThemeAdapt;
int FScreenMarginX;
int FScreenMarginY;
bool FShowPopup;
Graphics::TBitmap* FGlyphPopup;
AnsiString FHintPopupBtn;
Menus::TPopupMenu* FPopupMenu;
Classes::TNotifyEvent FOnPopupClick;
Graphics::TPicture* FBackground;
bool FShowScrollers;
bool FPersistPosition;
AnsiString FRegistryKey;
TCustomPaintEvent FOnCustomPaint;
bool FAutoHiding;
Graphics::TColor FURLColor;
Classes::TNotifyEvent FOnAlertClick;
void __fastcall SetFont(const Graphics::TFont* Value);
void __fastcall SetAlphaEnd(const Byte Value);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -