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

📄 wwdblook.hpp

📁 胜天进销存源码,国产优秀的进销存
💻 HPP
📖 第 1 页 / 共 2 页
字号:
// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

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

#ifndef WwdblookHPP
#define WwdblookHPP

#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 <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Buttons.hpp>	// Pascal unit
#include <Dbtables.hpp>	// Pascal unit
#include <Grids.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Wwtable.hpp>	// Pascal unit
#include <Wwcommon.hpp>	// Pascal unit
#include <Wwstr.hpp>	// Pascal unit
#include <Wwdbigrd.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Wwlocate.hpp>	// Pascal unit
#include <Dbctrls.hpp>	// Pascal unit
#include <Wwtypes.hpp>	// Pascal unit
#include <Wwframe.hpp>	// Pascal unit
#include <Wwdbedit.hpp>	// Pascal unit
#include <Wwcombobutton.hpp>	// Pascal unit
#include <Wwintl.hpp>	// Pascal unit

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

namespace Wwdblook
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TNotifyCloseUpEvent)(System::TObject* Sender, Db::TDataSet* LookupTable, Db::TDataSet* FillTable, bool modified);

typedef void __fastcall (__closure *TNotInListEvent)(System::TObject* Sender, Db::TDataSet* LookupTable, AnsiString NewValue, bool &Accept);

typedef void __fastcall (__closure *TwwPerformSearchEvent)(System::TObject* Sender, Db::TDataSet* LookupTable, AnsiString SearchField, AnsiString SearchValue, bool PerformLookup, bool &Found);

#pragma option push -b-
enum TwwDBLookupComboStyle { csDropDown, csDropDownList };
#pragma option pop

#pragma option push -b-
enum TwwDBLookupListOption { loColLines, loRowLines, loTitles, loFixedDropDownHeight, loSearchOnBackspace };
#pragma option pop

typedef Set<TwwDBLookupListOption, loColLines, loSearchOnBackspace>  TwwDBLookupListOptions;

#pragma option push -b-
enum TwwCalcFieldType { cftUnknown, cftCalculated, cftNotCalculated };
#pragma option pop

#pragma option push -b-
enum TwwSeqSearchOption { ssoEnabled, ssoCaseSensitive };
#pragma option pop

typedef Set<TwwSeqSearchOption, ssoEnabled, ssoCaseSensitive>  TwwSeqSearchOptions;

#pragma option push -b-
enum TwwLookupSearchType { lstDefault, lstCustom };
#pragma option pop

class DELPHICLASS TwwDropDownGridOptions;
class PASCALIMPLEMENTATION TwwDropDownGridOptions : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	int FTitleLines;
	Graphics::TColor FColor;
	Classes::TAlignment FTitleAlignment;
	
public:
	__fastcall TwwDropDownGridOptions(Classes::TComponent* AOwner);
	
__published:
	__property int TitleLines = {read=FTitleLines, write=FTitleLines, default=1};
	__property Graphics::TColor Color = {read=FColor, write=FColor, default=-16777211};
	__property Classes::TAlignment TitleAlignment = {read=FTitleAlignment, write=FTitleAlignment, default=0};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TwwDropDownGridOptions(void) { }
	#pragma option pop
	
};


