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

📄 fctreeview.hpp

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

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

#ifndef fcTreeViewHPP
#define fcTreeViewHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <ImgList.hpp>	// Pascal unit
#include <ShellAPI.hpp>	// Pascal unit
#include <fcCommon.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <fcCanvas.hpp>	// Pascal unit
#include <fccustomdraw.hpp>	// Pascal unit
#include <ComCtrls.hpp>	// Pascal unit
#include <Consts.hpp>	// Pascal unit
#include <ComStrs.hpp>	// Pascal unit
#include <Commctrl.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 Fctreeview
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TfcItemState { fcisSelected, fcisGrayed, fcisDisabled, fcisChecked, fcisFocused, fcisDefault, fcisHot, 
	fcisMarked, fcisIndeterminate };
#pragma option pop

typedef Set<TfcItemState, fcisSelected, fcisIndeterminate>  TfcItemStates;

class DELPHICLASS TfcCustomTreeView;
class DELPHICLASS TfcTreeNode;
typedef void __fastcall (__closure *TfcTVDrawTextEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node
	, const Windows::TRect &ARect, TfcItemStates AItemState, bool &DefaultDrawing);

typedef void __fastcall (__closure *TfcTreeMouseMoveEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* 
	Node, Classes::TShiftState Shift, int X, int Y);

typedef void __fastcall (__closure *TfcTreeMouseEvent)(TfcCustomTreeView* TreeView, TfcTreeNode* Node
	, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);

#pragma option push -b-
enum TfcNodeState { fcnsCut, fcnsDropHilited, fcnsFocused, fcnsSelected, fcnsExpanded };
#pragma option pop

#pragma option push -b-
enum TfcNodeAttachMode { fcnaAdd, fcnaAddFirst, fcnaAddChild, fcnaAddChildFirst, fcnaInsert, fcnaInsertAfter 
	};
#pragma option pop

#pragma option push -b-
enum TfcAddMode { fctaAddFirst, fctaAdd, fctaInsert };
#pragma option pop

#pragma option push -b-
enum TfcTreeViewCheckboxType { tvctNone, tvctCheckbox, tvctRadioGroup };
#pragma option pop

#pragma option push -b-
enum TfcTreeViewOption { tvoExpandOnDblClk, tvoExpandButtons3D, tvoFlatCheckBoxes, tvoHideSelection, 
	tvoRowSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoHotTrack, tvoAutoURL, tvoToolTips, tvoEditText, 
	tvo3StateCheckbox };
#pragma option pop

typedef Set<TfcTreeViewOption, tvoExpandOnDblClk, tvo3StateCheckbox>  TfcTreeViewOptions;

struct TfcNodeInfo;
typedef TfcNodeInfo *PfcNodeInfo;

#pragma pack(push, 1)
struct TfcNodeInfo
{
	int ImageIndex;
	int SelectedIndex;
	int StateIndex;
	int OverlayIndex;
	TfcTreeViewCheckboxType CheckboxType;
	Byte Checked;
	bool Expanded;
	char DummyPad[3];
	void *Data;
	int StringDataSize1;
	int StringDataSize2;
	int Count;
	System::SmallString<255>  Text;
} ;
#pragma pack(pop)

class DELPHICLASS TfcTreeNodes;
struct TfcNodeCache
{
	TfcTreeNode* CacheNode;
	int CacheIndex;
} ;

#pragma option push -b-
enum TwwStoreData { sdStoreText, sdStoreData1, sdStoreData2 };
#pragma option pop

class PASCALIMPLEMENTATION TfcTreeNodes : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TfcCustomTreeView* FOwner;
	int FUpdateCount;
	TfcNodeCache FNodeCache;
	bool InDestroy;
	void __fastcall AddedNode(TfcTreeNode* Value);
	HWND __fastcall GetHandle(void);
	TfcTreeNode* __fastcall GetNodeFromIndex(int Index);
	void __fastcall ReadData(Classes::TStream* Stream);
	void __fastcall Repaint(TfcTreeNode* Node);
	void __fastcall WriteData(Classes::TStream* Stream);
	void __fastcall ClearCache(void);
	void __fastcall ReadStreamVersion(Classes::TReader* Reader);
	void __fastcall WriteStreamVersion(Classes::TWriter* Writer);
	
protected:
	HTREEITEM __fastcall AddItem(HTREEITEM Parent, HTREEITEM Target, const tagTVITEMA &Item, TfcAddMode 
		AddMode);
	TfcTreeNode* __fastcall InternalAddObject(TfcTreeNode* Node, const AnsiString S, void * Ptr, TfcAddMode 
		AddMode);
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
	tagTVITEMA __fastcall CreateItem(TfcTreeNode* Node);
	int __fastcall GetCount(void);
	void __fastcall SetItem(int Index, TfcTreeNode* Value);
	void __fastcall SetUpdateState(bool Updating);
	
public:
	__fastcall TfcTreeNodes(TfcCustomTreeView* AOwner);
	__fastcall virtual ~TfcTreeNodes(void);
	TfcTreeNode* __fastcall AddChildFirst(TfcTreeNode* Node, const AnsiString S);
	TfcTreeNode* __fastcall AddChild(TfcTreeNode* Node, const AnsiString S);
	TfcTreeNode* __fastcall AddChildObjectFirst(TfcTreeNode* Node, const AnsiString S, void * Ptr);
	TfcTreeNode* __fastcall AddChildObject(TfcTreeNode* Node, const AnsiString S, void * Ptr);
	TfcTreeNode* __fastcall AddFirst(TfcTreeNode* Node, const AnsiString S);
	TfcTreeNode* __fastcall Add(TfcTreeNode* Node, const AnsiString S);
	TfcTreeNode* __fastcall AddObjectFirst(TfcTreeNode* Node, const AnsiString S, void * Ptr);
	TfcTreeNode* __fastcall AddObject(TfcTreeNode* Node, const AnsiString S, void * Ptr);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall BeginUpdate(void);
	void __fastcall Clear(void);
	void __fastcall Delete(TfcTreeNode* Node);
	void __fastcall EndUpdate(void);
	TfcTreeNode* __fastcall GetFirstNode(void);
	TfcTreeNode* __fastcall GetNode(HTREEITEM ItemId);
	TfcTreeNode* __fastcall Insert(TfcTreeNode* Node, const AnsiString S);
	TfcTreeNode* __fastcall InsertObject(TfcTreeNode* Node, const AnsiString S, void * Ptr);
	TfcTreeNode* __fastcall FindNode(AnsiString SearchText, bool VisibleOnly);
	TfcTreeNode* __fastcall FindNodeInfo(AnsiString SearchText, bool VisibleOnly, TwwStoreData StoreDataUsing
		);
	__property int Count = {read=GetCount, nodefault};
	__property HWND Handle = {read=GetHandle, nodefault};
	__property TfcTreeNode* Item[int Index] = {read=GetNodeFromIndex/*, default*/};
	__property TfcCustomTreeView* Owner = {read=FOwner};
};


