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 wxString strMainValue;
407 int intSeekData = (*iterDataStringPtr)->first;
408 strIter = MainMapData->find(intSeekData);
410 wxString strFileType = (*iterFileTypePtr)->second;
411 wxString strFileEnc = (*iterFileEncPtr)->second;
413 EscapeString(&strFileType, FALSE);
414 EscapeString(&strFileEnc, FALSE);
416 if (strIter->first == intSeekData){
418 strMainValue = strIter->second;
419 strMainValue.insert(0, wxT("data:") + strFileType + wxT(";") + strFileEnc + wxT(","));
423 if (*boolExtraPtr == TRUE){
425 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, strMainValue);
429 vCardData->AddRaw(strPropertyName, strMainValue);
433 boolExtraPtr = FALSE;
438 template<typename... Args>
439 void ProcessSaveData(wxString strPropertyName,
440 wxString *strPropertyInc,
441 bool *boolAdditionalInc, bool *boolExtraInc,
442 std::map<int,std::string>::iterator *iterDataInc,
443 std::map<int,std::string> *MainMapData,
444 std::map<int,wxString>::iterator *iterFileTypeInc,
445 std::map<int,wxString>::iterator *iterFileEncInc,
449 //int intSeekSelectedData = 0;
451 //DeleteMapDataProcess(IndexNum, Moo);
453 strPropertyPtr = strPropertyInc;
454 boolAdditionalPtr = boolAdditionalInc;
455 boolExtraPtr = boolExtraInc;
456 iterDataStringPtr = iterDataInc;
457 iterFileTypePtr = iterFileTypeInc;
458 iterFileEncPtr = iterFileEncInc;
460 ProcessSaveDataC(args...);
462 std::map<int,std::string>::iterator strIter;
463 wxString strMainValue;
465 int intSeekData = (*iterDataStringPtr)->first;
466 strIter = MainMapData->find(intSeekData);
468 wxString strFileType = (*iterFileTypePtr)->second;
469 wxString strFileEnc = (*iterFileEncPtr)->second;
471 EscapeString(&strFileType, FALSE);
472 EscapeString(&strFileEnc, FALSE);
474 if (strIter->first == intSeekData){
476 strMainValue = wxString::FromAscii(strIter->second.c_str());
477 strMainValue.insert(0, wxT("data:") + strFileType + wxT(";") + strFileEnc + wxT(","));
481 if (*boolExtraPtr == TRUE && !strPropertyPtr->IsEmpty()){
483 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, strMainValue);
487 vCardData->AddRaw(strPropertyName, strMainValue);
491 *boolExtraPtr = FALSE;
492 *boolAdditionalPtr = FALSE;
493 iterDataStringPtr = 0;
497 template<typename... Args>
498 void ProcessSaveData(wxString strPropertyName,
499 wxString *strPropertyInc,
500 bool *boolAdditionalInc, bool *boolExtraInc,
501 std::map<int,wxString>::iterator *iterDataInc,
502 std::map<int,wxString> *MainMapData,
506 //int intSeekSelectedData = 0;
508 //DeleteMapDataProcess(IndexNum, Moo);
509 strPropertyPtr = strPropertyInc;
510 boolAdditionalPtr = boolAdditionalInc;
511 boolExtraPtr = boolExtraInc;
512 iterDataPtr = iterDataInc;
513 ProcessSaveDataB(args...);
515 std::map<int,wxString>::iterator strIter;
516 wxString strMainValue;
518 int intSeekData = (*iterDataPtr)->first;
519 strIter = MainMapData->find(intSeekData);
521 if (strIter->first == intSeekData){
523 strMainValue = strIter->second;
527 EscapeString(&strMainValue, FALSE);
529 if (*boolExtraPtr == TRUE && !strPropertyPtr->IsEmpty()){
531 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, strMainValue);
535 vCardData->AddRaw(strPropertyName, strMainValue);
539 *boolExtraPtr = FALSE;
540 *boolAdditionalPtr = FALSE;
545 template<typename... Args>
546 void ProcessSaveData(wxString strPropertyName,
547 wxString *strPropertyInc,
548 bool *boolAdditionalInc, bool *boolExtraInc,
549 std::map<int,wxString>::iterator *iterDataInc,
554 //int intSeekSelectedData = 0;
556 //DeleteMapDataProcess(IndexNum, Moo);
557 strPropertyPtr = strPropertyInc;
558 boolAdditionalPtr = boolAdditionalInc;
559 boolExtraPtr = boolExtraInc;
560 iterDataPtr = iterDataInc;
562 ProcessSaveDataB(args...);
564 std::map<int,wxString>::iterator strIter;
566 if (*boolExtraPtr == TRUE && !strPropertyPtr->IsEmpty()){
568 vCardData->AddRaw(strPropertyName + wxT(";") + *strPropertyPtr, *MainData);
572 vCardData->AddRaw(strPropertyName, *MainData);
576 *boolExtraPtr = FALSE;
577 *boolAdditionalPtr = FALSE;
582 void ProcessCaptureStringsB () {} ;
584 void ProcessCaptureStringsProc(wxString *strCapture);
586 template<typename StringCapture, typename... Args>
587 void ProcessCaptureStringsB(StringCapture *string, Args*... args) {
589 ProcessCaptureStringsProc(string);
590 ProcessCaptureStringsB(args...);
594 template<typename... Args>
595 void ProcessCaptureStrings(Args*... args) {
597 //int intSeekSelectedData = 0;
599 ProcessCaptureStringsB(args...);
603 void ResetSaveProcessData();
604 void ContactFileChanged( wxCommandEvent &event );
607 void LoadKind(ContactKindType *KindType);
608 void LoadBirthday(wxString *BirthdayData, bool *BirthdayText);
609 void LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText);
610 void LoadGender(wxString *GenderComponent, wxString *GenderIdentity);
611 void LoadName(wxString *NameTitle, wxString *NameForename,
612 wxString *NameSurname, wxString *NameOtherNames,
613 wxString *NameSuffix);
614 void LoadMember(std::map<int,wxString> *GroupList);
615 void LoadAddress(std::map<int, wxString> *GeneralAddressList,
616 std::map<int, wxString> *GeneralAddressListTown,
617 std::map<int, wxString> *GeneralAddressListCounty,
618 std::map<int, wxString> *GeneralAddressListPostCode,
619 std::map<int, int> *GeneralAddressListPref,
620 std::map<int, wxString> *HomeAddressList,
621 std::map<int, wxString> *HomeAddressListTown,
622 std::map<int, wxString> *HomeAddressListCounty,
623 std::map<int, wxString> *HomeAddressListPostCode,
624 std::map<int, int> *HomeAddressListPref,
625 std::map<int, wxString> *BusinessAddressList,
626 std::map<int, wxString> *BusinessAddressListTown,
627 std::map<int, wxString> *BusinessAddressListCounty,
628 std::map<int, wxString> *BusinessAddressListPostCode,
629 std::map<int, int> *BusinessAddressListPref,
632 void LoadData(std::map<int, wxString> *GeneralList,
633 std::map<int, int> *GeneralListPref,
634 wxListCtrl *GeneralListCtrl,
635 std::map<int, wxString> *HomeList,
636 std::map<int, int> *HomeListPref,
637 wxListCtrl *HomeListCtrl,
638 std::map<int, wxString> *BusinessList,
639 std::map<int, int> *BusinessTZPref,
640 wxListCtrl *BusinessListCtrl,
643 void LoadData(std::map<int, wxString> *GeneralList,
644 std::map<int, int> *GeneralListPref,
645 std::map<int, wxString> *GeneralListType,
646 wxListCtrl *GeneralListCtrl,
647 std::map<int, wxString> *HomeList,
648 std::map<int, int> *HomeListPref,
649 std::map<int, wxString> *HomeListType,
650 wxListCtrl *HomeListCtrl,
651 std::map<int, wxString> *BusinessList,
652 std::map<int, int> *BusinessListPref,
653 std::map<int, wxString> *BusinessListType,
654 wxListCtrl *BusinessListCtrl,
657 void LoadData(std::map<int,wxString> *ItemList,
658 std::map<int,int> *ItemListPref,
659 wxListCtrl *ItemCtrl,
662 void LoadData(std::map<int,wxString> *ItemList,
663 std::map<int,int> *ItemListPref,
664 std::map<int,wxString> *ItemListType,
665 wxListCtrl *ItemCtrl,
668 void LoadData(wxString ItemName,
669 std::map<int,wxString> *ItemList,
670 std::map<int,int> *ItemListPref,
671 std::map<int,wxString> *ItemListType,
672 std::map<int,wxString> *ItemListDataType,
673 wxListCtrl *ItemCtrl,
676 void LoadPictureData(wxString ItemName,
677 std::map<int,std::string> *ItemList,
678 std::map<int,int> *ItemListPref,
679 std::map<int,wxString> *ItemListType,
680 wxListCtrl *ItemCtrl,
683 void LoadVendorData(std::map<int,wxString> *ItemListPEN,
684 std::map<int,wxString> *ItemListElement,
685 wxListCtrl *ItemCtrl,
688 void LoadXTokenData(std::map<int,wxString> *ItemListTokens,
689 wxListCtrl *ItemCtrl,
692 void LoadData(std::map<int,wxString> *ItemList,
693 wxComboBox *ItemCtrl);
695 void LoadRelatedData(std::map<int,wxString> *ItemList,
696 std::map<int,int> *ItemListPref,
697 std::map<int,wxString> *ItemListType,
698 wxListCtrl *ItemCtrl,
701 int intValueSeek = 1;
702 bool IsGroup = FALSE;
704 /* Items on General Tab */
706 ContactDataObject ContactEditorData;
708 /* Items regarding account and filename */
710 wxString wxSContactFilename;
711 wxString wxSContactAccount;
712 bool boolContactModified;
713 int intSeekSelectedData;
715 /* Section for saving/loading data */
717 wxString *strPropertyPtr;
718 bool *boolAdditionalPtr;
720 std::map<int,wxString>::iterator *iterDataPtr = 0;
721 std::map<int,std::string>::iterator *iterDataStringPtr = 0;
722 std::map<int,wxString>::iterator *iterFileTypePtr = 0;
723 std::map<int,wxString>::iterator *iterFileEncPtr = 0;
726 wxString ETagOriginal;
732 bool boolValue = FALSE;
733 bool boolValue2 = FALSE;
737 bool BinaryDataProc = FALSE;
738 bool EditMode = FALSE;
739 bool StartupEditMode = FALSE;
740 bool DialogOpen = FALSE;
743 std::string base64dec;
744 sf::Sound AudioPlayback;
745 sf::SoundBuffer AudioBuffer;
749 std::string base64dec;
750 sf::Music AudioPlayback;
751 AudioStream AudioStreamPlayback;
752 sf::SoundBuffer AudioBuffer;
754 wxBitmap PictureImage;
757 void SplitValues(wxString *PropertyLine,
758 std::map<int,int> *SplitPoints,
759 std::map<int,int> *SplitLength,
763 frmActivityMgr *ActMgrPtr;
764 wxETagProcessTimer *ETagTmrPtr;
765 wxContactFileMonitorTimer FMTimer;
767 int ContactEditorUID;
769 DECLARE_EVENT_TABLE()
771 //// end generated class members
775 #endif // __frmContactEditor__