//--------------------------------------------------------------------------- #ifndef searchH #define searchH //--------------------------------------------------------------------------- #include #include #include #include #include #include "mainfrm.h" #include #include //--------------------------------------------------------------------------- class TForm2 : public TForm { class TSearchThread; friend class TSearchThread; __published: // IDE-managed Components TPanel *Panel1; TPanel *pnlResult; TPanel *Panel3; TPanel *plPreview; TRadioGroup *searchTypeGroup; TGroupBox *GroupBox1; TCheckBox *CheckBox2; TPanel *Panel4; TButton *Button1; TSplitter *Splitter1; TPanel *pnlScope; TComboBox *SearchText; TPanel *Panel2; TRadioGroup *scopeGroup; TPanel *Panel5; TButton *Button2; TComboBox *ComboBox1; TListView *resultsLV; TProgressBar *progressBar; void __fastcall Button1Click(TObject *Sender); void __fastcall TerminateSearch(TObject *Sender); void __fastcall ListBox1DblClick(TObject *Sender); void __fastcall ListBox1Click(TObject *Sender); void __fastcall scopeGroupClick(TObject *Sender); void __fastcall Button2Click(TObject *Sender); void __fastcall FormShow(TObject *Sender); private: // User declarations class TSearchThread : public TThread { ListKey results; string searchText; int searchType; int searchOptions; SWKey *scope; TForm2 *parent; protected: void __fastcall Execute(); public: __fastcall TSearchThread(TForm2 *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; SWDispRTF *pvrtf; ListKey results; void populateRanges(); public: // User declarations char status; ModMap::iterator target; TPageControl *targetpc; // AnsiString CapText; __fastcall TForm2(TComponent* Owner); }; //--------------------------------------------------------------------------- extern TForm2 *Form2; //--------------------------------------------------------------------------- #endif