advgrid.hpp
来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 1,379 行 · 第 1/5 页
HPP
1,379 行
{
typedef Classes::TPersistent inherited;
private:
TCellType FCellType;
Graphics::TBitmap* FCellBitmap;
Graphics::TIcon* FCellIcon;
TCellVAlign FCellVAlign;
TCellHAlign FCellHAlign;
int FCellIndex;
bool FCellTransparent;
bool FCellCreated;
bool FCellBoolean;
int FCellAngle;
double FCellValue;
int FCellErrFrom;
int FCellErrLen;
AnsiString FCellText;
Variant FCellVar;
public:
__fastcall TCellGraphic(void);
__fastcall virtual ~TCellGraphic(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
void __fastcall SetInterfacedCell(Classes::TInterfacedPersistent* AObject);
void __fastcall SetBitmap(Graphics::TBitmap* ABmp, bool Transparent, TCellHAlign hal, TCellVAlign val);
void __fastcall SetPicture(Graphics::TPicture* APicture, bool Transparent, TStretchMode StretchMode, int padding, TCellHAlign hal, TCellVAlign val);
void __fastcall SetFilePicture(Advobj::TFilePicture* APicture, bool Transparent, TStretchMode stretchmode, int padding, TCellHAlign hal, TCellVAlign val);
void __fastcall SetImageIdx(int idx, TCellHAlign hal, TCellVAlign val);
void __fastcall SetDataImage(int idx, TCellHAlign hal, TCellVAlign val);
void __fastcall SetMultiImage(int Col, int Row, int dir, TCellHAlign hal, TCellVAlign val, Advobj::TImageChangeEvent Notifier);
void __fastcall SetIcon(Graphics::TIcon* aicon, TCellHAlign hal, TCellVAlign val);
void __fastcall SetCheckBox(bool Value, bool Data, bool Flat, TCellHAlign hal, TCellVAlign val);
void __fastcall SetAngle(short AAngle);
void __fastcall SetButton(int bw, int bh, AnsiString caption, TCellHAlign hal, TCellVAlign val);
void __fastcall SetBitButton(int bw, int bh, AnsiString caption, Graphics::TBitmap* Glyph, TCellHAlign hal, TCellVAlign val);
Types::TPoint __fastcall GetPictureSize(int cw, int rh, bool hastext);
__property Graphics::TIcon* CellIcon = {read=FCellIcon, write=FCellIcon};
__property Graphics::TBitmap* CellBitmap = {read=FCellBitmap, write=FCellBitmap};
__property Variant CellVar = {read=FCellVar, write=FCellVar};
__published:
__property TCellType CellType = {read=FCellType, write=FCellType, nodefault};
__property TCellVAlign CellVAlign = {read=FCellVAlign, write=FCellVAlign, nodefault};
__property TCellHAlign CellHAlign = {read=FCellHAlign, write=FCellHAlign, nodefault};
__property int CellIndex = {read=FCellIndex, write=FCellIndex, nodefault};
__property bool CellTransparent = {read=FCellTransparent, write=FCellTransparent, nodefault};
__property bool CellCreated = {read=FCellCreated, write=FCellCreated, nodefault};
__property bool CellBoolean = {read=FCellBoolean, write=FCellBoolean, nodefault};
__property int CellAngle = {read=FCellAngle, write=FCellAngle, nodefault};
__property double CellValue = {read=FCellValue, write=FCellValue};
__property int CellErrFrom = {read=FCellErrFrom, write=FCellErrFrom, nodefault};
__property int CellErrLen = {read=FCellErrLen, write=FCellErrLen, nodefault};
__property AnsiString CellText = {read=FCellText, write=FCellText};
};
class DELPHICLASS TBands;
class PASCALIMPLEMENTATION TBands : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
bool FPrint;
bool FActive;
int FTotalLength;
int FSecondaryLength;
int FPrimaryLength;
Graphics::TColor FSecondaryColor;
Graphics::TColor FPrimaryColor;
TAdvStringGrid* FOwner;
void __fastcall SetActive(const bool Value);
void __fastcall SetPrimaryColor(const Graphics::TColor Value);
void __fastcall SetPrimaryLength(const int Value);
void __fastcall SetSecondaryColor(const Graphics::TColor Value);
void __fastcall SetSecondaryLength(const int Value);
public:
__fastcall TBands(TAdvStringGrid* AOwner);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__property int TotalLength = {read=FTotalLength, nodefault};
__published:
__property bool Active = {read=FActive, write=SetActive, default=0};
__property Graphics::TColor PrimaryColor = {read=FPrimaryColor, write=SetPrimaryColor, default=-16777192};
__property int PrimaryLength = {read=FPrimaryLength, write=SetPrimaryLength, default=1};
__property Graphics::TColor SecondaryColor = {read=FSecondaryColor, write=SetSecondaryColor, default=-16777211};
__property int SecondaryLength = {read=FSecondaryLength, write=SetSecondaryLength, default=1};
__property bool Print = {read=FPrint, write=FPrint, default=0};
public:
#pragma option push -w-inl
/* TPersistent.Destroy */ inline __fastcall virtual ~TBands(void) { }
#pragma option pop
};
#pragma option push -b-
enum TNodeType { cnFlat, cn3D, cnGlyph, cnLeaf, cnXP };
#pragma option pop
class DELPHICLASS TCellNode;
class PASCALIMPLEMENTATION TCellNode : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
Graphics::TColor FColor;
TNodeType FNodeType;
Graphics::TColor FNodeColor;
Graphics::TBitmap* FExpandGlyph;
bool FExpandOne;
Graphics::TBitmap* FContractGlyph;
TAdvStringGrid* FOwner;
bool FShowTree;
bool FShowTreeFull;
int FNodeIndent;
Graphics::TColor FTreeColor;
void __fastcall SetExpandGlyph(Graphics::TBitmap* Value);
void __fastcall SetContractGlyph(Graphics::TBitmap* Value);
void __fastcall SetNodeType(TNodeType Value);
void __fastcall SetShowTree(const bool Value);
void __fastcall SetShowTreeFull(const bool Value);
void __fastcall SetNodeIndent(const int Value);
void __fastcall SetTreeColor(const Graphics::TColor Value);
public:
__fastcall TCellNode(TAdvStringGrid* AOwner);
__fastcall virtual ~TCellNode(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property Graphics::TColor Color = {read=FColor, write=FColor, default=12632256};
__property bool ExpandOne = {read=FExpandOne, write=FExpandOne, default=0};
__property TNodeType NodeType = {read=FNodeType, write=SetNodeType, default=4};
__property Graphics::TColor NodeColor = {read=FNodeColor, write=FNodeColor, default=0};
__property int NodeIndent = {read=FNodeIndent, write=SetNodeIndent, default=12};
__property Graphics::TBitmap* ExpandGlyph = {read=FExpandGlyph, write=SetExpandGlyph};
__property Graphics::TBitmap* ContractGlyph = {read=FContractGlyph, write=SetContractGlyph};
__property bool ShowTree = {read=FShowTree, write=SetShowTree, default=1};
__property bool ShowTreeFull = {read=FShowTreeFull, write=SetShowTreeFull, default=1};
__property Graphics::TColor TreeColor = {read=FTreeColor, write=SetTreeColor, default=8421504};
};
#pragma option push -b-
enum TControlStyle { csClassic, csFlat, csWinXP, csBorland, csTMS, csGlyph, csTheme };
#pragma option pop
class DELPHICLASS TControlLook;
class PASCALIMPLEMENTATION TControlLook : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
TAdvStringGrid* FGrid;
int FCheckBoxSize;
Graphics::TBitmap* FUnCheckedGlyph;
Graphics::TBitmap* FCheckedGlyph;
TControlStyle FControlStyle;
Graphics::TColor FColor;
int FRadioSize;
Graphics::TBitmap* FRadioOffGlyph;
Graphics::TBitmap* FRadioOnGlyph;
bool FFlatButton;
int FProgressMarginY;
int FProgressMarginX;
bool FProgressXP;
bool FDropDownAlwaysVisible;
bool FSpinButtonsAlwaysVisible;
bool FNoDisabledCheckRadioLook;
bool FNoDisabledButtonLook;
Graphics::TColor FCommentColor;
Graphics::TColor FProgressBorderColor;
Graphics::TColor FFixedGradientFrom;
Graphics::TColor FFixedGradientTo;
Graphics::TColor FFixedGradientMirrorFrom;
Graphics::TColor FFixedGradientMirrorTo;
Graphics::TColor FFixedGradientHoverFrom;
Graphics::TColor FFixedGradientHoverTo;
Graphics::TColor FFixedGradientHoverMirrorFrom;
Graphics::TColor FFixedGradientHoverMirrorTo;
Graphics::TColor FFixedGradientHoverBorder;
Graphics::TColor FFixedGradientDownFrom;
Graphics::TColor FFixedGradientDownTo;
Graphics::TColor FFixedGradientDownMirrorFrom;
Graphics::TColor FFixedGradientDownMirrorTo;
Graphics::TColor FFixedGradientDownBorder;
bool FFixedDropdownButton;
bool FCheckAlwaysActive;
bool FRadioAlwaysActive;
void __fastcall SetCheckBoxSize(const int Value);
void __fastcall SetControlStyle(const TControlStyle Value);
void __fastcall SetCheckedGlyph(const Graphics::TBitmap* Value);
void __fastcall SetUnCheckedGlyph(const Graphics::TBitmap* Value);
void __fastcall SetColor(const Graphics::TColor Value);
void __fastcall SetRadioOffGlyph(const Graphics::TBitmap* Value);
void __fastcall SetRadioOnGlyph(const Graphics::TBitmap* Value);
void __fastcall SetRadioSize(const int Value);
void __fastcall SetFlatButton(const bool Value);
void __fastcall SetProgressMarginX(const int Value);
void __fastcall SetProgressMarginY(const int Value);
void __fastcall SetProgressXP(const bool Value);
void __fastcall SetDropDownAlwaysVisible(const bool Value);
void __fastcall SetSpinButtonsAlwaysVisible(const bool Value);
void __fastcall SetNoDisabledCheckRadioLook(const bool Value);
void __fastcall SetNoDisabledButtonLook(const bool Value);
void __fastcall SetCommentColor(const Graphics::TColor Value);
void __fastcall SetFixedGradientFrom(const Graphics::TColor Value);
void __fastcall SetFixedGradientTo(const Graphics::TColor Value);
void __fastcall SetFixedGradientMirrorFrom(const Graphics::TColor Value);
void __fastcall SetFixedGradientMirrorTo(const Graphics::TColor Value);
void __fastcall SetFixedGradientHoverFrom(const Graphics::TColor Value);
void __fastcall SetFixedGradientHoverTo(const Graphics::TColor Value);
void __fastcall SetFixedGradientHoverMirrorFrom(const Graphics::TColor Value);
void __fastcall SetFixedGradientHoverMirrorTo(const Graphics::TColor Value);
void __fastcall SetFixedGradientHoverBorder(const Graphics::TColor Value);
void __fastcall SetFixedGradientDownFrom(const Graphics::TColor Value);
void __fastcall SetFixedGradientDownTo(const Graphics::TColor Value);
void __fastcall SetFixedGradientDownMirrorFrom(const Graphics::TColor Value);
void __fastcall SetFixedGradientDownMirrorTo(const Graphics::TColor Value);
void __fastcall SetFixedGradientDownBorder(const Graphics::TColor Value);
public:
__fastcall TControlLook(TAdvStringGrid* AOwner);
__fastcall virtual ~TControlLook(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property Graphics::TColor Color = {read=FColor, write=SetColor, default=0};
__property Graphics::TColor CommentColor = {read=FCommentColor, write=SetCommentColor, default=255};
__property Graphics::TBitmap* CheckedGlyph = {read=FCheckedGlyph, write=SetCheckedGlyph};
__property Graphics::TColor FixedGradientFrom = {read=FFixedGradientTo, write=SetFixedGradientTo, default=536870911};
__property Graphics::TColor FixedGradientTo = {read=FFixedGradientFrom, write=SetFixedGradientFrom, default=536870911};
__property Graphics::TColor FixedGradientMirrorFrom = {read=FFixedGradientMirrorTo, write=SetFixedGradientMirrorTo, default=536870911};
__property Graphics::TColor FixedGradientMirrorTo = {read=FFixedGradientMirrorFrom, write=SetFixedGradientMirrorFrom, default=536870911};
__property Graphics::TColor FixedGradientHoverFrom = {read=FFixedGradientHoverTo, write=SetFixedGradientHoverTo, default=536870911};
__property Graphics::TColor FixedGradientHoverTo = {read=FFixedGradientHoverFrom, write=SetFixedGradientHoverFrom, default=536870911};
__property Graphics::TColor FixedGradientHoverMirrorFrom = {read=FFixedGradientHoverMirrorTo, write=SetFixedGradientHoverMirrorTo, default=536870911};
__property Graphics::TColor FixedGradientHoverMirrorTo = {read=FFixedGradientHoverMirrorFrom, write=SetFixedGradientHoverMirrorFrom, default=536870911};
__property Graphics::TColor FixedGradientHoverBorder = {read=FFixedGradientHoverBorder, write=SetFixedGradientHoverBorder, default=536870911};
__property Graphics::TColor FixedGradientDownFrom = {read=FFixedGradientDownTo, write=SetFixedGradientDownTo, default=536870911};
__property Graphics::TColor FixedGradientDownTo = {read=FFixedGradientDownFrom, write=SetFixedGradientDownFrom, default=536870911};
__property Graphics::TColor FixedGradientDownMirrorFrom = {read=FFixedGradientDownMirrorTo, write=SetFixedGradientDownMirrorTo, default=536870911};
__property Graphics::TColor FixedGradientDownMirrorTo = {read=FFixedGradientDownMirrorFrom, write=SetFixedGradientDownMirrorFrom, default=536870911};
__property Graphics::TColor FixedGradientDownBorder = {read=FFixedGradientDownBorder, write=SetFixedGradientDownBorder, default=536870911};
__property bool FixedDropDownButton = {read=FFixedDropdownButton, write=FFixedDropdownButton, default=0};
__property Graphics::TBitmap* UnCheckedGlyph = {read=FUnCheckedGlyph, write=SetUnCheckedGlyph};
__property Graphics::TBitmap* RadioOnGlyph = {read=FRadioOnGlyph, write=SetRadioOnGlyph};
__property Graphics::TBitmap* RadioOffGlyph = {read=FRadioOffGlyph, write=SetRadioOffGlyph};
__property int CheckSize = {read=FCheckBoxSize, write=SetCheckBoxSize, default=15};
__property bool CheckAlwaysActive = {read=FCheckAlwaysActive, write=FCheckAlwaysActive, default=0};
__property int RadioSize = {read=FRadioSize, write=SetRadioSize, default=10};
__property bool RadioAlwaysActive = {read=FRadioAlwaysActive, write=FRadioAlwaysActive, default=0};
__property TControlStyle ControlStyle = {read=FControlStyle, write=SetControlStyle, default=2};
__property bool DropDownAlwaysVisible = {read=FDropDownAlwaysVisible, write=SetDropDownAlwaysVisible, default=0};
__property bool SpinButtonsAlwaysVisible = {read=FSpinButtonsAlwaysVisible, write=SetSpinButtonsAlwaysVisible, default=0};
__property bool FlatButton = {read=FFlatButton, write=SetFlatButton, default=0};
__property bool NoDisabledCheckRadioLook = {read=FNoDisabledCheckRadioLook, write=SetNoDisabledCheckRadioLook, default=0};
__property bool NoDisabledButtonLook = {read=FNoDisabledButtonLook, write=SetNoDisabledButtonLook, default=0};
__property Graphics::TColor ProgressBorderColor = {read=FProgressBorderColor, write=FProgressBorderColor, default=8421504};
__property int ProgressMarginX = {read=FProgressMarginX, write=SetProgressMarginX, default=2};
__property int ProgressMarginY = {read=FProgressMarginY, write=SetProgressMarginY, default=2};
__property bool ProgressXP = {read=FProgressXP, write=SetProgressXP, default=0};
};
class DELPHICLASS TShowModified;
class PASCALIMPLEMENTATION TShowModified : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
bool FEnabled;
Graphics::TColor FColor;
Classes::TNotifyEvent FOnChange;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?