class PASCALIMPLEMENTATION TfcTreeNode : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FMultiSelected;
	TfcTreeViewCheckboxType FCheckboxType;
	bool FChecked;
	TfcTreeNodes* FOwner;
	AnsiString FText;
	AnsiString FStringData1;
	AnsiString FStringData2;
	void *FData;
	_TREEITEM *FItemId;
	int FImageIndex;
	int FSelectedIndex;
	int FOverlayIndex;
	int FStateIndex;
	bool FDeleting;
	bool FInTree;
	bool FGrayed;
	void __fastcall SetCheckboxType(TfcTreeViewCheckboxType val);
	bool __fastcall CompareCount(int CompareMe);
	bool __fastcall DoCanExpand(bool Expand);
	void __fastcall DoExpand(bool Expand);
	void __fastcall ExpandItem(bool Expand, bool Recurse);
	int __fastcall GetAbsoluteIndex(void);
	bool __fastcall GetExpanded(void);
	int __fastcall GetLevel(void);
	TfcTreeNode* __fastcall GetParent(void);
	bool __fastcall GetChildren(void);
	bool __fastcall GetCut(void);
	bool __fastcall GetDropTarget(void);
	bool __fastcall GetFocused(void);
	int __fastcall GetIndex(void);
	TfcTreeNode* __fastcall GetItem(int Index);
	bool __fastcall GetSelected(void);
	bool __fastcall GetState(TfcNodeState NodeState);
	int __fastcall GetCount(void);
	TfcCustomTreeView* __fastcall GetTreeView(void);
	void __fastcall InternalMove(TfcTreeNode* ParentNode, TfcTreeNode* Node, HTREEITEM HItem, TfcAddMode 
		AddMode);
	bool __fastcall IsNodeVisible(void);
	void __fastcall SetChildren(bool Value);
	void __fastcall SetCut(bool Value);
	void __fastcall SetData(void * Value);
	void __fastcall SetDropTarget(bool Value);
	void __fastcall SetItem(int Index, TfcTreeNode* Value);
	void __fastcall SetExpanded(bool Value);
	void __fastcall SetFocused(bool Value);
	void __fastcall SetImageIndex(int Value);
	void __fastcall SetOverlayIndex(int Value);
	void __fastcall SetSelectedIndex(int Value);
	void __fastcall SetSelected(bool Value);
	void __fastcall SetStateIndex(int Value);
	void __fastcall SetText(const AnsiString S);
	bool __fastcall GetMultiSelected(void);
	void __fastcall SetMultiSelected(bool Value);
	void __fastcall SetChecked(bool val);
	void __fastcall SetGrayed(bool val);
	
protected:
	int ReadDataSize;
	virtual void __fastcall Invalidate(void);
	virtual int __fastcall GetSizeOfNodeInfo(void);
	virtual void __fastcall ReadData(Classes::TStream* Stream, PfcNodeInfo Info);
	virtual void __fastcall WriteData(Classes::TStream* Stream, PfcNodeInfo Info);
	
public:
	Variant Patch;
	int __fastcall GetStateIndex(void);
	bool __fastcall IsRadioGroup(void);
	virtual AnsiString __fastcall GetSortText(void);
	__fastcall virtual TfcTreeNode(TfcTreeNodes* AOwner);
	__fastcall virtual ~TfcTreeNode(void);
	bool __fastcall AlphaSort(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall Collapse(bool Recurse);
	bool __fastcall CustomSort(PFNTVCOMPARE SortProc, int Data);
	void __fastcall Delete(void);
	void __fastcall DeleteChildren(void);
	Windows::TRect __fastcall DisplayRect(bool TextOnly);
	bool __fastcall EditText(void);
	void __fastcall EndEdit(bool Cancel);
	void __fastcall Expand(bool Recurse);
	TfcTreeNode* __fastcall GetFirstChild(void);
	HWND __fastcall GetHandle(void);
	TfcTreeNode* __fastcall GetLastChild(void);
	TfcTreeNode* __fastcall GetNext(void);
	TfcTreeNode* __fastcall GetNextChild(TfcTreeNode* Value);
	TfcTreeNode* __fastcall GetNextSibling(void);
	TfcTreeNode* __fastcall GetNextVisible(void);
	TfcTreeNode* __fastcall GetPrev(void);
	TfcTreeNode* __fastcall GetPrevChild(TfcTreeNode* Value);
	TfcTreeNode* __fastcall GetPrevSibling(void);
	TfcTreeNode* __fastcall GetPrevVisible(void);
	bool __fastcall HasAsParent(TfcTreeNode* Value);
	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};

⌨️ 快捷键说明

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