Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added copyright and license header to the C++ source and header files in the contacte...
[xestiaab/.git] / source / contacteditor / frmContactEditor-Reset.cpp
1 // frmContactEditor-Reset.cpp - frmContactEditor form reset subroutines.
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 #include "frmContactEditor.h"
21 void frmContactEditor::ClearContact(){
22     
23     // Clear out the GUI and values.
24     
25     // Clear GUI.
26     
27     txtTitle->Clear();
28     txtForename->Clear();
29     txtSurname->Clear();
30     txtOtherNames->Clear();
31     txtSuffix->Clear();
32     cmbDisplayAs->Clear();
33     cmbDisplayAs->SetValue(wxT(""));
34     wxDateTime EmptyDate;
35     wxBitmap EmptyBitmap;
36     dapAnniversary->SetValue(EmptyDate);
37     dapBirthday->SetValue(EmptyDate);
38     txtBirthday->Clear();
39     txtAnniversary->Clear();
40     cmbGender->Select(0);
41     txtGenderDescription->Clear();
42     
43     lboNicknames->DeleteAllItems();
44     lboHomeNicknames->DeleteAllItems();
45     lboBusinessNicknames->DeleteAllItems();
46     
47     lboAddresses->DeleteAllItems();
48     lboHomeAddresses->DeleteAllItems();
49     lboBusinessAddresses->DeleteAllItems();
50     
51     lboEmails->DeleteAllItems();
52     lboHomeEmails->DeleteAllItems();
53     lboBusinessEmail->DeleteAllItems();
54     
55     lboIM->DeleteAllItems();
56     lboHomeIM->DeleteAllItems();
57     lboBusinessIM->DeleteAllItems();
58     
59     lboTelephone->DeleteAllItems();
60     lboHomeTelephone->DeleteAllItems();
61     lboBusinessTelephone->DeleteAllItems();
62     
63     lboLanguages->DeleteAllItems();
64     lboHomeLanguages->DeleteAllItems();
65     lboBusinessLanguages->DeleteAllItems();
66     
67     lboTimezones->DeleteAllItems();
68     lboHomeTimezones->DeleteAllItems();
69     lboBusinessTimezones->DeleteAllItems();
70     
71     lboGeoposition->DeleteAllItems();
72     lboHomeGeoposition->DeleteAllItems();
73     lboBusinessGeoposition->DeleteAllItems();
74     
75     lboRelated->DeleteAllItems();
76     
77     lboWebsites->DeleteAllItems();
78     lboHomeWebsites->DeleteAllItems();
79     lboBusinessWebsites->DeleteAllItems();
80     
81     lboTitles->DeleteAllItems();
82     lboHomeTitles->DeleteAllItems();
83     lboBusinessTitles->DeleteAllItems();
84     
85     lboRoles->DeleteAllItems();
86     lboHomeRoles->DeleteAllItems();
87     lboBusinessRoles->DeleteAllItems();
88     
89     lboOrganisations->DeleteAllItems();
90     lboHomeOrganisations->DeleteAllItems();
91     lboBusinessOrganisations->DeleteAllItems();
92     
93     lboNotes->DeleteAllItems();
94     lboHomeNotes->DeleteAllItems();
95     lboBusinessNotes->DeleteAllItems();
96     
97     lboCategories->DeleteAllItems();
98     
99     lboGroups->DeleteAllItems();
100     
101     // Clear Picture
102     lboPictures->DeleteAllItems();
103     imgPicture->SetBitmap(EmptyBitmap);
104     
105     // Clear Logo
106     lboLogos->DeleteAllItems();
107     imgLogo->SetBitmap(EmptyBitmap);
108     
109     lboSounds->DeleteAllItems();
110     
111     lboCalendarAddresses->DeleteAllItems();
112     lboCalendarRequestAddress->DeleteAllItems();
113     lboFreeBusyAddresses->DeleteAllItems();
114     
115     lboKeys->DeleteAllItems();
116     
117     lboVendorNamespace->DeleteAllItems();
118     lboXToken->DeleteAllItems();
119     
120     // Clear values out.
121     
122     wxString NameTitle;
123     wxString NameForename;
124     wxString NameSurname;
125     wxString NameOtherNames;
126     wxString NameSuffix;
127     wxString NameNickname;
128     wxString NameDisplayAs;
129     wxString NameLanguage;
130     wxString NameAltID;
131     wxString NameTokens;
132     
133     wxString Birthday;
134     wxString BirthdayAltID;
135     wxString BirthdayCalScale;
136     wxString BirthdayTokens;
137     wxString Anniversary;
138     wxString AnniversaryAltID;
139     wxString AnniversaryCalScale;
140     wxString AnniversaryTokens;
141     
142     wxString Gender;
143     wxString GenderDetails;
144     wxString GenderTokens;
145     
146     wxString UIDToken;
147     
148     /* We don't use these at the moment but we want to keep
149      them for compatability reasons */
150     
151     /*std::map<int, wxString> ExtraFullNames;*/
152     /*std::map<int, wxString> ExtraNicknames;*/
153     
154     FullNamesList.clear();    
155     FullNamesListType.clear();
156     FullNamesListLanguage.clear();
157     FullNamesListAltID.clear();
158     FullNamesListPID.clear();
159     FullNamesListTokens.clear();
160     FullNamesListPref.clear();
161     
162     GeneralNicknamesList.clear();
163     GeneralNicknamesListType.clear();
164     GeneralNicknamesListLanguage.clear();
165     GeneralNicknamesListAltID.clear();
166     GeneralNicknamesListPID.clear();
167     GeneralNicknamesListTokens.clear();        
168     GeneralNicknamesListPref.clear();        
169     
170     GeneralAddressList.clear();
171     GeneralAddressListTown.clear();
172     GeneralAddressListCounty.clear();
173     GeneralAddressListPostCode.clear();
174     GeneralAddressListCountry.clear();
175     GeneralAddressListLabel.clear();
176     GeneralAddressListLang.clear();        
177     GeneralAddressListAltID.clear();
178     GeneralAddressListPID.clear();
179     GeneralAddressListTokens.clear();
180     GeneralAddressListGeo.clear();
181     GeneralAddressListTimezone.clear();        
182     GeneralAddressListType.clear();
183     GeneralAddressListMediatype.clear();
184     GeneralAddressListPref.clear();
185     
186     GeneralEmailList.clear();
187     GeneralEmailListAltID.clear();
188     GeneralEmailListPID.clear();
189     GeneralEmailListType.clear();
190     GeneralEmailListTokens.clear();
191     GeneralEmailListPref.clear();
192     
193     GeneralIMList.clear();
194     GeneralIMListAltID.clear();
195     GeneralIMListPID.clear();
196     GeneralIMListType.clear();
197     GeneralIMListTokens.clear();
198     GeneralIMListMediatype.clear();
199     GeneralIMListPref.clear();
200     
201     GeneralTelephoneList.clear();
202     GeneralTelephoneListAltID.clear();
203     GeneralTelephoneListPID.clear();
204     GeneralTelephoneListType.clear();
205     GeneralTelephoneListTokens.clear();
206     GeneralTelephoneListPref.clear();
207     
208     GeneralLanguageList.clear();
209     GeneralLanguageListAltID.clear();
210     GeneralLanguageListPID.clear();
211     GeneralLanguageListType.clear();
212     GeneralLanguageListTokens.clear();
213     GeneralLanguageListPref.clear();
214     
215     GeneralTZList.clear();
216     GeneralTZListAltID.clear();
217     GeneralTZListPID.clear();
218     GeneralTZListType.clear();
219     GeneralTZListTokens.clear();
220     GeneralTZListMediatype.clear();
221     GeneralTZListPref.clear();
222     
223     GeneralGeographyList.clear();
224     GeneralGeographyListAltID.clear();
225     GeneralGeographyListPID.clear();
226     GeneralGeographyListType.clear();
227     GeneralGeographyListTokens.clear();
228     GeneralGeographyListMediatype.clear();
229     GeneralGeographyListPref.clear();
230     
231     GeneralRelatedList.clear();
232     GeneralRelatedListRelType.clear();
233     GeneralRelatedListLanguage.clear();
234     GeneralRelatedListAltID.clear();
235     GeneralRelatedListPID.clear();
236     GeneralRelatedListType.clear();
237     GeneralRelatedListTokens.clear();
238     GeneralRelatedListPref.clear();
239     
240     GeneralWebsiteList.clear();
241     GeneralWebsiteListAltID.clear();
242     GeneralWebsiteListPID.clear();
243     GeneralWebsiteListType.clear();
244     GeneralWebsiteListTokens.clear();
245     GeneralWebsiteListMediatype.clear();
246     GeneralWebsiteListPref.clear();
247     
248     GeneralTitleList.clear();
249     GeneralTitleListLanguage.clear();        
250     GeneralTitleListAltID.clear();
251     GeneralTitleListPID.clear();
252     GeneralTitleListType.clear();
253     GeneralTitleListTokens.clear();
254     GeneralTitleListPref.clear();
255     
256     GeneralRoleList.clear();
257     GeneralRoleListLanguage.clear();        
258     GeneralRoleListAltID.clear();
259     GeneralRoleListPID.clear();
260     GeneralRoleListType.clear();
261     GeneralRoleListTokens.clear();
262     GeneralRoleListPref.clear();
263     
264     GeneralOrganisationsList.clear();
265     GeneralOrganisationsListLanguage.clear();        
266     GeneralOrganisationsListAltID.clear();
267     GeneralOrganisationsListPID.clear();
268     GeneralOrganisationsListType.clear();
269     GeneralOrganisationsListTokens.clear();
270     GeneralOrganisationsListSortAs.clear();
271     GeneralOrganisationsListPref.clear();
272     
273     GeneralNoteList.clear();
274     GeneralNoteListLanguage.clear();        
275     GeneralNoteListAltID.clear();
276     GeneralNoteListPID.clear();
277     GeneralNoteListType.clear();
278     GeneralNoteListTokens.clear();
279     GeneralNoteListPref.clear();
280     
281     /* Items on Home Tab */        
282     
283     HomeNicknamesList.clear();
284     HomeNicknamesListType.clear();
285     HomeNicknamesListLanguage.clear();
286     HomeNicknamesListAltID.clear();
287     HomeNicknamesListPID.clear();
288     HomeNicknamesListTokens.clear();        
289     HomeNicknamesListPref.clear();        
290     
291     HomeAddressList.clear();
292     HomeAddressListTown.clear();
293     HomeAddressListCounty.clear();
294     HomeAddressListPostCode.clear();
295     HomeAddressListCountry.clear();
296     HomeAddressListLabel.clear();
297     HomeAddressListLang.clear();        
298     HomeAddressListAltID.clear();
299     HomeAddressListPID.clear();
300     HomeAddressListTokens.clear();
301     HomeAddressListGeo.clear();
302     HomeAddressListTimezone.clear();        
303     HomeAddressListType.clear();
304     HomeAddressListMediatype.clear();
305     HomeAddressListPref.clear();
306     
307     HomeEmailList.clear();
308     HomeEmailListAltID.clear();
309     HomeEmailListPID.clear();
310     HomeEmailListType.clear();
311     HomeEmailListTokens.clear();
312     HomeEmailListPref.clear();
313     
314     HomeIMList.clear();
315     HomeIMListAltID.clear();
316     HomeIMListPID.clear();
317     HomeIMListType.clear();
318     HomeIMListTokens.clear();
319     HomeIMListMediatype.clear();
320     HomeIMListPref.clear();
321     
322     HomeTelephoneList.clear();
323     HomeTelephoneListAltID.clear();
324     HomeTelephoneListPID.clear();
325     HomeTelephoneListType.clear();
326     HomeTelephoneListTokens.clear();
327     HomeTelephoneListPref.clear();
328     
329     HomeLanguageList.clear();
330     HomeLanguageListAltID.clear();
331     HomeLanguageListPID.clear();
332     HomeLanguageListType.clear();
333     HomeLanguageListTokens.clear();
334     HomeLanguageListPref.clear();
335     
336     HomeTZList.clear();
337     HomeTZListAltID.clear();
338     HomeTZListPID.clear();
339     HomeTZListType.clear();
340     HomeTZListTokens.clear();
341     HomeTZListMediatype.clear();
342     HomeTZListPref.clear();
343     
344     HomeGeographyList.clear();
345     HomeGeographyListAltID.clear();
346     HomeGeographyListPID.clear();
347     HomeGeographyListType.clear();
348     HomeGeographyListTokens.clear();
349     HomeGeographyListMediatype.clear();
350     HomeGeographyListPref.clear();
351     
352     HomeRelatedList.clear();
353     HomeRelatedListRelType.clear();
354     HomeRelatedListLanguage.clear();
355     HomeRelatedListAltID.clear();
356     HomeRelatedListPID.clear();
357     HomeRelatedListType.clear();
358     HomeRelatedListTokens.clear();
359     HomeRelatedListPref.clear();        
360     
361     HomeWebsiteList.clear();
362     HomeWebsiteListAltID.clear();
363     HomeWebsiteListPID.clear();
364     HomeWebsiteListType.clear();
365     HomeWebsiteListTokens.clear();
366     HomeWebsiteListMediatype.clear();
367     HomeWebsiteListPref.clear();
368     
369     HomeTitleList.clear();
370     HomeTitleListLanguage.clear();
371     HomeTitleListAltID.clear();
372     HomeTitleListPID.clear();
373     HomeTitleListType.clear();
374     HomeTitleListTokens.clear();
375     HomeTitleListPref.clear();
376     
377     HomeRoleList.clear();
378     HomeRoleListLanguage.clear();        
379     HomeRoleListAltID.clear();
380     HomeRoleListPID.clear();
381     HomeRoleListType.clear();
382     HomeRoleListTokens.clear();
383     HomeRoleListPref.clear();
384     
385     HomeOrganisationsList.clear();
386     HomeOrganisationsListLanguage.clear();        
387     HomeOrganisationsListAltID.clear();
388     HomeOrganisationsListPID.clear();
389     HomeOrganisationsListType.clear();
390     HomeOrganisationsListTokens.clear();
391     HomeOrganisationsListSortAs.clear();
392     HomeOrganisationsListPref.clear();
393     
394     HomeNoteList.clear();
395     HomeNoteListLanguage.clear();        
396     HomeNoteListAltID.clear();
397     HomeNoteListPID.clear();
398     HomeNoteListType.clear();
399     HomeNoteListTokens.clear();
400     HomeNoteListPref.clear();        
401     
402     /* Items on the Business tab */
403     
404     BusinessNicknamesList.clear();
405     BusinessNicknamesListType.clear();
406     BusinessNicknamesListLanguage.clear();
407     BusinessNicknamesListAltID.clear();
408     BusinessNicknamesListPID.clear();
409     BusinessNicknamesListTokens.clear();        
410     BusinessNicknamesListPref.clear();        
411     
412     BusinessAddressList.clear();
413     BusinessAddressListTown.clear();
414     BusinessAddressListCounty.clear();
415     BusinessAddressListPostCode.clear();
416     BusinessAddressListCountry.clear();
417     BusinessAddressListLabel.clear();
418     BusinessAddressListLang.clear();        
419     BusinessAddressListAltID.clear();
420     BusinessAddressListPID.clear();
421     BusinessAddressListTokens.clear();
422     BusinessAddressListGeo.clear();
423     BusinessAddressListTimezone.clear();        
424     BusinessAddressListType.clear();
425     BusinessAddressListMediatype.clear();
426     BusinessAddressListPref.clear();
427     
428     BusinessEmailList.clear();
429     BusinessEmailListAltID.clear();
430     BusinessEmailListPID.clear();
431     BusinessEmailListType.clear();
432     BusinessEmailListTokens.clear();
433     BusinessEmailListPref.clear();
434     
435     BusinessIMList.clear();
436     BusinessIMListAltID.clear();
437     BusinessIMListPID.clear();
438     BusinessIMListType.clear();
439     BusinessIMListTokens.clear();
440     BusinessIMListMediatype.clear();
441     BusinessIMListPref.clear();
442     
443     BusinessTelephoneList.clear();
444     BusinessTelephoneListAltID.clear();
445     BusinessTelephoneListPID.clear();
446     BusinessTelephoneListType.clear();
447     BusinessTelephoneListTokens.clear();
448     BusinessTelephoneListPref.clear();
449     
450     BusinessLanguageList.clear();
451     BusinessLanguageListAltID.clear();
452     BusinessLanguageListPID.clear();
453     BusinessLanguageListType.clear();
454     BusinessLanguageListTokens.clear();
455     BusinessLanguageListPref.clear();
456     
457     BusinessTZList.clear();
458     BusinessTZListAltID.clear();
459     BusinessTZListPID.clear();
460     BusinessTZListType.clear();
461     BusinessTZListTokens.clear();
462     BusinessTZListMediatype.clear();
463     BusinessTZListPref.clear();
464     
465     BusinessGeographyList.clear();
466     BusinessGeographyListAltID.clear();
467     BusinessGeographyListPID.clear();
468     BusinessGeographyListType.clear();
469     BusinessGeographyListTokens.clear();
470     BusinessGeographyListMediatype.clear();
471     BusinessGeographyListPref.clear();
472     
473     BusinessRelatedList.clear();
474     BusinessRelatedListRelType.clear();
475     BusinessRelatedListLanguage.clear();
476     BusinessRelatedListAltID.clear();
477     BusinessRelatedListPID.clear();
478     BusinessRelatedListType.clear();
479     BusinessRelatedListTokens.clear();
480     BusinessRelatedListPref.clear();            
481     
482     BusinessWebsiteList.clear();
483     BusinessWebsiteListAltID.clear();
484     BusinessWebsiteListPID.clear();
485     BusinessWebsiteListType.clear();
486     BusinessWebsiteListTokens.clear();
487     BusinessWebsiteListMediatype.clear();
488     BusinessWebsiteListPref.clear();
489     
490     BusinessTitleList.clear();
491     BusinessTitleListLanguage.clear();        
492     BusinessTitleListAltID.clear();
493     BusinessTitleListPID.clear();
494     BusinessTitleListType.clear();
495     BusinessTitleListTokens.clear();
496     BusinessTitleListPref.clear();
497     
498     BusinessRoleList.clear();
499     BusinessRoleListLanguage.clear();        
500     BusinessRoleListAltID.clear();
501     BusinessRoleListPID.clear();
502     BusinessRoleListType.clear();
503     BusinessRoleListTokens.clear();
504     BusinessRoleListPref.clear();
505     
506     BusinessOrganisationsList.clear();
507     BusinessOrganisationsListLanguage.clear();        
508     BusinessOrganisationsListAltID.clear();
509     BusinessOrganisationsListPID.clear();
510     BusinessOrganisationsListType.clear();
511     BusinessOrganisationsListTokens.clear();
512     BusinessOrganisationsListSortAs.clear();        
513     BusinessOrganisationsListPref.clear();
514     
515     BusinessNoteList.clear();
516     BusinessNoteListLanguage.clear();        
517     BusinessNoteListAltID.clear();
518     BusinessNoteListPID.clear();
519     BusinessNoteListType.clear();
520     BusinessNoteListTokens.clear();
521     BusinessNoteListPref.clear();        
522     
523     /* Items on the Categories tab */
524     
525     CategoriesList.clear();
526     CategoriesListAltID.clear();
527     CategoriesListPID.clear();
528     CategoriesListType.clear();
529     CategoriesListTokens.clear();
530     CategoriesListPref.clear();    
531     
532     /* Items on the Groups tab */
533     
534     GroupsList.clear();
535     GroupsListAltID.clear();
536     GroupsListPID.clear();
537     GroupsListType.clear();
538     GroupsListTokens.clear();
539     GroupsListPref.clear();
540     
541     /* Items on the Pictures tab */
542     
543     PicturesList.clear();
544     PicturesListAltID.clear();
545     PicturesListPID.clear();
546     PicturesListType.clear();
547     PicturesListPicEncType.clear();
548     PicturesListPictureType.clear();
549     PicturesListTokens.clear();
550     PicturesListMediatype.clear();        
551     PicturesListPref.clear();
552     
553     /* Items on the Logos tab */
554     
555     LogosList.clear();
556     LogosListAltID.clear();
557     LogosListPID.clear();
558     LogosListType.clear();
559     LogosListPicEncType.clear();        
560     LogosListPictureType.clear();
561     LogosListTokens.clear();
562     LogosListMediatype.clear();        
563     LogosListPref.clear();
564     
565     /* Items on the Sounds tab */
566     
567     SoundsList.clear();
568     SoundsListAltID.clear();
569     SoundsListPID.clear();
570     SoundsListType.clear();
571     SoundsListAudioEncType.clear();        
572     SoundsListAudioType.clear();        
573     SoundsListTokens.clear();
574     SoundsListMediatype.clear();        
575     SoundsListPref.clear();    
576     
577     /* Items on the Calendaring tab */
578     
579     CalendarList.clear();
580     CalendarListAltID.clear();
581     CalendarListPID.clear();
582     CalendarListType.clear();
583     CalendarListTokens.clear();
584     CalendarListMediatype.clear();        
585     CalendarListPref.clear();
586     
587     CalendarRequestList.clear();
588     CalendarRequestListAltID.clear();
589     CalendarRequestListPID.clear();
590     CalendarRequestListType.clear();
591     CalendarRequestListTokens.clear();
592     CalendarRequestListMediatype.clear();        
593     CalendarRequestListPref.clear();        
594     
595     FreeBusyList.clear();
596     FreeBusyListAltID.clear();
597     FreeBusyListPID.clear();
598     FreeBusyListType.clear();
599     FreeBusyListTokens.clear();
600     FreeBusyListMediatype.clear();        
601     FreeBusyListPref.clear();
602     
603     /* Items on the Security tab */
604     
605     KeyList.clear();
606     KeyListAltID.clear();
607     KeyListPID.clear();
608     KeyListKeyType.clear();        
609     KeyListDataType.clear();        
610     KeyListDataEncType.clear();
611     KeyListType.clear();
612     KeyListTokens.clear();
613     KeyListPref.clear();
614     
615     /* Items on the Other tab */
616     
617     VendorList.clear();
618     VendorListPEN.clear();
619     VendorListElement.clear();
620     
621     XTokenList.clear();        
622     XTokenListTokens.clear();
623     
624     wxSContactFilename.Clear();
625     boolContactModified = FALSE;
626     intSeekSelectedData = 0;
627     
628     /* Section for saving/loading data */
629     
630     ETag.Clear();
631     ETagOriginal.Clear();
632     
633     strValue.Clear();
634     strValue2.Clear();
635     strValue3.Clear();
636     
637     boolValue = FALSE;
638     boolValue2 = FALSE;
639     intValue = 0;
640     intValue2 = 0;
641     intValue3 = 0;
642     BinaryDataProc = FALSE;
643     EditMode = TRUE;
644     DialogOpen = FALSE;
645     
646     PictureImage = wxNullBitmap;
647     LogoImage = wxNullBitmap;
648     
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