Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added copyright and license headers on C++ source and header files in the carddav...
[xestiaab/.git] / source / frmSearch.h
1 // frmSearch.h - Search form header.
2 //
3 // (c) 2012-2015 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"
31 #include <map>
33 //// end generated include
35 DECLARE_EVENT_TYPE(SE_ADDSEARCHSETTING, wxID_ANY)
36 DECLARE_EVENT_TYPE(SE_REMOVESEARCHSETTING, wxID_ANY)
37 DECLARE_EVENT_TYPE(SE_RELOADACCOUNTS, wxID_ANY)
38 DECLARE_EVENT_TYPE(SE_ADDRESULT, wxID_ANY)
39 DECLARE_EVENT_TYPE(SE_SBUPDATE, wxID_ANY)
40 DECLARE_EVENT_TYPE(SE_SEARCHFINISHED, wxID_ANY)
41 DECLARE_EVENT_TYPE(SE_UPDATERESULT, wxID_ANY)
42 DECLARE_EVENT_TYPE(SE_DELETERESULT, wxID_ANY)
43 DECLARE_EVENT_TYPE(SE_OPENCONTACT, wxID_ANY)
44 DECLARE_EVENT_TYPE(SE_EDITCONTACT, wxID_ANY)
45 DECLARE_EVENT_TYPE(SE_REVEALCONTACT, wxID_ANY)
47 struct SRNotif{
48         vCardName ContactName;
49         wxString ContactNickname;
50         wxString ContactAccount;
51         wxString ContactAccountName;
52         wxString ContactFullFilename;
53         long SearchResultID;
54 };
56 /** Implementing frmSearchADT */
57 class frmSearch : public frmSearchADT
58 {
59         private:
60                 std::map<int, void*> SearchFrames;
61                 std::map<wxString, bool> SearchAccounts;
62                 std::map<wxString, wxString> SearchAccountsNames;
63                 std::map<wxString, wxString> SearchAccountsPaths;
64                 std::map<long, wxString> SearchResultAccount;
65                 std::map<long, wxString> SearchResultFilename;
66                 std::map<wxString, wxString> SearchModeMemoryFSPtr;
67                 int ScrollGen = 0;
68                 int SearchUID = 0;
69                 bool SearchEnabled = FALSE;
70                 bool StopMode = FALSE;
71                 bool SearchMode = FALSE;
72                 bool CheckDuplicate(wxString Filename, 
73                         wxString Account,
74                         std::map<long,wxString> *SRAcc,
75                         std::map<long,wxString> *SRFN);
76                 XABContactMenu *ContactMenu = new XABContactMenu(XABCONTACTMENU_SEARCH);
77         protected:
78                 // Handlers for frmSearchADT events.
79                 void SelectAccounts( wxCommandEvent& event );
80                 void SearchContacts( wxCommandEvent& event );
81                 void ResetContacts( wxCommandEvent& event );
82                 void AddSearchSetting( wxCommandEvent& event );
83                 void RemoveSearchSetting( wxCommandEvent& event );
84                 void ReloadAccountList( wxCommandEvent& event );
85                 void AddResult( wxCommandEvent& event );
86                 void SearchBarUpdate( wxCommandEvent& event );
87                 void SearchFinished( wxCommandEvent& event );
88                 void SearchContactsThread();
89                 void DisableAllSearchSettings(bool Enable);
90                 void OpenContact( wxCommandEvent& event );
91                 void EditContact( wxCommandEvent& event );
92                 void RevealContact( wxCommandEvent& event );
93                 void CloseWindow( wxCommandEvent& event );
94                 void UpdateResult( wxCommandEvent& event );
95                 void DeleteResult( wxCommandEvent& event );
96                 void CloseWindow( wxCloseEvent& event );
97                 void ShowContactMenu( wxMouseEvent& event );
98         public:
99                 /** Constructor */
100                 frmSearch( wxWindow* parent );
101                 void SetUID(int UID);
102                 void SetSearchMode(bool SearchModeIn);
103                 DECLARE_EVENT_TABLE()
104         //// end generated class members
105         
106 };
108 #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