-
Notifications
You must be signed in to change notification settings - Fork 2
/
HistoryForm.h
101 lines (100 loc) · 3.44 KB
/
HistoryForm.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//$$---- Form HDR ----
//---------------------------------------------------------------------------
#ifndef HistoryFormH
#define HistoryFormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "RzButton.hpp"
#include "RzPanel.hpp"
#include "RzTreeVw.hpp"
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include "RzCommon.hpp"
#include "DataFile.hpp"
#include <ImgList.hpp>
#include "RzLabel.hpp"
#include <Graphics.hpp>
#include <Menus.hpp>
#include <Dialogs.hpp>
//---------------------------------------------------------------------------
const int MAX_RESERVED_WORDS = 30;
class THistoryFormClass : public TForm
{
__published: // IDE-managed Components
TRzPanel *HistoryPanel;
TRzSpacer *TopSpacer;
TRzSpacer *MiddleSpacer;
TRzSpacer *LeftSpacer;
TRzSpacer *RightSpacer;
TRzPanel *HeaderPanel;
TRzPanel *TopPanel;
TRzLabel *CloseLabel;
TRzLabel *HistoryLabel;
TImage *HistoryImage;
TRzSpacer *BottomSpacer;
TImage *CloseImage;
TRzPanel *LeftPanel;
TRzLabel *ClearLabel;
TRzLabel *HelpLabel;
TImage *HelpImage;
TImage *ClearImage;
TImage *ShowImage;
TRzLabel *ShowLabel;
TRzSpacer *RzSpacer4;
TRzSpacer *RzSpacer5;
TRzSpacer *RzSpacer6;
TRzPanel *TreePanel;
TRzTreeView *CardTreeView;
TRzTreeView *QueryTreeView;
TPopupMenu *QueryMenu;
TMenuItem *QuerySaveMenuItem;
TMenuItem *QueryClearMenuItem;
TSaveDialog *SaveDialog;
TRzPanel *LabelPanel;
TRzToolButton *QueryButton;
TRzToolButton *CardButton;
void __fastcall HelpImageMouseEnter(TObject *Sender);
void __fastcall HelpLabelClick(TObject *Sender);
void __fastcall ClearLabelClick(TObject *Sender);
void __fastcall HelpLabelMouseLeave(TObject *Sender);
void __fastcall ClearLabelMouseEnter(TObject *Sender);
void __fastcall ShowLabelMouseEnter(TObject *Sender);
void __fastcall CloseLabelMouseEnter(TObject *Sender);
void __fastcall CloseLabelClick(TObject *Sender);
void __fastcall TopPanelMouseMove(TObject *Sender, TShiftState Shift, int X,
int Y);
void __fastcall TopPanelMouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall TopPanelMouseUp(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y);
void __fastcall FormShow(TObject *Sender);
void __fastcall FormActivate(TObject *Sender);
void __fastcall TranslateImageClick(TObject *Sender);
void __fastcall QueryClearMenuItemClick(TObject *Sender);
void __fastcall QuerySaveMenuItemClick(TObject *Sender);
void __fastcall QueryButtonMouseEnter(TObject *Sender);
void __fastcall QueryButtonMouseLeave(TObject *Sender);
void __fastcall QueryButtonClick(TObject *Sender);
void __fastcall CardButtonClick(TObject *Sender);
private: // User declarations
TTreeNode *rootNode, *rootNodeCard;
TFont *PFont;
bool bottonPressed;
int prevX, prevY;
void changeStyle();
void delete_node_if_exists(TTreeNode*, const AnsiString&);
void __fastcall SetLinkCursor(TControl *Control);
public: // User declarations
__fastcall THistoryFormClass(TComponent* Owner);
void insertWord(const AnsiString&);
void insertToCardList(const AnsiString&);
void saveHistory(TDataFile*);
void readHistory(TDataFile*);
};
//---------------------------------------------------------------------------
extern PACKAGE THistoryFormClass *HistoryFormClass;
//---------------------------------------------------------------------------
#endif