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

📄 fcdbtreeview.hpp

📁 一套及时通讯的原码
💻 HPP
📖 第 1 页 / 共 2 页
字号:
// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'fcdbtreeview.pas' rev: 5.00

#ifndef fcdbtreeviewHPP
#define fcdbtreeviewHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <ImgList.hpp>	// Pascal unit
#include <fcTreeHeader.hpp>	// Pascal unit
#include <fcChangeLink.hpp>	// Pascal unit
#include <fcImager.hpp>	// Pascal unit
#include <fcButton.hpp>	// Pascal unit
#include <fcShapeBtn.hpp>	// Pascal unit
#include <fcScrollBar.hpp>	// Pascal unit
#include <Buttons.hpp>	// Pascal unit
#include <fcDBCommon.hpp>	// Pascal unit
#include <fcCanvas.hpp>	// Pascal unit
#include <fcCommon.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Commctrl.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <ComCtrls.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Fcdbtreeview
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TfcTreeHitTest { fchtdOnButton, fchtdOnStateIcon, fchtdOnImageIcon, fchtdOnText, fchtdOnActiveNode 
	};
#pragma option pop

typedef Set<TfcTreeHitTest, fchtdOnButton, fchtdOnActiveNode>  TfcTreeHitTests;

class DELPHICLASS TfcTreeDataLink;
class DELPHICLASS TfcDBCustomTreeView;
#pragma option push -b-
enum TfcDBTreeViewOption { dtvoKeysScrollLevelOnly, dtvoAutoExpandOnDSScroll, dtvoExpandButtons3D, dtvoHideSelection, 
	dtvoRowSelect, dtvoShowNodeHint, dtvoShowButtons, dtvoShowLines, dtvoShowRoot, dtvoShowHorzScrollBar, 
	dtvoShowVertScrollBar, dtvoHotTracking, dtvoFlatCheckboxes };
#pragma option pop

typedef Set<TfcDBTreeViewOption, dtvoKeysScrollLevelOnly, dtvoFlatCheckboxes>  TfcDBTreeViewOptions;
	

class DELPHICLASS TfcDBTreeNode;
typedef void __fastcall (__closure *TfcDBTreeEvent)(TfcDBCustomTreeView* TreeView, TfcDBTreeNode* Node
	);

typedef void __fastcall (__closure *TfcDBTreeSectionEvent)(TfcDBCustomTreeView* TreeView, TfcDBTreeNode* 
	Node, Fctreeheader::TfcTreeHeaderSection* Section, AnsiString &DisplayText);

typedef void __fastcall (__closure *TfcDBTreeDrawSectionEvent)(TfcDBCustomTreeView* TreeView, TfcDBTreeNode* 
	Node, Fctreeheader::TfcTreeHeaderSection* Section, const Windows::TRect &ARect, AnsiString s, bool 
	&DefaultDrawing);

class DELPHICLASS TfcDBMultiSelectAttributes;
class PASCALIMPLEMENTATION TfcDBMultiSelectAttributes : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FEnabled;
	bool FAutoUnselect;
	int FMultiSelectLevel;
	bool FMultiSelectCheckbox;
	TfcDBCustomTreeView* TreeView;
	void __fastcall SetEnabled(bool val);
	void __fastcall SetMultiSelectLevel(int val);
	void __fastcall SetMultiSelectCheckBox(bool val);
	
public:
	__fastcall TfcDBMultiSelectAttributes(Classes::TComponent* Owner);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property bool AutoUnselect = {read=FAutoUnselect, write=FAutoUnselect, default=0};
	__property bool Enabled = {read=FEnabled, write=SetEnabled, default=0};
	__property int MultiSelectLevel = {read=FMultiSelectLevel, write=SetMultiSelectLevel, default=0};
	__property bool MultiSelectCheckbox = {read=FMultiSelectCheckbox, write=SetMultiSelectCheckBox, default=1
		};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TfcDBMultiSelectAttributes(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TfcDBTreeMouseEvent)(TfcDBCustomTreeView* TreeView, TfcDBTreeNode* 
	Node, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);

typedef void __fastcall (__closure *TfcDBTreeMouseMoveEvent)(TfcDBCustomTreeView* TreeView, TfcDBTreeNode* 
	Node, Classes::TShiftState Shift, int X, int Y);

