calendarsButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(XCCalendarManipulator::ShowCalendarsList), NULL, this);
previousButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(XCCalendarManipulator::PreviousMonth), NULL, this);
+#if defined(WIN32)
+ dateButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+ dateButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
+ nextButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+ nextButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
+ calendarsButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+ calendarsButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
+ previousButton->Connect(wxEVT_ENTER_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseover), NULL, this);
+ previousButton->Connect(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(XCCalendarManipulator::ButtonMouseout), NULL, this);
+#endif
+
Bind(XCCALENDARMANIPULATOR_CHANGEGRID, &XCCalendarManipulator::ChangeGrid, this, ID_CHANGEGRID);
+
+ this->Refresh();
}
XCCalendarManipulator::~XCCalendarManipulator(){
return calendarList->GetHiddenCalendarsList();
+}
+
+void XCCalendarManipulator::ButtonMouseover(wxMouseEvent &event)
+{
+ wxWindow *eventObject = (wxWindow*)event.GetEventObject();
+ eventObject->SetWindowStyle(0 | wxSIMPLE_BORDER);
+}
+
+void XCCalendarManipulator::ButtonMouseout(wxMouseEvent &event)
+{
+ wxWindow *eventObject = (wxWindow*)event.GetEventObject();
+ eventObject->SetWindowStyle(0 | wxNO_BORDER);
}
\ No newline at end of file