flexbase.hpp
来自「FlexGraphics是一套创建矢量图形的VCL组件」· HPP 代码 · 共 1,378 行 · 第 1/5 页
HPP
1,378 行
class DELPHICLASS TFlexGroup;
class PASCALIMPLEMENTATION TFlexGroup : public TFlexControl
{
typedef TFlexControl inherited;
private:
bool FGroupResize;
bool FGroupMove;
bool FBoundsChanging;
Types::TRect FOldDocRect;
bool FNeedRefreshBounds;
protected:
virtual void __fastcall ControlCreate(void);
virtual void __fastcall ControlTranslate(const Flexutils::TTranslateInfo &TranslateInfo);
virtual Types::TRect __fastcall GetRefreshRect(int RefreshX, int RefreshY);
virtual void __fastcall PropBeforeChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
void __fastcall RefreshBounds(void);
virtual bool __fastcall GetIsUngroupable(void);
public:
virtual bool __fastcall EndGroupUngroup(void);
virtual bool __fastcall IsPointInside(int PaintX, int PaintY);
virtual void __fastcall Translate(const Flexutils::TTranslateInfo &TranslateInfo);
public:
/* TFlexControl.Create */ inline __fastcall virtual TFlexGroup(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexControl(AOwner, AParent, ALayer) { }
/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexGroup(void) { }
};
typedef TMetaClass* TFlexCloneClass;
class DELPHICLASS TFlexClone;
class PASCALIMPLEMENTATION TFlexClone : public TFlexControl
{
typedef TFlexControl inherited;
private:
TLinkProp* FSourceProp;
Flexprops::TBoolProp* FAutoSizeProp;
bool FSizeLock;
void __fastcall SetSizeLock(bool Value);
protected:
virtual void __fastcall CreateProperties(void);
virtual void __fastcall ControlCreate(void);
virtual void __fastcall ControlDestroy(void);
virtual Types::TRect __fastcall GetRefreshRect(int RefreshX, int RefreshY);
virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
virtual void __fastcall PropStored(System::TObject* Sender, Flexprops::TCustomProp* Prop, bool &IsStored, const System::UnicodeString PropName = L"");
virtual void __fastcall Paint(Graphics::TCanvas* Canvas, Types::TRect &PaintRect);
void __fastcall SourceLinkNotify(System::TObject* Sender, Flexutils::TNotifyLink* Source, const Flexutils::TNotifyLinkInfo &Info);
void __fastcall SetSizeFromLinkedControl(void);
Graphics::TMetafile* __fastcall OpenMetafile(const Types::TRect &Bounds);
void __fastcall CloseMetafile(Graphics::TMetafile* Metafile);
__property bool SizeLock = {read=FSizeLock, write=SetSizeLock, nodefault};
public:
__property TLinkProp* SourceProp = {read=FSourceProp};
__property Flexprops::TBoolProp* AutoSizeProp = {read=FAutoSizeProp};
public:
/* TFlexControl.Create */ inline __fastcall virtual TFlexClone(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexControl(AOwner, AParent, ALayer) { }
/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexClone(void) { }
};
class DELPHICLASS TFlexGrid;
class PASCALIMPLEMENTATION TFlexGrid : public TFlexServiceControl
{
typedef TFlexServiceControl inherited;
private:
bool FSnap;
TFlexSnaps FSnapTo;
bool FShowPixGrid;
TFlexGridStyle FStyle;
Graphics::TColor FColor;
Graphics::TColor FPixColor;
int FHSize;
int FVSize;
int FHOffset;
int FVOffset;
void __fastcall GetOwnerWidth(System::TObject* Sender, /* out */ int &Value);
void __fastcall GetOwnerHeight(System::TObject* Sender, /* out */ int &Value);
void __fastcall SetColor(const Graphics::TColor Value);
void __fastcall SetShowPixGrid(const bool Value);
void __fastcall SetStyle(const TFlexGridStyle Value);
void __fastcall SetPixColor(const Graphics::TColor Value);
void __fastcall SetHSize(const int Value);
void __fastcall SetVSize(const int Value);
void __fastcall SetHOffset(const int Value);
void __fastcall SetVOffset(const int Value);
protected:
virtual void __fastcall CreateProperties(void);
virtual void __fastcall ControlCreate(void);
virtual void __fastcall Paint(Graphics::TCanvas* Canvas, Types::TRect &PaintRect);
public:
void __fastcall DoSnap(const Types::TRect &SnapRect, Types::TPoint &Delta, TResizeCursor ResizeCursor = (TResizeCursor)(0x0));
virtual void __fastcall DoCustomSnap(const Types::TRect &SnapRect, Types::TPoint &Delta, int HStep, int VStep, int HOffset, int VOffset, TResizeCursor ResizeCursor = (TResizeCursor)(0x0), TFlexSnaps SnapTo = (TFlexSnaps() << snAll ));
__property bool Snap = {read=FSnap, write=FSnap, nodefault};
__property TFlexSnaps SnapTo = {read=FSnapTo, write=FSnapTo, nodefault};
__property bool ShowPixGrid = {read=FShowPixGrid, write=SetShowPixGrid, nodefault};
__property TFlexGridStyle Style = {read=FStyle, write=SetStyle, nodefault};
__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
__property Graphics::TColor PixColor = {read=FPixColor, write=SetPixColor, nodefault};
__property int HSize = {read=FHSize, write=SetHSize, nodefault};
__property int VSize = {read=FVSize, write=SetVSize, nodefault};
__property int HOffset = {read=FHOffset, write=SetHOffset, nodefault};
__property int VOffset = {read=FVOffset, write=SetVOffset, nodefault};
public:
/* TFlexControl.Create */ inline __fastcall virtual TFlexGrid(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexGrid(void) { }
};
class PASCALIMPLEMENTATION TFlexLayer : public TFlexServiceControl
{
typedef TFlexServiceControl inherited;
private:
Flexprops::TBoolProp* FMoveableProp;
Flexprops::TBoolProp* FResizableProp;
Flexprops::TBoolProp* FReadOnlyProp;
bool __fastcall GetReadOnly(void);
void __fastcall SetReadOnly(bool Value);
bool __fastcall GetMoveable(void);
void __fastcall SetMoveable(const bool Value);
bool __fastcall GetResizable(void);
void __fastcall SetResizable(const bool Value);
protected:
System::UnicodeString FCheckName;
virtual void __fastcall CreateProperties(void);
virtual void __fastcall ControlCreate(void);
virtual void __fastcall ControlDestroy(void);
virtual void __fastcall PropBeforeChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
virtual void __fastcall PropStored(System::TObject* Sender, Flexprops::TCustomProp* Prop, bool &IsStored, const System::UnicodeString PropName = L"");
__property Flexprops::TBoolProp* ReadOnlyProp = {read=FReadOnlyProp};
__property Flexprops::TBoolProp* MoveableProp = {read=FMoveableProp};
__property Flexprops::TBoolProp* ResizableProp = {read=FResizableProp};
public:
virtual void __fastcall Invalidate(void);
__property bool Moveable = {read=GetMoveable, write=SetMoveable, nodefault};
__property bool Resizable = {read=GetResizable, write=SetResizable, nodefault};
__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, nodefault};
public:
/* TFlexControl.Create */ inline __fastcall virtual TFlexLayer(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexLayer(void) { }
};
class DELPHICLASS TFlexLayers;
class PASCALIMPLEMENTATION TFlexLayers : public TFlexServiceControl
{
typedef TFlexServiceControl inherited;
public:
TFlexLayer* operator[](int Index) { return Controls[Index]; }
private:
TFlexLayer* __fastcall GetLayer(int Index);
HIDESBASE TFlexLayer* __fastcall GetByName(const System::UnicodeString Name);
protected:
virtual void __fastcall ControlCreate(void);
public:
TFlexLayer* __fastcall New(void);
virtual int __fastcall Add(TFlexControl* AControl);
virtual void __fastcall Delete(int Index);
virtual void __fastcall ChangeOrder(int CurIndex, int NewIndex);
__property TFlexLayer* Controls[int Index] = {read=GetLayer/*, default*/};
__property TFlexLayer* ByName[const System::UnicodeString Name] = {read=GetByName};
public:
/* TFlexControl.Create */ inline __fastcall virtual TFlexLayers(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexLayers(void) { }
};
struct TPaintOrder
{
private:
struct _TPaintOrder__1
{
public:
int First;
int Last;
};
typedef DynamicArray<_TPaintOrder__1> _TPaintOrder__2;
struct _TPaintOrder__3
{
public:
int Next;
int Prev;
TFlexControl* Control;
};
typedef DynamicArray<_TPaintOrder__3> _TPaintOrder__4;
public:
_TPaintOrder__2 LayerRefs;
_TPaintOrder__4 ControlRefs;
};
class PASCALIMPLEMENTATION TFlexCustomScheme : public TFlexServiceControl
{
typedef TFlexServiceControl inherited;
private:
bool __fastcall GetDefault(void);
void __fastcall SetDefault(const bool Value);
void __fastcall GetOwnerWidth(System::TObject* Sender, /* out */ int &Value);
void __fastcall GetOwnerHeight(System::TObject* Sender, /* out */ int &Value);
protected:
Flexprops::TBoolProp* FDefaultProp;
virtual void __fastcall CreateProperties(void);
virtual void __fastcall ControlCreate(void);
virtual void __fastcall ControlDestroy(void);
virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
virtual void __fastcall PropStored(System::TObject* Sender, Flexprops::TCustomProp* Prop, bool &IsStored, const System::UnicodeString PropName = L"");
virtual void __fastcall PaintAll(Graphics::TCanvas* Canvas, int PaintX, int PaintY);
__property bool Default = {read=GetDefault, write=SetDefault, nodefault};
public:
virtual TFlexControl* __fastcall FindControlAtPoint(int x, int y);
bool __fastcall CreatePaintOrder(TPaintOrder &PaintOrder);
public:
/* TFlexControl.Create */ inline __fastcall virtual TFlexCustomScheme(TFlexPanel* AOwner, TFlexControl* AParent, TFlexLayer* ALayer) : TFlexServiceControl(AOwner, AParent, ALayer) { }
/* TFlexControl.Destroy */ inline __fastcall virtual ~TFlexCustomScheme(void) { }
};
class DELPHICLASS TFlexScheme;
class PASCALIMPLEMENTATION TFlexScheme : public TFlexCustomScheme
{
typedef TFlexCustomScheme inherited;
private:
Flexprops::TBrushProp* FBrushProp;
Flexprops::TPictureProp* FPictureProp;
Flexprops::TBackgroundOptionsProp* FBackgroundProp;
protected:
System::UnicodeString FCheckName;
virtual void __fastcall ControlCreate(void);
virtual void __fastcall CreateProperties(void);
virtual void __fastcall Paint(Graphics::TCanvas* Canvas, Types::TRect &PaintRect);
virtual void __fastcall PropBeforeChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
virtual void __fastcall PropChanged(System::TObject* Sender, Flexprops::TCustomProp* Prop);
virtual void __fastcall PropStored(System::TObject* Sender, Flexprops::TCustomProp* Prop, bool &IsStored, const System::UnicodeString PropName = L"");
virtual Types::TRect __fastcall GetRefreshRect(int RefreshX, int RefreshY);
public:
__property Flexprops::TBrushProp* BrushProp = {read=FBrushProp};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?