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

📄 fctreeview.hpp

📁 一套及时通讯的原码
💻 HPP
📖 第 1 页 / 共 3 页
字号:
	bool __fastcall CheckboxNeeded(TfcTreeNode* Node);
	Windows::TPoint __fastcall GetCenterPoint(const Windows::TRect &ARect);
	void __fastcall SetOptions(TfcTreeViewOptions Value);
	void __fastcall SetLineColor(Graphics::TColor Value);
	void __fastcall SetInactiveFocusColor(Graphics::TColor Value);
	Shortint __fastcall GetItemHeight(void);
	void __fastcall SetItemHeight(Shortint Value);
	int __fastcall GetScrollTime(void);
	void __fastcall SetScrollTime(int Value);
	int __fastcall GetMultiSelectListCount(void);
	TfcTreeNode* __fastcall GetMultiSelectItem(int Index);
	void __fastcall HintTimerEvent(System::TObject* Sender);
	Fccanvas::TfcCanvas* __fastcall GetPaintCanvas(void);
	
protected:
	Classes::TList* FMultiSelectList;
	bool SkipErase;
	bool SkipChangeMessages;
	bool InLoading;
	Extctrls::TTimer* FChangeTimer;
	int DisplayedItems;
	bool FMouseInControl;
	Controls::THintWindow* HintWindow;
	Extctrls::TTimer* HintTimer;
	int HintTimerCount;
	TfcTreeNode* LastHintNode;
	DYNAMIC bool __fastcall CanEdit(TfcTreeNode* Node);
	DYNAMIC bool __fastcall CanChange(TfcTreeNode* Node);
	DYNAMIC bool __fastcall CanCollapse(TfcTreeNode* Node);
	DYNAMIC bool __fastcall CanExpand(TfcTreeNode* Node);
	DYNAMIC void __fastcall Change(TfcTreeNode* Node);
	DYNAMIC void __fastcall Collapse(TfcTreeNode* Node);
	virtual TfcTreeNode* __fastcall CreateNode(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	DYNAMIC void __fastcall Delete(TfcTreeNode* Node);
	virtual void __fastcall DestroyWnd(void);
	DYNAMIC void __fastcall DoEndDrag(System::TObject* Target, int X, int Y);
	DYNAMIC void __fastcall DoStartDrag(Controls::TDragObject* &DragObject);
	DYNAMIC void __fastcall Edit(const tagTVITEMA &Item);
	DYNAMIC void __fastcall Expand(TfcTreeNode* Node);
	virtual Controls::TDragImageList* __fastcall GetDragImages(void);
	virtual void __fastcall GetImageIndex(TfcTreeNode* Node);
	virtual void __fastcall GetSelectedIndex(TfcTreeNode* Node);
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall KeyPress(char &Key);
	DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
		);
	virtual void __fastcall SetDragMode(Controls::TDragMode Value);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	__property bool AutoExpand = {read=FAutoExpand, write=SetAutoExpand, default=0};
	__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
	__property int ChangeDelay = {read=GetChangeDelay, write=SetChangeDelay, default=0};
	__property Imglist::TCustomImageList* Images = {read=FImages, write=SetImages};
	__property int Indent = {read=GetIndent, write=SetIndent, nodefault};
	__property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, default=0};
	__property bool RightClickSelects = {read=FRightClickSelects, write=FRightClickSelects, default=0};
		
	__property TfcSortType SortType = {read=FSortType, write=SetSortType, default=0};
	__property Imglist::TCustomImageList* StateImages = {read=FStateImages, write=SetStateImages};
	__property bool StreamExpandedNode = {read=FStreamExpandedNode, write=FStreamExpandedNode, default=0
		};
	__property TfcTVEditingEvent OnEditing = {read=FOnEditing, write=FOnEditing};
	__property TfcTVEditedEvent OnEdited = {read=FOnEdited, write=FOnEdited};
	__property TfcTVExpandingEvent OnExpanding = {read=FOnExpanding, write=FOnExpanding};
	__property TfcTVExpandedEvent OnExpanded = {read=FOnExpanded, write=FOnExpanded};
	__property TfcTVCollapsingEvent OnCollapsing = {read=FOnCollapsing, write=FOnCollapsing};
	__property TfcTVExpandedEvent OnCollapsed = {read=FOnCollapsed, write=FOnCollapsed};
	__property TfcTVChangingEvent OnChanging = {read=FOnChanging, write=FOnChanging};
	__property TfcTVChangedEvent OnChange = {read=FOnChange, write=FOnChange};
	__property TfcTVCompareEvent OnCompare = {read=FOnCompare, write=FOnCompare};
	__property TfcTVExpandedEvent OnDeletion = {read=FOnDeletion, write=FOnDeletion};
	__property TfcTVExpandedEvent OnGetImageIndex = {read=FOnGetImageIndex, write=FOnGetImageIndex};
	__property TfcTVExpandedEvent OnGetSelectedIndex = {read=FOnGetSelectedIndex, write=FOnGetSelectedIndex
		};
	virtual void __fastcall MultiSelectNode(TfcTreeNode* Node, bool Select, bool redraw);
	virtual bool __fastcall IsVisible(TfcTreeNode* Node, bool PartialOK);
	Windows::TRect __fastcall ItemRect(TfcTreeNode* Node, bool LabelOnly);
	void __fastcall PaintButton(TfcTreeNode* Node, const Windows::TPoint &pt, int size);
	void __fastcall PaintLines(TfcTreeNode* Node);
	void __fastcall PaintImage(TfcTreeNode* Node, TfcItemStates State);
	Windows::TRect __fastcall LevelRect(TfcTreeNode* ANode);
	virtual void __fastcall DoDrawText(TfcCustomTreeView* TreeView, TfcTreeNode* Node, const Windows::TRect 
		&ARect, TfcItemStates AItemState, bool &DefaultDrawing);
	virtual void __fastcall Compare(TfcTreeNode* Node1, TfcTreeNode* Node2, int lParam, int &Result);
	virtual void __fastcall CalcNodeAttributes(TfcTreeNode* Node, TfcItemStates AItemState);
	virtual AnsiString __fastcall GetDisplayText(TfcTreeNode* Node);
	void __fastcall LoadCanvasDefaults(TfcTreeNode* Node, TfcItemStates AItemState);
	virtual bool __fastcall ProcessKeyPress(char Key, Classes::TShiftState shift);
	virtual bool __fastcall IsRowSelect(void);
	virtual void __fastcall MouseLoop(int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	bool __fastcall UseImages(TfcTreeNode* Node);
	bool __fastcall UseStateImages(TfcTreeNode* Node);
	virtual void __fastcall BeginPainting(void);
	virtual void __fastcall EndPainting(void);
	virtual void __fastcall BeginItemPainting(TfcTreeNode* Node, const Windows::TRect &ARect, TfcItemStates 
		AItemState);
	virtual void __fastcall EndItemPainting(TfcTreeNode* Node, const Windows::TRect &ARect, TfcItemStates 
		AItemState);
	virtual void __fastcall PaintItem(TfcTreeNode* Node);
	void __fastcall ClearStateImageIndexes(void);
	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 void __fastcall DoToggleCheckbox(TfcTreeNode* Node);
	virtual void __fastcall FreeHintWindow(void);
	virtual Controls::THintWindow* __fastcall CreateHintWindow(TfcTreeNode* Node);
	void __fastcall UnselectAllNodes(TfcTreeNode* IgnoreNode);
	void __fastcall InvalidateNoErase(void);
	__property Shortint ItemHeight = {read=GetItemHeight, write=SetItemHeight, nodefault};
	__property TfcCalcNodeAttributesEvent OnCalcNodeAttributes = {read=FOnCalcNodeAttributes, write=FOnCalcNodeAttributes
		};
	__property int ScrollTime = {read=GetScrollTime, write=SetScrollTime, nodefault};
	__property TMetaClass* NodeClass = {read=FNodeClass, write=FNodeClass};
	
public:
	Variant Patch;
	void __fastcall ResetStateImages(void);
	__property int StreamVersion = {read=FStreamVersion, nodefault};
	TfcTreeNode* __fastcall GetFirstSibling(TfcTreeNode* Node);
	void __fastcall InvalidateNode(TfcTreeNode* Node);
	bool __fastcall MultiSelectCheckboxNeeded(TfcTreeNode* Node);
	void __fastcall UnselectAll(void);
	__fastcall virtual TfcCustomTreeView(Classes::TComponent* AOwner);
	__fastcall virtual ~TfcCustomTreeView(void);
	bool __fastcall AlphaSort(void);
	bool __fastcall CustomSort(PFNTVCOMPARE SortProc, int Data);
	void __fastcall FullCollapse(void);
	void __fastcall FullExpand(void);
	TfcHitTests __fastcall GetHitTestInfoAt(int X, int Y);
	TfcTreeNode* __fastcall GetNodeAt(int X, int Y);
	bool __fastcall IsEditing(void);
	void __fastcall LoadFromFile(const AnsiString FileName);
	void __fastcall LoadFromStream(Classes::TStream* Stream);
	void __fastcall SaveToFile(const AnsiString FileName);
	void __fastcall SaveToStream(Classes::TStream* Stream);
	__property Fccanvas::TfcCanvas* Canvas = {read=GetPaintCanvas};
	__property TfcTreeNode* DropTarget = {read=GetDropTarget, write=SetDropTarget};
	__property TfcTreeNode* Selected = {read=GetSelection, write=SetSelection};
	__property TfcTreeNode* TopItem = {read=GetTopItem, write=SetTopItem};
	__property TfcTreeNode* RightClickNode = {read=FRClickNode};
	__property TfcTreeViewOptions Options = {read=FOptions, write=SetOptions, default=1257};
	__property TfcTreeNodes* Items = {read=FTreeNodes, write=SeTfcTreeNodes};
	__property TfcTVMultiSelectAttributes* MultiSelectAttributes = {read=FMultiSelectAttributes, write=
		FMultiSelectAttributes};
	__property TfcTVDrawTextEvent OnDrawText = {read=FOnDrawText, write=FOnDrawText};
	__property TfcItemChangeEvent OnItemChange = {read=FOnItemChange, write=FOnItemChange};
	__property TfcTreeNode* MultiSelectList[int Index] = {read=GetMultiSelectItem};
	__property int MultiSelectListCount = {read=GetMultiSelectListCount, nodefault};
	__property Graphics::TColor LineColor = {read=FLineColor, write=SetLineColor, default=-2147483632};
		
	__property Graphics::TColor InactiveFocusColor = {read=FInactiveFocusColor, write=SetInactiveFocusColor
		, default=-2147483633};
	__property TfcTreeMouseMoveEvent OnMouseMove = {read=FOnMouseMove, write=FOnMouseMove};
	__property TfcTreeMouseEvent OnMouseDown = {read=FOnMouseDown, write=FOnMouseDown};
	__property TfcTreeMouseEvent OnMouseUp = {read=FOnMouseUp, write=FOnMouseUp};
	__property TfcTreeMouseEvent OnDblClick = {read=FOnDblClick, write=FOnDblClick};
	__property TfcToggleCheckboxEvent OnToggleCheckbox = {read=FOnToggleCheckbox, write=FOnToggleCheckbox
		};
	__property bool UsePaintBuffering = {read=FUsePaintBuffering, write=FUsePaintBuffering, default=0};
		
	__property bool DisableThemes = {read=FDisableThemes, write=FDisableThemes, default=0};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TfcCustomTreeView(HWND ParentWindow) : Controls::TWinControl(
		ParentWindow) { }
	#pragma option pop
	
};


