1 // frmContactEditor.h - frmContactEditor form header.
3 // (c) 2012-2016 Xestia Software Development.
5 // This file is part of Xestia Address Book.
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.
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.
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 __frmContactEditor__
20 #define __frmContactEditor__
27 #include <SFML/Audio.hpp>
31 Subclass of frmContactEditorADT, which is generated by wxFormBuilder.
34 #include "../AppXestiaAddrBk.h"
35 #include "../vcard/vcard.h"
36 #include "../common/textprocessing.h"
37 #include "../common/etag.h"
38 #include "../common/timers.h"
40 #include "../actmgr/frmActivityMgr.h"
41 #include "../frmMain.h"
43 #include "cdo/ContactDataObject.h"
45 #define CE_NICKNAME wxT("Nickname")
46 #define CE_ADDRESS wxT("Address")
47 #define CE_EMAIL wxT("Email")
48 #define CE_IM wxT("IM")
49 #define CE_TELEPHONE wxT("Telephone")
50 #define CE_LANG wxT("Languages")
51 #define CE_TZ wxT("Timezone")
52 #define CE_RELATED wxT("Related")
53 #define CE_WEBSITE wxT("Websites")
54 #define CE_TITLE wxT("Titles")
55 #define CE_GEOPOSITION wxT("Geoposition")
56 #define CE_ROLE wxT("Roles")
57 #define CE_ORG wxT("Organisations")
58 #define CE_NOTE wxT("Notes")
59 #define CE_CATEGORIES wxT("Categories")
60 #define CE_GROUPS wxT("Groups")
61 #define CE_PICTURES wxT("Pictures")
62 #define CE_SOUNDS wxT("Sounds")
63 #define CE_CALENDAR wxT("Calendar")
64 #define CE_KEY wxT("Key")
65 #define CE_TOKEN wxT("Token")
67 //// end generated include
70 struct frmActivityMgr;
72 // Special Audio Stream for detecting when a sound has stopped playing.
73 class AudioStream: public sf::Music
77 bool onGetData(SoundStream::Chunk& data)
80 bool running = sf::Music::onGetData(data);
87 bool GetPlayingStatus(){ return FilePlaying; }
89 bool FilePlaying = TRUE;
92 /** Implementing frmContactEditorADT */
93 class frmContactEditor : public frmContactEditorADT
96 // Handlers for frmContactEditorADT events.
97 void AddGeneralNickname( wxCommandEvent& event );
98 void ModifyGeneralNickname( wxCommandEvent& event );
99 void DeleteGeneralNickname( wxCommandEvent& event );
100 void AddHomeNickname( wxCommandEvent& event );
101 void ModifyHomeNickname( wxCommandEvent& event );
102 void DeleteHomeNickname( wxCommandEvent& event );
103 void AddBusinessNickname( wxCommandEvent& event );
104 void ModifyBusinessNickname( wxCommandEvent& event );
105 void DeleteBusinessNickname( wxCommandEvent& event );
106 void AddGeneralAddress( wxCommandEvent& event );
107 void ModifyGeneralAddress( wxCommandEvent& event );
108 void DeleteGeneralAddress( wxCommandEvent& event );
109 void AddGeneralEmail( wxCommandEvent& event );
110 void ModifyGeneralEmail( wxCommandEvent& event );
111 void DeleteGeneralEmail( wxCommandEvent& event );
112 void AddGeneralIM( wxCommandEvent& event );
113 void ModifyGeneralIM( wxCommandEvent& event );
114 void DeleteGeneralIM( wxCommandEvent& event );
115 void MoveGeneralIMUp( wxCommandEvent& event );
116 void MoveGeneralIMDown( wxCommandEvent& event );
117 void AddGeneralTelephone( wxCommandEvent& event );
118 void ModifyGeneralTelephone( wxCommandEvent& event );
119 void DeleteGeneralTelephone( wxCommandEvent& event );
120 void AddGeneralLanguages( wxCommandEvent& event );
121 void ModifyGeneralLanguages( wxCommandEvent& event );
122 void DeleteGeneralLanguage( wxCommandEvent& event );
123 void AddGeneralTimezone( wxCommandEvent& event );
124 void ModifyGeneralTimezone( wxCommandEvent& event );
125 void DeleteGeneralTimezone( wxCommandEvent& event );
126 void AddGeneralGeoposition( wxCommandEvent& event );
127 void ModifyGeneralGeoposition( wxCommandEvent& event );
128 void DeleteGeneralGeoposition( wxCommandEvent& event );
129 void AddGeneralRelated( wxCommandEvent& event );
130 void ModifyGeneralRelated( wxCommandEvent& event );
131 void DeleteGeneralRelated( wxCommandEvent& event );
132 void AddGeneralWebsite( wxCommandEvent& event );
133 void ModifyGeneralWebsite( wxCommandEvent& event );
134 void DeleteGeneralWebsite( wxCommandEvent& event );
135 void MoveGeneralWebsiteUp( wxCommandEvent& event );
136 void MoveGeneralWebsiteDown( wxCommandEvent& event );
137 void AddGeneralTitle( wxCommandEvent& event );
138 void ModifyGeneralTitle( wxCommandEvent& event );
139 void DeleteGeneralTitle( wxCommandEvent& event );
140 void MoveGeneralTitleUp( wxCommandEvent& event );
141 void MoveGeneralTitleDown( wxCommandEvent& event );
142 void AddGeneralRole( wxCommandEvent& event );
143 void ModifyGeneralRole( wxCommandEvent& event );
144 void DeleteGeneralRole( wxCommandEvent& event );
145 void MoveGeneralRoleUp( wxCommandEvent& event );
146 void MoveGeneralRoleDown( wxCommandEvent& event );
147 void AddGeneralOrganisation( wxCommandEvent& event );
148 void ModifyGeneralOrganisation( wxCommandEvent& event );
149 void DeleteGeneralOrganisation( wxCommandEvent& event );
150 void MoveGeneralOrganisationUp( wxCommandEvent& event );
151 void MoveGeneralOrganisationDown( wxCommandEvent& event );
152 void AddGeneralNote( wxCommandEvent& event );
153 void ModifyGeneralNote( wxCommandEvent& event );
154 void DeleteGeneralNote( wxCommandEvent& event );
155 void MoveGeneralNoteUp( wxCommandEvent& event );
156 void MoveGeneralNoteDown( wxCommandEvent& event );
157 void AddHomeAddress( wxCommandEvent& event );
158 void ModifyHomeAddress( wxCommandEvent& event );
159 void DeleteHomeAddress( wxCommandEvent& event );
160 void AddHomeEmail( wxCommandEvent& event );
161 void ModifyHomeEmail( wxCommandEvent& event );
162 void DeleteHomeEmail( wxCommandEvent& event );
163 void AddHomeIM( wxCommandEvent& event );
164 void ModifyHomeIM( wxCommandEvent& event );
165 void DeleteHomeIM( wxCommandEvent& event );
166 void AddHomeTelephone( wxCommandEvent& event );
167 void ModifyHomeTelephone( wxCommandEvent& event );
168 void DeleteHomeTelephone( wxCommandEvent& event );
169 void AddHomeLanguage( wxCommandEvent& event );
170 void ModifyHomeLanguage( wxCommandEvent& event );
171 void DeleteHomeLanguage( wxCommandEvent& event );
172 void AddHomeTimezone( wxCommandEvent& event );
173 void ModifyHomeTimezone( wxCommandEvent& event );
174 void DeleteHomeTimezone( wxCommandEvent& event );
175 void AddHomeGeoposition( wxCommandEvent& event );
176 void ModifyHomeGeoposition( wxCommandEvent& event );
177 void DeleteHomeGeoposition( wxCommandEvent& event );
178 void AddHomeRelated( wxCommandEvent& event );
179 void ModifyHomeRelated( wxCommandEvent& event );
180 void DeleteHomeRelated( wxCommandEvent& event );
181 void AddHomeWebsite( wxCommandEvent& event );
182 void ModifyHomeWebsite( wxCommandEvent& event );
183 void DeleteHomeWebsite( wxCommandEvent& event );
184 void AddHomeTitle( wxCommandEvent& event );
185 void ModifyHomeTitle( wxCommandEvent& event );
186 void DeleteHomeTitle( wxCommandEvent& event );
187 void AddHomeRole( wxCommandEvent& event );
188 void ModifyHomeRole( wxCommandEvent& event );
189 void DeleteHomeRole( wxCommandEvent& event );
190 void MoveHomeRoleUp( wxCommandEvent& event );
191 void MoveHomeRoleDown( wxCommandEvent& event );
192 void AddHomeOrganisation( wxCommandEvent& event );
193 void ModifyHomeOrganisation( wxCommandEvent& event );
194 void DeleteHomeOrganisation( wxCommandEvent& event );
195 void MoveHomeOrganisationUp( wxCommandEvent& event );
196 void MoveHomeOrganisationDown( wxCommandEvent& event );
197 void AddHomeNote( wxCommandEvent& event );
198 void ModifyHomeNote( wxCommandEvent& event );
199 void DeleteHomeNote( wxCommandEvent& event );
200 void MoveHomeNoteUp( wxCommandEvent& event );
201 void MoveHomeNoteDown( wxCommandEvent& event );
202 void AddBusinessAddress( wxCommandEvent& event );
203 void ModifyBusinessAddress( wxCommandEvent& event );
204 void DeleteBusinessAddress( wxCommandEvent& event );
205 void AddBusinessEmail( wxCommandEvent& event );
206 void ModifyBusinessEmail( wxCommandEvent& event );
207 void DeleteBusinessEmail( wxCommandEvent& event );
208 void AddBusinessIM( wxCommandEvent& event );
209 void ModifyBusinessIM( wxCommandEvent& event );
210 void DeleteBusinessIM( wxCommandEvent& event );
211 void AddBusinessTelephone( wxCommandEvent& event );
212 void ModifyBusinessTelephone( wxCommandEvent& event );
213 void DeleteBusinessTelephone( wxCommandEvent& event );
214 void AddBusinessLanguage( wxCommandEvent& event );
215 void ModifyBusinessLanguage( wxCommandEvent& event );
216 void DeleteBusinessLanguage( wxCommandEvent& event );
217 void AddBusinessTimezone( wxCommandEvent& event );
218 void ModifyBusinessTimezone( wxCommandEvent& event );
219 void DeleteBusinessTimezone( wxCommandEvent& event );
220 void AddBusinessGeoposition( wxCommandEvent& event );
221 void ModifyBusinessGeoposition( wxCommandEvent& event );
222 void DeleteBusinessGeoposition( wxCommandEvent& event );
223 void AddBusinessRelated( wxCommandEvent& event );
224 void ModifyBusinessRelated( wxCommandEvent& event );
225 void DeleteBusinessRelated( wxCommandEvent& event );
226 void AddBusinessWebsite( wxCommandEvent& event );
227 void ModifyBusinessWebsite( wxCommandEvent& event );
228 void DeleteBusinessWebsite( wxCommandEvent& event );
229 void AddBusinessTitle( wxCommandEvent& event );
230 void ModifyBusinessTitle( wxCommandEvent& event );
231 void DeleteBusinessTitle( wxCommandEvent& event );
232 void MoveBusinessTitleUp( wxCommandEvent& event );
233 void MoveBusinessTitleDown( wxCommandEvent& event );
234 void AddBusinessRole( wxCommandEvent& event );
235 void ModifyBusinessRole( wxCommandEvent& event );
236 void DeleteBusinessRole( wxCommandEvent& event );
237 void MoveBusinessRoleUp( wxCommandEvent& event );
238 void MoveBusinessRoleDown( wxCommandEvent& event );
239 void AddBusinessOrganisation( wxCommandEvent& event );
240 void ModifyBusinessOrganisation( wxCommandEvent& event );
241 void DeleteBusinessOrganisation( wxCommandEvent& event );
242 void MoveBusinessOrganisationUp( wxCommandEvent& event );
243 void MoveBusinessOrganisationDown( wxCommandEvent& event );
244 void AddBusinessNote( wxCommandEvent& event );
245 void ModifyBusinessNote( wxCommandEvent& event );
246 void DeleteBusinessNote( wxCommandEvent& event );
247 void MoveBusinessNoteUp( wxCommandEvent& event );
248 void MoveBusinessNoteDown( wxCommandEvent& event );
249 void AddCategory( wxCommandEvent& event );
250 void ModifyCategory( wxCommandEvent& event );
251 void DeleteCategory( wxCommandEvent& event );
252 void AddGroup( wxCommandEvent& event );
253 void ModifyGroup( wxCommandEvent& event );
254 void DeleteGroup( wxCommandEvent& event );
255 void AddPicture( wxCommandEvent& event );
256 void ModifyPicture( wxCommandEvent& event );
257 void DeletePicture( wxCommandEvent& event );
258 void LoadPicture( wxListEvent& event );
259 void SavePicture( wxCommandEvent& event);
260 void AddLogo( wxCommandEvent& event );
261 void ModifyLogo( wxCommandEvent& event );
262 void DeleteLogo( wxCommandEvent& event );
263 void LoadLogo( wxListEvent& event );
264 void SaveLogo( wxCommandEvent& event);
265 void AddSound( wxCommandEvent& event );
266 void ModifySound( wxCommandEvent& event );
267 void DeleteSound( wxCommandEvent& event );
268 void SaveSound( wxCommandEvent& event);
269 void PlaySoundDetach();
270 void PlaySound( wxCommandEvent& event );
271 void StopSound( wxCommandEvent& event );
272 void AddCalendarAddress( wxCommandEvent& event );
273 void ModifyCalendarAddress( wxCommandEvent& event );
274 void DeleteCalendarAddress( wxCommandEvent& event );
275 void AddCalendarRequest( wxCommandEvent& event );
276 void ModifyCalendarRequest( wxCommandEvent& event );
277 void DeleteCalendarRequest( wxCommandEvent& event );
278 void AddFreeBusy( wxCommandEvent& event );
279 void ModifyFreeBusy( wxCommandEvent& event );
280 void DeleteFreeBusy( wxCommandEvent& event );
281 void AddKey( wxCommandEvent& event );
282 void ModifyKey( wxCommandEvent& event );
283 void DeleteKey( wxCommandEvent& event );
284 void AddVendorNamespace( wxCommandEvent& event );
285 void ModifyVendorNamespace( wxCommandEvent& event );
286 void DeleteVendorNamespace( wxCommandEvent& event );
287 void MoveVendorNamespaceUp( wxCommandEvent& event );
288 void MoveVendorNamespaceDown( wxCommandEvent& event );
289 void AddXToken( wxCommandEvent& event );
290 void ModifyXToken( wxCommandEvent& event );
291 void DeleteXToken( wxCommandEvent& event );
292 void MoveXTokenUp( wxCommandEvent& event );
293 void MoveXTokenDown( wxCommandEvent& event );
294 void SaveContact( wxCommandEvent& event );
295 void SaveCloseContact( wxCommandEvent& event );
296 void CloseContact( wxCommandEvent& event );
297 void CloseWindow( wxCloseEvent& event );
298 void CutText( wxCommandEvent& event );
299 void CopyText( wxCommandEvent& event );
300 void PasteText( wxCommandEvent& event );
301 void SetupColumn(wxString ColumnType, wxListCtrl *ListCtrl);
302 void UpdateMembersTab( wxCommandEvent &event );
303 void UpdateDisplayAs( wxCommandEvent &event );
304 void UpdateName( wxCommandEvent &event );
305 bool GetSelectedItem(wxListCtrl *ListCtrlPtr,
307 int *intSelectedData);
308 int GetLastInt(std::map<int, wxString> *MapData);
309 int GetLastInt(std::map<int, std::string> *MapData);
310 bool ProcessEvent(wxEvent& event);
313 frmContactEditor( wxWindow* parent );
315 void SetupContact(wxString AccountName);
316 void SetupPointers(frmActivityMgr *ActMgr, wxETagProcessTimer *ETagProc,
317 frmMain *MainPtrInc);
318 bool LoadContact(wxString Filename);
319 void SetMode(bool StartupEditMode);
320 void SetUID(int UID);
323 void DeleteMapDataProcess(int IndexNum, std::map<int, std::string>* MapData);
324 void DeleteMapDataProcess(int IndexNum, std::map<int, wxString>* MapData);
325 void DeleteMapDataProcess(int IndexNum, std::map<int, bool>* MapData);
326 void DeleteMapDataProcess(int IndexNum, std::map<int, int>* MapData);
328 void DeleteMapDataB () {} ;
330 template<typename MapData, typename... Args>
331 void DeleteMapDataB(MapData* mapdata, Args*... args) {
333 DeleteMapDataProcess(intSeekSelectedData, mapdata);
334 DeleteMapDataB(args...);
338 template<typename... Args>
339 void DeleteMapData(int IndexNum, Args*... args) {
341 //int intSeekSelectedData = 0;
343 //DeleteMapDataProcess(IndexNum, Moo);
345 intSeekSelectedData = IndexNum;
346 DeleteMapDataB(args...);
350 void ProcessSaveDataProc(wxString PropName,
351 std::map<int,int>* MapData);
352 void ProcessSaveDataProc(wxString PropName,
353 std::map<int,wxString>* MapData);
354 void ProcessSaveDataStrProc(wxString PropName,
355 std::map<int,int>* MapData);
356 void ProcessSaveDataStrProc(wxString PropName,
357 std::map<int,wxString>* MapData);
358 void ProcessSaveDataStrProc(wxString PropName,
359 std::map<int,std::string>* MapData);
362 void ProcessSaveDataB () { } ;
363 void ProcessSaveDataC () { } ;
365 template<typename PropName, typename MapData, typename... Args>
366 void ProcessSaveDataB(PropName propname, MapData* mapdata, Args*... args) {
368 ProcessSaveDataProc(propname, mapdata);
369 ProcessSaveDataB(args...);
373 template<typename PropName, typename MapData, typename... Args>
374 void ProcessSaveDataC(PropName propname, MapData* mapdata, Args*... args) {
376 ProcessSaveDataStrProc(propname, mapdata);
377 ProcessSaveDataC(args...);
381 template<typename... Args>
382 void ProcessSaveData(wxString strPropertyName,
383 wxString *strPropertyInc,
384 bool *boolAdditionalInc, bool *boolExtraInc,
385 std::map<int,wxString>::iterator *iterDataInc,
386 std::map<int,wxString> *MainMapData,
387 std::map<int,wxString>::iterator *iterFileTypeInc,
388 std::map<int,wxString>::iterator *iterFileEncInc,
392 //int intSeekSelectedData = 0;
394 //DeleteMapDataProcess(IndexNum, Moo);
396 strPropertyPtr = strPropertyInc;
397 boolAdditionalPtr = boolAdditionalInc;
398 boolExtraPtr = boolExtraInc;
399 iterDataPtr = iterDataInc;
400 iterFileTypePtr = iterFileTypeInc;
401 iterFileEncPtr = iterFileEncInc;
402 ProcessSaveDataB(args...);
404 std::map<int,wxString>::iterator strIter;
405 std::map<int,wxString>::iterator strDataTypeIter;
406 wxString strMainValue;
408 int intSeekData = (*iterDataStringPtr)->first;
409 strIter = MainMapData->find(intSeekData);
411 wxString strFileType = (*iterFileTypePtr)->second;
412 wxString strFileEnc = (*iterFileEncPtr)->second;
414 EscapeString(&strFileType, FALSE);
415 EscapeString(&strFileEnc, FALSE);
417 if (strIter->first == intSeekData){
419 strMainValue = strIter->second;
420 strMainValue.insert(0, wxT("data:") + strFileType + wxT(";") + strFileEnc + wxT(","));
424 if (*boolExtraPtr == TRUE){
426 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, strMainValue);
430 vCardData->AddRaw(strPropertyName, strMainValue);
434 boolExtraPtr = FALSE;
439 template<typename... Args>
440 void ProcessSaveData(wxString strPropertyName,
441 wxString *strPropertyInc,
442 bool *boolAdditionalInc, bool *boolExtraInc,
443 std::map<int,std::string>::iterator *iterDataInc,
444 std::map<int,std::string> *MainMapData,
445 std::map<int,wxString>::iterator *iterFileTypeInc,
446 std::map<int,wxString>::iterator *iterFileEncInc,
450 //int intSeekSelectedData = 0;
452 //DeleteMapDataProcess(IndexNum, Moo);
454 strPropertyPtr = strPropertyInc;
455 boolAdditionalPtr = boolAdditionalInc;
456 boolExtraPtr = boolExtraInc;
457 iterDataStringPtr = iterDataInc;
458 iterFileTypePtr = iterFileTypeInc;
459 iterFileEncPtr = iterFileEncInc;
461 ProcessSaveDataC(args...);
463 std::map<int,std::string>::iterator strIter;
464 wxString strMainValue;
466 int intSeekData = (*iterDataStringPtr)->first;
467 strIter = MainMapData->find(intSeekData);
469 wxString strFileType = (*iterFileTypePtr)->second;
470 wxString strFileEnc = (*iterFileEncPtr)->second;
472 EscapeString(&strFileType, FALSE);
473 EscapeString(&strFileEnc, FALSE);
475 if (strIter->first == intSeekData){
477 strMainValue = wxString::FromAscii(strIter->second.c_str());
478 strMainValue.insert(0, wxT("data:") + strFileType + wxT(";") + strFileEnc + wxT(","));
482 if (*boolExtraPtr == TRUE && !strPropertyPtr->IsEmpty()){
484 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, strMainValue);
488 vCardData->AddRaw(strPropertyName, strMainValue);
492 *boolExtraPtr = FALSE;
493 *boolAdditionalPtr = FALSE;
494 iterDataStringPtr = 0;
498 template<typename... Args>
499 void ProcessSaveData(wxString strPropertyName,
500 wxString *strPropertyInc,
501 bool *boolAdditionalInc, bool *boolExtraInc,
502 std::map<int,wxString>::iterator *iterDataInc,
503 std::map<int,wxString> *MainMapData,
507 //int intSeekSelectedData = 0;
509 //DeleteMapDataProcess(IndexNum, Moo);
510 strPropertyPtr = strPropertyInc;
511 boolAdditionalPtr = boolAdditionalInc;
512 boolExtraPtr = boolExtraInc;
513 iterDataPtr = iterDataInc;
514 ProcessSaveDataB(args...);
516 std::map<int,wxString>::iterator strIter;
517 wxString strMainValue;
519 int intSeekData = (*iterDataPtr)->first;
520 strIter = MainMapData->find(intSeekData);
522 if (strIter->first == intSeekData){
524 strMainValue = strIter->second;
528 EscapeString(&strMainValue, FALSE);
530 if (*boolExtraPtr == TRUE && !strPropertyPtr->IsEmpty()){
532 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, strMainValue);
536 vCardData->AddRaw(strPropertyName, strMainValue);
540 *boolExtraPtr = FALSE;
541 *boolAdditionalPtr = FALSE;
546 template<typename... Args>
547 void ProcessSaveData(wxString strPropertyName,
548 wxString *strPropertyInc,
549 bool *boolAdditionalInc, bool *boolExtraInc,
550 std::map<int,wxString>::iterator *iterDataInc,
555 //int intSeekSelectedData = 0;
557 //DeleteMapDataProcess(IndexNum, Moo);
558 strPropertyPtr = strPropertyInc;
559 boolAdditionalPtr = boolAdditionalInc;
560 boolExtraPtr = boolExtraInc;
561 iterDataPtr = iterDataInc;
563 ProcessSaveDataB(args...);
565 std::map<int,wxString>::iterator strIter;
567 if (*boolExtraPtr == TRUE && !strPropertyPtr->IsEmpty()){
569 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, *MainData);
573 vCardData->AddRaw(strPropertyName, *MainData);
577 *boolExtraPtr = FALSE;
578 *boolAdditionalPtr = FALSE;
583 void ProcessCaptureStringsB () {} ;
585 void ProcessCaptureStringsProc(wxString *strCapture);
587 template<typename StringCapture, typename... Args>
588 void ProcessCaptureStringsB(StringCapture *string, Args*... args) {
590 ProcessCaptureStringsProc(string);
591 ProcessCaptureStringsB(args...);
595 template<typename... Args>
596 void ProcessCaptureStrings(Args*... args) {
598 //int intSeekSelectedData = 0;
600 ProcessCaptureStringsB(args...);
604 void ResetSaveProcessData();
605 void ContactFileChanged( wxCommandEvent &event );
608 void LoadKind(ContactKindType *KindType);
609 void LoadBirthday(wxString *BirthdayData, bool *BirthdayText);
610 void LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText);
611 void LoadGender(wxString *GenderComponent, wxString *GenderIdentity);
612 void LoadName(wxString *NameTitle, wxString *NameForename,
613 wxString *NameSurname, wxString *NameOtherNames,
614 wxString *NameSuffix);
615 void LoadMember(std::map<int,wxString> *GroupList);
616 void LoadAddress(std::map<int, wxString> *GeneralAddressList,
617 std::map<int, wxString> *GeneralAddressListTown,
618 std::map<int, wxString> *GeneralAddressListCounty,
619 std::map<int, wxString> *GeneralAddressListPostCode,
620 std::map<int, int> *GeneralAddressListPref,
621 std::map<int, wxString> *HomeAddressList,
622 std::map<int, wxString> *HomeAddressListTown,
623 std::map<int, wxString> *HomeAddressListCounty,
624 std::map<int, wxString> *HomeAddressListPostCode,
625 std::map<int, int> *HomeAddressListPref,
626 std::map<int, wxString> *BusinessAddressList,
627 std::map<int, wxString> *BusinessAddressListTown,
628 std::map<int, wxString> *BusinessAddressListCounty,
629 std::map<int, wxString> *BusinessAddressListPostCode,
630 std::map<int, int> *BusinessAddressListPref,
633 void LoadData(std::map<int, wxString> *GeneralList,
634 std::map<int, int> *GeneralListPref,
635 wxListCtrl *GeneralListCtrl,
636 std::map<int, wxString> *HomeList,
637 std::map<int, int> *HomeListPref,
638 wxListCtrl *HomeListCtrl,
639 std::map<int, wxString> *BusinessList,
640 std::map<int, int> *BusinessTZPref,
641 wxListCtrl *BusinessListCtrl,
644 void LoadData(std::map<int, wxString> *GeneralList,
645 std::map<int, int> *GeneralListPref,
646 std::map<int, wxString> *GeneralListType,
647 wxListCtrl *GeneralListCtrl,
648 std::map<int, wxString> *HomeList,
649 std::map<int, int> *HomeListPref,
650 std::map<int, wxString> *HomeListType,
651 wxListCtrl *HomeListCtrl,
652 std::map<int, wxString> *BusinessList,
653 std::map<int, int> *BusinessListPref,
654 std::map<int, wxString> *BusinessListType,
655 wxListCtrl *BusinessListCtrl,
658 void LoadData(std::map<int,wxString> *ItemList,
659 std::map<int,int> *ItemListPref,
660 wxListCtrl *ItemCtrl,
663 void LoadData(std::map<int,wxString> *ItemList,
664 std::map<int,int> *ItemListPref,
665 std::map<int,wxString> *ItemListType,
666 wxListCtrl *ItemCtrl,
669 void LoadData(wxString ItemName,
670 std::map<int,wxString> *ItemList,
671 std::map<int,int> *ItemListPref,
672 std::map<int,wxString> *ItemListType,
673 std::map<int,wxString> *ItemListDataType,
674 wxListCtrl *ItemCtrl,
677 void LoadPictureData(wxString ItemName,
678 std::map<int,std::string> *ItemList,
679 std::map<int,int> *ItemListPref,
680 std::map<int,wxString> *ItemListType,
681 wxListCtrl *ItemCtrl,
684 void LoadVendorData(std::map<int,wxString> *ItemListPEN,
685 std::map<int,wxString> *ItemListElement,
686 wxListCtrl *ItemCtrl,
689 void LoadXTokenData(std::map<int,wxString> *ItemListTokens,
690 wxListCtrl *ItemCtrl,
693 void LoadData(std::map<int,wxString> *ItemList,
694 wxComboBox *ItemCtrl);
696 void LoadRelatedData(std::map<int,wxString> *ItemList,
697 std::map<int,int> *ItemListPref,
698 std::map<int,wxString> *ItemListType,
699 wxListCtrl *ItemCtrl,
702 int intValueSeek = 1;
703 bool IsGroup = FALSE;
705 /* Items on General Tab */
707 ContactDataObject ContactEditorData;
709 /* Items regarding account and filename */
711 wxString wxSContactFilename;
712 wxString wxSContactAccount;
713 bool boolContactModified;
714 int intSeekSelectedData;
716 /* Section for saving/loading data */
718 wxString *strPropertyPtr;
719 bool *boolAdditionalPtr;
721 std::map<int,wxString>::iterator *iterDataPtr = 0;
722 std::map<int,std::string>::iterator *iterDataStringPtr = 0;
723 std::map<int,wxString>::iterator *iterFileTypePtr = 0;
724 std::map<int,wxString>::iterator *iterFileEncPtr = 0;
727 wxString ETagOriginal;
733 bool boolValue = FALSE;
734 bool boolValue2 = FALSE;
738 bool BinaryDataProc = FALSE;
739 bool EditMode = FALSE;
740 bool StartupEditMode = FALSE;
741 bool DialogOpen = FALSE;
744 std::string base64dec;
745 sf::Sound AudioPlayback;
746 sf::SoundBuffer AudioBuffer;
750 std::string base64dec;
751 sf::Music AudioPlayback;
752 AudioStream AudioStreamPlayback;
753 sf::SoundBuffer AudioBuffer;
755 wxBitmap PictureImage;
758 void SplitValues(wxString *PropertyLine,
759 std::map<int,int> *SplitPoints,
760 std::map<int,int> *SplitLength,
764 frmActivityMgr *ActMgrPtr;
765 wxETagProcessTimer *ETagTmrPtr;
766 wxContactFileMonitorTimer FMTimer;
768 int ContactEditorUID;
770 DECLARE_EVENT_TABLE()
772 //// end generated class members
776 #endif // __frmContactEditor__