]> git.saurik.com Git - wxWidgets.git/commitdiff
initial native implementation of wxCalendarCtrl for MSW
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 4 Apr 2008 04:17:03 +0000 (04:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 4 Apr 2008 04:17:03 +0000 (04:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

20 files changed:
Makefile.in
build/bakefiles/files.bkl
build/msw/makefile.bcc
build/msw/makefile.gcc
build/msw/makefile.vc
build/msw/makefile.wat
build/msw/wx_adv.dsp
build/msw/wx_core.dsp
build/msw/wx_vc7_adv.vcproj
build/msw/wx_vc7_core.vcproj
docs/changes.txt
include/wx/calctrl.h
include/wx/generic/calctrlg.h
include/wx/msw/calctrl.h [new file with mode: 0644]
include/wx/msw/private/datecontrols.h [new file with mode: 0644]
interface/calctrl.h
src/generic/calctrlg.cpp
src/msw/calctrl.cpp [new file with mode: 0644]
src/msw/datecontrols.cpp [new file with mode: 0644]
src/msw/datectrl.cpp

index a22b10ad2fe88fb141719b16a04cc5bf1c93635e..d6e75b348fcb529f9c63889a5b2ca9aff23b435a 100644 (file)
@@ -3015,8 +3015,11 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_ADVANCED_PLATFORM_NATIVE_HDR =  \
        wx/gtk/dataview.h \
        wx/gtk/hyperlink.h
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ADVANCED_PLATFORM_NATIVE_HDR = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_ADVANCED_PLATFORM_NATIVE_HDR)
-@COND_TOOLKIT_MSW@ADVANCED_PLATFORM_NATIVE_HDR = wx/msw/datectrl.h
-@COND_TOOLKIT_WINCE@ADVANCED_PLATFORM_NATIVE_HDR = wx/msw/datectrl.h
+@COND_TOOLKIT_MSW@ADVANCED_PLATFORM_NATIVE_HDR = \
+@COND_TOOLKIT_MSW@     wx/msw/calctrl.h wx/msw/datecontrols.h wx/msw/datectrl.h
+@COND_TOOLKIT_WINCE@ADVANCED_PLATFORM_NATIVE_HDR = \
+@COND_TOOLKIT_WINCE@   wx/msw/calctrl.h wx/msw/datecontrols.h \
+@COND_TOOLKIT_WINCE@   wx/msw/datectrl.h
 COND_WXUNIV_0_ADVANCED_HDR =  \
        wx/aboutdlg.h \
        wx/animate.h \
@@ -5376,9 +5379,11 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS =  \
        monodll_hyperlink.o
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS)
 @COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS \
-@COND_TOOLKIT_MSW@     = monodll_datectrl.o
+@COND_TOOLKIT_MSW@     = monodll_calctrl.o monodll_datecontrols.o \
+@COND_TOOLKIT_MSW@     monodll_datectrl.o
 @COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS \
-@COND_TOOLKIT_WINCE@   = monodll_datectrl.o
+@COND_TOOLKIT_WINCE@   = monodll_calctrl.o monodll_datecontrols.o \
+@COND_TOOLKIT_WINCE@   monodll_datectrl.o
 @COND_TOOLKIT_COCOA@__MEDIA_PLATFORM_SRC_OBJECTS = monodll_mediactrl.o
 @COND_TOOLKIT_GTK@__MEDIA_PLATFORM_SRC_OBJECTS = monodll_mediactrl.o 
 @COND_TOOLKIT_MAC@__MEDIA_PLATFORM_SRC_OBJECTS = monodll_mediactrl.o
@@ -7286,9 +7291,11 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 =  \
        monolib_hyperlink.o
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1)
 @COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 \
-@COND_TOOLKIT_MSW@     = monolib_datectrl.o
+@COND_TOOLKIT_MSW@     = monolib_calctrl.o monolib_datecontrols.o \
+@COND_TOOLKIT_MSW@     monolib_datectrl.o
 @COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 \
-@COND_TOOLKIT_WINCE@   = monolib_datectrl.o
+@COND_TOOLKIT_WINCE@   = monolib_calctrl.o monolib_datecontrols.o \
+@COND_TOOLKIT_WINCE@   monolib_datectrl.o
 @COND_TOOLKIT_COCOA@__MEDIA_PLATFORM_SRC_OBJECTS_1 = monolib_mediactrl.o
 @COND_TOOLKIT_GTK@__MEDIA_PLATFORM_SRC_OBJECTS_1 = monolib_mediactrl.o 
 @COND_TOOLKIT_MAC@__MEDIA_PLATFORM_SRC_OBJECTS_1 = monolib_mediactrl.o
@@ -11030,9 +11037,11 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 =  \
        advdll_hyperlink.o
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2)
 @COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 \
-@COND_TOOLKIT_MSW@     = advdll_datectrl.o
+@COND_TOOLKIT_MSW@     = advdll_calctrl.o advdll_datecontrols.o \
+@COND_TOOLKIT_MSW@     advdll_datectrl.o
 @COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 \
-@COND_TOOLKIT_WINCE@   = advdll_datectrl.o
+@COND_TOOLKIT_WINCE@   = advdll_calctrl.o advdll_datecontrols.o \
+@COND_TOOLKIT_WINCE@   advdll_datectrl.o
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_2 \
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = advdll_sound_sdl.o
 COND_MONOLITHIC_0_SHARED_0_USE_GUI_1___advlib___depname = \
@@ -11109,9 +11118,11 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 =  \
        advlib_hyperlink.o
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3)
 @COND_TOOLKIT_MSW@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 \
-@COND_TOOLKIT_MSW@     = advlib_datectrl.o
+@COND_TOOLKIT_MSW@     = advlib_calctrl.o advlib_datecontrols.o \
+@COND_TOOLKIT_MSW@     advlib_datectrl.o
 @COND_TOOLKIT_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 \
-@COND_TOOLKIT_WINCE@   = advlib_datectrl.o
+@COND_TOOLKIT_WINCE@   = advlib_calctrl.o advlib_datecontrols.o \
+@COND_TOOLKIT_WINCE@   advlib_datectrl.o
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_3 \
 @COND_PLATFORM_UNIX_1_USE_PLUGINS_0@   = advlib_sound_sdl.o
 @COND_SHARED_1@____wxadv_namedll_DEP = $(__advdll___depname)
@@ -14152,9 +14163,6 @@ monodll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(MONODLL_ODEP)
 monodll_animate.o: $(srcdir)/src/gtk/animate.cpp $(MONODLL_ODEP)
        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp
 
-monodll_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(MONODLL_ODEP)
-       $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
-
 monodll_hyperlink.o: $(srcdir)/src/gtk/hyperlink.cpp $(MONODLL_ODEP)
        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/hyperlink.cpp
 
