Class Tf_Inspector (unit Inspect)

Inherits from

TForm

Constructors


Constructor create(parent : tcomponent{; TTI : tObject});

peProp : TextRect(SR, Sr.


Functions

procedure Button1Click(Sender: TObject);


procedure Edit1Exit(Sender: TObject);

LastForm.

procedure Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

to route keypresses properly.

procedure Edit1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

For auto refresh.

procedure FormClose(Sender: TObject; var Action: TCloseAction);

to route keypresses properly.

procedure FormCreate(Sender: TObject);

this loads bitmaps from DLL among other things.

procedure FormDestroy(Sender: TObject);

if PED^.

procedure FormHide(Sender: TObject);


procedure FormResize(Sender: TObject);

a row showing in the listbox.

procedure FormShow(Sender: TObject);

Set to application.

procedure ListBox1DblClick(Sender: TObject);

This is an ugly one.

procedure ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);

I'm really sorry about these next two procedures.

procedure ListBox1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);


procedure ListBox1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

I := TreeView1.

procedure ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure ListBox1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

edit box.

procedure ListBox2DblClick(Sender: TObject);

handles dragging the split in the two panes.

procedure ListBox2DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);

Draws event names and shows if their assigned.

procedure ListBox2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

The dummy node keeps the '+' } { sign visible so you can drop down the } { components children.

procedure PaintBox1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

these next three are just your stock split panel } { handling routines.

procedure PaintBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure PaintBox1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);


procedure TreeView1Change(Sender: TObject; Node: TTreeNode);

This enumerates each property and puts them in the list box.

procedure TreeView1Collapsing(Sender: TObject; Node: TTreeNode; var AllowCollapse: Boolean);

and delete it.

procedure TreeView1DblClick(Sender: TObject);

Tell it we're dragging.

procedure TreeView1Expanding(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean);

Have to simulate double click.

procedure AutoStart;

If Assigned(OldKeyEvent) then OldKeyEvent(Sender, Key, Shift);

Procedure EndAutoStart;

OldFormHandler := Screen.

procedure InsertComp(C, Parent : TComponent);

; TTI : tObject

procedure SelectComp(C : TComponent);


Function AssignIcon(O : TObject) : Integer;

Traces up the inheritance Hierarchy to assign icons to } { components.

Procedure Idlehandler(Sender : TObject; var Done : Boolean);


Function LocateComp(C : TComponent) : ttreeNode;


Procedure NewFormhandler(Sender : TObject);

, self

Procedure NewKeyEvent(Sender : TObject; Var Key : Word; Shift : TShiftState);

Free; ListScreen.

Function SeeIfChanged(X : Integer) : Boolean;

Looks to see if the memorized property is the right one.

Procedure ShowAll(I : TTreeNode);

Creates a item in the treeview for each form in application.

Procedure ShowChildren(O : TComponent; I : TTreeNode);

Places all components in their proper place in the treeview.

Procedure WhileSizing(Var msg : tmessage);


Properties

Events

Variables

Button1 : TSpeedButton;


Edit1 : TEdit;


Label1 : TLabel;


ListBox1 : TListBox;


ListBox2 : TListBox;


PageControl1 : TPageControl;


PaintBox1 : TPaintBox;


TabSheet1 : TTabSheet;


TabSheet2 : TTabSheet;


TreeView1 : TTreeView;


Autostarted : Boolean;


BeforeShow : tShowEvent;


CBDown : Boolean;


ComboButtonBox : Trect;

Private declarations

HotKey : tShortCut;


ImageL : TImageList;


Ti : TComponent;


DownArrow : TBitmap;


EditHit : Real;


EditRect : TRect;


FromListBox : Boolean;


HalfWay : Integer;


LastEdit : TRect;


LastException : String[255];


LastForm : TForm;


Lastpoll : Real;


LastX : Integer;


MDX : Integer;


OldFormHandler : TNotifyEvent;


OldIdleHandler : TIdleEvent;


OldKeyEvent : TkeyEvent;


OldKeyPreview : Boolean;


parentObject : tcomponent;


SplitDrag : Boolean;


TreeIList : TStringList;



Constructors


Constructor create(parent : tcomponent{; TTI : tObject});

peProp : TextRect(SR, Sr.Left, SR.Top, S + PI^.Name); peSetItem : TextRect(SR, Sr.Left, SR.Top, S + PPED^.Name);


Functions


procedure Button1Click(Sender: TObject);


procedure Edit1Exit(Sender: TObject);

LastForm.KeyPreview := OldkeyPreview; LastForm.OnKeyDown := OldKeyEvent; Screen.OnActiveFormChange := OldFormHandler; If Assigned(LastForm) then LastForm.OnKeyDown := OldKeyEvent;


procedure Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

to route keypresses properly.


procedure Edit1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

For auto refresh.


procedure FormClose(Sender: TObject; var Action: TCloseAction);

to route keypresses properly.


procedure FormCreate(Sender: TObject);

this loads bitmaps from DLL among other things.


procedure FormDestroy(Sender: TObject);

if PED^.M.Code <> Nil then begin if PED^.Enabled then CopyRect(DR, cbf.Canvas, Sr) Else CopyRect(DR, cbe.Canvas, Sr); if odSelected in State then TextOut(HalfWay + 4, Rect.Top+1, 'Assigned') Else TextOut(HalfWay + 3, Rect.Top, 'Assigned'); End Else CopyRect(DR, cbd.Canvas, Sr);


procedure FormHide(Sender: TObject);


procedure FormResize(Sender: TObject);

a row showing in the listbox.


procedure FormShow(Sender: TObject);

Set to application.OnIdle.


procedure ListBox1DblClick(Sender: TObject);

This is an ugly one.


procedure ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);

