📄 advgrid.hpp
字号:
typedef void __fastcall (__closure *TEndRowSizeEvent)(System::TObject* Sender, int ARow);
typedef void __fastcall (__closure *TClickCellEvent)(System::TObject* Sender, int ARow, int ACol);
typedef void __fastcall (__closure *TDblClickCellEvent)(System::TObject* Sender, int ARow, int ACol);
typedef void __fastcall (__closure *TCanEditCellEvent)(System::TObject* Sender, int ARow, int ACol, bool &CanEdit);
typedef void __fastcall (__closure *TCanClickCellEvent)(System::TObject* Sender, int ARow, int ACol, bool &Allow);
typedef void __fastcall (__closure *TIsFixedCellEvent)(System::TObject* Sender, int ARow, int ACol, bool &IsFixed);
typedef void __fastcall (__closure *TIsPasswordCellEvent)(System::TObject* Sender, int ARow, int ACol, bool &IsPassword);
typedef void __fastcall (__closure *TAnchorClickEvent)(System::TObject* Sender, int ARow, int ACol, AnsiString Anchor, bool &AutoHandle);
typedef void __fastcall (__closure *TAnchorHintEvent)(System::TObject* Sender, int ARow, int ACol, AnsiString &Anchor);
typedef void __fastcall (__closure *TAnchorEvent)(System::TObject* Sender, int ARow, int ACol, AnsiString Anchor);
typedef void __fastcall (__closure *TCellControlEvent)(System::TObject* Sender, int ARow, int ACol, AnsiString CtrlID, AnsiString CtrlType, AnsiString CtrlVal);
typedef void __fastcall (__closure *TCellComboControlEvent)(System::TObject* Sender, int ARow, int ACol, AnsiString CtrlID, AnsiString CtrlType, AnsiString CtrlVal, Classes::TStringList* Values, bool &Edit, int &DropCount);
typedef void __fastcall (__closure *TCellValidateEvent)(System::TObject* Sender, int ACol, int ARow, AnsiString &Value, bool &Valid);
typedef void __fastcall (__closure *TCellValidateWideEvent)(System::TObject* Sender, int ACol, int ARow, WideString &Value, bool &Valid);
typedef void __fastcall (__closure *TEditChangeEvent)(System::TObject* Sender, int ACol, int ARow, AnsiString Value);
typedef void __fastcall (__closure *TDateTimeChangeEvent)(System::TObject* Sender, int ACol, int ARow, System::TDateTime ADateTime);
typedef void __fastcall (__closure *TCellsChangedEvent)(System::TObject* Sender, const Types::TRect &R);
typedef void __fastcall (__closure *TGetCheckEvent)(System::TObject* Sender, int ACol, int ARow, AnsiString &Value);
typedef void __fastcall (__closure *TCustomCellDrawEvent)(System::TObject* Sender, Graphics::TCanvas* Canvas, int ACol, int ARow, Grids::TGridDrawState AState, const Types::TRect &ARect, bool Printing);
typedef void __fastcall (__closure *TCustomCellSizeEvent)(System::TObject* Sender, Graphics::TCanvas* Canvas, int ACol, int ARow, Types::TPoint &ASize, bool Printing);
typedef void __fastcall (__closure *TDoFitToPageEvent)(System::TObject* Sender, double &ScaleFactor, bool &Allow);
typedef void __fastcall (__closure *TBeforeCellPasteEvent)(System::TObject* Sender, int ACol, int ARow, AnsiString &Value, bool &Allow);
typedef void __fastcall (__closure *TBeforeCellPasteWideEvent)(System::TObject* Sender, int ACol, int ARow, WideString &Value, bool &Allow);
typedef void __fastcall (__closure *TSelectionChanged)(System::TObject* Sender, int ALeft, int ATop, int ARight, int ABottom);
typedef void __fastcall (__closure *TRowDisjunctSelectEvent)(System::TObject* Sender, int ARow, bool AState, bool &Allow);
typedef void __fastcall (__closure *TFloatFormatEvent)(System::TObject* Sender, int ACol, int ARow, bool &IsFloat, AnsiString &FloatFormat);
#pragma option push -b-
enum TFindParameters { fnMatchCase, fnMatchFull, fnMatchRegular, fnDirectionLeftRight, fnMatchStart, fnFindInCurrentRow, fnFindInCurrentCol, fnIncludeFixed, fnAutoGoto, fnIgnoreHTMLTags, fnBackward, fnIncludeHiddenColumns, fnFindInPresetCol, fnFindInPresetRow };
#pragma option pop
#pragma option push -b-
enum TCellHAlign { haLeft, haRight, haCenter, haBeforeText, haAfterText, haFull };
#pragma option pop
#pragma option push -b-
enum TCellVAlign { vaTop, vaBottom, vaCenter, vaUnderText, vaAboveText, vaFull };
#pragma option pop
#pragma option push -b-
enum TCellType { ctBitmap, ctIcon, ctNone, ctImageList, ctCheckBox, ctDataCheckBox, ctRotated, ctDataImage, ctNode, ctRadio, ctEmpty, ctImages, ctPicture, ctFilePicture, ctValue, ctProgress, ctComment, ctButton, ctBitButton, ctVirtCheckBox, ctRowCheckBox, ctProgressPie, ctSummary, ctRangeIndicator, ctXPProgress };
#pragma option pop
#pragma option push -b-
enum TFitToPage { fpNever, fpGrow, fpShrink, fpAlways, fpCustom };
#pragma option pop
typedef Set<TFindParameters, fnMatchCase, fnFindInPresetRow> TFindParams;
#pragma option push -b-
enum TStretchMode { noStretch, Stretch, StretchWithAspectRatio, Shrink, ShrinkWithAspectRatio };
#pragma option pop
#pragma option push -b-
enum TSortBlankPosition { blFirst, blLast };
#pragma option pop
#pragma option push -b-
enum TScrollBarAlways { saNone, saVert, saHorz, saBoth };
#pragma option pop
typedef void __fastcall (__closure *THasComboEvent)(System::TObject* Sender, int ACol, int ARow, bool &HasComboBox);
#pragma option push -b-
enum TGridExportState { esExportStart, esExportNewRow, esExportDone, esExportSelRow, esExportFail };
#pragma option pop
#pragma option push -b-
enum TGridImportState { isImportStart, isImportNewRow, isImportDone, isImportSelRow };
#pragma option pop
typedef void __fastcall (__closure *TCalcFooterEvent)(System::TObject* Sender, int ACol, int ARow, AnsiString &Value);
typedef void __fastcall (__closure *TGridBalloonEvent)(System::TObject* Sender, int ACol, int ARow, AnsiString &ATitle, AnsiString &AText, int &AIcon);
typedef void __fastcall (__closure *TWordWrapEvent)(System::TObject* Sender, int ACol, int ARow, bool &WordWrap);
class DELPHICLASS TDragScrollDelays;
class PASCALIMPLEMENTATION TDragScrollDelays : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
int FInitialDelay;
int FRepeatDelay;
public:
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property int InitialDelay = {read=FInitialDelay, write=FInitialDelay, default=1000};
__property int RepeatDelay = {read=FRepeatDelay, write=FRepeatDelay, default=250};
public:
#pragma option push -w-inl
/* TPersistent.Destroy */ inline __fastcall virtual ~TDragScrollDelays(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TDragScrollDelays(void) : Classes::TPersistent() { }
#pragma option pop
};
class DELPHICLASS TDragScrollMargins;
class PASCALIMPLEMENTATION TDragScrollMargins : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
int FTopMargin;
int FBottomMargin;
int FLeftMargin;
int FRightMargin;
public:
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property int TopMargin = {read=FTopMargin, write=FTopMargin, default=50};
__property int BottomMargin = {read=FBottomMargin, write=FBottomMargin, default=50};
__property int LeftMargin = {read=FLeftMargin, write=FLeftMargin, default=50};
__property int RightMargin = {read=FRightMargin, write=FRightMargin, default=50};
public:
#pragma option push -w-inl
/* TPersistent.Destroy */ inline __fastcall virtual ~TDragScrollMargins(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TDragScrollMargins(void) : Classes::TPersistent() { }
#pragma option pop
};
class DELPHICLASS TDragScrollOptions;
class PASCALIMPLEMENTATION TDragScrollOptions : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
bool FActive;
TDragScrollDelays* FDelays;
TDragScrollMargins* FMargins;
public:
__fastcall TDragScrollOptions(void);
__fastcall virtual ~TDragScrollOptions(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property bool Active = {read=FActive, write=FActive, default=0};
__property TDragScrollDelays* Delays = {read=FDelays, write=FDelays};
__property TDragScrollMargins* Margins = {read=FMargins, write=FMargins};
};
#pragma option push -b-
enum TDragScrollDirections { dsdUp, dsdDown, dsdLeft, dsdRight };
#pragma option pop
typedef Set<TDragScrollDirections, dsdUp, dsdRight> TDragScrollDirection;
typedef void __fastcall (__closure *TDragScrollEvent)(System::TObject* Sender, int TopRow, int LeftCol, TDragScrollDirection &DragScrollDir, bool &CanScroll);
class DELPHICLASS TCellGraphic;
class PASCALIMPLEMENTATION TCellGraphic : public Classes::TPersistent
{
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 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 DELPHICLASS TAdvStringGrid;
class DELPHICLASS TGridDropTarget;
class PASCALIMPLEMENTATION TGridDropTarget : public Asgdd::TASGDropTarget
{
typedef Asgdd::TASGDropTarget inherited;
private:
TAdvStringGrid* FGrid;
public:
__fastcall TGridDropTarget(TAdvStringGrid* AGrid);
virtual void __fastcall DropText(const Types::TPoint &pt, AnsiString s);
virtual void __fastcall DropCol(const Types::TPoint &pt, int Col);
virtual void __fastcall DropRTF(const Types::TPoint &pt, AnsiString s);
virtual void __fastcall DropFiles(const Types::TPoint &pt, Classes::TStrings* files);
virtual void __fastcall DragMouseMove(const Types::TPoint &pt, bool &Allow, Asgdd::TDropFormats DropFormats);
virtual void __fastcall DragMouseLeave(void);
public:
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TGridDropTarget(void) { }
#pragma option pop
};
class DELPHICLASS TBackGround;
#pragma option push -b-
enum TBackGroundDisplay { bdTile, bdFixed, bdGradientHorz, bdGradientVert };
#pragma option pop
#pragma option push -b-
enum TBackGroundCells { bcNormal, bcFixed, bcAll };
#pragma option pop
class PASCALIMPLEMENTATION TBackGround : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
TAdvStringGrid* FGrid;
int FTop;
int FLeft;
TBackGroundDisplay FDisplay;
TBackGroundCells FBackgroundCells;
Graphics::TColor FColorTo;
Graphics::TColor FColor;
void __fastcall SetBitmap(Graphics::TBitmap* Value);
void __fastcall SetTop(int Value);
void __fastcall SetLeft(int Value);
void __fastcall SetDisplay(TBackGroundDisplay Value);
void __fastcall SetBackGroundCells(const TBackGroundCells Value);
void __fastcall SetColor(const Graphics::TColor Value);
void __fastcall SetColorTo(const Graphics::TColor Value);
Graphics::TBitmap* FBitmap;
public:
__fastcall TBackGround(TAdvStringGrid* AGrid);
__fastcall virtual ~TBackGround(void);
__published:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -