Browse CVS Repository
Contents of /tombo/Tombo/Src/SearchTree.h
Parent Directory
| Revision Log
| Revision Graph
Revision 1.6 -
( show annotations)
( download)
( as text)
Sat Sep 24 14:12:27 2005 UTC
(18 years, 6 months ago)
by hirami
Branch: MAIN
CVS Tags: Tombo_2_0a3, Tombo_1_17_1, B191, B192, B193, B194, B196, B197, B198, B199, B200, B201, B202, B203, B205, B206, B207, B208, B187, B189, B188, B213, B212, B211, B217, B216, B215, B214, B219, B218, Tombo_2_0b2, Tombo_2_0b3, Tombo_2_0b1, Tombo_2_0b4, B228, B229, B226, B227, B224, B225, B222, B223, B220, B221, SNAPSHOT20051220, B231, B230, Tombo_1_15, Tombo_1_17, Tombo_1_16, HEAD
Branch point for: Tombo_1_17_1_branch
Changes since 1.5: +9 -14 lines
File MIME type: text/x-chdr
- replace tree search scan implementation.
| 1 |
#ifndef SEARCHTREE_H |
| 2 |
#define SEARCHTREE_H |
| 3 |
|
| 4 |
enum SearchResult; |
| 5 |
class SearchEngineA; |
| 6 |
class SearchTreeScanner; |
| 7 |
|
| 8 |
/////////////////////////////////////////////////////////// |
| 9 |
// Popup "searching" dialog and do search another thread |
| 10 |
/////////////////////////////////////////////////////////// |
| 11 |
|
| 12 |
class SearchTree { |
| 13 |
protected: |
| 14 |
/////////////////////////////// |
| 15 |
// dialog |
| 16 |
|
| 17 |
HWND hDlgWnd; |
| 18 |
|
| 19 |
/////////////////////////////// |
| 20 |
// Thread and thread control vars. |
| 21 |
|
| 22 |
HANDLE hSearchThread; |
| 23 |
|
| 24 |
/////////////////////////////// |
| 25 |
// for searching variables |
| 26 |
|
| 27 |
SearchEngineA *pRegex; |
| 28 |
BOOL bSearchDirectionForward; |
| 29 |
BOOL bSearchEncryptedMemo; |
| 30 |
BOOL bSkipOne; |
| 31 |
|
| 32 |
TomboURI *pStartURI; |
| 33 |
|
| 34 |
SearchTreeScanner *pScanner; |
| 35 |
TomboURI *pMatchedURI; |
| 36 |
|
| 37 |
SearchResult srResult; |
| 38 |
|
| 39 |
public: |
| 40 |
//////////////////////// |
| 41 |
// ctor & dtor |
| 42 |
|
| 43 |
SearchTree() : pRegex(NULL), hSearchThread(NULL), hDlgWnd(NULL), pStartURI(NULL), pScanner(NULL), pMatchedURI(NULL) {} |
| 44 |
~SearchTree(); |
| 45 |
BOOL Init(SearchEngineA *p, const TomboURI *pStartURI, BOOL bDirectionForward, BOOL bSkipOne, BOOL bSkipEncrypt); |
| 46 |
|
| 47 |
//////////////////////// |
| 48 |
// Dialog callback |
| 49 |
|
| 50 |
void InitDialog(HWND hDlg); |
| 51 |
void OnClose(HWND hDlg, WORD nId); |
| 52 |
|
| 53 |
HWND GetWnd() { return hDlgWnd; } |
| 54 |
|
| 55 |
//////////////////////// |
| 56 |
// other funcs |
| 57 |
|
| 58 |
void Popup(HINSTANCE hInst, HWND hParent); |
| 59 |
SearchResult Search(); |
| 60 |
|
| 61 |
void CancelRequest(); |
| 62 |
|
| 63 |
void SetResult(SearchResult sr) { srResult = sr; } |
| 64 |
SearchResult GetResult() { return srResult; } |
| 65 |
|
| 66 |
const TomboURI *GetMatchedURI() { return pMatchedURI; } |
| 67 |
const TomboURI *CurrentURI(); |
| 68 |
}; |
| 69 |
|
| 70 |
#endif |
| |