@@ -18073,6 +18081,21 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1@monodll_eggtrayicon.o: $(srcdir)/src/gtk1/eggtrayicon.c $(MONODLL_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1@  $(CCC) -c -o $@ $(MONODLL_CFLAGS) $(srcdir)/src/gtk1/eggtrayicon.c
 
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monodll_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
 @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
 
@@ -18676,9 +18699,6 @@ monolib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(MONOLIB_ODEP)
 monolib_animate.o: $(srcdir)/src/gtk/animate.cpp $(MONOLIB_ODEP)
        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp
 
-monolib_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(MONOLIB_ODEP)
-       $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
-
 monolib_hyperlink.o: $(srcdir)/src/gtk/hyperlink.cpp $(MONOLIB_ODEP)
        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/hyperlink.cpp
 
@@ -22597,6 +22617,21 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1@monolib_eggtrayicon.o: $(srcdir)/src/gtk1/eggtrayicon.c $(MONOLIB_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1@  $(CCC) -c -o $@ $(MONOLIB_CFLAGS) $(srcdir)/src/gtk1/eggtrayicon.c
 
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monolib_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
 @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
 
@@ -30529,9 +30564,6 @@ advdll_version_rc.o: $(srcdir)/src/msw/version.rc $(ADVDLL_ODEP)
 advdll_animate.o: $(srcdir)/src/gtk/animate.cpp $(ADVDLL_ODEP)
        $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp
 
-advdll_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(ADVDLL_ODEP)
-       $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
-
 advdll_hyperlink.o: $(srcdir)/src/gtk/hyperlink.cpp $(ADVDLL_ODEP)
        $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/gtk/hyperlink.cpp
 
@@ -30784,6 +30816,21 @@ advdll_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_@advdll_eggtrayicon.o: $(srcdir)/src/gtk1/eggtrayicon.c $(ADVDLL_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_@    $(CCC) -c -o $@ $(ADVDLL_CFLAGS) $(srcdir)/src/gtk1/eggtrayicon.c
 
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_WXUNIV_0@advdll_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_WXUNIV_0@  $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
+
+@COND_TOOLKIT_MSW_WXUNIV_0@advdll_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_MSW_WXUNIV_0@    $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_WINCE_WXUNIV_0@advdll_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_WINCE_WXUNIV_0@  $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_MSW_WXUNIV_0@advdll_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_MSW_WXUNIV_0@    $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
+@COND_TOOLKIT_WINCE_WXUNIV_0@advdll_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(ADVDLL_ODEP)
+@COND_TOOLKIT_WINCE_WXUNIV_0@  $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
 @COND_TOOLKIT_MSW_WXUNIV_0@advdll_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(ADVDLL_ODEP)
 @COND_TOOLKIT_MSW_WXUNIV_0@    $(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
 
@@ -30793,9 +30840,6 @@ advdll_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVDLL_ODEP)
 advlib_animate.o: $(srcdir)/src/gtk/animate.cpp $(ADVLIB_ODEP)
        $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp
 
-advlib_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(ADVLIB_ODEP)
-       $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
-
 advlib_hyperlink.o: $(srcdir)/src/gtk/hyperlink.cpp $(ADVLIB_ODEP)
        $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/gtk/hyperlink.cpp
 
@@ -31048,6 +31092,21 @@ advlib_wizard.o: $(srcdir)/src/generic/wizard.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_@advlib_eggtrayicon.o: $(srcdir)/src/gtk1/eggtrayicon.c $(ADVLIB_ODEP)
 @COND_TOOLKIT_GTK_TOOLKIT_VERSION_@    $(CCC) -c -o $@ $(ADVLIB_CFLAGS) $(srcdir)/src/gtk1/eggtrayicon.c
 
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_WXUNIV_0@advlib_calctrl.o: $(srcdir)/src/gtk/calctrl.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_WXUNIV_0@  $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/gtk/calctrl.cpp
+
+@COND_TOOLKIT_MSW_WXUNIV_0@advlib_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_MSW_WXUNIV_0@    $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_WINCE_WXUNIV_0@advlib_calctrl.o: $(srcdir)/src/msw/calctrl.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_WINCE_WXUNIV_0@  $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/calctrl.cpp
+
+@COND_TOOLKIT_MSW_WXUNIV_0@advlib_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_MSW_WXUNIV_0@    $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
+@COND_TOOLKIT_WINCE_WXUNIV_0@advlib_datecontrols.o: $(srcdir)/src/msw/datecontrols.cpp $(ADVLIB_ODEP)
+@COND_TOOLKIT_WINCE_WXUNIV_0@  $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/datecontrols.cpp
+
 @COND_TOOLKIT_MSW_WXUNIV_0@advlib_datectrl.o: $(srcdir)/src/msw/datectrl.cpp $(ADVLIB_ODEP)
 @COND_TOOLKIT_MSW_WXUNIV_0@    $(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/msw/datectrl.cpp
 
index 0e99acb71bb095fde05a97a4c83a33c5e487941f..c20c976abc4a4e0e54f6d30a44e62d227c52ea7f 100644 (file)
@@ -2896,9 +2896,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
 
 <!-- not used with wxUniv -->
 <set var="ADVANCED_MSW_NATIVE_SRC" hints="files">
+    src/msw/calctrl.cpp
+    src/msw/datecontrols.cpp
     src/msw/datectrl.cpp
 </set>
 <set var="ADVANCED_MSW_NATIVE_HDR" hints="files">
+    wx/msw/calctrl.h
+    wx/msw/datecontrols.h
     wx/msw/datectrl.h
 </set>
 
index 4afaf4e956e892c233a062fbcb7c2673261ef449..2ceb33566d6879268548b126487187c81dbdb8d0 100644 (file)
@@ -1965,6 +1965,8 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_sound.obj \
        $(OBJS)\monodll_taskbar.obj \
        $(OBJS)\monodll_joystick.obj \
+       $(OBJS)\monodll_calctrl.obj \
+       $(OBJS)\monodll_datecontrols.obj \
        $(OBJS)\monodll_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -2611,6 +2613,8 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_sound.obj \
        $(OBJS)\monolib_taskbar.obj \
        $(OBJS)\monolib_joystick.obj \
+       $(OBJS)\monolib_calctrl.obj \
+       $(OBJS)\monolib_datecontrols.obj \
        $(OBJS)\monolib_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -3647,6 +3651,8 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\advdll_sound.obj \
        $(OBJS)\advdll_taskbar.obj \
        $(OBJS)\advdll_joystick.obj \
+       $(OBJS)\advdll_calctrl.obj \
+       $(OBJS)\advdll_datecontrols.obj \
        $(OBJS)\advdll_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -3719,6 +3725,8 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\advlib_sound.obj \
        $(OBJS)\advlib_taskbar.obj \
        $(OBJS)\advlib_joystick.obj \
+       $(OBJS)\advlib_calctrl.obj \
+       $(OBJS)\advlib_datecontrols.obj \
        $(OBJS)\advlib_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -5661,6 +5669,12 @@ $(OBJS)\monodll_mono.obj: ..\..\src\univ\themes\mono.cpp
 $(OBJS)\monodll_win32.obj: ..\..\src\univ\themes\win32.cpp
        $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\win32.cpp
 
+$(OBJS)\monodll_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\monodll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\monodll_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
@@ -7787,6 +7801,12 @@ $(OBJS)\monolib_mono.obj: ..\..\src\univ\themes\mono.cpp
 $(OBJS)\monolib_win32.obj: ..\..\src\univ\themes\win32.cpp
        $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\win32.cpp
 
+$(OBJS)\monolib_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\monolib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\monolib_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
@@ -12799,6 +12819,12 @@ $(OBJS)\advdll_dummy.obj: ..\..\src\common\dummy.cpp
 $(OBJS)\advdll_version.res: ..\..\src\msw\version.rc
        brcc32 -32 -r -fo$@ -i$(BCCDIR)\include    -d__WXMSW__ $(__WXUNIV_DEFINE_p_54) $(__DEBUG_DEFINE_p_53) $(__EXCEPTIONS_DEFINE_p_53) $(__RTTI_DEFINE_p_53) $(__THREAD_DEFINE_p_53) $(__UNICODE_DEFINE_p_54) $(__MSLU_DEFINE_p_53) $(__GFXCTX_DEFINE_p_53) -i$(SETUPHDIR) -i..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv_bcc$(VENDORTAG)  -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_ADV ..\..\src\msw\version.rc
 
+$(OBJS)\advdll_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\advdll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
@@ -12900,6 +12926,12 @@ $(OBJS)\advdll_joystick.obj: ..\..\src\msw\joystick.cpp
 $(OBJS)\advlib_dummy.obj: ..\..\src\common\dummy.cpp
        $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp
 
+$(OBJS)\advlib_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\advlib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
index 619ab08fbbdb30f783293e1dc61dca0afa6ba65f..c7136924708383eb911b92bdd8684ed8e357a998 100644 (file)
@@ -1985,6 +1985,8 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_sound.o \
        $(OBJS)\monodll_taskbar.o \
        $(OBJS)\monodll_joystick.o \
+       $(OBJS)\monodll_calctrl.o \
+       $(OBJS)\monodll_datecontrols.o \
        $(OBJS)\monodll_datectrl.o
 endif
 ifeq ($(WXUNIV),1)
@@ -2637,6 +2639,8 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_sound.o \
        $(OBJS)\monolib_taskbar.o \
        $(OBJS)\monolib_joystick.o \
+       $(OBJS)\monolib_calctrl.o \
+       $(OBJS)\monolib_datecontrols.o \
        $(OBJS)\monolib_datectrl.o
 endif
 ifeq ($(WXUNIV),1)
@@ -3701,6 +3705,8 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\advdll_sound.o \
        $(OBJS)\advdll_taskbar.o \
        $(OBJS)\advdll_joystick.o \
+       $(OBJS)\advdll_calctrl.o \
+       $(OBJS)\advdll_datecontrols.o \
        $(OBJS)\advdll_datectrl.o
 endif
 ifeq ($(WXUNIV),1)
@@ -3777,6 +3783,8 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\advlib_sound.o \
        $(OBJS)\advlib_taskbar.o \
        $(OBJS)\advlib_joystick.o \
+       $(OBJS)\advlib_calctrl.o \
+       $(OBJS)\advlib_datecontrols.o \
        $(OBJS)\advlib_datectrl.o
 endif
 ifeq ($(WXUNIV),1)
@@ -5803,6 +5811,12 @@ $(OBJS)\monodll_mono.o: ../../src/univ/themes/mono.cpp
 $(OBJS)\monodll_win32.o: ../../src/univ/themes/win32.cpp
        $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\monodll_calctrl.o: ../../src/msw/calctrl.cpp
+       $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+
+$(OBJS)\monodll_datecontrols.o: ../../src/msw/datecontrols.cpp
+       $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\monodll_datectrl.o: ../../src/msw/datectrl.cpp
        $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
 
@@ -8043,6 +8057,12 @@ $(OBJS)\monolib_mono.o: ../../src/univ/themes/mono.cpp
 $(OBJS)\monolib_win32.o: ../../src/univ/themes/win32.cpp
        $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\monolib_calctrl.o: ../../src/msw/calctrl.cpp
+       $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+
+$(OBJS)\monolib_datecontrols.o: ../../src/msw/datecontrols.cpp
+       $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\monolib_datectrl.o: ../../src/msw/datectrl.cpp
        $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
 
@@ -13393,6 +13413,12 @@ $(OBJS)\advdll_dummy.o: ../../src/common/dummy.cpp
 $(OBJS)\advdll_version_rc.o: ../../src/msw/version.rc
        windres --use-temp-file -i$< -o$@    --define __WXMSW__ $(__WXUNIV_DEFINE_p_54) $(__DEBUG_DEFINE_p_53) $(__EXCEPTIONS_DEFINE_p_53) $(__RTTI_DEFINE_p_53) $(__THREAD_DEFINE_p_53) $(__UNICODE_DEFINE_p_54) $(__MSLU_DEFINE_p_53) $(__GFXCTX_DEFINE_p_53) --include-dir $(SETUPHDIR) --include-dir ../../include --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv_gcc$(VENDORTAG)  --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_ADV
 
+$(OBJS)\advdll_calctrl.o: ../../src/msw/calctrl.cpp
+       $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
+
+$(OBJS)\advdll_datecontrols.o: ../../src/msw/datecontrols.cpp
+       $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\advdll_datectrl.o: ../../src/msw/datectrl.cpp
        $(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
 
@@ -13494,6 +13520,12 @@ $(OBJS)\advdll_joystick.o: ../../src/msw/joystick.cpp
 $(OBJS)\advlib_dummy.o: ../../src/common/dummy.cpp
        $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
 
+$(OBJS)\advlib_calctrl.o: ../../src/msw/calctrl.cpp
+       $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
+
+$(OBJS)\advlib_datecontrols.o: ../../src/msw/datecontrols.cpp
+       $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
+
 $(OBJS)\advlib_datectrl.o: ../../src/msw/datectrl.cpp
        $(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
 
index dd71c75ba30494778071268aeafef07e05635197..43c5b0b7fec8c6d0850916cf2b4102a5db895e7c 100644 (file)
@@ -2139,6 +2139,8 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_sound.obj \
        $(OBJS)\monodll_taskbar.obj \
        $(OBJS)\monodll_joystick.obj \
+       $(OBJS)\monodll_calctrl.obj \
+       $(OBJS)\monodll_datecontrols.obj \
        $(OBJS)\monodll_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -2791,6 +2793,8 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_sound.obj \
        $(OBJS)\monolib_taskbar.obj \
        $(OBJS)\monolib_joystick.obj \
+       $(OBJS)\monolib_calctrl.obj \
+       $(OBJS)\monolib_datecontrols.obj \
        $(OBJS)\monolib_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -3869,6 +3873,8 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\advdll_sound.obj \
        $(OBJS)\advdll_taskbar.obj \
        $(OBJS)\advdll_joystick.obj \
+       $(OBJS)\advdll_calctrl.obj \
+       $(OBJS)\advdll_datecontrols.obj \
        $(OBJS)\advdll_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -3947,6 +3953,8 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\advlib_sound.obj \
        $(OBJS)\advlib_taskbar.obj \
        $(OBJS)\advlib_joystick.obj \
+       $(OBJS)\advlib_calctrl.obj \
+       $(OBJS)\advlib_datecontrols.obj \
        $(OBJS)\advlib_datectrl.obj
 !endif
 !if "$(WXUNIV)" == "1"
@@ -5993,6 +6001,12 @@ $(OBJS)\monodll_mono.obj: ..\..\src\univ\themes\mono.cpp
 $(OBJS)\monodll_win32.obj: ..\..\src\univ\themes\win32.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\univ\themes\win32.cpp
 
+$(OBJS)\monodll_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\monodll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\monodll_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
@@ -8119,6 +8133,12 @@ $(OBJS)\monolib_mono.obj: ..\..\src\univ\themes\mono.cpp
 $(OBJS)\monolib_win32.obj: ..\..\src\univ\themes\win32.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\univ\themes\win32.cpp
 
+$(OBJS)\monolib_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\monolib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\monolib_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
@@ -13131,6 +13151,12 @@ $(OBJS)\advdll_dummy.obj: ..\..\src\common\dummy.cpp
 $(OBJS)\advdll_version.res: ..\..\src\msw\version.rc
        rc /fo$@  /d WIN32 $(____DEBUGRUNTIME_4) $(__NO_VC_CRTDBG_p_60)  /d __WXMSW__ $(__WXUNIV_DEFINE_p_54) $(__DEBUG_DEFINE_p_53) $(__EXCEPTIONS_DEFINE_p_53) $(__RTTI_DEFINE_p_53) $(__THREAD_DEFINE_p_53) $(__UNICODE_DEFINE_p_54) $(__MSLU_DEFINE_p_53) $(__GFXCTX_DEFINE_p_53) /i $(SETUPHDIR) /i ..\..\include /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv_vc$(VENDORTAG)  /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_ADV ..\..\src\msw\version.rc
 
+$(OBJS)\advdll_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\advdll_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
@@ -13232,6 +13258,12 @@ $(OBJS)\advdll_joystick.obj: ..\..\src\msw\joystick.cpp
 $(OBJS)\advlib_dummy.obj: ..\..\src\common\dummy.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp
 
+$(OBJS)\advlib_calctrl.obj: ..\..\src\msw\calctrl.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\calctrl.cpp
+
+$(OBJS)\advlib_datecontrols.obj: ..\..\src\msw\datecontrols.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datecontrols.cpp
+
 $(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\msw\datectrl.cpp
 
index a63e6b4762b858d26a06a0b3321a2bb69ed5ca7b..8dc0086f356d516af9c2b3fd8d1b779b21abb8f7 100644 (file)
@@ -705,6 +705,8 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =  &
        $(OBJS)\monodll_sound.obj &
        $(OBJS)\monodll_taskbar.obj &
        $(OBJS)\monodll_joystick.obj &
+       $(OBJS)\monodll_calctrl.obj &
+       $(OBJS)\monodll_datecontrols.obj &
        $(OBJS)\monodll_datectrl.obj
 !endif
 !ifeq WXUNIV 1
@@ -1362,6 +1364,8 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =  &
        $(OBJS)\monolib_sound.obj &
        $(OBJS)\monolib_taskbar.obj &
        $(OBJS)\monolib_joystick.obj &
+       $(OBJS)\monolib_calctrl.obj &
+       $(OBJS)\monolib_datecontrols.obj &
        $(OBJS)\monolib_datectrl.obj
 !endif
 !ifeq WXUNIV 1
@@ -2442,6 +2446,8 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =  &
        $(OBJS)\advdll_sound.obj &
        $(OBJS)\advdll_taskbar.obj &
        $(OBJS)\advdll_joystick.obj &
+       $(OBJS)\advdll_calctrl.obj &
+       $(OBJS)\advdll_datecontrols.obj &
        $(OBJS)\advdll_datectrl.obj
 !endif
 !ifeq WXUNIV 1
@@ -2520,6 +2526,8 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =  &
        $(OBJS)\advlib_sound.obj &
        $(OBJS)\advlib_taskbar.obj &
        $(OBJS)\advlib_joystick.obj &
+       $(OBJS)\advlib_calctrl.obj &
+       $(OBJS)\advlib_datecontrols.obj &
        $(OBJS)\advlib_datectrl.obj
 !endif
 !ifeq WXUNIV 1
@@ -6035,6 +6043,12 @@ $(OBJS)\monodll_mono.obj :  .AUTODEPEND ..\..\src\univ\themes\mono.cpp
 $(OBJS)\monodll_win32.obj :  .AUTODEPEND ..\..\src\univ\themes\win32.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
 
+$(OBJS)\monodll_calctrl.obj :  .AUTODEPEND ..\..\src\msw\calctrl.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+
+$(OBJS)\monodll_datecontrols.obj :  .AUTODEPEND ..\..\src\msw\datecontrols.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+
 $(OBJS)\monodll_datectrl.obj :  .AUTODEPEND ..\..\src\msw\datectrl.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
 
@@ -8275,6 +8289,12 @@ $(OBJS)\monolib_mono.obj :  .AUTODEPEND ..\..\src\univ\themes\mono.cpp
 $(OBJS)\monolib_win32.obj :  .AUTODEPEND ..\..\src\univ\themes\win32.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
 
+$(OBJS)\monolib_calctrl.obj :  .AUTODEPEND ..\..\src\msw\calctrl.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+
+$(OBJS)\monolib_datecontrols.obj :  .AUTODEPEND ..\..\src\msw\datecontrols.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+
 $(OBJS)\monolib_datectrl.obj :  .AUTODEPEND ..\..\src\msw\datectrl.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
 
@@ -13625,6 +13645,12 @@ $(OBJS)\advdll_dummy.obj :  .AUTODEPEND ..\..\src\common\dummy.cpp
 $(OBJS)\advdll_version.res :  .AUTODEPEND ..\..\src\msw\version.rc
        wrc -q -ad -bt=nt -r -fo=$^@    -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p)  $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv_wat$(VENDORTAG)  -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_ADV $<
 
+$(OBJS)\advdll_calctrl.obj :  .AUTODEPEND ..\..\src\msw\calctrl.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
+
+$(OBJS)\advdll_datecontrols.obj :  .AUTODEPEND ..\..\src\msw\datecontrols.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
+
 $(OBJS)\advdll_datectrl.obj :  .AUTODEPEND ..\..\src\msw\datectrl.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
 
@@ -13726,6 +13752,12 @@ $(OBJS)\advdll_joystick.obj :  .AUTODEPEND ..\..\src\msw\joystick.cpp
 $(OBJS)\advlib_dummy.obj :  .AUTODEPEND ..\..\src\common\dummy.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
 
+$(OBJS)\advlib_calctrl.obj :  .AUTODEPEND ..\..\src\msw\calctrl.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
+
+$(OBJS)\advlib_datecontrols.obj :  .AUTODEPEND ..\..\src\msw\datecontrols.cpp
+       $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
+
 $(OBJS)\advlib_datectrl.obj :  .AUTODEPEND ..\..\src\msw\datectrl.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
 
index 89105441bce053ff0bc779deb96415dc2e7c0f85..ec7c9583b0ef24a036b95205068e13a906436aa8 100644 (file)
@@ -278,6 +278,76 @@ SOURCE=..\..\src\msw\aboutdlg.cpp
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\msw\calctrl.cpp\r
+\r
+!IF  "$(CFG)" == "adv - Win32 DLL Universal Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 DLL Universal Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 DLL Release"\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 DLL Debug"\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Universal Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Universal Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Release"\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Debug"\r
+\r
+\r
+!ENDIF\r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\src\msw\datecontrols.cpp\r
+\r
+!IF  "$(CFG)" == "adv - Win32 DLL Universal Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 DLL Universal Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 DLL Release"\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 DLL Debug"\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Universal Release"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Universal Debug"\r
+\r
+# PROP Exclude_From_Build 1\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Release"\r
+\r
+\r
+!ELSEIF  "$(CFG)" == "adv - Win32 Debug"\r
+\r
+\r
+!ENDIF\r
+\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\msw\datectrl.cpp\r
 \r
 !IF  "$(CFG)" == "adv - Win32 DLL Universal Release"\r
@@ -625,6 +695,14 @@ InputPath=..\..\include\wx\univ\setup.h
 # PROP Default_Filter ""\r
 # Begin Source File\r
 \r
+SOURCE=..\..\include\wx\msw\calctrl.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\include\wx\msw\datecontrols.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\msw\datectrl.h\r
 # End Source File\r
 # Begin Source File\r
index 16161dc89f5e8569296adce586f72e680f2feab4..63b21e080364c86b88a596670211ec15a66b55ae 100644 (file)
@@ -4692,6 +4692,10 @@ SOURCE=..\..\include\wx\msw\button.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\include\wx\msw\calctrl.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\msw\caret.h\r
 # End Source File\r
 # Begin Source File\r
@@ -4752,6 +4756,10 @@ SOURCE=..\..\include\wx\msw\ole\dataobj2.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\include\wx\msw\datecontrols.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\msw\datectrl.h\r
 # End Source File\r
 # Begin Source File\r
index 5b373d67db76a83b8a2459175c74ee71180b556a..bd8937706967bf74c4305360fc461ec20b2e2ae3 100644 (file)
                        UniqueIdentifier="{D030D8C2-53EE-5B96-8F89-D78157B06140}">\r
                        <File\r
                                RelativePath="..\..\src\msw\aboutdlg.cpp"/>\r
+                       <File\r
+                               RelativePath="..\..\src\msw\calctrl.cpp">\r
+                               <FileConfiguration\r
+                                       Name="DLL Universal Release|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                               <FileConfiguration\r
+                                       Name="DLL Universal Debug|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                               <FileConfiguration\r
+                                       Name="Universal Release|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                               <FileConfiguration\r
+                                       Name="Universal Debug|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\src\msw\datecontrols.cpp">\r
+                               <FileConfiguration\r
+                                       Name="DLL Universal Release|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                               <FileConfiguration\r
+                                       Name="DLL Universal Debug|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                               <FileConfiguration\r
+                                       Name="Universal Release|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                               <FileConfiguration\r
+                                       Name="Universal Debug|Win32"\r
+                                       ExcludedFromBuild="true"/>\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\src\msw\datectrl.cpp">\r
                                <FileConfiguration\r
                <Filter\r
                        Name="MSW Headers"\r
                        UniqueIdentifier="{5AFFF20E-29F9-512B-B80A-7DC45976CDAC}">\r
+                       <File\r
+                               RelativePath="..\..\include\wx\msw\calctrl.h"/>\r
+                       <File\r
+                               RelativePath="..\..\include\wx\msw\datecontrols.h"/>\r
                        <File\r
                                RelativePath="..\..\include\wx\msw\datectrl.h"/>\r
                        <File\r
index 5c2fd98abfea5c2fca3f564fdcd78d6fe9890163..2fdc16f778d7f83daee2045e988b4cbb4c45a6e5 100644 (file)
                                RelativePath="..\..\include\wx\msw\brush.h"/>\r
                        <File\r
                                RelativePath="..\..\include\wx\msw\button.h"/>\r
+                       <File\r
+                               RelativePath="..\..\include\wx\msw\calctrl.h"/>\r
                        <File\r
                                RelativePath="..\..\include\wx\msw\caret.h"/>\r
                        <File\r
                                RelativePath="..\..\include\wx\msw\ole\dataobj.h"/>\r
                        <File\r
                                RelativePath="..\..\include\wx\msw\ole\dataobj2.h"/>\r
+                       <File\r
+                               RelativePath="..\..\include\wx\msw\datecontrols.h"/>\r
                        <File\r
                                RelativePath="..\..\include\wx\msw\datectrl.h"/>\r
                        <File\r
index 18522e2f5db5572963a505a5a32f39a5bd89d670..af74dc4cb0b87586d3e5892ff32ddb60c025ecb6 100644 (file)
@@ -245,6 +245,7 @@ All (Unix):
 All (GUI):
 
 - Added wxDataViewCtrl class and helper classes
+- Provide native implementation of wxCalendarCtrl under wxMSW and wxGTK
 - Added {wxTextCtrl,wxComboBox}::AutoComplete() and AutoCompleteFileNames()
 - Added wxH[V]ScrolledWindow (Brad Anderson, Bryan Petty).
 - Added wxNotificationMessage class for non-intrusive notifications
index 0be77175d4931c2904caa877993da5c76505a43c..12e715781e35f37ec4f49642e6e9120ce4f7cb56 100644 (file)
@@ -185,6 +185,32 @@ public:
     virtual bool SetDate(const wxDateTime& date) = 0;
 
 
+    // restricting the dates shown by the control to the specified range: only
+    // implemented in the generic and MSW versions for now
+
+    // if either date is set, the corresponding limit will be enforced and true
+    // returned; if none are set, the existing restrictions are removed and
+    // false is returned
+    virtual bool
+    SetDateRange(const wxDateTime& WXUNUSED(lowerdate) = wxDefaultDateTime,
+                 const wxDateTime& WXUNUSED(upperdate) = wxDefaultDateTime)
+    {
+        return false;
+    }
+
+    // retrieves the limits currently in use (wxDefaultDateTime if none) in the
+    // provided pointers (which may be NULL) and returns true if there are any
+    // limits or false if none
+    virtual bool
+    GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const
+    {
+        if ( lowerdate )
+            *lowerdate = wxDefaultDateTime;
+        if ( upperdate )
+            *upperdate = wxDefaultDateTime;
+        return false;
+    }
+
     // returns one of wxCAL_HITTEST_XXX constants and fills either date or wd
     // with the corresponding value (none for NOWHERE, the date for DAY and wd
     // for HEADER)
@@ -285,16 +311,22 @@ public:
 
 #define wxCalendarNameStr "CalendarCtrl"
 
-#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
-    #define wxHAS_NATIVE_CALENDARCTRL
-    #include "wx/gtk/calctrl.h"
-    #define wxCalendarCtrl wxGtkCalendarCtrl
-#else
+#ifndef __WXUNIVERSAL__
+    #if defined(__WXGTK20__)
+        #define wxHAS_NATIVE_CALENDARCTRL
+        #include "wx/gtk/calctrl.h"
+        #define wxCalendarCtrl wxGtkCalendarCtrl
+    #elif defined(__WXMSW__)
+        #define wxHAS_NATIVE_CALENDARCTRL
+        #include "wx/msw/calctrl.h"
+    #endif
+#endif // !__WXUNIVERSAL__
+
+#ifndef wxHAS_NATIVE_CALENDARCTRL
     #include "wx/generic/calctrlg.h"
     #define wxCalendarCtrl wxGenericCalendarCtrl
 #endif
 
-
 // ----------------------------------------------------------------------------
 // calendar event types and macros for handling them
 // ----------------------------------------------------------------------------
index 253890e05614041cb2e70d6bd2819ffe923f7f4b..7be301ff48e7ed379bb992d7d85d4fd00afa408d 100644 (file)
@@ -58,15 +58,18 @@ public:
     // set/get the range in which selection can occur
     // ---------------------------------------------
 
-    // all functions in this section are for generic version only
+    virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
+                              const wxDateTime& upperdate = wxDefaultDateTime);
+
+    virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const;
+
+    // these functions are for generic version only, don't use them but use the
+    // Set/GetDateRange() above instead
     bool SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime);
     const wxDateTime& GetLowerDateLimit() const { return m_lowdate; }
     bool SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime);
     const wxDateTime& GetUpperDateLimit() const { return m_highdate; }
 
-    bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
-                      const wxDateTime& upperdate = wxDefaultDateTime);
-
 
     // calendar mode
     // -------------
diff --git a/include/wx/msw/calctrl.h b/include/wx/msw/calctrl.h
new file mode 100644 (file)
index 0000000..5f78f2f
--- /dev/null
@@ -0,0 +1,59 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/msw/calctrl.h
+// Purpose:     wxCalendarCtrl control implementation for MSW
+// Author:      Vadim Zeitlin
+// RCS-ID:      $Id$
+// Copyright:   (C) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_MSW_CALCTRL_H_
+#define _WX_MSW_CALCTRL_H_
+
+class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxCalendarCtrlBase
+{
+public:
+    wxCalendarCtrl() { }
+    wxCalendarCtrl(wxWindow *parent,
+                   wxWindowID id,
+                   const wxDateTime& date = wxDefaultDateTime,
+                   const wxPoint& pos = wxDefaultPosition,
+                   const wxSize& size = wxDefaultSize,
+                   long style = wxCAL_SHOW_HOLIDAYS,
+                   const wxString& name = wxCalendarNameStr)
+    {
+        Create(parent, id, date, pos, size, style, name);
+    }
+
+    bool Create(wxWindow *parent,
+                wxWindowID id,
+                const wxDateTime& date = wxDefaultDateTime,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = wxCAL_SHOW_HOLIDAYS,
+                const wxString& name = wxCalendarNameStr);
+
+    virtual bool SetDate(const wxDateTime& date);
+    virtual wxDateTime GetDate() const;
+
+    virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
+                              const wxDateTime& upperdate = wxDefaultDateTime);
+    virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const;
+
+    virtual bool EnableMonthChange(bool enable = true);
+
+    virtual void Mark(size_t day, bool mark);
+
+protected:
+    virtual wxSize wxCalendarCtrl::DoGetBestSize() const;
+
+    virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
+    virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxCalendarCtrl)
+    DECLARE_NO_COPY_CLASS(wxCalendarCtrl)
+};
+
+#endif // _WX_MSW_CALCTRL_H_
diff --git a/include/wx/msw/private/datecontrols.h b/include/wx/msw/private/datecontrols.h
new file mode 100644 (file)
index 0000000..3d5a865
--- /dev/null
@@ -0,0 +1,51 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        msw/private/datecontrols.h
+// Purpose:     implementation helpers for wxDatePickerCtrl and wxCalendarCtrl
+// Author:      Vadim Zeitlin
+// Created:     2008-04-04
+// RCS-ID:      $Id$
+// Copyright:   (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _MSW_PRIVATE_DATECONTROLS_H_
+#define _MSW_PRIVATE_DATECONTROLS_H_
+
+// namespace for the helper functions related to the date controls
+namespace wxMSWDateControls
+{
+
+// do the one time only initialization of date classes of comctl32.dll, return
+// true if ok or log an error and return false if we failed (this can only
+// happen with a very old version of common controls DLL, i.e. before 4.70)
+extern bool CheckInitialization();
+
+// convert SYSTEMTIME to wxDateTime
+inline void FromSystemTime(wxDateTime *dt, const SYSTEMTIME& st)
+{
+    dt->Set(st.wDay,
+            wx_static_cast(wxDateTime::Month, wxDateTime::Jan + st.wMonth - 1),
+            st.wYear,
+            0, 0, 0);
+}
+
+// convert wxDateTime to SYSTEMTIME
+inline void ToSystemTime(SYSTEMTIME *st, const wxDateTime& dt)
+{
+    const wxDateTime::Tm tm(dt.GetTm());
+
+    st->wYear = (WXWORD)tm.year;
+    st->wMonth = (WXWORD)(tm.mon - wxDateTime::Jan + 1);
+    st->wDay = tm.mday;
+
+    st->wDayOfWeek =
+    st->wHour =
+    st->wMinute =
+    st->wSecond =
+    st->wMilliseconds = 0;
+}
+
+} // namespace wxMSWDateControls
+
+#endif // _MSW_PRIVATE_DATECONTROLS_H_
+
index b57c2945a3b1178db7b06e2c49ee88d6472cc3ad..aaaaf4cbf2e4a749bd4095cf002a1419b6de6ebc 100644 (file)
@@ -438,5 +438,53 @@ public:
         In generic wxCalendarCtrl,
     */
     void Mark(size_t day, bool mark);
+
+
+    /**
+        @name Date range.
+
+        The functions in this section are currently implemented in the generic
+        and MSW versions and do nothing in the native GTK implementation.
+     */
+    //@{
+
+    /**
+        Restrict the dates shown by the control to the specified range.
+
+        If either date is set, the corresponding limit will be enforced and
+        @true returned. If none are set, the existing restrictions are removed
+        and @false is returned.
+
+        @param lowerdate
+            the low limit for the dates shown by the control or @c
+            wxDefaultDateTime
+        @param highlighting
+            the high limit for the dates shown by the control or @c
+            wxDefaultDateTime
+        @return
+            @true if either limit is valid, @false otherwise
+     */
+    virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
+                              const wxDateTime& upperdate = wxDefaultDateTime);
+
+    /**
+        Returns the limits currently being used.
+
+        @see SetDateRange()
+
+        @param lowerdate
+            if non-@NULL, the value of the low limit for the dates shown by the
+            control is returned (which may be @c wxDefaultDateTime if no limit
+            is set)
+        @param upperdate
+            if non-@NULL, the value of the upper limit for the dates shown by the
+            control is returned (which may be @c wxDefaultDateTime if no limit
+            is set)
+        @return
+            @true if either limit is set, @false otherwise
+     */
+    virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const
+
+    //@}
 };
 
index 9ac23cf05a37a9645d5d8a25fde9d56bf6adce5b..5725f369b5c8a717085cd6702e8a22275635d78b 100644 (file)
@@ -639,6 +639,17 @@ bool wxGenericCalendarCtrl::SetDateRange(const wxDateTime& lowerdate /* = wxDefa
     return retval;
 }
 
+bool wxGenericCalendarCtrl::GetDateRange(wxDateTime *lowerdate,
+                                         wxDateTime *upperdate) const
+{
+    if ( lowerdate )
+        *lowerdate = m_lowdate;
+    if ( upperdate )
+        *upperdate = m_highdate;
+
+    return m_lowdate.IsValid() || m_highdate.IsValid();
+}
+
 // ----------------------------------------------------------------------------
 // date helpers
 // ----------------------------------------------------------------------------
diff --git a/src/msw/calctrl.cpp b/src/msw/calctrl.cpp
new file mode 100644 (file)
index 0000000..596b8be
--- /dev/null
@@ -0,0 +1,220 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/msw/calctrl.cpp
+// Purpose:     wxCalendarCtrl implementation
+// Author:      Vadim Zeitlin
+// Created:     2008-04-04
+// RCS-ID:      $Id:$
+// Copyright:   (C) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#if wxUSE_CALENDARCTRL
+
+#ifndef WX_PRECOMP
+    #include "wx/msw/wrapwin.h"
+    #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
+#endif
+
+#include "wx/calctrl.h"
+
+#include "wx/msw/private/datecontrols.h"
+
+IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl)
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl creation
+// ----------------------------------------------------------------------------
+
+bool
+wxCalendarCtrl::Create(wxWindow *parent,
+                       wxWindowID id,
+                       const wxDateTime& dt,
+                       const wxPoint& pos,
+                       const wxSize& size,
+                       long style,
+                       const wxString& name)
+{
+    if ( !wxMSWDateControls::CheckInitialization() )
+        return false;
+
+    // initialize the base class
+    if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
+        return false;
+
+    // create the native control
+    if ( !MSWCreateControl(MONTHCAL_CLASS, wxEmptyString, pos, size) )
+        return false;
+
+    SetDate(dt.IsValid() ? dt : wxDateTime::Today());
+
+    return true;
+}
+
+WXDWORD wxCalendarCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
+{
+    WXDWORD styleMSW = wxCalendarCtrlBase::MSWGetStyle(style, exstyle);
+
+    // right now we don't support any native styles but we should add wx styles
+    // corresponding to MCS_NOTODAY, MCS_NOTODAYCIRCLE and MCS_WEEKNUMBERS
+    // probably (TODO)
+
+    // for compatibility with the other versions, just turn off today display
+    // unconditionally for now
+    styleMSW |= MCS_NOTODAY;
+
+    return styleMSW;
+}
+
+// TODO: handle WM_WININICHANGE
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl geometry
+// ----------------------------------------------------------------------------
+
+wxSize wxCalendarCtrl::DoGetBestSize() const
+{
+    RECT rc;
+    if ( !GetHwnd() || !MonthCal_GetMinReqRect(GetHwnd(), &rc) )
+    {
+        return wxCalendarCtrlBase::DoGetBestSize();
+    }
+
+    const wxSize best = wxRectFromRECT(rc).GetSize() + GetWindowBorderSize();
+    CacheBestSize(best);
+    return best;
+}
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl operations
+// ----------------------------------------------------------------------------
+
+bool wxCalendarCtrl::SetDate(const wxDateTime& dt)
+{
+    wxCHECK_MSG( dt.IsValid(), false, "invalid date" );
+
+    SYSTEMTIME st;
+    wxMSWDateControls::ToSystemTime(&st, dt);
+    if ( !MonthCal_SetCurSel(GetHwnd(), &st) )
+    {
+        wxLogDebug(_T("DateTime_SetSystemtime() failed"));
+
+        return false;
+    }
+
+    return true;
+}
+
+wxDateTime wxCalendarCtrl::GetDate() const
+{
+    SYSTEMTIME st;
+    if ( !MonthCal_GetCurSel(GetHwnd(), &st) )
+        return wxDefaultDateTime;
+
+    wxDateTime dt;
+    wxMSWDateControls::FromSystemTime(&dt, st);
+    return dt;
+}
+
+bool wxCalendarCtrl::SetDateRange(const wxDateTime& dt1, const wxDateTime& dt2)
+{
+    SYSTEMTIME st[2];
+
+    DWORD flags = 0;
+    if ( dt1.IsValid() )
+    {
+        wxMSWDateControls::ToSystemTime(&st[0], dt1);
+        flags |= GDTR_MIN;
+    }
+
+    if ( dt2.IsValid() )
+    {
+        wxMSWDateControls::ToSystemTime(&st[1], dt2);
+        flags |= GDTR_MAX;
+    }
+
+    if ( !MonthCal_SetRange(GetHwnd(), flags, st) )
+    {
+        wxLogDebug(_T("MonthCal_SetRange() failed"));
+    }
+
+    return flags != 0;
+}
+
+bool wxCalendarCtrl::GetDateRange(wxDateTime *dt1, wxDateTime *dt2) const
+{
+    SYSTEMTIME st[2];
+
+    DWORD flags = MonthCal_GetRange(GetHwnd(), st);
+    if ( dt1 )
+    {
+        if ( flags & GDTR_MIN )
+            wxMSWDateControls::FromSystemTime(dt1, st[0]);
+        else
+            *dt1 = wxDefaultDateTime;
+    }
+
+    if ( dt2 )
+    {
+        if ( flags & GDTR_MAX )
+            wxMSWDateControls::FromSystemTime(dt2, st[1]);
+        else
+            *dt2 = wxDefaultDateTime;
+    }
+
+    return flags != 0;
+}
+
+// ----------------------------------------------------------------------------
+// other wxCalendarCtrl operations
+// ----------------------------------------------------------------------------
+
+bool wxCalendarCtrl::EnableMonthChange(bool enable)
+{
+    wxFAIL_MSG( "not implemented" );
+
+    return false;
+}
+
+void wxCalendarCtrl::Mark(size_t day, bool mark)
+{
+    wxFAIL_MSG( "not implemented" );
+}
+
+// ----------------------------------------------------------------------------
+// wxCalendarCtrl events
+// ----------------------------------------------------------------------------
+
+bool wxCalendarCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
+{
+    NMHDR* hdr = (NMHDR *)lParam;
+    switch ( hdr->code )
+    {
+        case MCN_SELECT:
+            NMSELCHANGE *sch = (NMSELCHANGE *)hdr;
+            GenerateEvent(wxEVT_CALENDAR_SEL_CHANGED);
+            *result = 0;
+            return true;
+    }
+
+    return wxCalendarCtrlBase::MSWOnNotify(idCtrl, lParam, result);
+}
+
+#endif // wxUSE_CALENDARCTRL
diff --git a/src/msw/datecontrols.cpp b/src/msw/datecontrols.cpp
new file mode 100644 (file)
index 0000000..e850351
--- /dev/null
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        src/msw/datecontrols.cpp
+// Purpose:     implementation of date controls helper functions
+// Author:      Vadim Zeitlin
+// Created:     2008-04-04
+// RCS-ID:      $Id$
+// Copyright:   (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#endif // WX_PRECOMP
+
+#if wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
+
+#include "wx/msw/private/datecontrols.h"
+
+#include "wx/dynlib.h"
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+bool wxMSWDateControls::CheckInitialization()
+{
+    // although we already call InitCommonControls() in app.cpp which is
+    // supposed to initialize all common controls, in comctl32.dll 4.72 (and
+    // presumably earlier versions 4.70 and 4.71, date time picker not being
+    // supported in < 4.70 anyhow) it does not do it and we have to initialize
+    // it explicitly
+
+    // this is initially set to -1 to indicate that we need to perform the
+    // initialization and gets set to false or true depending on its result
+    static int s_initResult = -1; // MT-ok: used from GUI thread only
+    if ( s_initResult == -1 )
+    {
+        // in any case do nothing the next time, the result won't change and
+        // it's enough to give the error only once
+        s_initResult = false;
+
+        if ( wxApp::GetComCtl32Version() < 470 )
+        {
+            wxLogError(_("This system doesn't support date controls, please upgrade your version of comctl32.dll"));
+
+            return false;
+        }
+
+#if wxUSE_DYNLIB_CLASS
+        INITCOMMONCONTROLSEX icex;
+        icex.dwSize = sizeof(icex);
+        icex.dwICC = ICC_DATE_CLASSES;
+
+        wxDynamicLibrary dllComCtl32(_T("comctl32.dll") , wxDL_VERBATIM);
+
+        if ( dllComCtl32.IsLoaded() )
+        {
+            typedef BOOL (WINAPI *ICCEx_t)(INITCOMMONCONTROLSEX *);
+            wxDYNLIB_FUNCTION( ICCEx_t, InitCommonControlsEx, dllComCtl32 );
+
+            if ( pfnInitCommonControlsEx )
+            {
+                s_initResult = (*pfnInitCommonControlsEx)(&icex);
+            }
+        }
+#endif // wxUSE_DYNLIB_CLASS
+    }
+
+    return s_initResult != 0;
+}
+
+#endif // wxUSE_DATEPICKCTRL || wxUSE_CALENDARCTRL
index 3a694a227e187dbdd13d684b61bbb6110d3ed740..0beaeb4e8d71500711d126a11a1477e1341c339a 100644 (file)
@@ -35,7 +35,8 @@
 #endif
 
 #include "wx/datectrl.h"
-#include "wx/dynlib.h"
+
+#include "wx/msw/private/datecontrols.h"
 
 #define _WX_DEFINE_DATE_EVENTS_
 #include "wx/dateevt.h"
@@ -55,33 +56,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxDatePickerCtrl, wxControl)
 // implementation
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// helpers for wxDateTime <-> SYSTEMTIME conversion
-// ----------------------------------------------------------------------------
-
-static inline void wxFromSystemTime(wxDateTime *dt, const SYSTEMTIME& st)
-{
-    dt->Set(st.wDay,
-            wx_static_cast(wxDateTime::Month, wxDateTime::Jan + st.wMonth - 1),
-            st.wYear,
-            0, 0, 0);
-}
-
-static inline void wxToSystemTime(SYSTEMTIME *st, const wxDateTime& dt)
-{
-    const wxDateTime::Tm tm(dt.GetTm());
-
-    st->wYear = (WXWORD)tm.year;
-    st->wMonth = (WXWORD)(tm.mon - wxDateTime::Jan + 1);
-    st->wDay = tm.mday;
-
-    st->wDayOfWeek =
-    st->wHour =
-    st->wMinute =
-    st->wSecond =
-    st->wMilliseconds = 0;
-}
-
 // ----------------------------------------------------------------------------
 // wxDatePickerCtrl creation
 // ----------------------------------------------------------------------------
@@ -96,51 +70,8 @@ wxDatePickerCtrl::Create(wxWindow *parent,
                          const wxValidator& validator,
                          const wxString& name)
 {
-    // although we already call InitCommonControls() in app.cpp which is
-    // supposed to initialize all common controls, in comctl32.dll 4.72 (and
-    // presumably earlier versions 4.70 and 4.71, date time picker not being
-    // supported in < 4.70 anyhow) it does not do it and we have to initialize
-    // it explicitly
-    static bool s_initDone = false; // MT-ok: used from GUI thread only
-    if ( !s_initDone )
-    {
-#ifndef __WXWINCE__
-        if ( wxApp::GetComCtl32Version() < 470 )
-        {
-            wxLogError(_("This system doesn't support date picker control, please upgrade your version of comctl32.dll"));
-
-            return false;
-        }
-#endif
-
-#if wxUSE_DYNLIB_CLASS
-        INITCOMMONCONTROLSEX icex;
-        icex.dwSize = sizeof(icex);
-        icex.dwICC = ICC_DATE_CLASSES;
-
-        wxDynamicLibrary dllComCtl32(
-#ifdef __WXWINCE__
-            _T("commctrl.dll")
-#else
-            _T("comctl32.dll")
-#endif
-            , wxDL_VERBATIM);
-
-        if ( dllComCtl32.IsLoaded() )
-        {
-            typedef BOOL (WINAPI *ICCEx_t)(INITCOMMONCONTROLSEX *);
-            wxDYNLIB_FUNCTION( ICCEx_t, InitCommonControlsEx, dllComCtl32 );
-
-            if ( pfnInitCommonControlsEx )
-            {
-                (*pfnInitCommonControlsEx)(&icex);
-            }
-
-            s_initDone = true;
-        }
-#endif
-    }
-
+    if ( !wxMSWDateControls::CheckInitialization() )
+        return false;
 
     // use wxDP_SPIN if wxDP_DEFAULT (0) was given as style
     if ( !(style & wxDP_DROPDOWN) )
@@ -248,7 +179,7 @@ void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
 
     SYSTEMTIME st;
     if ( dt.IsValid() )
-        wxToSystemTime(&st, dt);
+        wxMSWDateControls::ToSystemTime(&st, dt);
     if ( !DateTime_SetSystemtime(GetHwnd(),
                                  dt.IsValid() ? GDT_VALID : GDT_NONE,
                                  &st) )
@@ -263,8 +194,6 @@ void wxDatePickerCtrl::SetValue(const wxDateTime& dt)
         m_date.ResetTime();
 }
 
-#include <iostream>
-
 wxDateTime wxDatePickerCtrl::GetValue() const
 {
 #ifdef __WXDEBUG__
@@ -272,7 +201,7 @@ wxDateTime wxDatePickerCtrl::GetValue() const
     SYSTEMTIME st;
     if ( DateTime_GetSystemtime(GetHwnd(), &st) == GDT_VALID )
     {
-        wxFromSystemTime(&dt, st);
+        wxMSWDateControls::FromSystemTime(&dt, st);
     }
 
     wxASSERT_MSG( m_date.IsValid() == dt.IsValid() &&
@@ -290,13 +219,13 @@ void wxDatePickerCtrl::SetRange(const wxDateTime& dt1, const wxDateTime& dt2)
     DWORD flags = 0;
     if ( dt1.IsValid() )
     {
-        wxToSystemTime(&st[0], dt1);
+        wxMSWDateControls::ToSystemTime(&st[0], dt1);
         flags |= GDTR_MIN;
     }
 
     if ( dt2.IsValid() )
     {
-        wxToSystemTime(&st[1], dt2);
+        wxMSWDateControls::ToSystemTime(&st[1], dt2);
         flags |= GDTR_MAX;
     }
 
@@ -314,7 +243,7 @@ bool wxDatePickerCtrl::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
     if ( dt1 )
     {
         if ( flags & GDTR_MIN )
-            wxFromSystemTime(dt1, st[0]);
+            wxMSWDateControls::FromSystemTime(dt1, st[0]);
         else
             *dt1 = wxDefaultDateTime;
     }
@@ -322,7 +251,7 @@ bool wxDatePickerCtrl::GetRange(wxDateTime *dt1, wxDateTime *dt2) const
     if ( dt2 )
     {
         if ( flags & GDTR_MAX )
-            wxFromSystemTime(dt2, st[1]);
+            wxMSWDateControls::FromSystemTime(dt2, st[1]);
         else
             *dt2 = wxDefaultDateTime;
     }
@@ -345,7 +274,7 @@ wxDatePickerCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
             NMDATETIMECHANGE *dtch = (NMDATETIMECHANGE *)hdr;
             wxDateTime dt;
             if ( dtch->dwFlags == GDT_VALID )
-                wxFromSystemTime(&dt, dtch->st);
+                wxMSWDateControls::FromSystemTime(&dt, dtch->st);
 
             // filter out duplicate DTN_DATETIMECHANGE events which the native
             // control sends us when using wxDP_DROPDOWN style