-
Notifications
You must be signed in to change notification settings - Fork 226
/
UfrmFormTree.h
76 lines (69 loc) · 2.6 KB
/
UfrmFormTree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//---------------------------------------------------------------------------
#ifndef UfrmFormTreeH
#define UfrmFormTreeH
#include <Classes.hpp>
#include <ComCtrls.hpp>
#include <Controls.hpp>
#include <Dialogs.hpp>
#include <Menus.hpp>
//---------------------------------------------------------------------------
//#include <Classes.hpp>
//#include <Controls.hpp>
//#include <StdCtrls.hpp>
//#include <Forms.hpp>
//#include <ComCtrls.hpp>
#include <map>
typedef std::map<const void*, TTreeNode*> TTreeNodeMap;
//---------------------------------------------------------------------------
class TIdrDfmFormTree_11011981 : public TForm
{
__published: // IDE-managed Components
TTreeView *tvForm;
TFindDialog *dlgFind;
TPopupMenu *mnuTree;
TMenuItem *Expand1;
TMenuItem *Collapse1;
TMenuItem *Find1;
void __fastcall tvFormKeyPress(TObject *Sender, char &Key);
void __fastcall tvFormDblClick(TObject *Sender);
void __fastcall dlgFindFind(TObject *Sender);
void __fastcall Expand1Click(TObject *Sender);
void __fastcall Collapse1Click(TObject *Sender);
void __fastcall Find1Click(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift);
void __fastcall FormCreate(TObject *Sender);
private: // User declarations
String MakeNodeCaption(TComponent* curCompo);
String MakeNodeEventCaption(void* item);
void BorderTheControl(TControl* aControl);
void __fastcall AddEventsToNode(String compName, TTreeNode* dstNode, TList* evList);
TTreeNode* __fastcall FindTreeNodeByText(TTreeNode* nodeFrom, const String& txt, bool caseSensitive);
TTreeNode* __fastcall FindTreeNodeByTag(const void* tag);
void __fastcall AddTreeNodeWithTag(TTreeNode* node, const void* tag);
TTreeNodeMap NodesMap;
bool __fastcall IsEventNode(TTreeNode* selNode);
public: // User declarations
__fastcall TIdrDfmFormTree_11011981(TComponent* Owner);
};
//---------------------------------------------------------------------------
//show thinking cursor (ctor - show, dtor - hide with restore previous)
class ThinkCursor
{
public:
inline ThinkCursor()
{
prevCursor = Screen->Cursor;
Screen->Cursor = crHourGlass;
Application->ProcessMessages();
}
inline ~ThinkCursor()
{
Screen->Cursor = prevCursor;
}
private:
Controls::TCursor prevCursor;
};
//---------------------------------------------------------------------------
#endif