I'm really sorry about these next two procedures. I'm too busy } { right now do document them properly.


procedure ListBox1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);


procedure ListBox1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

I := TreeView1.Items.AddObject(TreeView1.Items.GetFirstNode, 'Application', Application); SI := AssignIcon(Application);


procedure ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure ListBox1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

edit box.


procedure ListBox2DblClick(Sender: TObject);

handles dragging the split in the two panes.


procedure ListBox2DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);

Draws event names and shows if their assigned.


procedure ListBox2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

The dummy node keeps the '+' } { sign visible so you can drop down the } { components children.


procedure PaintBox1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

these next three are just your stock split panel } { handling routines. There's some GDI optimization } { to prevent flicker.


procedure PaintBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure PaintBox1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);


procedure TreeView1Change(Sender: TObject; Node: TTreeNode);

This enumerates each property and puts them in the list box.


procedure TreeView1Collapsing(Sender: TObject; Node: TTreeNode; var AllowCollapse: Boolean);

and delete it.


procedure TreeView1DblClick(Sender: TObject);

Tell it we're dragging.


procedure TreeView1Expanding(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean);

Have to simulate double click.


procedure AutoStart;

If Assigned(OldKeyEvent) then OldKeyEvent(Sender, Key, Shift);


Procedure EndAutoStart;

OldFormHandler := Screen.OnActiveFormChange; Screen.OnActiveFormChange := NewFormHandler; LastForm := Nil; NewFormHandler(self);


procedure InsertComp(C, Parent : TComponent);

; TTI : tObject


procedure SelectComp(C : TComponent);


Function AssignIcon(O : TObject) : Integer;

Traces up the inheritance Hierarchy to assign icons to } { components.


Procedure Idlehandler(Sender : TObject; var Done : Boolean);


Function LocateComp(C : TComponent) : ttreeNode;


Procedure NewFormhandler(Sender : TObject);

, self


Procedure NewKeyEvent(Sender : TObject; Var Key : Word; Shift : TShiftState);

Free; ListScreen.Destroy;


Function SeeIfChanged(X : Integer) : Boolean;

Looks to see if the memorized property is the right one. } { this is only really used to prevent flicker while polling.


Procedure ShowAll(I : TTreeNode);

Creates a item in the treeview for each form in application.


Procedure ShowChildren(O : TComponent; I : TTreeNode);

Places all components in their proper place in the treeview.


Procedure WhileSizing(Var msg : tmessage);


Properties


Events


Variables


Button1 : TSpeedButton;


Edit1 : TEdit;


Label1 : TLabel;


ListBox1 : TListBox;


ListBox2 : TListBox;


PageControl1 : TPageControl;


PaintBox1 : TPaintBox;


TabSheet1 : TTabSheet;


TabSheet2 : TTabSheet;


TreeView1 : TTreeView;


Autostarted : Boolean;


BeforeShow : tShowEvent;


CBDown : Boolean;


ComboButtonBox : Trect;

Private declarations


HotKey : tShortCut;


ImageL : TImageList;


Ti : TComponent;


DownArrow : TBitmap;


EditHit : Real;


EditRect : TRect;


FromListBox : Boolean;


HalfWay : Integer;


LastEdit : TRect;


LastException : String[255];


LastForm : TForm;


Lastpoll : Real;


LastX : Integer;


MDX : Integer;


OldFormHandler : TNotifyEvent;


OldIdleHandler : TIdleEvent;


OldKeyEvent : TkeyEvent;


OldKeyPreview : Boolean;


parentObject : tcomponent;


SplitDrag : Boolean;


TreeIList : TStringList;