class DELPHICLASS TfcTreeView;
class PASCALIMPLEMENTATION TfcTreeView : public TfcCustomTreeView 
{
	typedef TfcCustomTreeView inherited;
	
__published:
	__property DisableThemes ;
	__property Align ;
	__property Anchors ;
	__property AutoExpand ;
	__property BiDiMode ;
	__property BorderStyle ;
	__property ChangeDelay ;
	__property Color ;
	__property LineColor ;
	__property InactiveFocusColor ;
	__property Ctl3D ;
	__property Constraints ;
	__property DragKind ;
	__property DragCursor ;
	__property DragMode ;
	__property Enabled ;
	__property Font ;
	__property Images ;
	__property Indent ;
	__property MultiSelectAttributes ;
	__property Options ;
	__property Items ;
	__property ParentBiDiMode ;
	__property ParentColor ;
	__property ParentCtl3D ;
	__property ParentFont ;
	__property ParentShowHint ;
	__property UsePaintBuffering ;
	__property PopupMenu ;
	__property ReadOnly ;
	__property RightClickSelects ;
	__property ShowHint ;
	__property SortType ;
	__property StateImages ;
	__property StreamExpandedNode ;
	__property TabOrder ;
	__property TabStop ;
	__property Visible ;
	__property OnChange ;
	__property OnChanging ;
	__property OnClick ;
	__property OnCollapsing ;
	__property OnCollapsed ;
	__property OnCompare ;
	__property OnDblClick ;
	__property OnDeletion ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEdited ;
	__property OnEditing ;
	__property OnEndDock ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnExpanding ;
	__property OnExpanded ;
	__property OnGetImageIndex ;
	__property OnGetSelectedIndex ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnToggleCheckbox ;
	__property OnStartDock ;
	__property OnStartDrag ;
	__property OnCalcNodeAttributes ;
	__property OnDrawText ;
public:
	#pragma option push -w-inl
	/* TfcCustomTreeView.Create */ inline __fastcall virtual TfcTreeView(Classes::TComponent* AOwner) : 
		TfcCustomTreeView(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TfcCustomTreeView.Destroy */ inline __fastcall virtual ~TfcTreeView(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TfcTreeView(HWND ParentWindow) : TfcCustomTreeView(
		ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall fcTreeViewError(const AnsiString Msg);

}	/* namespace Fctreeview */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Fctreeview;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// fcTreeView

⌨️ 快捷键说明

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