forked from crypto2011/IDR
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUfrmFormTree.h
More file actions
71 lines (60 loc) · 2.44 KB
/
UfrmFormTree.h
File metadata and controls
71 lines (60 loc) · 2.44 KB
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
//---------------------------------------------------------------------------
#ifndef UfrmFormTreeH
#define UfrmFormTreeH
#include <System.Classes.hpp>
#include <Vcl.ComCtrls.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.Dialogs.hpp>
#include <Vcl.Menus.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