Bind(XCCALENDARMONTH_UPDATECALENDARCOLOUR, &XCCalendarMonthView::UpdateCalendarColour, this, ID_UPDATECOLOUR);
}
-XCCalendarMonthView::XCCalendarMonthView(XCCalendarMonthViewGrid *grid, CalendarDataStorage *dataStorage, std::vector<int> *hideAccounts, std::vector<int> *hideCalendars)
- : wxPanel(NULL, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL){
-
- Connect(ID_MONTHVIEWCLEARSELECTION, XCCALENDARMONTH_DESELECTOTHERENTRIES, wxCommandEventHandler(XCCalendarMonthView::DeselectOthersEvent));
-
- calendarStorage = dataStorage;
-
- mondayText = new XCCalendarMonthViewDayTitle(this, _("Monday"), wxDefaultPosition, wxDefaultSize);
- tuesdayText = new XCCalendarMonthViewDayTitle(this, _("Tuesday"), wxDefaultPosition, wxDefaultSize);
- wednesdayText = new XCCalendarMonthViewDayTitle(this, _("Wednesday"), wxDefaultPosition, wxDefaultSize);
- thursdayText = new XCCalendarMonthViewDayTitle(this, _("Thursday"), wxDefaultPosition, wxDefaultSize);
- fridayText = new XCCalendarMonthViewDayTitle(this, _("Friday"), wxDefaultPosition, wxDefaultSize);
- saturdayText = new XCCalendarMonthViewDayTitle(this, _("Saturday"), wxDefaultPosition, wxDefaultSize);
- sundayText = new XCCalendarMonthViewDayTitle(this, _("Sunday"), wxDefaultPosition, wxDefaultSize);
-
- windowSizer->Add(mondayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(tuesdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(wednesdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(thursdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(fridayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(saturdayText, 1, wxEXPAND|wxALL, 0);
- windowSizer->Add(sundayText, 1, wxEXPAND|wxALL, 0);
-
- ProcessGrid(grid, hideAccounts, hideCalendars);
-
- // Setup the days.
-
- // Setup the growable rows and columns.
-
- windowSizer->AddGrowableCol(0);
- windowSizer->AddGrowableCol(1);
- windowSizer->AddGrowableCol(2);
- windowSizer->AddGrowableCol(3);
- windowSizer->AddGrowableCol(4);
- windowSizer->AddGrowableCol(5);
- windowSizer->AddGrowableCol(6);
- windowSizer->SetFlexibleDirection( wxBOTH );
- windowSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-
- this->SetSizer(windowSizer);
- windowSizer->Fit(this);
- this->Layout();
- this->SetBackgroundColour(wxColour(0,0,0));
-
-}
-
XCCalendarMonthView::~XCCalendarMonthView(){
delete mondayText;