aboutsummaryrefslogblamecommitdiffstats
path: root/apps/windoze/CBuilder5/BibleCS/searchfrm.h
blob: ff811a407d6f4186c46d9e7ca060482699865ce3 (plain) (tree)































                                                                             



















                                      

                         

                                









                                                                         
                                                                            
                                                                          
                                     



                                                                            
                                                      
















                                                                                                                                                                    
                          


















                                                                             
//---------------------------------------------------------------------------
#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 *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;
	TPanel *Panel13;
	TButton *Button3;
	TPanel *Panel2;
	TRadioGroup *scopeGroup;
	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);
	void __fastcall Button3Click(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;
	bool initializing;
	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