wwfltdlg.hpp

来自「胜天进销存源码,国产优秀的进销存」· HPP 代码 · 共 563 行 · 第 1/2 页

HPP
563
字号
// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

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

#ifndef WwfltdlgHPP
#define WwfltdlgHPP

#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 <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <Wwdatsrc.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Buttons.hpp>	// Pascal unit
#include <Wwfltdum.hpp>	// Pascal unit
#include <Dbtables.hpp>	// Pascal unit
#include <Tabs.hpp>	// Pascal unit
#include <Wwcommon.hpp>	// Pascal unit
#include <Wwsystem.hpp>	// Pascal unit
#include <Wwdialog.hpp>	// Pascal unit
#include <Wwdbdatetimepicker.hpp>	// Pascal unit
#include <Mask.hpp>	// Pascal unit
#include <Wwdbedit.hpp>	// Pascal unit
#include <Wwdotdot.hpp>	// Pascal unit
#include <Wwdbcomb.hpp>	// Pascal unit
#include <Wwclearbuttongroup.hpp>	// Pascal unit
#include <Wwradiogroup.hpp>	// Pascal unit
#include <Comctrls.hpp>	// Pascal unit
#include <Widestrings.hpp>	// Pascal unit
#include <Typinfo.hpp>	// Pascal unit

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

namespace Wwfltdlg
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TwwFilterDialogOption { fdCaseSensitive, fdShowCaseSensitive, fdShowOKCancel, fdShowViewSummary, fdShowFieldOrder, fdShowValueRangeTab, fdShowNonMatching, fdHidePartialAnywhere, fdDisableDateTimePicker, fdSizeable, fdTabsAtTop };
#pragma option pop

#pragma option push -b-
enum TwwFilterFieldsFetchType { fmUseTTable, fmUseSQL, fmUseTFields };
#pragma option pop

typedef Set<TwwFilterDialogOption, fdCaseSensitive, fdTabsAtTop>  TwwFilterDialogOptions;

#pragma option push -b-
enum TwwFilterDialogSort { fdSortByFieldNo, fdSortByFieldName };
#pragma option pop

#pragma option push -b-
enum TwwFilterMatchType { fdMatchStart, fdMatchAny, fdMatchExact, fdMatchEnd, fdMatchRange, fdMatchNone };
#pragma option pop

#pragma option push -b-
enum TwwFilterMethodAll { fdByFilter, fdByQueryModify, fdByQueryParams };
#pragma option pop

typedef TwwFilterMethodAll TwwFilterMethod;

typedef TwwFilterMatchType TwwDefaultMatchType;

#pragma option push -b-
enum TwwDefaultFilterBy { fdSmartFilter, fdFilterByRange, fdFilterByValue };
#pragma option pop

typedef void __fastcall (__closure *TwwFilterDialogSummaryEvent)(System::TObject* Sender, Classes::TList* AFieldInfo, bool &DoDefault);

typedef void __fastcall (__closure *TwwOnInitTempDataSetEvent)(System::TObject* Sender, Db::TDataSet* OrigDataSet, Db::TDataSet* TempDataSet);

class DELPHICLASS TwwFilterDlg;
typedef void __fastcall (__closure *TwwOnInitFilterDlgEvent)(TwwFilterDlg* Dialog);

typedef void __fastcall (__closure *TwwOnExecuteSQLEvent)(TwwFilterDlg* Dialog, Dbtables::TQuery* Query);

typedef void __fastcall (__closure *TwwOnEncodeValueEvent)(Db::TFieldType AFieldType, AnsiString AFieldName, AnsiString &AUserValue);

typedef void __fastcall (__closure *TwwOnEncodeDateTimeEvent)(System::TDateTime ADateTime, Db::TFieldType AFieldType, AnsiString AFieldName, AnsiString &FormattedDateStr);

#pragma option push -b-
enum TwwFilterOptimization { fdNone, fdUseAllIndexes, fdUseActiveIndex };
#pragma option pop

#pragma option push -b-
enum TwwQueryFormatDateMode { qfdMonthDayYear, qfdDayMonthYear, qfdYearMonthDay };
#pragma option pop

