using namespace std;
XCCalendarDayEntry::XCCalendarDayEntry(wxWindow* parent, const wxString& title, const wxPoint& pos, const wxSize& size, const int id)
- : wxPanel(parent, wxID_ANY, pos, size, wxTAB_TRAVERSAL, title)
-{
-
- Connect(wxID_ANY, XCCALENDARDAYENTRY_DESELECT, wxCommandEventHandler(XCCalendarDayEntry::Deselect));
+ : wxPanel(parent, wxID_ANY, pos, size, wxTAB_TRAVERSAL, title){
DayPanel = parent->GetParent();
EntryID = id;
AlarmIcon->SetBitmap(AlarmIconBitmap);
HighPriorityIcon->SetBitmap(PriorityIconBitmap);
+
+ Connect(wxID_ANY, XCCALENDARDAYENTRY_DESELECT, wxCommandEventHandler(XCCalendarDayEntry::Deselect));
+ AlarmIcon->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(XCCalendarDayEntry::LeftClick), NULL, this);
+ HighPriorityIcon->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(XCCalendarDayEntry::LeftClick), NULL, this);
+ EventText->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(XCCalendarDayEntry::LeftClick), NULL, this);
UpdateInformation();
}
-void XCCalendarDayEntry::PaintFrameEvent(wxPaintEvent &PaintEvent)
-{
+void XCCalendarDayEntry::PaintFrameEvent(wxPaintEvent &PaintEvent){
Repaint();
}
-void XCCalendarDayEntry::ResizeFrameEvent(wxSizeEvent &SizeEvent)
-{
+void XCCalendarDayEntry::ResizeFrameEvent(wxSizeEvent &SizeEvent){
// Adjust the Event text so it is displayed properly.
}
-void XCCalendarDayEntry::LeftClick(wxMouseEvent &MouseEvent)
-{
+void XCCalendarDayEntry::LeftClick(wxMouseEvent &MouseEvent){
// Change the background of the widget to mark
// the entry as selected.