]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/calctrl.h
simplify wxEVT_MENU_OPEN/CLOSE generation
[wxWidgets.git] / include / wx / calctrl.h
index 2fd259e4250ca7b2d51ed541b8d8251df3e5d68b..24c4146dff5afee1ed097da0144ebb7449aa773b 100644 (file)
@@ -159,14 +159,14 @@ private:
 // wxCalendarCtrl events
 // ----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_ADV wxCalendarCtrl;
+class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
 
 class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
 {
 friend class wxCalendarCtrl;
 public:
     wxCalendarEvent() { Init(); }
-    wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
+    inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
 
     void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
     wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
@@ -202,19 +202,17 @@ wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
 // calendar event types and macros for handling them
 // ----------------------------------------------------------------------------
 
-BEGIN_DECLARE_EVENT_TYPES()
-    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_SEL_CHANGED, 950)
-    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DAY_CHANGED, 951)
-    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_MONTH_CHANGED, 952)
-    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_YEAR_CHANGED, 953)
-    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DOUBLECLICKED, 954)
-    DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEKDAY_CLICKED, 955)
-END_DECLARE_EVENT_TYPES()
+extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_SEL_CHANGED;
+extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_DAY_CHANGED;
+extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_MONTH_CHANGED;
+extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_YEAR_CHANGED;
+extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_DOUBLECLICKED;
+extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED;
 
 typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
 
 #define wxCalendarEventHandler(func) \
-    (wxObjectEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
 
 #define wx__DECLARE_CALEVT(evt, id, fn) \
     wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(fn))