class DELPHICLASS TwwDBCustomLookupCombo;
class DELPHICLASS TwwPopupGrid;
class DELPHICLASS TwwDBLookupList;
class PASCALIMPLEMENTATION TwwDBLookupList : public Wwdbigrd::TwwCustomDBGrid 
{
	typedef Wwdbigrd::TwwCustomDBGrid inherited;
	
private:
	TwwDBCustomLookupCombo* FCombo;
	Dbctrls::TFieldDataLink* FFieldLink;
	Dbctrls::TFieldDataLink* FNavigatorLink;
	AnsiString FLookupField;
	Db::TField* FDisplayFld;
	Db::TField* FValueFld;
	Db::TField* FValueFld2;
	Db::TField* FValueFld3;
	AnsiString FValue;
	AnsiString FValue2;
	AnsiString FValue3;
	AnsiString FDisplayValue;
	int FHiliteRow;
	TwwDBLookupListOptions FOptions;
	int FTitleOffset;
	bool FFoundValue;
	bool FInCellSelect;
	Classes::TNotifyEvent FOnListClick;
	bool BeAccurate;
	int inDataChanged;
	AnsiString DummyString;
	HIDESBASE Classes::TStrings* __fastcall getSelectedFields(void);
	HIDESBASE void __fastcall setSelectedFields(Classes::TStrings* sel);
	AnsiString __fastcall GetDataField();
	HIDESBASE Db::TDataSource* __fastcall GetDataSource(void);
	Db::TDataSource* __fastcall GetLookupSource(void);
	AnsiString __fastcall GetLookupField();
	Db::TDataSet* __fastcall GetLookupTable(void);
	AnsiString __fastcall GetValue();
	AnsiString __fastcall GetValue2();
	AnsiString __fastcall GetValue3();
	AnsiString __fastcall GetDisplayValue();
	bool __fastcall GetReadOnly(void);
	void __fastcall FieldLinkActive(System::TObject* Sender);
	void __fastcall DataChange(System::TObject* Sender);
	void __fastcall NavigatorDataChange(System::TObject* Sender);
	void __fastcall EditingChange(System::TObject* Sender);
	void __fastcall SetDataField(const AnsiString Value);
	HIDESBASE void __fastcall SetDataSource(Db::TDataSource* Value);
	void __fastcall SetLookupSource(Db::TDataSource* Value);
	void __fastcall SetLookupTable(Db::TDataSet* value);
	void __fastcall SetLookupField(const AnsiString Value);
	void __fastcall SetValue(const AnsiString Value);
	void __fastcall SetDisplayValue(const AnsiString Value);
	void __fastcall SetReadOnly(bool Value);
	HIDESBASE void __fastcall SetOptions(TwwDBLookupListOptions Value);
	void __fastcall NewLayout(void);
	void __fastcall FastLookup(void);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
	
protected:
	HIDESBASE void __fastcall UpdateData(System::TObject* Sender);
	Wwtable::TwwTable* __fastcall LTable(void);
	bool __fastcall isWWCalculatedField(void);
	virtual bool __fastcall HighlightCell(int DataCol, int DataRow, const AnsiString Value, Grids::TGridDrawState AState);
	DYNAMIC bool __fastcall CanGridAcceptKey(Word Key, Classes::TShiftState Shift);
	virtual void __fastcall DefineFieldMap(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	virtual bool __fastcall CanEdit(void);
	void __fastcall InitFields(bool showError);
	virtual void __fastcall CreateWnd(void);
	DYNAMIC void __fastcall KeyPress(char &Key);
	virtual void __fastcall LinkActive(bool Value);
	virtual void __fastcall Scroll(int Distance);
	DYNAMIC void __fastcall ListClick(void);
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	virtual void __fastcall Paint(void);
	virtual void __fastcall DataChanged(void);
	HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Message);
	virtual void __fastcall DrawCell(int ACol, int ARow, const Types::TRect &ARect, Grids::TGridDrawState AState);
	
public:
	int lookupFieldCount;
	__fastcall virtual TwwDBLookupList(Classes::TComponent* AOwner);
	__fastcall virtual ~TwwDBLookupList(void);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	__property AnsiString Value = {read=GetValue, write=SetValue};
	__property AnsiString DisplayValue = {read=GetDisplayValue, write=SetDisplayValue};
	__property Db::TField* DisplayFld = {read=FDisplayFld};
	__property VisibleRowCount ;
	virtual void __fastcall SetColumnAttributes(void);
	void __fastcall DoLookup(bool SetToDisplayIndex);
	
__published:
	__property Anchors  = {default=3};
	__property Constraints ;
	__property Classes::TStrings* Selected = {read=getSelectedFields, write=setSelectedFields};
	__property Db::TDataSet* LookupTable = {read=GetLookupTable, write=SetLookupTable};
	__property AnsiString DataField = {read=GetDataField, write=SetDataField};
	__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
	__property AnsiString LookupField = {read=GetLookupField, write=SetLookupField};
	__property TwwDBLookupListOptions Options = {read=FOptions, write=SetOptions, default=0};
	__property Classes::TNotifyEvent OnClick = {read=FOnListClick, write=FOnListClick};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
	__property Align  = {default=0};
	__property BorderStyle  = {default=1};
	__property Color  = {default=-16777211};
	__property Ctl3D ;
	__property DragCursor  = {default=-12};
	__property DragMode  = {default=0};
	__property Enabled  = {default=1};
	__property Font ;
	__property ParentColor  = {default=0};
	__property ParentCtl3D  = {default=1};
	__property ParentFont  = {default=1};
	__property ParentShowHint  = {default=1};
	__property PopupMenu ;
	__property ShowHint ;
	__property TabOrder  = {default=-1};
	__property TabStop  = {default=1};
	__property Visible  = {default=1};
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TwwDBLookupList(HWND ParentWindow) : Wwdbigrd::TwwCustomDBGrid(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TwwPopupGrid : public TwwDBLookupList 
{
	typedef TwwDBLookupList inherited;
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	virtual bool __fastcall CanEdit(void);
	virtual void __fastcall LinkActive(bool Value);
	
public:
	__property RowCount  = {default=5};
	__property ColCount  = {default=5};
	__fastcall virtual TwwPopupGrid(Classes::TComponent* AOwner);
	
__published:
	__property ControlType ;
public:
	#pragma option push -w-inl
	/* TwwDBLookupList.Destroy */ inline __fastcall virtual ~TwwPopupGrid(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TwwPopupGrid(HWND ParentWindow) : TwwDBLookupList(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TwwDBCustomLookupCombo : public Stdctrls::TCustomEdit 
{
	typedef Stdctrls::TCustomEdit inherited;
	
private:
	Wwintl::TwwController* FController;
	Wwdbedit::TwwDBPicture* FPicture;
	Classes::TAlignment FDropDownAlignment;
	Controls::TControlCanvas* FCanvas;
	int FDropDownCount;
	int FDropDownWidth;
	Controls::TWinControl* FBtnControl;
	TwwDBLookupComboStyle FStyle;
	Classes::TNotifyEvent FOnDropDown;
	TNotifyCloseUpEvent FOnCloseUp;
	TNotInListEvent FOnNotInList;
	Classes::TNotifyEvent FOnMouseEnter;
	Classes::TNotifyEvent FOnMouseLeave;
	bool FShowMatchText;
	TwwPerformSearchEvent FOnPerformCustomSearch;
	Classes::TNotifyEvent FOnBeforeDropDown;
	TwwDropDownGridOptions* FDropDownGridOptions;
	bool FNavigator;
	bool ChangingFromLink;
	bool ProcessingNotInList;
	bool InCloseUpEvent;
	int FSearchDelay;
	bool FAutoDropDown;
	AnsiString FSearchField;
	TwwSeqSearchOptions FSeqSearchOptions;
	bool FOrderByDisplay;
	int FItemCount;
	bool FPreciseEditRegion;
	bool FAllowClearKey;
	bool FUseTFields;
	Controls::TImageList* FImageList;
	Wwframe::TwwComboButtonStyle FButtonStyle;
	int ExtraHeight;
	bool FControlInfoInDataset;
	Wwframe::TwwEditFrame* FFrame;
	Wwframe::TwwButtonEffects* FButtonEffects;
	int FButtonWidth;
	bool SkipUpdate;
	bool SetModifiedInChangeEvent;
	bool InDropDownEvent;
	bool InCustomSearch;
	bool FDisableThemes;
	bool OldShowHint;
	bool FMouseInControl;
	AnsiString __fastcall GetDataField();
	Db::TDataSource* __fastcall GetDataSource(void);
	Db::TDataSet* __fastcall GetLookupTable(void);
	AnsiString __fastcall GetLookupField();
	bool __fastcall GetReadOnly(void);
	AnsiString __fastcall GetValue();
	AnsiString __fastcall GetValue2();
	AnsiString __fastcall GetValue3();
	void __fastcall EnableEdit(void);
	AnsiString __fastcall GetDisplayValue();
	int __fastcall GetMinHeight(void);

⌨️ 快捷键说明

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