📄 flexprops.hpp
字号:
__property int EnumCount = {read=GetEnumCount, nodefault};
};
class DELPHICLASS TBoolProp;
class PASCALIMPLEMENTATION TBoolProp : public TEnumProp
{
typedef TEnumProp inherited;
private:
void __fastcall SetValue(bool Value);
bool __fastcall GetValue(void);
protected:
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
public:
__fastcall TBoolProp(TPropList* AOwner, const AnsiString AName);
__property bool Value = {read=GetValue, write=SetValue, nodefault};
public:
#pragma option push -w-inl
/* TEnumProp.Destroy */ inline __fastcall virtual ~TBoolProp(void) { }
#pragma option pop
};
typedef void __fastcall (__closure *TGetIntEvent)(System::TObject* Sender, /* out */ int &Value);
class DELPHICLASS TIntProp;
class PASCALIMPLEMENTATION TIntProp : public TCustomProp
{
typedef TCustomProp inherited;
private:
int FValue;
int *FSource;
TGetIntEvent FOnGetValue;
void __fastcall SetValue(int Value);
int __fastcall GetValue(void);
protected:
int FBeforeValue;
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall SetDisplayValue(const AnsiString Value);
public:
__fastcall TIntProp(TPropList* AOwner, const AnsiString AName);
__property int Value = {read=GetValue, write=SetValue, nodefault};
__property int BeforeValue = {read=FBeforeValue, write=FBeforeValue, nodefault};
__property int SavedValue = {read=FValue, nodefault};
__property Windows::PInteger Source = {read=FSource, write=FSource};
__property TGetIntEvent OnGetValue = {read=FOnGetValue, write=FOnGetValue};
public:
#pragma option push -w-inl
/* TCustomProp.Destroy */ inline __fastcall virtual ~TIntProp(void) { }
#pragma option pop
};
class DELPHICLASS TLongWordProp;
class PASCALIMPLEMENTATION TLongWordProp : public TCustomProp
{
typedef TCustomProp inherited;
protected:
unsigned FValue;
virtual void __fastcall SetValue(unsigned Value);
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall SetDisplayValue(const AnsiString Value);
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
public:
__fastcall TLongWordProp(TPropList* AOwner, const AnsiString AName);
__property unsigned Value = {read=FValue, write=SetValue, nodefault};
public:
#pragma option push -w-inl
/* TCustomProp.Destroy */ inline __fastcall virtual ~TLongWordProp(void) { }
#pragma option pop
};
class DELPHICLASS TDoubleProp;
class PASCALIMPLEMENTATION TDoubleProp : public TCustomProp
{
typedef TCustomProp inherited;
private:
double FValue;
void __fastcall SetValue(double Value);
protected:
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall SetDisplayValue(const AnsiString Value);
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
public:
__fastcall TDoubleProp(TPropList* AOwner, const AnsiString AName);
__property double Value = {read=FValue, write=SetValue};
public:
#pragma option push -w-inl
/* TCustomProp.Destroy */ inline __fastcall virtual ~TDoubleProp(void) { }
#pragma option pop
};
class DELPHICLASS TDateTimeProp;
class PASCALIMPLEMENTATION TDateTimeProp : public TCustomProp
{
typedef TCustomProp inherited;
private:
System::TDateTime FValue;
void __fastcall SetValue(System::TDateTime Value);
protected:
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall SetDisplayValue(const AnsiString Value);
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
public:
__fastcall TDateTimeProp(TPropList* AOwner, const AnsiString AName);
__property System::TDateTime Value = {read=FValue, write=SetValue};
public:
#pragma option push -w-inl
/* TCustomProp.Destroy */ inline __fastcall virtual ~TDateTimeProp(void) { }
#pragma option pop
};
typedef void __fastcall (__closure *TGetStringEvent)(System::TObject* Sender, /* out */ AnsiString &
s);
class DELPHICLASS TStrProp;
class PASCALIMPLEMENTATION TStrProp : public TCustomProp
{
typedef TCustomProp inherited;
protected:
AnsiString FValue;
TGetStringEvent FOnGetString;
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall SetValue(const AnsiString Value);
virtual AnsiString __fastcall GetValue();
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
public:
__fastcall TStrProp(TPropList* AOwner, const AnsiString AName);
__property AnsiString Value = {read=GetValue, write=SetValue};
__property AnsiString SavedValue = {read=FValue, write=FValue};
__property TGetStringEvent OnGetString = {read=FOnGetString, write=FOnGetString};
public:
#pragma option push -w-inl
/* TCustomProp.Destroy */ inline __fastcall virtual ~TStrProp(void) { }
#pragma option pop
};
class DELPHICLASS TStrListProp;
class PASCALIMPLEMENTATION TStrListProp : public TCustomProp
{
typedef TCustomProp inherited;
private:
Classes::TStringList* FStrList;
void __fastcall SetText(const AnsiString Value);
AnsiString __fastcall GetLine(int Index);
int __fastcall GetLinesCount(void);
AnsiString __fastcall GetText();
void __fastcall SetLine(int Index, const AnsiString Value);
HIDESBASE AnsiString __fastcall GetName(int Index);
AnsiString __fastcall GetValue(const AnsiString Name);
AnsiString __fastcall GetValueByIndex(int Index);
void __fastcall SetValue(const AnsiString Name, const AnsiString Value);
void __fastcall SetValueByIndex(int Index, const AnsiString Value);
void __fastcall SetName(int Index, const AnsiString Value);
protected:
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
public:
__fastcall TStrListProp(TPropList* AOwner, const AnsiString AName);
__fastcall virtual ~TStrListProp(void);
HIDESBASE void __fastcall Assign(Classes::TStrings* Source);
void __fastcall AssignTo(Classes::TStrings* Dest);
void __fastcall Clear(void);
int __fastcall Add(const AnsiString s);
bool __fastcall Insert(int Index, const AnsiString S);
void __fastcall Delete(int Index);
void __fastcall RemoveByName(const AnsiString Name);
int __fastcall IndexOf(const AnsiString s);
int __fastcall IndexOfName(const AnsiString s);
__property int LinesCount = {read=GetLinesCount, nodefault};
__property AnsiString Lines[int Index] = {read=GetLine, write=SetLine/*, default*/};
__property AnsiString Names[int Index] = {read=GetName, write=SetName};
__property AnsiString Values[AnsiString Name] = {read=GetValue, write=SetValue};
__property AnsiString ValuesByIndex[int Index] = {read=GetValueByIndex, write=SetValueByIndex};
__property AnsiString Text = {read=GetText, write=SetText};
};
class DELPHICLASS TUserDataProp;
class PASCALIMPLEMENTATION TUserDataProp : public TStrListProp
{
typedef TStrListProp inherited;
public:
#pragma option push -w-inl
/* TStrListProp.Create */ inline __fastcall TUserDataProp(TPropList* AOwner, const AnsiString AName
) : TStrListProp(AOwner, AName) { }
#pragma option pop
#pragma option push -w-inl
/* TStrListProp.Destroy */ inline __fastcall virtual ~TUserDataProp(void) { }
#pragma option pop
};
typedef void __fastcall (__closure *TPropDataEvent)(System::TObject* Sender, Variant &Value);
class DELPHICLASS TDataProp;
class PASCALIMPLEMENTATION TDataProp : public TCustomProp
{
typedef TCustomProp inherited;
private:
TPropDataEvent FOnGetPropData;
TPropDataEvent FOnSetPropData;
protected:
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
public:
__fastcall TDataProp(TPropList* AOwner, const AnsiString AName);
__property TPropDataEvent OnGetPropData = {read=FOnGetPropData, write=FOnGetPropData};
__property TPropDataEvent OnSetPropData = {read=FOnSetPropData, write=FOnSetPropData};
public:
#pragma option push -w-inl
/* TCustomProp.Destroy */ inline __fastcall virtual ~TDataProp(void) { }
#pragma option pop
};
#pragma option push -b-
enum TBrushMethod { bmHatch, bmGradient, bmBitmap };
#pragma option pop
class DELPHICLASS TBrushProp;
class PASCALIMPLEMENTATION TBrushProp : public TCustomProp
{
typedef TCustomProp inherited;
private:
Graphics::TBrush* FBrush;
TBrushMethod FMethod;
Flexutils::TGradientStyle FGradStyle;
Graphics::TColor FGradBeginColor;
Graphics::TColor FGradEndColor;
Graphics::TBitmap* FBitmap;
Flexutils::TTiledBitmapCache FCache;
AnsiString FBitmapLinkName;
bool FBitmapMasked;
Graphics::TColor FBitmapMaskColor;
bool FBitmapCache;
Flexutils::TBitmapDisplay FBitmapDisplay;
Graphics::TColor __fastcall GetColor(void);
Graphics::TBrushStyle __fastcall GetStyle(void);
void __fastcall SetColor(const Graphics::TColor Value);
HIDESBASE void __fastcall SetStyle(const Graphics::TBrushStyle Value);
void __fastcall SetGradBeginColor(const Graphics::TColor Value);
void __fastcall SetGradEndColor(const Graphics::TColor Value);
void __fastcall SetGradStyle(const Flexutils::TGradientStyle Value);
bool __fastcall GetIsPaintAlternate(void);
void __fastcall SetBitmap(const Graphics::TBitmap* Value);
void __fastcall SetBitmapMaskColor(const Graphics::TColor Value);
void __fastcall SetBitmapMasked(const bool Value);
void __fastcall SetBitmapCache(const bool Value);
void __fastcall SetBitmapDisplay(const Flexutils::TBitmapDisplay Value);
void __fastcall SetBitmapLinkName(const AnsiString Value);
void __fastcall SetMethod(const TBrushMethod Value);
bool __fastcall GetIsClear(void);
bool __fastcall StoreBitmap(void);
bool __fastcall StoreBitmapLinkName(void);
protected:
virtual TPropType __fastcall GetPropType(const AnsiString PropName);
virtual Variant __fastcall GetPropValue(const AnsiString PropName);
virtual void __fastcall SetPropValue(const AnsiString PropName, const Variant &Value);
virtual AnsiString __fastcall GetDisplayValue();
virtual void __fastcall BitmapChange(System::TObject* Sender);
void __fastcall ResetCache(void);
public:
__fastcall TBrushProp(TPropList* AOwner, const AnsiString AName);
__fastcall virtual ~TBrushProp(void);
void __fastcall InitBitmap(int Width, int Height);
void __fastcall FreeBitmap(void);
bool __fastcall UpdateBitmapLink(void);
virtual void __fastcall Setup(Graphics::TCanvas* Canvas, int Scale);
virtual void __fastcall Translate(const Flexutils::TTranslateInfo &TranslateInfo);
void __fastcall PaintAlternate(Graphics::TCanvas* Canvas, Windows::TRect &PaintRect, const Windows::TRect
&RefreshRect, int Scale, bool ClipTransparent);
__property bool IsPaintAlternate = {read=GetIsPaintAlternate, nodefault};
__property bool IsClear = {read=GetIsClear, nodefault};
__published:
__property TBrushMethod Method = {read=FMethod, write=SetMethod, default=0};
__property Graphics::TColor Color = {read=GetColor, write=SetColor, default=536870911};
__property Graphics::TBrushStyle Style = {read=GetStyle, write=SetStyle, default=0};
__property Graphics::TBitmap* Bitmap = {read=FBitmap, write=SetBitmap, stored=StoreBitmap};
__property AnsiString BitmapLinkName = {read=FBitmapLinkName, write=SetBitmapLinkName, stored=StoreBitmapLinkName
};
__property bool BitmapMasked = {read=FBitmapMasked, write=SetBitmapMasked, default=0};
__property Graphics::TColor BitmapMaskColor = {read=FBitmapMaskColor, write=SetBitmapMaskColor, default=0
};
__property bool BitmapCache = {read=FBitmapCache, write=SetBitmapCache, default=0};
__property Flexutils::TBitmapDisplay BitmapDisplay = {read=FBitmapDisplay, write=SetBitmapDisplay,
default=1};
__property Flexutils::TGradientStyle GradStyle = {read=FGradStyle, write=SetGradStyle, default=0};
__property Graphics::TColor GradBeginColor = {read=FGradBeginColor, write=SetGradBeginColor, default=0
};
__property Graphics::TColor GradEndColor = {read=FGradEndColor, write=SetGradEndColor, default=0};
};
class DELPHICLASS TLineCapProp;
class PASCALIMPLEMENTATION TLineCapProp : public TCustomProp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -