]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/calctrl.h
implemented Mark() in the native MSW version of wxCalendarCtrl
[wxWidgets.git] / include / wx / msw / calctrl.h
index 3f527182f1c70efb661c2703d1b1f7c73a88bd02..d750d54728c7647ae664f9da35c94f79c24819e2 100644 (file)
@@ -13,7 +13,7 @@
 class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxCalendarCtrlBase
 {
 public:
-    wxCalendarCtrl() { }
+    wxCalendarCtrl() { Init(); }
     wxCalendarCtrl(wxWindow *parent,
                    wxWindowID id,
                    const wxDateTime& date = wxDefaultDateTime,
@@ -22,6 +22,8 @@ public:
                    long style = wxCAL_SHOW_HOLIDAYS,
                    const wxString& name = wxCalendarNameStr)
     {
+        Init();
+
         Create(parent, id, date, pos, size, style, name);
     }
 
@@ -58,8 +60,20 @@ protected:
     void MSWOnDoubleClick(wxMouseEvent& event);
 
 private:
+    void Init() { m_marks = 0; }
+
+    void UpdateMarks();
+
+
+    // current date, we need to store it instead of simply retrieving it from
+    // the control as needed in order to be able to generate the correct events
+    // from MSWOnNotify()
     wxDateTime m_date;
 
+    // bit field containing the state (marked or not) of all days in the month
+    wxUint32 m_marks;
+
+
     DECLARE_DYNAMIC_CLASS(wxCalendarCtrl)
     DECLARE_NO_COPY_CLASS(wxCalendarCtrl)
 };