typedef void __fastcall (__closure *TwwOnSelectFilterField)(System::TObject* Sender, AnsiString FieldName, AnsiString &PictureMask, Classes::TStrings* ComboList);

typedef void __fastcall (__closure *TwwOnAcceptFilterRecord)(System::TObject* Sender, Db::TDataSet* DataSet, bool &Accept, bool &DefaultFiltering);

class DELPHICLASS TwwFieldInfo;
class PASCALIMPLEMENTATION TwwFieldInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	AnsiString FieldName;
	AnsiString DisplayLabel;
	TwwFilterMatchType MatchType;
	AnsiString FilterValue;
	AnsiString MinValue;
	AnsiString MaxValue;
	bool CaseSensitive;
	bool NonMatching;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TwwFieldInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TwwFieldInfo(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TwwFilterDlg : public Forms::TForm 
{
	typedef Forms::TForm inherited;
	
__published:
	Extctrls::TPanel* FieldCriteriaPanel;
	Comctrls::TPageControl* SelectNotebook;
	Comctrls::TTabSheet* TabSheet1;
	Stdctrls::TLabel* FieldValueLbl;
	Extctrls::TRadioGroup* MatchTypeGroup;
	Extctrls::TPanel* Panel1;
	Stdctrls::TCheckBox* CaseSensitive;
	Stdctrls::TCheckBox* Nonmatching;
	Buttons::TBitBtn* FilterValueClearButton;
	Wwdbcomb::TwwDBComboBox* FilterValueCombo;
	Wwdbedit::TwwDBEdit* FilterValueEdit;
	Comctrls::TTabSheet* TabSheet2;
	Stdctrls::TLabel* StartingRangeLbl;
	Stdctrls::TLabel* EndingRangeLbl;
	Stdctrls::TEdit* MinValueEdit;
	Stdctrls::TEdit* MaxValueEdit;
	Buttons::TBitBtn* MinValueClearButton;
	Buttons::TBitBtn* MaxValueClearButton;
	Wwdbdatetimepicker::TwwDBDateTimePicker* MinDateEdit;
	Wwdbdatetimepicker::TwwDBDateTimePicker* MaxDateEdit;
	Extctrls::TPanel* FieldListPanel;
	Comctrls::TTabControl* FieldTabSet;
	Stdctrls::TListBox* FieldsListBox;
	Extctrls::TPanel* ButtonPanel;
	Stdctrls::TButton* ViewButton;
	Stdctrls::TButton* ClearSearchButton;
	Extctrls::TPanel* OKCancelPanel;
	Extctrls::TPanel* CriteriaLabelPanel;
	Stdctrls::TLabel* FieldCriteria;
	Extctrls::TPanel* FieldsLabelPanel;
	Stdctrls::TLabel* FieldsLbl;
	Extctrls::TPanel* FieldOrderPanel;
	Extctrls::TRadioGroup* FieldOrder;
	void __fastcall FieldOrderClick(System::TObject* Sender);
	void __fastcall FieldsListBoxClick(System::TObject* Sender);
	void __fastcall ViewButtonClick(System::TObject* Sender);
	void __fastcall FormKeyDown(System::TObject* Sender, Word &Key, Classes::TShiftState Shift);
	void __fastcall FormShow(System::TObject* Sender);
	void __fastcall ValueRangeTabSetChange(System::TObject* Sender, int NewTab, bool &AllowChange);
	void __fastcall ClearSearchButtonClick(System::TObject* Sender);
	void __fastcall FilterValueComboChange(System::TObject* Sender);
	void __fastcall MinValueEditChange(System::TObject* Sender);
	void __fastcall MaxValueEditChange(System::TObject* Sender);
	void __fastcall FormCloseQuery(System::TObject* Sender, bool &CanClose);
	void __fastcall FormActivate(System::TObject* Sender);
	void __fastcall MinValueClearButtonClick(System::TObject* Sender);
	void __fastcall MaxValueClearButtonClick(System::TObject* Sender);
	void __fastcall FilterValueClearButtonClick(System::TObject* Sender);
	void __fastcall MatchTypeGroupClick(System::TObject* Sender);
	void __fastcall FieldTabSetChanging(System::TObject* Sender, bool &AllowChange);
	void __fastcall FieldCriteriaPanelResize(System::TObject* Sender);
	
private:
	int LastItemIndex;
	bool FormActivated;
	bool __fastcall IsValueField(AnsiString ADisplayLabel);
	bool __fastcall IsValueType(Db::TFieldType AFieldType);
	void __fastcall RefreshClearbutton(void);
	bool __fastcall ValidEditValue(AnsiString val);
	bool __fastcall ValidEditValues(AnsiString val);
	void __fastcall ApplyIntl(void);
	Db::TFieldType __fastcall GetFieldType(AnsiString ADisplayLabel);
	void __fastcall UpdateFilterEditControl(void);
	AnsiString __fastcall GetSQLPropertyname();
	void __fastcall ShowValueRangeTabs(void);
	
protected:
	Classes::TComponent* DlgComponent;
	Db::TDataSet* DlgDataSet;
	Classes::TList* FieldInfo;
	Stdctrls::TCustomEdit* MinValueEditControl;
	Stdctrls::TCustomEdit* MaxValueEditControl;
	Stdctrls::TCustomEdit* FilterValueEditControl;
	
public:
	Stdctrls::TButton* OKBtn;
	Stdctrls::TButton* CancelBtn;
	bool FilterChanged;
	void __fastcall RefreshFieldList(bool ShowAll);
	void __fastcall AdjustFieldTabSet(int NewTab);
	__fastcall TwwFilterDlg(Classes::TComponent* AOwner, Classes::TComponent* ADlgComponent);
	__fastcall virtual ~TwwFilterDlg(void);
	bool __fastcall SelectField(bool FieldChanged);
	void __fastcall SelectPage(void);
	void __fastcall SelectFocus(void);
	void __fastcall SetFilterfield(AnsiString ADisplayLabel, TwwFilterMatchType AMatchType, AnsiString AFilterValue, AnsiString AMinValue, AnsiString AMaxValue, bool ACaseSensitive, bool ANonMatching);
	bool __fastcall GetFilterField(AnsiString ADisplayLabel, TwwFieldInfo* &FldInfo);
	void __fastcall CopyList(Classes::TList* fromlist, Classes::TList* tolist);
public:
	#pragma option push -w-inl
	/* TCustomForm.Create */ inline __fastcall virtual TwwFilterDlg(Classes::TComponent* AOwner) : Forms::TForm(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomForm.CreateNew */ inline __fastcall virtual TwwFilterDlg(Classes::TComponent* AOwner, int Dummy) : Forms::TForm(AOwner, Dummy) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TwwFilterDlg(HWND ParentWindow) : Forms::TForm(ParentWindow) { }
	#pragma option pop
	
};


class DELPHICLASS TwwDBFieldInfo;
class PASCALIMPLEMENTATION TwwDBFieldInfo : public System::TObject 
{
	typedef System::TObject inherited;
	
public:
	AnsiString LogicalFieldName;
	AnsiString PhysicalFieldName;
	AnsiString TableName;
	Db::TFieldType FieldType;
	AnsiString DisplayLabel;
	int Size;
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TwwDBFieldInfo(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TwwDBFieldInfo(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TwwDatasetFilterType { fdUseOnFilter, fdUseFilterProp, fdUseBothFilterTypes };
#pragma option pop

class DELPHICLASS TwwFilterPropertyOptions;
class PASCALIMPLEMENTATION TwwFilterPropertyOptions : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TwwDatasetFilterType FDatasetFilterType;
	AnsiString FLikeWildcardChar;
	bool FUseBracketsAroundFields;
	bool FUseLikeOperator;
	bool FLikeSupportsUpperKeyword;
	
__published:
	__property TwwDatasetFilterType DatasetFilterType = {read=FDatasetFilterType, write=FDatasetFilterType, default=0};
	__property bool UseLikeOperator = {read=FUseLikeOperator, write=FUseLikeOperator, default=0};

⌨️ 快捷键说明

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