📄 wwdbigrd.hpp
字号:
bool FSelfChangingTitleFont;
int FSelRow;
TwwGridDataLink* FDataLink;
Classes::TNotifyEvent FOnColEnter;
Classes::TNotifyEvent FOnColExit;
TwwDrawDataCellEvent FOnDrawDataCell;
TCalcCellColorsEvent FOnCalcCellColors;
TCalcTitleAttributesEvent FOnCalcTitleAttributes;
TwwDrawTitleCellEvent FOnDrawTitleCell;
TwwDrawGroupHeaderCellEvent FOnDrawGroupHeaderCell;
TwwCalcTitleImageEvent FOnCalcTitleImage;
TTitleButtonClickEvent FOnTitleButtonClick;
Wwdbedit::TwwValidateEvent FOnCheckValue;
Classes::TNotifyEvent FOnTopRowChanged;
Classes::TNotifyEvent FOnRowChanged;
Classes::TNotifyEvent FOnCellChanged;
TwwLeftColChangedEvent FOnLeftColChanged;
AnsiString FEditText;
TIndicatorColorType FIndicatorColor;
Graphics::TColor FIndicatorIconColor;
Classes::TAlignment FTitleAlignment;
int FRowHeightPercent;
int FTitleLines;
bool FShowVertScrollBar;
Grids::TMovedEvent FOnColumnMoved;
TColWidthChangedEvent FOnColWidthChanged;
TAllowColResizeEvent FOnAllowColResize;
bool FTitleButtons;
bool FEditCalculated;
bool FUseTFields;
int FIndicatorWidth;
TwwIButton* FIndicatorButton;
Controls::TImageList* FImageList;
Controls::TImageList* FTitleImageList;
TDrawFooterCellEvent FOnDrawFooterCell;
TwwFieldChangedEvent FOnFieldChanged;
Classes::TNotifyEvent FOnUpdateFooter;
TwwCreateGridHintWindowEvent FOnCreateHintWindow;
TwwGridURLOpenEvent FOnURLOpen;
int FSavePrevGridWidth;
bool FHideAllLines;
Controls::TCursor FSavedCursor;
int URLLinkActiveRow;
int URLLinkActiveCol;
bool InUpdateRowCount;
int FCalcCellRow;
int FCalcCellCol;
bool isWhiteBackground;
bool isDrawFocusRect;
bool SkipLineDrawing;
int TitleClickColumn;
int TitleClickRow;
bool TitleClickGroupTitle;
bool MouseOverGroupTitle;
TwwMultiSelectOptions FMultiSelectOptions;
bool DisableCellChangedEvent;
Classes::TList* ColItems;
bool UseDragCanvas;
Graphics::TBitmap* CaptureTitleBitmap;
int FDragVertOffset;
bool SkipTitleButtonClick;
Classes::TStrings* FControlType;
bool FControlInfoInDataset;
Classes::TStrings* FPictureMasks;
Classes::TStrings* FRegexMasks;
bool FPictureMaskFromDataSet;
bool CallColEnter;
void *LastBookmark;
void *LastMasterBookmark;
int TempLastCol;
bool ShouldUpdateFooter;
TwwColumn* DummyColumn;
int lastMouseX;
int lastMouseY;
int titleLastMouseX;
int titleLastMouseY;
Extctrls::TTimer* HintTimer;
int HintTimerCount;
int FUpdateCount;
TwwPadColumnStyle FPadColumnStyle;
Graphics::TCanvas* FPaintCanvas;
Graphics::TBitmap* FPaintBitmap;
TwwEditControlOptions FEditControlOptions;
Wwpaintoptions::TwwGridPaintOptions* FPaintOptions;
#pragma pack(push,1)
Types::TRect UpdateRect;
#pragma pack(pop)
bool ChangedBrushColor;
bool AlternatingEven;
int FSizingIndex;
int FPriorSizingWidth;
int FRowOffset;
TwwGridLineStyle FLineStyle;
bool ClickedOnGroupName;
bool ClickedOnGroupChild;
bool FCompareBookmarksAltMethod;
TwwCustomDrawCellEvent FOnBeforeDrawCell;
TwwCustomDrawCellEvent FOnAfterDrawCell;
bool FDisableThemesInTitle;
HIDESBASE Grids::TGridCoord __fastcall CalcCoordFromPoint(int X, int Y, const Grids::TGridDrawInfo &DrawInfo);
void __fastcall SetRowOffset(int value);
void __fastcall SetUseTFields(bool Val);
Classes::TComponent* __fastcall GetPictureControl(void);
void __fastcall HintTimerEvent(System::TObject* Sender);
void __fastcall MouseLoop_DragColumn(int HitTest, int X, int Y);
bool __fastcall IsScrollBarVisible(void);
bool __fastcall AcquireFocus(void);
void __fastcall EditingChanged(void);
Db::TDataSource* __fastcall GetDataSource(void);
int __fastcall GetFieldCount(void);
Db::TField* __fastcall GetFields(int Index);
Db::TField* __fastcall GetSelectedField(void);
int __fastcall GetSelectedIndex(void);
void __fastcall RecordChanged(Db::TField* Field);
void __fastcall FieldChanged(Db::TField* Field);
void __fastcall SetDataSource(Db::TDataSource* Value);
HIDESBASE void __fastcall SetOptions(TwwDBGridOptions Value);
void __fastcall SetSelectedField(Db::TField* Value);
void __fastcall SetSelectedIndex(int Value);
void __fastcall SetTitleFont(Graphics::TFont* Value);
void __fastcall SetIndicatorIconColor(Graphics::TColor Value);
void __fastcall SetTitleAlignment(Classes::TAlignment sel);
void __fastcall SetTitleLines(int sel);
void __fastcall SetRowHeightPercent(int sel);
void __fastcall SetShowVertScrollBar(bool val);
void __fastcall SetTitleButtons(bool val);
bool __fastcall GetShowHorzScrollBar(void);
void __fastcall SetShowHorzScrollBar(bool val);
Classes::TStrings* __fastcall GetSelectedFields(void);
void __fastcall SetSelectedFields(Classes::TStrings* sel);
int __fastcall GetColWidthsPixels(int Index);
void __fastcall SetColWidthsPixels(int Index, int Value);
void __fastcall SetIndicatorWidth(int val);
void __fastcall TitleFontChanged(System::TObject* Sender);
void __fastcall UpdateData(void);
void __fastcall UpdateActive(void);
HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Message);
HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMExit(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMParentFontChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
HIDESBASE MESSAGE void __fastcall WMRButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Msg);
HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
TwwColumn* __fastcall GetFastColumn(int Index);
TwwColumn* __fastcall GetColumn(int Index);
void __fastcall SetFooterColor(Graphics::TColor sel);
void __fastcall SetFooterCellColor(Graphics::TColor sel);
void __fastcall SetFooterHeight(int val);
Graphics::TCanvas* __fastcall GetCanvas(void);
void __fastcall SetPictureMasks(Classes::TStrings* val);
void __fastcall SetRegexMasks(Classes::TStrings* val);
void __fastcall SetControlType(Classes::TStrings* val);
void __fastcall SetUpdateState(bool Updating);
void __fastcall InheritedPaint(void);
void __fastcall SetIndicatorColor(TIndicatorColorType Value);
int __fastcall GetCalcCellRow(void);
HIDESBASE MESSAGE void __fastcall CMCancelMode(Controls::TCMCancelMode &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
HIDESBASE Grids::TGridCoord __fastcall CalcMaxTopLeft(const Grids::TGridCoord &Coord, const Grids::TGridDrawInfo &DrawInfo);
void __fastcall SetGroupFieldName(AnsiString Value);
protected:
Classes::TList* FCacheColInfo;
int FTopRecord;
Byte FIndicatorOffset;
Wwriched::TwwDBRichEdit* TempRichEdit;
bool FUpdateFields;
bool FAcquireFocus;
bool SuppressShowEditor;
bool ShiftSelectMode;
void *ShiftSelectBookmark;
AnsiString dummy1;
AnsiString dummy2;
int TitleTextOffset;
bool FieldMappedText;
bool URLLinkActive;
Controls::THintWindow* HintWindow;
Sysutils::TWordArray *OrigColWidths;
int OrigColWidthsCount;
TwwCustomDrawGridCellInfo* DrawCellInfo;
bool SkipErase;
Controls::TWinControl* CurrentCustomEdit;
Wwdbdatetimepicker::TwwDBCustomDateTimePicker* FDateTimePicker;
bool FFocused;
virtual bool __fastcall UseAlternateBuffering(void);
virtual int __fastcall GetGridDataBottom(const Grids::TGridDrawInfo &DrawInfo);
void __fastcall ResetTitleClick(void);
void __fastcall UpdateLeftCol(int ACol);
HIDESBASE virtual void __fastcall ShowEditor(void);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
void __fastcall MoveCol(int ACol);
virtual void __fastcall DoCreateHintWindow(TwwGridHintWindow* HintWindow, Db::TField* AField, const Types::TRect &R, bool &WordWrap, int &MaxWidth, int &MaxHeight, bool &DoDefault);
virtual bool __fastcall IsProportionalColumns(void);
virtual void __fastcall DoURLOpen(AnsiString &URLLink, Db::TField* Field, bool &UseDefault);
bool __fastcall IsDropDownGridFocused(void);
bool __fastcall IsDropDownGridShowing(void);
virtual void __fastcall FillWithAlternatingRowBitmap(const Types::TRect &TempRect);
virtual void __fastcall LayoutChanged(void);
DYNAMIC void __fastcall CalcRowHeight(void);
bool __fastcall RecordCountIsValid(void);
DYNAMIC bool __fastcall AllowCancelOnExit(void);
DYNAMIC bool __fastcall CanEditAcceptKey(char Key);
DYNAMIC bool __fastcall CanEditModify(void);
DYNAMIC int __fastcall GetEditLimit(void);
DYNAMIC void __fastcall ColumnMoved(int FromIndex, int ToIndex);
DYNAMIC void __fastcall ColEnter(void);
DYNAMIC void __fastcall ColExit(void);
virtual void __fastcall Scroll(int Distance);
DYNAMIC void __fastcall ColWidthsChanged(void);
virtual bool __fastcall HighlightCell(int DataCol, int DataRow, const AnsiString Value, Grids::TGridDrawState AState);
virtual void __fastcall DrawCell(int ACol, int ARow, const Types::TRect &ARect, Grids::TGridDrawState AState);
DYNAMIC AnsiString __fastcall GetEditMask(int ACol, int ARow);
DYNAMIC AnsiString __fastcall GetEditText(int ACol, int ARow);
DYNAMIC void __fastcall SetEditText(int ACol, int ARow, const AnsiString Value);
Db::TField* __fastcall GetColField(int ACol);
DYNAMIC AnsiString __fastcall GetFieldValue(int ACol);
virtual void __fastcall DefineFieldMap(void);
DYNAMIC void __fastcall DrawDataCell(const Types::TRect &Rect, Db::TField* Field, Grids::TGridDrawState State);
virtual void __fastcall ProportionalColWidths(void);
virtual void __fastcall SetColumnAttributes(void);
DYNAMIC void __fastcall KeyPress(char &Key);
virtual void __fastcall LinkActive(bool Value);
virtual void __fastcall Loaded(void);
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 void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
DYNAMIC void __fastcall TimedScroll(Grids::TGridScrollDirection Direction);
virtual void __fastcall CreateWnd(void);
virtual bool __fastcall IsWWControl(int ACol, int ARow);
virtual void __fastcall InvalidateTitle(void);
__property bool DefaultDrawing = {read=FDefaultDrawing, write=FDefaultDrawing, default=1};
__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
__property ParentColor = {default=0};
__property bool ReadOnly = {read=FReadOnly, write=FReadOnly, default=0};
__property Graphics::TColor TitleColor = {read=FTitleColor, write=FTitleColor, default=-16777201};
__property Graphics::TColor FooterColor = {read=FFooterColor, write=SetFooterColor, default=-16777201};
__property Graphics::TColor FooterCellColor = {read=FFooterCellColor, write=SetFooterCellColor, default=-16777201};
__property int FooterHeight = {read=FFooterHeight, write=SetFooterHeight, default=0};
__property Graphics::TFont* TitleFont = {read=FTitleFont, write=SetTitleFont};
__property Classes::TNotifyEvent OnColEnter = {read=FOnColEnter, write=FOnColEnter};
__property Classes::TNotifyEvent OnColExit = {read=FOnColExit, write=FOnColExit};
__property TwwDrawDataCellEvent OnDrawDataCell = {read=FOnDrawDataCell, write=FOnDrawDataCell};
virtual void __fastcall DoTitleButtonClick(AnsiString AFieldName);
virtual void __fastcall DoDrawTitleCell(Graphics::TCanvas* ACanvas, Db::TField* Field, const Types::TRect &ARect, bool &DefaultDrawing);
virtual void __fastcall DoDrawGroupHeaderCell(Graphics::TCanvas* ACanvas, AnsiString GroupHeaderName, const Types::TRect &ARect, bool &DefaultDrawing);
virtual void __fastcall DoCalcTitleImage(System::TObject* Sender, Db::TField* Field, TwwTitleImageAttributes &TitleImageAttributes);
DYNAMIC bool __fastcall DoMouseWheelDown(Classes::TShiftState Shift, const Types::TPoint &MousePos);
DYNAMIC bool __fastcall DoMouseWheelUp(Classes::TShiftState Shift, const Types::TPoint &MousePos);
bool __fastcall UseRightToLeftAlignmentForField(const Db::TField* AField, Classes::TAlignment Alignment);
void __fastcall UpdateScrollBar(void);
bool __fastcall IsValidCell(int ACol, int ARow);
int __fastcall DbCol(int col);
int __fastcall DbRow(int row);
void __fastcall Draw3DLines(const Types::TRect &ARect, int ACol, int ARow, Grids::TGridDrawState AState);
virtual Graphics::TColor __fastcall CellColor(int ACol, int ARow);
virtual void __fastcall DrawCheckBox(const Types::TRect &ARect, int ACol, int ARow, bool val);
void __fastcall DrawCheckBox_Checkmark(const Types::TRect &ARect, int ACol, int ARow, bool val);
virtual void __fastcall RefreshBookmarkList(void);
virtual Grids::TInplaceEdit* __fastcall CreateEditor(void);
virtual void __fastcall HideControls(void);
__property TColWidthChangedEvent OnColWidthChanged = {read=FOnColWidthChanged, write=FOnColWidthChanged};
__property TAllowColResizeEvent OnAllowColResize = {read=FOnAllowColResize, write=FOnAllowColResize};
__property Grids::TMovedEvent OnColumnMoved = {read=FOnColumnMoved, write=FOnColumnMoved};
virtual void __fastcall UnselectAll(void);
bool __fastcall IsSelectedCheckbox(int ACol);
virtual void __fastcall DataChanged(void);
DYNAMIC bool __fastcall IsSelectedRow(int DataRow);
virtual void __fastcall DoTopRowChanged(void);
virtual void __fastcall DoRowChanged(void);
virtual void __fastcall DoCellChanged(void);
virtual void __fastcall DoCheckRowChanged(void);
__property int IndicatorButtonWidth = {read=FIndicatorWidth, write=SetIndicatorWidth, nodefault};
DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
DYNAMIC void __fastcall TopLeftChanged(void);
virtual Types::TRect __fastcall GetClientRect();
virtual void __fastcall Paint(void);
Classes::TStrings* __fastcall GetControlType(void);
virtual void __fastcall GetControlInfo(AnsiString AFieldName, AnsiString &AControlType, AnsiString &AParameters);
virtual void __fastcall DoFieldChanged(Db::TField* Field);
virtual void __fastcall DoUpdateFooter(void);
virtual Types::TRect __fastcall GetFooterRect();
virtual void __fastcall CheckFooterUpdate(void);
DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int AX, int AY);
virtual void __fastcall FreeHintWindow(void);
virtual Controls::THintWindow* __fastcall CreateHintWindow(Db::TField* AField);
virtual void __fastcall ValidationErrorUsingMask(Db::TField* Field);
void __fastcall ChangeOrientation(bool RightToLeftOrientation);
virtual void __fastcall DrawLines(void);
virtual void __fastcall PaintClickedTitleButton(void);
bool __fastcall AdjustBoundsRect(Controls::TWinControl* ACurrentCustomEdit);
virtual void __fastcall CalcSizingState(int X, int Y, Grids::TGridState &State, int &Index, int &SizingPos, int &SizingOfs, Grids::TGridDrawInfo &FixedInfo);
virtual void __fastcall InitCacheColInfo(void);
bool __fastcall UseThemesInTitle(void);
bool __fastcall IsShortCut(Messages::TWMKey &Message);
public:
bool AlternatePaintBuffering;
bool SkipHideControls;
bool SkipDataChange;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -