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

📄 fctreeview.hpp

📁 一套及时通讯的原码
💻 HPP
📖 第 1 页 / 共 3 页
字号:
	int __fastcall IndexOf(TfcTreeNode* Value);
	void __fastcall MakeVisible(void);
	virtual void __fastcall MoveTo(TfcTreeNode* Destination, TfcNodeAttachMode Mode);
	__property int AbsoluteIndex = {read=GetAbsoluteIndex, nodefault};
	__property int Count = {read=GetCount, nodefault};
	__property bool Cut = {read=GetCut, write=SetCut, nodefault};
	__property void * Data = {read=FData, write=SetData};
	__property bool Deleting = {read=FDeleting, nodefault};
	__property bool Focused = {read=GetFocused, write=SetFocused, nodefault};
	__property bool DropTarget = {read=GetDropTarget, write=SetDropTarget, nodefault};
	__property bool Selected = {read=GetSelected, write=SetSelected, nodefault};
	__property bool Expanded = {read=GetExpanded, write=SetExpanded, nodefault};
	__property HWND Handle = {read=GetHandle, nodefault};
	__property bool HasChildren = {read=GetChildren, write=SetChildren, nodefault};
	__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, nodefault};
	__property int Index = {read=GetIndex, nodefault};
	__property bool IsVisible = {read=IsNodeVisible, nodefault};
	__property TfcTreeNode* Item[int Index] = {read=GetItem, write=SetItem/*, default*/};
	__property HTREEITEM ItemId = {read=FItemId};
	__property int Level = {read=GetLevel, nodefault};
	__property int OverlayIndex = {read=FOverlayIndex, write=SetOverlayIndex, nodefault};
	__property TfcTreeNodes* Owner = {read=FOwner};
	__property TfcTreeNode* Parent = {read=GetParent};
	__property int SelectedIndex = {read=FSelectedIndex, write=SetSelectedIndex, nodefault};
	__property int StateIndex = {read=FStateIndex, write=SetStateIndex, nodefault};
	__property AnsiString Text = {read=FText, write=SetText};
	__property AnsiString StringData = {read=FStringData1, write=FStringData1};
	__property AnsiString StringData2 = {read=FStringData2, write=FStringData2};
	__property TfcCustomTreeView* TreeView = {read=GetTreeView};
	__property bool Checked = {read=FChecked, write=SetChecked, nodefault};
	__property bool Grayed = {read=FGrayed, write=SetGrayed, nodefault};
	__property TfcTreeViewCheckboxType CheckboxType = {read=FCheckboxType, write=SetCheckboxType, nodefault};
	__property bool MultiSelected = {read=GetMultiSelected, write=SetMultiSelected, nodefault};
};


typedef TfcNodeCache *PfcNodeCache;

class DELPHICLASS TfcTVMultiSelectAttributes;
class PASCALIMPLEMENTATION TfcTVMultiSelectAttributes : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FEnabled;
	bool FAutoUnselect;
	int FMultiSelectLevel;
	bool FMultiSelectCheckbox;
	TfcCustomTreeView* TreeView;
	void __fastcall SetEnabled(bool val);
	void __fastcall SetMultiSelectLevel(int val);
	void __fastcall SetMultiSelectCheckBox(bool val);
	
public:
	__fastcall TfcTVMultiSelectAttributes(Classes::TComponent* Owner);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property bool AutoUnselect = {read=FAutoUnselect, write=FAutoUnselect, default=1};
	__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 ~TfcTVMultiSelectAttributes(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TfcHitTest { fchtAbove, fchtBelow, fchtNowhere, fchtOnItem, fchtOnButton, fchtOnIcon, fchtOnIndent, fchtOnLabel, fchtOnRight, fchtOnStateIcon, fchtToLeft, fchtToRight };
#pragma option pop

typedef Set<TfcHitTest, fchtAbove, fchtToRight>  TfcHitTests;

#pragma option push -b-
enum TfcSortType { fcstNone, fcstData, fcstText, fcstBoth };
#pragma option pop

class DELPHICLASS EfcTreeViewError;
class PASCALIMPLEMENTATION EfcTreeViewError : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall EfcTreeViewError(const AnsiString Msg) : Sysutils::Exception(Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EfcTreeViewError(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EfcTreeViewError(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EfcTreeViewError(int Ident, const System::TVarRec * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EfcTreeViewError(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EfcTreeViewError(const AnsiString Msg, const System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EfcTreeViewError(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EfcTreeViewError(System::PResStringRec ResStringRec, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EfcTreeViewError(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TfcTVChangingEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node, bool &AllowChange);

typedef void __fastcall (__closure *TfcTVChangedEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node);

typedef void __fastcall (__closure *TfcTVEditingEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node, bool &AllowEdit);

typedef void __fastcall (__closure *TfcTVEditedEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node, AnsiString &S);

typedef void __fastcall (__closure *TfcTVExpandingEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node, bool &AllowExpansion);

typedef void __fastcall (__closure *TfcTVCollapsingEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node, bool &AllowCollapse);

typedef void __fastcall (__closure *TfcTVExpandedEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node);

typedef void __fastcall (__closure *TfcTVCompareEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node1, TfcTreeNode* Node2, int Data, int &Compare);

typedef void __fastcall (__closure *TfcTVCustomDrawEvent)(TfcCustomTreeView* TreeView, const Types::TRect &ARect, bool &DefaultDraw);

typedef void __fastcall (__closure *TfcCalcNodeAttributesEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node, TfcItemStates State);

#pragma option push -b-
enum TfcItemChangeAction { icaAdd, icaDelete, icaText, icaImageIndex };
#pragma option pop

typedef void __fastcall (__closure *TfcItemChangeEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node, TfcItemChangeAction Action, const Variant &NewValue);

typedef void __fastcall (__closure *TfcToggleCheckboxEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node);

typedef TMetaClass*TfcTreeNodeClass;

class PASCALIMPLEMENTATION TfcCustomTreeView : public Controls::TWinControl 
{
	typedef Controls::TWinControl inherited;
	
private:
	TfcItemChangeEvent FOnItemChange;
	bool FAutoExpand;
	Forms::TFormBorderStyle FBorderStyle;
	Fccanvas::TfcCanvas* FCanvas;
	Fccanvas::TfcCanvas* FPaintCanvas;
	bool FCanvasChanged;
	void *FDefEditProc;
	bool FDragged;
	Controls::TDragImageList* FDragImage;
	TfcTreeNode* FDragNode;
	HWND FEditHandle;
	void *FEditInstance;
	Imglist::TChangeLink* FImageChangeLink;
	Imglist::TCustomImageList* FImages;
	TfcTreeNode* FLastDropTarget;
	bool FManualNotify;
	Classes::TMemoryStream* FMemStream;
	TfcTreeNode* FRClickNode;
	bool FRightClickSelects;
	bool FReadOnly;
	int FSaveIndex;
	int FSaveIndent;
	Classes::TStringList* FSaveItems;
	int FSaveTopIndex;
	TfcSortType FSortType;
	bool FStateChanging;
	Imglist::TCustomImageList* FStateImages;
	Imglist::TChangeLink* FStateChangeLink;
	bool FStreamExpandedNode;
	TfcTreeNodes* FTreeNodes;
	WideString FWideText;
	TfcTVEditingEvent FOnEditing;
	TfcTVEditedEvent FOnEdited;
	TfcTVExpandedEvent FOnExpanded;
	TfcTVExpandingEvent FOnExpanding;
	TfcTVExpandedEvent FOnCollapsed;
	TfcTVCollapsingEvent FOnCollapsing;
	TfcTVChangingEvent FOnChanging;
	TfcTVChangedEvent FOnChange;
	TfcTVCompareEvent FOnCompare;
	TfcTVExpandedEvent FOnDeletion;
	TfcTVExpandedEvent FOnGetImageIndex;
	TfcTVExpandedEvent FOnGetSelectedIndex;
	Graphics::TColor FLineColor;
	Graphics::TColor FInactiveFocusColor;
	TfcTreeMouseEvent FOnMouseDown;
	TfcTreeMouseEvent FOnMouseUp;
	TfcTreeMouseEvent FOnDblClick;
	TfcTreeMouseMoveEvent FOnMouseMove;
	TfcToggleCheckboxEvent FOnToggleCheckbox;
	TMetaClass*FNodeClass;
	TfcTVMultiSelectAttributes* FMultiSelectAttributes;
	TfcCalcNodeAttributesEvent FOnCalcNodeAttributes;
	int FBorderWidth;
	TfcTVDrawTextEvent FOnDrawText;
	TfcTreeViewOptions FOptions;
	bool FDisableThemes;
	Graphics::TBitmap* FPaintBitmap;
	int FIndent;
	TfcTreeNode* LastSelectedNode;
	TfcTreeNode* MouseNode;
	TfcTreeNode* LastMouseMoveNode;
	TfcHitTests LastMouseHitTest;
	TfcTreeNode* ClickedNode;
	bool Down;
	TfcTreeNode* EditNode;
	TfcTreeNode* BeforeMouseDownNode;
	int FStreamVersion;
	bool FUsePaintBuffering;
	void __fastcall CanvasChanged(System::TObject* Sender);
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMDrag(Controls::TCMDrag &Message);
	MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	void __fastcall EditWndProc(Messages::TMessage &Message);
	void __fastcall DoDragOver(Controls::TDragObject* Source, int X, int Y, bool CanDrop);
	int __fastcall GetChangeDelay(void);
	TfcTreeNode* __fastcall GetDropTarget(void);
	int __fastcall GetIndent(void);
	TfcTreeNode* __fastcall GetNodeFromItem(const tagTVITEMA &Item);
	TfcTreeNode* __fastcall GetSelection(void);
	TfcTreeNode* __fastcall GetTopItem(void);
	void __fastcall ImageListChange(System::TObject* Sender);
	void __fastcall SetAutoExpand(bool Value);
	void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
	void __fastcall SetChangeDelay(int Value);
	void __fastcall SetDropTarget(TfcTreeNode* Value);
	void __fastcall SetImageList(unsigned Value, int Flags);
	void __fastcall SetIndent(int Value);
	void __fastcall SetImages(Imglist::TCustomImageList* Value);
	void __fastcall SetReadOnly(bool Value);
	void __fastcall SetSelection(TfcTreeNode* Value);
	void __fastcall SetSortType(TfcSortType Value);
	void __fastcall SetStateImages(Imglist::TCustomImageList* Value);
	void __fastcall SeTfcTreeNodes(TfcTreeNodes* Value);
	void __fastcall SetTopItem(TfcTreeNode* Value);
	void __fastcall OnChangeTimer(System::TObject* Sender);
	HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMRButtonDown(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMRButtonUp(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMNotify(Messages::TWMNotify &Message);
	HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMEraseBkgnd &Message);
	HIDESBASE MESSAGE void __fastcall CMExit(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMDestroy(Messages::TWMNoParams &Message);

⌨️ 快捷键说明

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