⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbadvgrid.hpp

📁 TMS component pack v4.2 for delphi
💻 HPP
📖 第 1 页 / 共 2 页
字号:
// CodeGear C++ Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Dbadvgrid.pas' rev: 11.00

#ifndef DbadvgridHPP
#define DbadvgridHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Basegrid.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <Dbctrls.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Advgrid.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Grids.hpp>	// Pascal unit
#include <Advutil.hpp>	// Pascal unit
#include <Dbtables.hpp>	// Pascal unit
#include <Inifiles.hpp>	// Pascal unit
#include <Advobj.hpp>	// Pascal unit
#include <Jpeg.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Dbadvgrid
{
//-- type declarations -------------------------------------------------------
typedef DynamicArray<int >  DBAdvGrid__2;

class DELPHICLASS TAdvGridDataLink;
class DELPHICLASS TDBAdvGrid;
class DELPHICLASS TDBGridColumnCollection;
class DELPHICLASS TDBGridColumnItem;
class PASCALIMPLEMENTATION TDBGridColumnCollection : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
public:
	TDBGridColumnItem* operator[](int Index) { return Items[Index]; }
	
private:
	TDBAdvGrid* FOwner;
	bool FNoRecursiveUpdate;
	HIDESBASE TDBGridColumnItem* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, const TDBGridColumnItem* Value);
	
protected:
	virtual void __fastcall Update(Classes::TCollectionItem* Item);
	__property TDBAdvGrid* Grid = {read=FOwner};
	
public:
	bool __fastcall HasFieldsDefined(void);
	virtual TMetaClass* __fastcall GetItemClass(void);
	HIDESBASE TDBGridColumnItem* __fastcall Add(void);
	HIDESBASE TDBGridColumnItem* __fastcall Insert(int index);
	__property TDBGridColumnItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
	__fastcall TDBGridColumnCollection(TDBAdvGrid* AOwner);
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	void __fastcall SetOrganization(void);
	void __fastcall ResetOrganization(void);
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TDBGridColumnCollection(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TSetQueryOrderEvent)(System::TObject* Sender, AnsiString &SQL);

typedef void __fastcall (__closure *TGetRecordCountEvent)(System::TObject* Sender, int &Count);

#pragma option push -b-
enum TDataSetType { dtSequenced, dtNonSequenced };
#pragma option pop

typedef void __fastcall (__closure *TGetHTMLTemplateDataEvent)(System::TObject* Sender, int ACol, int ARow, AnsiString Fieldname, AnsiString &Data);

#pragma option push -b-
enum TEditPostMode { epCell, epRow };
#pragma option pop

typedef void __fastcall (__closure *TDBColumnPopupEvent)(System::TObject* Sender, int ACol, int ARow, Menus::TPopupMenu* PopupMenu);

class PASCALIMPLEMENTATION TDBAdvGrid : public Advgrid::TAdvStringGrid 
{
	typedef Advgrid::TAdvStringGrid inherited;
	
private:
	TDBGridColumnCollection* FColumnCollection;
	TAdvGridDataLink* FDataLink;
	bool FInternalCall;
	bool FDoNotUpdateMe;
	Advgrid::TCellGraphic* FCellGraphic;
	Advgrid::TRowChangedEvent FOnRowChanged;
	bool FShowMemoFields;
	Advgrid::TCellValidateEvent FOnCellValidate;
	Advgrid::TCellValidateWideEvent FOnCellValidateWide;
	Advgrid::TCanSortEvent FOnCanSort;
	TSetQueryOrderEvent FOnSetQueryOrder;
	Db::TDataSetState FOldState;
	bool FRecordChanged;
	bool FShowDefinedFields;
	bool FInternalInsert;
	bool FShowDBIndicator;
	void *FOldPosition;
	bool FEmptyDataSet;
	bool FOldIsBOF;
	bool FOldIsEOF;
	bool FCancelEditReturn;
	bool FDoNotCountRow;
	TGetRecordCountEvent FOnGetRecordCount;
	bool FShowBooleanFields;
	bool FShowPictureFields;
	bool FNotDeletionUpdate;
	Graphics::TPicture* FPicture;
	bool FPageMode;
	Classes::TList* FPictureList;
	bool FRefreshOnDelete;
	bool FUpdateCancel;
	bool FNewRecord;
	bool FRefreshOnInsert;
	Classes::TStringList* FLookupKeys;
	int FVisibleFieldCount;
	TDataSetType FDataSetType;
	int FExportRow;
	bool FSelExport;
	bool FSelImport;
	int FSelRow;
	void *FImportPos;
	bool FNewAppendRecord;
	TGetHTMLTemplateDataEvent FOnGetHTMLTemplateData;
	bool FKeyDownAppend;
	bool FMouseWheelScrolling;
	int FLastDesignChoice;
	Advgrid::TRowChangingEvent FOnRowChanging;
	bool FFilteredDataSet;
	TDataSetType FOldDataSetType;
	Grids::TGetEditEvent FOnGetEditText;
	bool FShowUnicode;
	bool FInternalSelection;
	bool FDatasetTypeAuto;
	TEditPostMode FEditPostMode;
	int FEditRec;
	Classes::TStringList* FEditRecData;
	Db::TDataSetState FOldEditingState;
	bool FEditUpdating;
	AnsiString FEditText;
	WideString FEditWideText;
	bool FDoNotCallSelect;
	bool FDoNotBounsBack;
	int FOldAR;
	int FOldTopRow;
	bool FAppending;
	bool FAppendOperation;
	bool FExporting;
	bool FEditEnding;
	bool FOldFoaterEnableCalc;
	bool FAllowRowChange;
	bool FMustEnableControls;
	bool FAutoCreateColumns;
	bool FAutoRemoveColumns;
	TDBColumnPopupEvent FOnColumnPopup;
	bool FShowDesignHelper;
	bool FInternalMove;
	void __fastcall DataUpdate(void);
	void __fastcall DataChange(void);
	void __fastcall ActiveChange(bool Value);
	void __fastcall RecordChanged(Db::TField* Field);
	void __fastcall EditingChanged(void);
	void __fastcall UpdateRowCount(void);
	bool __fastcall CheckDataSet(void);
	void __fastcall UpdateScrollBar(void);
	void __fastcall UpdateVisibleFields(void);
	MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
	Db::TDataSource* __fastcall GetDataSource(void);
	HIDESBASE bool __fastcall GetReadOnly(void);
	void __fastcall SetDataSource(const Db::TDataSource* Value);
	HIDESBASE void __fastcall SetReadOnly(const bool Value);
	HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &WMScroll);
	HIDESBASE MESSAGE void __fastcall WMKeyDown(Messages::TWMKey &Msg);
	void __fastcall GetEditTextEvent(System::TObject* Sender, int ACol, int ARow, AnsiString &Value);
	void __fastcall RowChangingEvent(System::TObject* Sender, int OldRow, int NewRow, bool &Allow);
	void __fastcall RowUpdateEvent(System::TObject* Sender, int OldRow, int NewRow);
	int __fastcall GetFieldCount(void);
	Db::TField* __fastcall GetFields(int FieldIndex);
	void __fastcall SynchColumns(void);
	void __fastcall SetColumnCollection(const TDBGridColumnCollection* Value);
	int __fastcall GetColCount(void);
	HIDESBASE void __fastcall SetColCount(const int Value);
	void __fastcall SetShowMemoFields(const bool Value);
	void __fastcall CellValidateEvent(System::TObject* Sender, int ACol, int ARow, AnsiString &Value, bool &Valid);
	void __fastcall CellValidateWideEvent(System::TObject* Sender, int ACol, int ARow, WideString &Value, bool &Valid);
	void __fastcall CanSortEvent(System::TObject* Sender, int ACol, bool &DoSort);
	void __fastcall SetShowDBIndicator(const bool Value);
	void __fastcall SetShowBooleanFields(const bool Value);
	void __fastcall SetShowPictureFields(const bool Value);
	Db::TField* __fastcall GetDBFieldAtColumn(int ACol);
	int __fastcall GetDBFieldIndexAtColumn(int ACol);
	HIDESBASE int __fastcall GetFixedRowsEx(void);
	HIDESBASE void __fastcall SetFixedRowsEx(const int Value);
	AnsiString __fastcall HTMLDBReplace(AnsiString s, Db::TDataSet* dataset, int ACol, int ARow);
	void __fastcall LoadFromDataSet(void);
	void __fastcall RemoveAllPictures(void);
	void __fastcall RemoveAllBooleanCheckBoxes(void);
	void __fastcall RemoveAllStringCheckBoxes(void);
	void __fastcall RemoveAllGraphics(void);
	void __fastcall RemoveAllCellValues(void);
	void __fastcall SetPageMode(const bool Value);
	void __fastcall SetDataSetType(const TDataSetType Value);
	int __fastcall GetDBRow(void);
	void __fastcall SetDBRow(const int Value);
	int __fastcall MouseOverDesignChoice(int X, int Y);
	void __fastcall DesignerUpdate(void);
	TDBGridColumnItem* __fastcall GetColumnByName(AnsiString AValue);
	TDBGridColumnItem* __fastcall GetColumnByFieldName(AnsiString AValue);
	void __fastcall SetDatasetTypeAuto(const bool Value);
	void __fastcall SetEditPostMode(const TEditPostMode Value);
	void __fastcall SetAutoCreateColumns(const bool Value);
	void __fastcall SetAutoRemoveColumns(const bool Value);
	void __fastcall SetShowDesignHelper(const bool Value);
	
