// frmSearch.h - Search form header. // // (c) 2012-2017 Xestia Software Development. // // This file is part of Xestia Address Book. // // Xestia Address Book is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by the // Free Software Foundation, version 3 of the license. // // Xestia Address Book is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License along // with Xestia Address Book. If not, see #ifndef __frmSearch__ #define __frmSearch__ /** @file Subclass of frmSearchADT, which is generated by wxFormBuilder. */ #include "../AppXestiaAddrBk.h" #include "../vcard/vcard.h" #include "../widgets/XABContactMenu.h" #include "XABSearchPanel.h" #include "../Bitmaps.h" #include "../frmMain.h" #include "../frmContact.h" #include "frmSearchAccounts.h" #include "../common/preferences.h" #include "../common/dirs.h" #include "../vcard/vcard.h" #include #include #include #include #include //// end generated include DECLARE_EVENT_TYPE(SE_ADDSEARCHSETTING, wxID_ANY) DECLARE_EVENT_TYPE(SE_REMOVESEARCHSETTING, wxID_ANY) DECLARE_EVENT_TYPE(SE_RELOADACCOUNTS, wxID_ANY) DECLARE_EVENT_TYPE(SE_ADDRESULT, wxID_ANY) DECLARE_EVENT_TYPE(SE_SBUPDATE, wxID_ANY) DECLARE_EVENT_TYPE(SE_SEARCHFINISHED, wxID_ANY) DECLARE_EVENT_TYPE(SE_UPDATERESULT, wxID_ANY) DECLARE_EVENT_TYPE(SE_DELETERESULT, wxID_ANY) DECLARE_EVENT_TYPE(SE_OPENCONTACT, wxID_ANY) DECLARE_EVENT_TYPE(SE_EDITCONTACT, wxID_ANY) DECLARE_EVENT_TYPE(SE_REVEALCONTACT, wxID_ANY) struct SRNotif{ vCardName ContactName; wxString ContactNickname; wxString ContactAccount; wxString ContactAccountName; wxString ContactFullFilename; long SearchResultID; }; /** Implementing frmSearchADT */ class frmSearch : public frmSearchADT { private: std::map SearchFrames; std::map SearchAccounts; std::map SearchAccountsNames; std::map SearchAccountsPaths; std::map SearchResultAccount; std::map SearchResultFilename; std::map SearchModeMemoryFSPtr; int ScrollGen = 0; int SearchUID = 0; bool SearchEnabled = FALSE; bool StopMode = FALSE; bool SearchMode = FALSE; bool CheckDuplicate(wxString Filename, wxString Account, std::map *SRAcc, std::map *SRFN); XABContactMenu *ContactMenu = new XABContactMenu(XABCONTACTMENU_SEARCH); protected: // Handlers for frmSearchADT events. void SelectAccounts( wxCommandEvent& event ); void SearchContacts( wxCommandEvent& event ); void ResetContacts( wxCommandEvent& event ); void AddSearchSetting( wxCommandEvent& event ); void RemoveSearchSetting( wxCommandEvent& event ); void ReloadAccountList( wxCommandEvent& event ); void AddResult( wxCommandEvent& event ); void SearchBarUpdate( wxCommandEvent& event ); void SearchFinished( wxCommandEvent& event ); void SearchContactsThread(); void DisableAllSearchSettings(bool Enable); void OpenContact( wxCommandEvent& event ); void EditContact( wxCommandEvent& event ); void RevealContact( wxCommandEvent& event ); void CloseWindow( wxCommandEvent& event ); void UpdateResult( wxCommandEvent& event ); void DeleteResult( wxCommandEvent& event ); void CloseWindow( wxCloseEvent& event ); void ShowContactMenu( wxMouseEvent& event ); public: /** Constructor */ frmSearch( wxWindow* parent ); void SetUID(int UID); void SetSearchMode(bool SearchModeIn); DECLARE_EVENT_TABLE() //// end generated class members }; #endif // __frmSearch__