typedef void __fastcall (__closure *TfcDBTreeDrawTextEvent)(TfcDBCustomTreeView* TreeView, TfcDBTreeNode* 
	Node, const Windows::TRect &ARect, bool &DefaultDrawing);

class DELPHICLASS TfcMultiSelectItem;
class PASCALIMPLEMENTATION TfcDBCustomTreeView : public Controls::TWinControl 
{
	typedef Controls::TWinControl inherited;
	
private:
	TfcDBTreeViewOptions FOptions;
	Classes::TStrings* FDisplayFields;
	Forms::TFormBorderStyle FBorderStyle;
	TfcDBTreeEvent FOnCalcNodeAttributes;
	TfcDBTreeSectionEvent FOnCalcSectionAttributes;
	TfcDBTreeDrawSectionEvent FOnDrawSection;
	TfcDBTreeEvent FOnChange;
	TfcDBTreeEvent FOnUserExpand;
	TfcDBTreeEvent FOnUserCollapse;
	TfcDBMultiSelectAttributes* FMultiSelectAttributes;
	TfcDBTreeMouseEvent FOnMouseDown;
	TfcDBTreeMouseEvent FOnMouseUp;
	TfcDBTreeMouseEvent FOnDblClick;
	TfcDBTreeMouseMoveEvent FOnMouseMove;
	int FLevelIndent;
	AnsiString FDataSourcesMiddle;
	Fcimager::TfcCustomImager* FImager;
	Classes::TList* FMultiSelectList;
	Imglist::TCustomImageList* FImages;
	Imglist::TCustomImageList* FStateImages;
	Graphics::TColor FLineColor;
	Graphics::TColor FInactiveFocusColor;
	bool FScrollWithinLevel;
	bool FDisableThemes;
	Classes::TList* FDataLinks;
	Controls::TControlCanvas* FCanvas;
	Fccanvas::TfcCanvas* FPaintCanvas;
	Graphics::TBitmap* FPaintBitmap;
	bool SkipErase;
	bool SkipReload;
	TfcTreeDataLink* FFirstDataLink;
	TfcTreeDataLink* FLastDataLink;
	Db::TDataSet* FActiveDataSet;
	Db::TDataSet* FLastVisibleDataset;
	bool ActiveDataSetChanged;
	int ActiveNodeIndex;
	Extctrls::TTimer* HintTimer;
	int HintTimerCount;
	int LastHintRow;
	Classes::TList* Nodes;
	int RowHeight;
	int FixedOffset;
	int CacheSize;
	TfcDBTreeNode* FActiveNode;
	int MaxTextWidth;
	bool ResetScroll;
	bool Down;
	int MouseRow;
	int PaintingRow;
	TfcDBTreeDrawTextEvent FOnDrawText;
	Controls::TCursor SaveCursor;
	bool CheckMaxWidth;
	bool CheckMaxWidthGrow;
	bool InPaint;
	bool InComputeHorzWidthOnly;
	Fcchangelink::TfcChangeLink* FChangeLink;
	bool NodesCleared;
	bool HaveBadLink;
	bool FHideUpDownButtons;
	Fctreeheader::TfcTreeHeader* FHeader;
	void __fastcall SetHideUpDownButtons(bool val);
	Db::TDataSource* __fastcall GetDataSource(void);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	Db::TDataSource* __fastcall GetLastDataSource(void);
	void __fastcall SetLastDataSource(Db::TDataSource* Value);
	void __fastcall SetDataSources(AnsiString Value);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall CMExit(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	void __fastcall TreeDownClick(System::TObject* Sender);
	void __fastcall TreeUpClick(System::TObject* Sender);
	TfcTreeDataLink* __fastcall GetParentDataLink(Db::TDataSet* Dataset);
	TfcTreeDataLink* __fastcall GetChildDataLink(Db::TDataSet* Dataset);
	void __fastcall MouseToRow(int X, int Y, int &Row);
	bool __fastcall RowToNode(int Row, TfcDBTreeNode* &Node);
	bool __fastcall NodeToRow(TfcDBTreeNode* Node, int &Row);
	void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
	Windows::TPoint __fastcall GetCenterPoint(const Windows::TRect &ARect);
	void __fastcall ResetStartOffsets(Db::TDataSet* ActiveDataSet);
	int __fastcall GetStartOffset(void);
	void __fastcall SetStartOffset(Db::TDataSet* ActiveDataSet, int val);
	void __fastcall SetImages(Imglist::TCustomImageList* Value);
	void __fastcall SetStateImages(Imglist::TCustomImageList* Value);
	bool __fastcall UseStateImages(TfcDBTreeNode* Node);
	TfcMultiSelectItem* __fastcall GetMultiSelectItem(int Index);
	void __fastcall HintTimerEvent(System::TObject* Sender);
	int __fastcall GetMultiSelectListCount(void);
	int __fastcall GetStateImageWidth(void);
	void __fastcall ScrollRight(void);
	void __fastcall ScrollLeft(void);
	void __fastcall SetLineColor(Graphics::TColor Value);
	void __fastcall SetInactiveFocusColor(Graphics::TColor Value);
	void __fastcall SetOptions(TfcDBTreeViewOptions Value);
	int __fastcall GetStartX(TfcDBTreeNode* Node);
	void __fastcall SetDisplayFields(Classes::TStrings* Value);
	void __fastcall UpdateScrollBarPosition(void);
	void __fastcall SetLevelIndent(int val);
	void __fastcall SetImager(Fcimager::TfcCustomImager* Value);
	void __fastcall ImagerChange(System::TObject* Sender);
	void __fastcall SetHeader(Fctreeheader::TfcTreeHeader* Value);
	
protected:
	Controls::THintWindow* HintWindow;
	void *LastActiveBookmark;
	void *FirstBookmark;
	int ScrollSize;
	int HotTrackRow;
	bool FMouseInControl;
	bool SkipFreeNodes;
	Classes::TList* OldNodes;
	Fcscrollbar::TfcScrollBar* HorzScrollBar;
	Fcscrollbar::TfcScrollBar* VertScrollBar;
	Fcshapebtn::TfcShapeBtn* UpTreeButton;
	Fcshapebtn::TfcShapeBtn* DownTreeButton;
	int StartOffsets[51];
	void *RootDataSetBookmark;
	DYNAMIC bool __fastcall DoMouseWheelDown(Classes::TShiftState Shift, const Windows::TPoint &MousePos
		);
	DYNAMIC bool __fastcall DoMouseWheelUp(Classes::TShiftState Shift, const Windows::TPoint &MousePos)
		;
	AnsiString __fastcall GetNodeText(AnsiString DisplayFieldLine, Db::TDataSet* DataSet, Db::TField* &
		Field);
	virtual int __fastcall ComputeHeaderWidth(void);
	virtual bool __fastcall IsRootDataSetMoved(void);
	virtual void __fastcall DrawColumnText(TfcDBTreeNode* Node, const Windows::TRect &ARect);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall UpdateScrollBar(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall PaintButton(TfcDBTreeNode* Node, const Windows::TPoint &pt, int Size, bool 
		Expanded);
	virtual void __fastcall PaintLines(TfcDBTreeNode* Node);
	virtual void __fastcall PaintImage(TfcDBTreeNode* Node);
	virtual void __fastcall DataChanged(Db::TDataSet* DataSet);
	virtual void __fastcall Scroll(Db::TDataSet* DataSet, int Distance);
	virtual void __fastcall LinkActive(Db::TDataSet* DataSet, bool Value);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall DoCalcNodeAttributes(TfcDBTreeNode* Node);
	virtual void __fastcall DoCalcSectionAttributes(TfcDBTreeNode* Node, Fctreeheader::TfcTreeHeaderSection* 
		Section, AnsiString &DisplayText);
	virtual void __fastcall DoDrawSection(TfcDBTreeNode* Node, Fctreeheader::TfcTreeHeaderSection* Section
		, const Windows::TRect &ARect, AnsiString s, bool &DoDefault);
	virtual bool __fastcall InMasterChanging(Db::TDataSet* DataSet);
	virtual void __fastcall RefreshDataLinks(Db::TDataSource* FirstDS, Db::TDataSource* LastDS);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
		);
	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 

⌨️ 快捷键说明

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