Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
088818f83e9c0072e87307a9aded628ed6cb4fae
[xestiaab/.git] / source / search / frmSearch.h
1 // frmSearch.h - Search form header.
2 //
3 // (c) 2012-2017 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #ifndef __frmSearch__
20 #define __frmSearch__
22 /**
23 @file
24 Subclass of frmSearchADT, which is generated by wxFormBuilder.
25 */
27 #include "../AppXestiaAddrBk.h"
28 #include "../vcard/vcard.h"
29 #include "../widgets/XABContactMenu.h"
30 #include "XABSearchPanel.h"
31 #include "../bitmaps.h"
33 #include <map>
34 #include <wx/fs_mem.h>
35 #include <wx/tokenzr.h>
36 #include <wx/dir.h>
38 //// end generated include
40 DECLARE_EVENT_TYPE(SE_ADDSEARCHSETTING, wxID_ANY)
41 DECLARE_EVENT_TYPE(SE_REMOVESEARCHSETTING, wxID_ANY)
42 DECLARE_EVENT_TYPE(SE_RELOADACCOUNTS, wxID_ANY)
43 DECLARE_EVENT_TYPE(SE_ADDRESULT, wxID_ANY)
44 DECLARE_EVENT_TYPE(SE_SBUPDATE, wxID_ANY)
45 DECLARE_EVENT_TYPE(SE_SEARCHFINISHED, wxID_ANY)
46 DECLARE_EVENT_TYPE(SE_UPDATERESULT, wxID_ANY)
47 DECLARE_EVENT_TYPE(SE_DELETERESULT, wxID_ANY)
48 DECLARE_EVENT_TYPE(SE_OPENCONTACT, wxID_ANY)
49 DECLARE_EVENT_TYPE(SE_EDITCONTACT, wxID_ANY)
50 DECLARE_EVENT_TYPE(SE_REVEALCONTACT, wxID_ANY)
52 struct SRNotif{
53         vCardName ContactName;
54         wxString ContactNickname;
55         wxString ContactAccount;
56         wxString ContactAccountName;
57         wxString ContactFullFilename;
58         long SearchResultID;
59 };
61 /** Implementing frmSearchADT */
62 class frmSearch : public frmSearchADT
63 {
64         private:
65                 std::map<int, void*> SearchFrames;
66                 std::map<wxString, bool> SearchAccounts;
67                 std::map<wxString, wxString> SearchAccountsNames;
68                 std::map<wxString, wxString> SearchAccountsPaths;
69                 std::map<long, wxString> SearchResultAccount;
70                 std::map<long, wxString> SearchResultFilename;
71                 std::map<wxString, wxString> SearchModeMemoryFSPtr;
72                 int ScrollGen = 0;
73                 int SearchUID = 0;
74                 bool SearchEnabled = FALSE;
75                 bool StopMode = FALSE;
76                 bool SearchMode = FALSE;
77                 bool CheckDuplicate(wxString Filename, 
78                         wxString Account,
79                         std::map<long,wxString> *SRAcc,
80                         std::map<long,wxString> *SRFN);
81                 XABContactMenu *ContactMenu = new XABContactMenu(XABCONTACTMENU_SEARCH);
82         protected:
83                 // Handlers for frmSearchADT events.
84                 void SelectAccounts( wxCommandEvent& event );
85                 void SearchContacts( wxCommandEvent& event );
86                 void ResetContacts( wxCommandEvent& event );
87                 void AddSearchSetting( wxCommandEvent& event );
88                 void RemoveSearchSetting( wxCommandEvent& event );
89                 void ReloadAccountList( wxCommandEvent& event );
90                 void AddResult( wxCommandEvent& event );
91                 void SearchBarUpdate( wxCommandEvent& event );
92                 void SearchFinished( wxCommandEvent& event );
93                 void SearchContactsThread();
94                 void DisableAllSearchSettings(bool Enable);
95                 void OpenContact( wxCommandEvent& event );
96                 void EditContact( wxCommandEvent& event );
97                 void RevealContact( wxCommandEvent& event );
98                 void CloseWindow( wxCommandEvent& event );
99                 void UpdateResult( wxCommandEvent& event );
100                 void DeleteResult( wxCommandEvent& event );
101                 void CloseWindow( wxCloseEvent& event );
102                 void ShowContactMenu( wxMouseEvent& event );
103         public:
104                 /** Constructor */
105                 frmSearch( wxWindow* parent );
106                 void SetUID(int UID);
107                 void SetSearchMode(bool SearchModeIn);
108                 DECLARE_EVENT_TABLE()
109         //// end generated class members
110         
111 };
113 #endif // __frmSearch__
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy