: wxPanel(parent, wxID_ANY, pos, size, wxTAB_TRAVERSAL, title){
szrMain = new wxBoxSizer( wxVERTICAL );
pnlMain = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(500, 50), wxTAB_TRAVERSAL);
+#if defined(__APPLE__)
+ pnlMain->SetBackgroundColour(wxColour(120,120,120));
+#else
pnlMain->SetBackgroundColour(wxColour(40,40,40));
+#endif
this->SetSizer(szrMain);
szrMain->Add(pnlMain, 0, wxEXPAND, 0);
wxDateTime dtNow = wxDateTime::Now();
-#if defined(WIN32)
+#if defined(WIN32) || defined(__APPLE__)
moo = new frmCalendarSelectMonth(this);
#else
moo = new XCCalendarMonthSelect(this);
// Bring up a popup control to select the month and year.
- // TODO: Do something different for Win32.
+ // Do something different for Win32 and macOS.
moo->SetPosition(wxPoint(dateButton->GetScreenRect().GetLeft(), dateButton->GetScreenRect().GetBottom()));
moo->UpdateDate(month, year);
-#if defined(WIN32)
+#if defined(WIN32) || defined(__APPLE__)
moo->ShowModal();
#else
moo->Popup();
calendarList->SetPosition(wxPoint(calendarsButton->GetScreenRect().GetLeft(), calendarsButton->GetScreenRect().GetBottom()));
calendarList->UpdateCalendarList(dataStorage);
+#if defined(__APPLE__)
+
+ if (calendarListShow == false)
+ {
+ calendarList->Show();
+ calendarListShow = true;
+ }
+ else
+ {
+ calendarList->Hide();
+ calendarListShow = false;
+ }
+#else
calendarList->Popup();
-
+#endif
+
}
void XCCalendarManipulator::UpdateDateButtonText(){
#include <wx/mstream.h>
#include "events.h"
-#if defined(WIN32)
+#if defined(WIN32) || defined(__APPLE__)
#include "../forms/calendarselectmonth/frmCalendarSelectMonth.h"
#else
#include "XCCalendarMonthSelect.h"
wxButton *nextButton = nullptr;
wxButton *calendarsButton = nullptr;
wxButton *dateButton = nullptr;
-#if defined(WIN32)
+#if defined(WIN32) || defined(__APPLE__)
frmCalendarSelectMonth *moo = nullptr;
#else
XCCalendarMonthSelect *moo = nullptr;
wxBitmap nextIconBitmap;
wxBitmap previousIconBitmap;
wxBitmap calendarsIconBitmap;
+#if defined(__APPLE__)
+ bool calendarListShow = false;
+#endif
void UpdateDateButtonText();
protected:
};
-#endif
\ No newline at end of file
+#endif