protected:
	virtual bool __fastcall CanEditShow(void);
	DYNAMIC bool __fastcall CanEditModify(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	DYNAMIC bool __fastcall DoMouseWheelDown(Classes::TShiftState Shift, const Types::TPoint &MousePos);
	DYNAMIC bool __fastcall DoMouseWheelUp(Classes::TShiftState Shift, const Types::TPoint &MousePos);
	virtual void __fastcall DoCanEditCell(int ACol, int ARow, bool &CanEdit);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	virtual bool __fastcall SelectCell(int ACol, int ARow);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	virtual bool __fastcall CanModify(void);
	virtual int __fastcall GetRecordCount(void);
	virtual AnsiString __fastcall GetCurrentCell();
	virtual void __fastcall GetDisplText(int c, int r, AnsiString &Value);
	virtual void __fastcall DrawCell(int ACol, int ARow, const Types::TRect &ARect, Grids::TGridDrawState AState);
	virtual void __fastcall Scroll(int Distance);
	DYNAMIC void __fastcall TopLeftChanged(void);
	DYNAMIC void __fastcall ColumnMoved(int FromIndex, int ToIndex);
	virtual void __fastcall Loaded(void);
	virtual TDBGridColumnCollection* __fastcall CreateColumns(void);
	DYNAMIC void __fastcall ColWidthsChanged(void);
	virtual void __fastcall GetCellAlign(int ACol, int ARow, Classes::TAlignment &HAlign, Basegrid::TVAlignment &VAlign);
	virtual void __fastcall GetCellBorder(int ACol, int ARow, Graphics::TPen* APen, Advgrid::TCellBorders &borders);
	virtual void __fastcall GetCellPrintBorder(int ACol, int ARow, Graphics::TPen* APen, Advgrid::TCellBorders &borders);
	virtual void __fastcall GetCellPrintColor(int ACol, int ARow, Grids::TGridDrawState AState, Graphics::TBrush* ABrush, Graphics::TFont* AFont);
	virtual void __fastcall GetCellColor(int ACol, int ARow, Grids::TGridDrawState AState, Graphics::TBrush* ABrush, Graphics::TFont* AFont);
	virtual bool __fastcall HasCombo(int ACol, int ARow);
	virtual void __fastcall GetCellEditor(int ACol, int ARow, Basegrid::TEditorType &AEditor);
	virtual void __fastcall GetCellFixed(int ACol, int ARow, bool &IsFixed);
	virtual void __fastcall GetCellPassword(int ACol, int ARow, bool &IsPassword);
	virtual void __fastcall GetColFormat(int ACol, Advgrid::TSortStyle &ASortStyle, AnsiString &aPrefix, AnsiString &aSuffix);
	DYNAMIC int __fastcall GetEditLimit(void);
	DYNAMIC AnsiString __fastcall GetEditMask(int ACol, int ARow);
	virtual Advgrid::TCellGraphic* __fastcall GetCellGraphic(int ACol, int ARow);
	virtual Advgrid::TCellType __fastcall GetCellType(int ACol, int ARow);
	virtual AnsiString __fastcall GetCheckFalse(int ACol, int ARow);
	virtual AnsiString __fastcall GetCheckTrue(int ACol, int ARow);
	virtual bool __fastcall GetFilter(int ACol);
	virtual void __fastcall UpdateColSize(int ACol, int &NewWidth);
	virtual void __fastcall UpdateAutoColSize(int ACol, int &NewWidth);
	virtual void __fastcall UpdateColHeaders(void);
	virtual AnsiString __fastcall GetFormattedCell(int ACol, int ARow);
	DYNAMIC void __fastcall SetEditText(int ACol, int ARow, const AnsiString Value);
	DYNAMIC AnsiString __fastcall GetEditText(int ACol, int ARow);
	virtual void __fastcall GetCellReadOnly(int ACol, int ARow, bool &IsReadOnly);
	virtual bool __fastcall ToggleCheck(int ACol, int ARow, bool FromEdit);
	virtual void __fastcall PasteInCell(int ACol, int ARow, AnsiString Value);
	virtual void __fastcall DoAppendRow(void);
	void __fastcall RemoveStringCheckBox(int ACol);
	void __fastcall AddStringCheckBox(int ACol);
	virtual void __fastcall QueryAddRow(bool &AllowAdd);
	void __fastcall LoadLookupList(Db::TField* fld, Classes::TStrings* list);
	AnsiString __fastcall GetLookupKey(int i);
	__property TAdvGridDataLink* DataLink = {read=FDataLink};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
	virtual void __fastcall Paint(void);
	virtual void __fastcall UpdateOnSelection(Grids::TGridRect &GR);
	virtual void __fastcall UpdateSelectionRect(Grids::TGridRect &GR);
	void __fastcall BlobFieldToStream(Db::TBlobField* DBField, Types::TPoint &size);
	
public:
	__fastcall virtual TDBAdvGrid(Classes::TComponent* AOwner);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -