📄 zqcustctrl.h
字号:
//---------------------------------------------------------------------------
#ifndef zqCustCtrlH
#define zqCustCtrlH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------
class PACKAGE TzqCustCtrl : public TComponent
{
private:
bool OnDestroy;
TControl *FDesignObject;
TPopupMenu* FPopupMenu;
bool FDesigning;
bool FHintClassInfo;
int FGridSize;
bool OnResizing;
bool OnMoving;
bool IsDblClick;
TPoint PO;
int fc[6];
void *dp[13];
void *hw;
void __fastcall SetDesigning(bool Designing);
void __fastcall SetDesignObject(TControl* DesginObject);
void __fastcall SetHintClassInfo(bool HintClassInfo);
void __fastcall SetPopupMenu(TPopupMenu *PopupMenu);
void __fastcall EnableDesign();
void __fastcall DisableDesign();
void __fastcall BeginResize(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall ProcessResize(TObject *Sender,
TShiftState Shift, int X, int Y);
void __fastcall EndResize(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall BeginMove(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall ProcessMove(TObject *Sender,
TShiftState Shift, int X, int Y);
void __fastcall EndMove(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall Click(TObject *Sender);
void __fastcall DblClick(TObject *Sender);
int __fastcall GetCurrentPosition(int index);
void __fastcall (__closure *FOnObjectResize)(TObject *Sender);
void __fastcall (__closure *FOnObjectMove)(TObject *Sender);
void __fastcall (__closure *FOnClick)(TObject *Sender);
void __fastcall (__closure *FOnDblClick)(TObject *Sender);
void __fastcall (__closure *FOnMouseDown)(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall (__closure *FOnMouseMove)(TObject *Sender,
TShiftState Shift, int X, int Y);
void __fastcall (__closure *FOnMouseUp)(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall Notification(TComponent *AComponent, TOperation Operation);
void __fastcall (__closure *FOnMouseEnter)(TObject *Sender);
void __fastcall (__closure *FOnMouseLeave)(TObject *Sender);
void __fastcall (__closure *FOnSetInvalidObject)(TObject *Sender);
void __fastcall (__closure *ProcessDefault)(TMessage &Message);
void __fastcall ProcessMessages(TMessage &Message);
protected:
public:
__fastcall TzqCustCtrl(TComponent* Owner);
__fastcall ~TzqCustCtrl();
__published:
void __fastcall ResetDesign();
__property bool Designing =
{read = FDesigning, write = SetDesigning, default = false};
__property TControl *DesignObject =
{read = FDesignObject, write = SetDesignObject};
__property bool HintClassInfo =
{read = FHintClassInfo, write = SetHintClassInfo};
__property int GridSize =
{read = FGridSize, write = FGridSize};
__property int CurrentHeight = {read = GetCurrentPosition, index=0};
__property int CurrentLeft = {read = GetCurrentPosition, index=1};
__property int CurrentTop = {read = GetCurrentPosition, index=2};
__property int CurrentWidth = {read = GetCurrentPosition, index=3};
__property TPopupMenu* PopupMenu = {read=FPopupMenu, write=SetPopupMenu};
__property void __fastcall (__closure *OnObjectResize)(TObject *Sender) =
{read = FOnObjectResize, write = FOnObjectResize};
__property void __fastcall (__closure *OnObjectMove)(TObject *Sender) =
{read = FOnObjectMove, write = FOnObjectMove};
__property void __fastcall (__closure *OnClick)(TObject *Sender) =
{read = FOnClick, write = FOnClick};
__property void __fastcall (__closure *OnDblClick)(TObject *Sender) =
{read = FOnDblClick, write = FOnDblClick};
__property void __fastcall (__closure *OnMouseDown)(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y) =
{read = FOnMouseDown, write = FOnMouseDown};
__property void __fastcall (__closure *OnMouseMove)(TObject *Sender,
TShiftState Shift, int X, int Y) =
{read = FOnMouseMove, write = FOnMouseMove};
__property void __fastcall (__closure *OnMouseUp)(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y) =
{read = FOnMouseUp, write = FOnMouseUp};
__property void __fastcall (__closure *OnMouseEnter)(TObject *Sender) =
{read = FOnMouseEnter, write = FOnMouseEnter};
__property void __fastcall (__closure *OnMouseLeave)(TObject *Sender) =
{read = FOnMouseLeave, write = FOnMouseLeave};
__property void __fastcall (__closure *OnSetInvalidObject)(TObject *Sender) =
{read = FOnSetInvalidObject, write = FOnSetInvalidObject};
};
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -