aboutsummaryrefslogtreecommitdiffstats
path: root/apps/windoze/CBuilder5/BibleCS/searchfrm.h
blob: 2b9a8ca40e5069f1942c037d39fd49012ff845be (plain) (blame)
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
102
103
104
105
106
107
//---------------------------------------------------------------------------
#ifndef searchH
#define searchH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
#include "mainfrm.h"
#include <swmgr.h>
#include <ComCtrls.hpp>
#include <TntStdCtrls.hpp>
#include "rxricheditx.h"
#include <ImgList.hpp>
//---------------------------------------------------------------------------
class TsearchForm : public TForm {
	class TSearchThread;
	friend class TSearchThread;
__published:	// IDE-managed Components
	TImageList *searchImageList;
	TPanel *pnlChooseMod;
	TPanel *Panel7;
	TProgressBar *progressBar;
	TPanel *pnlResult;
	TSplitter *Splitter1;
	TPanel *plPreview;
	TListView *resultsLV;
	TPanel *Panel1;
	TPanel *Panel3;
	TComboBox *SearchTextOld;
	TPanel *pnlScope;
	TPanel *Panel2;
	TRadioGroup *scopeGroup;
	TPanel *Panel5;
	TPanel *Panel8;
	TLabel *moduleName;
	TSplitter *ChooseModSplitter;
	TPanel *Panel9;
	TTreeView *modTreeView;
	TPanel *Panel6;
	TButton *Button1;
	TPanel *Panel10;
	TRadioGroup *searchTypeGroup;
	TGroupBox *searchOptionsGroup;
	TCheckBox *caseSensitiveCkBx;
	TPanel *Panel4;
	TButton *searchBtn;
	TPanel *Panel11;
	TPanel *Panel12;
	TButton *customRangeBtn;
	TComboBox *ComboBox1;
	TLabel *lblChooseModule;
	TButton *Button2;
	void __fastcall searchBtnClick(TObject *Sender);
	void __fastcall TerminateSearch(TObject *Sender);
	void __fastcall ListBox1DblClick(TObject *Sender);
	void __fastcall ListBox1Click(TObject *Sender);
	void __fastcall scopeGroupClick(TObject *Sender);
	void __fastcall customRangeBtnClick(TObject *Sender);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall resultsLVChange(TObject *Sender, TListItem *Item,
		TItemChange Change);
	void __fastcall resultsLVCustomDrawItem(TCustomListView *Sender,
          TListItem *Item, TCustomDrawState State, bool &DefaultDraw);
	void __fastcall resultsLVInfoTip(TObject *Sender, TListItem *Item,
          AnsiString &InfoTip);
	void __fastcall Button1Click(TObject *Sender);
	void __fastcall FormActivate(TObject *Sender);
	void __fastcall modTreeViewChange(TObject *Sender, TTreeNode *Node);
	void __fastcall Button2Click(TObject *Sender);
private:	// User declarations
	class TSearchThread : public TThread {
		ListKey results;
		string searchText;
		int searchType;
		int searchOptions;
		SWKey *scope;
		TsearchForm *parent;
	protected:
		void __fastcall Execute();
	public:
		__fastcall TSearchThread(TsearchForm *parent, string searchText, int searchType, int searchOptions, SWKey *scope = 0, bool CreateSuspended = false);
		void __fastcall FillListBox(void);
		static void searchProgressCallback(char status, void *searchFrm);
		void __fastcall updateStatus(void);
		void __fastcall updateProgressBar(void);
	} *searchThread;
	TRxRichEditX *pvrtf;
	ListKey results;
	void populateRanges();
public:		// User declarations
	void setTarget(SWModule *target);
	char status;
	SWModule *target;
	TPageControl *targetpc;
	TTntComboBox *SearchText;
//	AnsiString CapText;
     
	__fastcall TsearchForm(TComponent* Owner);
	void fillList();
};
//---------------------------------------------------------------------------
extern TsearchForm *searchForm;
//---------------------------------------------------------------------------
#endif