+
+ this->Layout();
+
+}
+
+std::vector<int> XCCalendarList::GetHiddenAccountsList(){
+
+ std::vector<int> accountList;
+
+ // Go through each of the account controls and work
+ // out which entries should be hidden based on account.
+
+ for (std::vector<XCCalendarListAccountCtrl*>::iterator accountListIter = accountControlList.begin();
+ accountListIter != accountControlList.end(); accountListIter++){
+
+ if ((*accountListIter)->GetShowCheckboxState() == wxCHK_UNCHECKED){
+
+ accountList.push_back((*accountListIter)->GetAccountID());
+
+ }
+
+ }
+
+ return accountList;
+
+}
+
+std::vector<int> XCCalendarList::GetHiddenCalendarsList(){
+
+ std::vector<int> calendarList;
+
+ // Go through each of the calendar controls and
+ // work out which entries should be hidden based on
+ // calendar.
+
+ for (std::vector<XCCalendarListAccountCtrl*>::iterator accountListIter = accountControlList.begin();
+ accountListIter != accountControlList.end(); accountListIter++){
+
+ // Get the list of hidden calendars.
+
+ vector<int> calendarHiddenList = (*accountListIter)->GetHiddenCalendarList();
+
+ for (vector<int>::iterator calendarHiddenIter = calendarHiddenList.begin();
+ calendarHiddenIter != calendarHiddenList.end(); calendarHiddenIter++){
+
+ vector<int>::iterator calendarHiddenFind = find(calendarList.begin(), calendarList.end(), *calendarHiddenIter);
+
+ if (calendarHiddenFind == calendarList.end()){
+
+ calendarList.push_back(*calendarHiddenIter);
+
+ }
+
+ }
+
+ }
+
+ return calendarList;