added native GTK implementation of wxCalendarCtrl (modified patch 1925439)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-03-28 02:47:12 +00:00
parent bd7cef4a05
commit 628e155d8c
24 changed files with 1064 additions and 465 deletions

View File

@ -3009,9 +3009,12 @@ COND_TOOLKIT_WINCE_ADVANCED_PLATFORM_HDR = \
@COND_TOOLKIT_WINCE@ADVANCED_PLATFORM_HDR = $(COND_TOOLKIT_WINCE_ADVANCED_PLATFORM_HDR)
@COND_TOOLKIT_X11@ADVANCED_PLATFORM_HDR = \
@COND_TOOLKIT_X11@ wx/unix/joystick.h wx/unix/sound.h wx/unix/taskbarx11.h
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ADVANCED_PLATFORM_NATIVE_HDR \
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = wx/gtk/animate.h wx/gtk/dataview.h \
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ wx/gtk/hyperlink.h
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_ADVANCED_PLATFORM_NATIVE_HDR = \
wx/gtk/animate.h \
wx/gtk/calctrl.h \
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_WXUNIV_0_ADVANCED_HDR = \
@ -3026,7 +3029,7 @@ COND_WXUNIV_0_ADVANCED_HDR = \
wx/editlbox.h \
wx/generic/aboutdlgg.h \
wx/generic/bmpcbox.h \
wx/generic/calctrl.h \
wx/generic/calctrlg.h \
wx/generic/datectrl.h \
wx/generic/dataview.h \
wx/generic/grid.h \
@ -3068,7 +3071,7 @@ COND_WXUNIV_1_ADVANCED_HDR = \
wx/editlbox.h \
wx/generic/aboutdlgg.h \
wx/generic/bmpcbox.h \
wx/generic/calctrl.h \
wx/generic/calctrlg.h \
wx/generic/datectrl.h \
wx/generic/dataview.h \
wx/generic/grid.h \
@ -5313,11 +5316,12 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_1 = \
@COND_TOOLKIT_X11@__LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_1)
COND_WXUNIV_0___ADVANCED_SRC_OBJECTS = \
monodll_animatecmn.o \
monodll_calctrlcmn.o \
monodll_datavcmn.o \
monodll_hyperlnkcmn.o \
monodll_aboutdlgg.o \
monodll_bmpcboxg.o \
monodll_calctrl.o \
monodll_calctrlg.o \
monodll_datavgen.o \
monodll_datectlg.o \
monodll_editlbox.o \
@ -5339,11 +5343,12 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS = \
@COND_WXUNIV_0@__ADVANCED_SRC_OBJECTS = $(COND_WXUNIV_0___ADVANCED_SRC_OBJECTS)
COND_WXUNIV_1___ADVANCED_SRC_OBJECTS = \
monodll_animatecmn.o \
monodll_calctrlcmn.o \
monodll_datavcmn.o \
monodll_hyperlnkcmn.o \
monodll_aboutdlgg.o \
monodll_bmpcboxg.o \
monodll_calctrl.o \
monodll_calctrlg.o \
monodll_datavgen.o \
monodll_datectlg.o \
monodll_editlbox.o \
@ -5366,6 +5371,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS = \
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS = \
monodll_aboutdlg.o \
monodll_animate.o \
monodll_calctrl.o \
monodll_dataview.o \
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)
@ -7220,11 +7226,12 @@ COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_3 = \
@COND_TOOLKIT_X11@__LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_X11___LOWLEVEL_SRC_OBJECTS_3)
COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_1 = \
monolib_animatecmn.o \
monolib_calctrlcmn.o \
monolib_datavcmn.o \
monolib_hyperlnkcmn.o \
monolib_aboutdlgg.o \
monolib_bmpcboxg.o \
monolib_calctrl.o \
monolib_calctrlg.o \
monolib_datavgen.o \
monolib_datectlg.o \
monolib_editlbox.o \
@ -7246,11 +7253,12 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_1 = \
@COND_WXUNIV_0@__ADVANCED_SRC_OBJECTS_1 = $(COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_1)
COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_1 = \
monolib_animatecmn.o \
monolib_calctrlcmn.o \
monolib_datavcmn.o \
monolib_hyperlnkcmn.o \
monolib_aboutdlgg.o \
monolib_bmpcboxg.o \
monolib_calctrl.o \
monolib_calctrlg.o \
monolib_datavgen.o \
monolib_datectlg.o \
monolib_editlbox.o \
@ -7273,6 +7281,7 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_1 = \
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_1 = \
monolib_aboutdlg.o \
monolib_animate.o \
monolib_calctrl.o \
monolib_dataview.o \
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)
@ -10961,11 +10970,12 @@ COND_USE_SOSYMLINKS_1___advdll___so_symlinks_uninst_cmd = rm -f \
@COND_PLATFORM_WIN32_1@__advdll___win32rc = advdll_version_rc.o
COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_2 = \
advdll_animatecmn.o \
advdll_calctrlcmn.o \
advdll_datavcmn.o \
advdll_hyperlnkcmn.o \
advdll_aboutdlgg.o \
advdll_bmpcboxg.o \
advdll_calctrl.o \
advdll_calctrlg.o \
advdll_datavgen.o \
advdll_datectlg.o \
advdll_editlbox.o \
@ -10987,11 +10997,12 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_2 = \
@COND_WXUNIV_0@__ADVANCED_SRC_OBJECTS_2 = $(COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_2)
COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_2 = \
advdll_animatecmn.o \
advdll_calctrlcmn.o \
advdll_datavcmn.o \
advdll_hyperlnkcmn.o \
advdll_aboutdlgg.o \
advdll_bmpcboxg.o \
advdll_calctrl.o \
advdll_calctrlg.o \
advdll_datavgen.o \
advdll_datectlg.o \
advdll_editlbox.o \
@ -11011,9 +11022,13 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_2 = \
$(__ADVANCED_PLATFORM_SRC_OBJECTS_8) \
advdll_animateg.o
@COND_WXUNIV_1@__ADVANCED_SRC_OBJECTS_2 = $(COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_2)
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 \
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = advdll_aboutdlg.o advdll_animate.o \
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ advdll_dataview.o advdll_hyperlink.o
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 = \
advdll_aboutdlg.o \
advdll_animate.o \
advdll_calctrl.o \
advdll_dataview.o \
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_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_2 \
@ -11034,11 +11049,12 @@ COND_MONOLITHIC_0_SHARED_0_USE_GUI_1___advlib___depname = \
@COND_USE_PCH_1@ = .pch/wxprec_advlib/wx/wxprec.h.gch
COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_3 = \
advlib_animatecmn.o \
advlib_calctrlcmn.o \
advlib_datavcmn.o \
advlib_hyperlnkcmn.o \
advlib_aboutdlgg.o \
advlib_bmpcboxg.o \
advlib_calctrl.o \
advlib_calctrlg.o \
advlib_datavgen.o \
advlib_datectlg.o \
advlib_editlbox.o \
@ -11060,11 +11076,12 @@ COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_3 = \
@COND_WXUNIV_0@__ADVANCED_SRC_OBJECTS_3 = $(COND_WXUNIV_0___ADVANCED_SRC_OBJECTS_3)
COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_3 = \
advlib_animatecmn.o \
advlib_calctrlcmn.o \
advlib_datavcmn.o \
advlib_hyperlnkcmn.o \
advlib_aboutdlgg.o \
advlib_bmpcboxg.o \
advlib_calctrl.o \
advlib_calctrlg.o \
advlib_datavgen.o \
advlib_datectlg.o \
advlib_editlbox.o \
@ -11084,9 +11101,13 @@ COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_3 = \
$(__ADVANCED_PLATFORM_SRC_OBJECTS_9) \
advlib_animateg.o
@COND_WXUNIV_1@__ADVANCED_SRC_OBJECTS_3 = $(COND_WXUNIV_1___ADVANCED_SRC_OBJECTS_3)
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 \
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = advlib_aboutdlg.o advlib_animate.o \
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ advlib_dataview.o advlib_hyperlink.o
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 = \
advlib_aboutdlg.o \
advlib_animate.o \
advlib_calctrl.o \
advlib_dataview.o \
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_WINCE@__ADVANCED_PLATFORM_NATIVE_SRC_OBJECTS_3 \
@ -14131,6 +14152,9 @@ 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
@ -17836,6 +17860,9 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@monodll_animatecmn.o: $(srcdir)/src/common/animatecmn.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/animatecmn.cpp
@COND_USE_GUI_1@monodll_calctrlcmn.o: $(srcdir)/src/common/calctrlcmn.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/calctrlcmn.cpp
@COND_USE_GUI_1@monodll_datavcmn.o: $(srcdir)/src/common/datavcmn.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/datavcmn.cpp
@ -17848,8 +17875,8 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@monodll_bmpcboxg.o: $(srcdir)/src/generic/bmpcboxg.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/bmpcboxg.cpp
@COND_USE_GUI_1@monodll_calctrl.o: $(srcdir)/src/generic/calctrl.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/calctrl.cpp
@COND_USE_GUI_1@monodll_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
@COND_USE_GUI_1@monodll_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp
@ -18649,6 +18676,9 @@ 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
@ -22354,6 +22384,9 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@monolib_animatecmn.o: $(srcdir)/src/common/animatecmn.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/animatecmn.cpp
@COND_USE_GUI_1@monolib_calctrlcmn.o: $(srcdir)/src/common/calctrlcmn.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/calctrlcmn.cpp
@COND_USE_GUI_1@monolib_datavcmn.o: $(srcdir)/src/common/datavcmn.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/datavcmn.cpp
@ -22366,8 +22399,8 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@monolib_bmpcboxg.o: $(srcdir)/src/generic/bmpcboxg.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/bmpcboxg.cpp
@COND_USE_GUI_1@monolib_calctrl.o: $(srcdir)/src/generic/calctrl.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/calctrl.cpp
@COND_USE_GUI_1@monolib_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
@COND_USE_GUI_1@monolib_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp
@ -30496,6 +30529,9 @@ 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
@ -30505,6 +30541,9 @@ advdll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(ADVDLL_ODEP)
advdll_animatecmn.o: $(srcdir)/src/common/animatecmn.cpp $(ADVDLL_ODEP)
$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/common/animatecmn.cpp
advdll_calctrlcmn.o: $(srcdir)/src/common/calctrlcmn.cpp $(ADVDLL_ODEP)
$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/common/calctrlcmn.cpp
advdll_datavcmn.o: $(srcdir)/src/common/datavcmn.cpp $(ADVDLL_ODEP)
$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/common/datavcmn.cpp
@ -30517,8 +30556,8 @@ advdll_aboutdlgg.o: $(srcdir)/src/generic/aboutdlgg.cpp $(ADVDLL_ODEP)
advdll_bmpcboxg.o: $(srcdir)/src/generic/bmpcboxg.cpp $(ADVDLL_ODEP)
$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/bmpcboxg.cpp
advdll_calctrl.o: $(srcdir)/src/generic/calctrl.cpp $(ADVDLL_ODEP)
$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/calctrl.cpp
advdll_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(ADVDLL_ODEP)
$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
advdll_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(ADVDLL_ODEP)
$(CXXC) -c -o $@ $(ADVDLL_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp
@ -30754,6 +30793,9 @@ 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
@ -30763,6 +30805,9 @@ advlib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(ADVLIB_ODEP)
advlib_animatecmn.o: $(srcdir)/src/common/animatecmn.cpp $(ADVLIB_ODEP)
$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/common/animatecmn.cpp
advlib_calctrlcmn.o: $(srcdir)/src/common/calctrlcmn.cpp $(ADVLIB_ODEP)
$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/common/calctrlcmn.cpp
advlib_datavcmn.o: $(srcdir)/src/common/datavcmn.cpp $(ADVLIB_ODEP)
$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/common/datavcmn.cpp
@ -30775,8 +30820,8 @@ advlib_aboutdlgg.o: $(srcdir)/src/generic/aboutdlgg.cpp $(ADVLIB_ODEP)
advlib_bmpcboxg.o: $(srcdir)/src/generic/bmpcboxg.cpp $(ADVLIB_ODEP)
$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/bmpcboxg.cpp
advlib_calctrl.o: $(srcdir)/src/generic/calctrl.cpp $(ADVLIB_ODEP)
$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/calctrl.cpp
advlib_calctrlg.o: $(srcdir)/src/generic/calctrlg.cpp $(ADVLIB_ODEP)
$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/calctrlg.cpp
advlib_datavgen.o: $(srcdir)/src/generic/datavgen.cpp $(ADVLIB_ODEP)
$(CXXC) -c -o $@ $(ADVLIB_CXXFLAGS) $(srcdir)/src/generic/datavgen.cpp

View File

@ -2814,11 +2814,12 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<set var="ADVANCED_CMN_SRC" hints="files">
src/common/animatecmn.cpp
src/common/calctrlcmn.cpp
src/common/datavcmn.cpp
src/common/hyperlnkcmn.cpp
src/generic/aboutdlgg.cpp
src/generic/bmpcboxg.cpp
src/generic/calctrl.cpp
src/generic/calctrlg.cpp
src/generic/datavgen.cpp
src/generic/datectlg.cpp
src/generic/editlbox.cpp
@ -2849,7 +2850,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/editlbox.h
wx/generic/aboutdlgg.h
wx/generic/bmpcbox.h
wx/generic/calctrl.h
wx/generic/calctrlg.h
wx/generic/datectrl.h
wx/generic/dataview.h
wx/generic/grid.h
@ -2988,11 +2989,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<set var="ADVANCED_GTK_NATIVE_SRC" hints="files">
src/gtk/aboutdlg.cpp
src/gtk/animate.cpp
src/gtk/calctrl.cpp
src/gtk/dataview.cpp
src/gtk/hyperlink.cpp
</set>
<set var="ADVANCED_GTK_NATIVE_HDR" hints="files">
wx/gtk/animate.h
wx/gtk/calctrl.h
wx/gtk/dataview.h
wx/gtk/hyperlink.h
</set>

View File

@ -1936,11 +1936,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_animatecmn.obj \
$(OBJS)\monodll_calctrlcmn.obj \
$(OBJS)\monodll_datavcmn.obj \
$(OBJS)\monodll_hyperlnkcmn.obj \
$(OBJS)\monodll_aboutdlgg.obj \
$(OBJS)\monodll_bmpcboxg.obj \
$(OBJS)\monodll_calctrl.obj \
$(OBJS)\monodll_calctrlg.obj \
$(OBJS)\monodll_datavgen.obj \
$(OBJS)\monodll_datectlg.obj \
$(OBJS)\monodll_editlbox.obj \
@ -1969,11 +1970,12 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_animatecmn.obj \
$(OBJS)\monodll_calctrlcmn.obj \
$(OBJS)\monodll_datavcmn.obj \
$(OBJS)\monodll_hyperlnkcmn.obj \
$(OBJS)\monodll_aboutdlgg.obj \
$(OBJS)\monodll_bmpcboxg.obj \
$(OBJS)\monodll_calctrl.obj \
$(OBJS)\monodll_calctrlg.obj \
$(OBJS)\monodll_datavgen.obj \
$(OBJS)\monodll_datectlg.obj \
$(OBJS)\monodll_editlbox.obj \
@ -2580,11 +2582,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_animatecmn.obj \
$(OBJS)\monolib_calctrlcmn.obj \
$(OBJS)\monolib_datavcmn.obj \
$(OBJS)\monolib_hyperlnkcmn.obj \
$(OBJS)\monolib_aboutdlgg.obj \
$(OBJS)\monolib_bmpcboxg.obj \
$(OBJS)\monolib_calctrl.obj \
$(OBJS)\monolib_calctrlg.obj \
$(OBJS)\monolib_datavgen.obj \
$(OBJS)\monolib_datectlg.obj \
$(OBJS)\monolib_editlbox.obj \
@ -2613,11 +2616,12 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_animatecmn.obj \
$(OBJS)\monolib_calctrlcmn.obj \
$(OBJS)\monolib_datavcmn.obj \
$(OBJS)\monolib_hyperlnkcmn.obj \
$(OBJS)\monolib_aboutdlgg.obj \
$(OBJS)\monolib_bmpcboxg.obj \
$(OBJS)\monolib_calctrl.obj \
$(OBJS)\monolib_calctrlg.obj \
$(OBJS)\monolib_datavgen.obj \
$(OBJS)\monolib_datectlg.obj \
$(OBJS)\monolib_editlbox.obj \
@ -3614,11 +3618,12 @@ __advdll___depname = \
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\advdll_animatecmn.obj \
$(OBJS)\advdll_calctrlcmn.obj \
$(OBJS)\advdll_datavcmn.obj \
$(OBJS)\advdll_hyperlnkcmn.obj \
$(OBJS)\advdll_aboutdlgg.obj \
$(OBJS)\advdll_bmpcboxg.obj \
$(OBJS)\advdll_calctrl.obj \
$(OBJS)\advdll_calctrlg.obj \
$(OBJS)\advdll_datavgen.obj \
$(OBJS)\advdll_datectlg.obj \
$(OBJS)\advdll_editlbox.obj \
@ -3647,11 +3652,12 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\advdll_animatecmn.obj \
$(OBJS)\advdll_calctrlcmn.obj \
$(OBJS)\advdll_datavcmn.obj \
$(OBJS)\advdll_hyperlnkcmn.obj \
$(OBJS)\advdll_aboutdlgg.obj \
$(OBJS)\advdll_bmpcboxg.obj \
$(OBJS)\advdll_calctrl.obj \
$(OBJS)\advdll_calctrlg.obj \
$(OBJS)\advdll_datavgen.obj \
$(OBJS)\advdll_datectlg.obj \
$(OBJS)\advdll_editlbox.obj \
@ -3684,11 +3690,12 @@ __advlib___depname = \
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\advlib_animatecmn.obj \
$(OBJS)\advlib_calctrlcmn.obj \
$(OBJS)\advlib_datavcmn.obj \
$(OBJS)\advlib_hyperlnkcmn.obj \
$(OBJS)\advlib_aboutdlgg.obj \
$(OBJS)\advlib_bmpcboxg.obj \
$(OBJS)\advlib_calctrl.obj \
$(OBJS)\advlib_calctrlg.obj \
$(OBJS)\advlib_datavgen.obj \
$(OBJS)\advlib_datectlg.obj \
$(OBJS)\advlib_editlbox.obj \
@ -3717,11 +3724,12 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\advlib_animatecmn.obj \
$(OBJS)\advlib_calctrlcmn.obj \
$(OBJS)\advlib_datavcmn.obj \
$(OBJS)\advlib_hyperlnkcmn.obj \
$(OBJS)\advlib_aboutdlgg.obj \
$(OBJS)\advlib_bmpcboxg.obj \
$(OBJS)\advlib_calctrl.obj \
$(OBJS)\advlib_calctrlg.obj \
$(OBJS)\advlib_datavgen.obj \
$(OBJS)\advlib_datectlg.obj \
$(OBJS)\advlib_editlbox.obj \
@ -7152,6 +7160,11 @@ $(OBJS)\monodll_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -7173,8 +7186,8 @@ $(OBJS)\monodll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\monodll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
!endif
!if "$(USE_GUI)" == "1"
@ -9273,6 +9286,11 @@ $(OBJS)\monolib_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -9294,8 +9312,8 @@ $(OBJS)\monolib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\monolib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
!endif
!if "$(USE_GUI)" == "1"
@ -12787,6 +12805,9 @@ $(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp
$(OBJS)\advdll_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp
$(OBJS)\advdll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
$(OBJS)\advdll_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -12799,8 +12820,8 @@ $(OBJS)\advdll_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp
$(OBJS)\advdll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp
$(OBJS)\advdll_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\advdll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
$(OBJS)\advdll_datavgen.obj: ..\..\src\generic\datavgen.cpp
$(CXX) -q -c -P -o$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp
@ -12885,6 +12906,9 @@ $(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp
$(OBJS)\advlib_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp
$(OBJS)\advlib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
$(OBJS)\advlib_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -12897,8 +12921,8 @@ $(OBJS)\advlib_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp
$(OBJS)\advlib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp
$(OBJS)\advlib_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\advlib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
$(OBJS)\advlib_datavgen.obj: ..\..\src\generic\datavgen.cpp
$(CXX) -q -c -P -o$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp

View File

@ -1956,11 +1956,12 @@ endif
ifeq ($(WXUNIV),0)
____ADVANCED_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_animatecmn.o \
$(OBJS)\monodll_calctrlcmn.o \
$(OBJS)\monodll_datavcmn.o \
$(OBJS)\monodll_hyperlnkcmn.o \
$(OBJS)\monodll_aboutdlgg.o \
$(OBJS)\monodll_bmpcboxg.o \
$(OBJS)\monodll_calctrl.o \
$(OBJS)\monodll_calctrlg.o \
$(OBJS)\monodll_datavgen.o \
$(OBJS)\monodll_datectlg.o \
$(OBJS)\monodll_editlbox.o \
@ -1989,11 +1990,12 @@ endif
ifeq ($(WXUNIV),1)
____ADVANCED_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_animatecmn.o \
$(OBJS)\monodll_calctrlcmn.o \
$(OBJS)\monodll_datavcmn.o \
$(OBJS)\monodll_hyperlnkcmn.o \
$(OBJS)\monodll_aboutdlgg.o \
$(OBJS)\monodll_bmpcboxg.o \
$(OBJS)\monodll_calctrl.o \
$(OBJS)\monodll_calctrlg.o \
$(OBJS)\monodll_datavgen.o \
$(OBJS)\monodll_datectlg.o \
$(OBJS)\monodll_editlbox.o \
@ -2606,11 +2608,12 @@ endif
ifeq ($(WXUNIV),0)
____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_animatecmn.o \
$(OBJS)\monolib_calctrlcmn.o \
$(OBJS)\monolib_datavcmn.o \
$(OBJS)\monolib_hyperlnkcmn.o \
$(OBJS)\monolib_aboutdlgg.o \
$(OBJS)\monolib_bmpcboxg.o \
$(OBJS)\monolib_calctrl.o \
$(OBJS)\monolib_calctrlg.o \
$(OBJS)\monolib_datavgen.o \
$(OBJS)\monolib_datectlg.o \
$(OBJS)\monolib_editlbox.o \
@ -2639,11 +2642,12 @@ endif
ifeq ($(WXUNIV),1)
____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_animatecmn.o \
$(OBJS)\monolib_calctrlcmn.o \
$(OBJS)\monolib_datavcmn.o \
$(OBJS)\monolib_hyperlnkcmn.o \
$(OBJS)\monolib_aboutdlgg.o \
$(OBJS)\monolib_bmpcboxg.o \
$(OBJS)\monolib_calctrl.o \
$(OBJS)\monolib_calctrlg.o \
$(OBJS)\monolib_datavgen.o \
$(OBJS)\monolib_datectlg.o \
$(OBJS)\monolib_editlbox.o \
@ -3668,11 +3672,12 @@ endif
ifeq ($(WXUNIV),0)
____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\advdll_animatecmn.o \
$(OBJS)\advdll_calctrlcmn.o \
$(OBJS)\advdll_datavcmn.o \
$(OBJS)\advdll_hyperlnkcmn.o \
$(OBJS)\advdll_aboutdlgg.o \
$(OBJS)\advdll_bmpcboxg.o \
$(OBJS)\advdll_calctrl.o \
$(OBJS)\advdll_calctrlg.o \
$(OBJS)\advdll_datavgen.o \
$(OBJS)\advdll_datectlg.o \
$(OBJS)\advdll_editlbox.o \
@ -3701,11 +3706,12 @@ endif
ifeq ($(WXUNIV),1)
____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\advdll_animatecmn.o \
$(OBJS)\advdll_calctrlcmn.o \
$(OBJS)\advdll_datavcmn.o \
$(OBJS)\advdll_hyperlnkcmn.o \
$(OBJS)\advdll_aboutdlgg.o \
$(OBJS)\advdll_bmpcboxg.o \
$(OBJS)\advdll_calctrl.o \
$(OBJS)\advdll_calctrlg.o \
$(OBJS)\advdll_datavgen.o \
$(OBJS)\advdll_datectlg.o \
$(OBJS)\advdll_editlbox.o \
@ -3742,11 +3748,12 @@ endif
ifeq ($(WXUNIV),0)
____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\advlib_animatecmn.o \
$(OBJS)\advlib_calctrlcmn.o \
$(OBJS)\advlib_datavcmn.o \
$(OBJS)\advlib_hyperlnkcmn.o \
$(OBJS)\advlib_aboutdlgg.o \
$(OBJS)\advlib_bmpcboxg.o \
$(OBJS)\advlib_calctrl.o \
$(OBJS)\advlib_calctrlg.o \
$(OBJS)\advlib_datavgen.o \
$(OBJS)\advlib_datectlg.o \
$(OBJS)\advlib_editlbox.o \
@ -3775,11 +3782,12 @@ endif
ifeq ($(WXUNIV),1)
____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\advlib_animatecmn.o \
$(OBJS)\advlib_calctrlcmn.o \
$(OBJS)\advlib_datavcmn.o \
$(OBJS)\advlib_hyperlnkcmn.o \
$(OBJS)\advlib_aboutdlgg.o \
$(OBJS)\advlib_bmpcboxg.o \
$(OBJS)\advlib_calctrl.o \
$(OBJS)\advlib_calctrlg.o \
$(OBJS)\advlib_datavgen.o \
$(OBJS)\advlib_datectlg.o \
$(OBJS)\advlib_editlbox.o \
@ -7406,6 +7414,11 @@ $(OBJS)\monodll_animatecmn.o: ../../src/common/animatecmn.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_calctrlcmn.o: ../../src/common/calctrlcmn.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_datavcmn.o: ../../src/common/datavcmn.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@ -7427,7 +7440,7 @@ $(OBJS)\monodll_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_calctrl.o: ../../src/generic/calctrl.cpp
$(OBJS)\monodll_calctrlg.o: ../../src/generic/calctrlg.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
@ -9641,6 +9654,11 @@ $(OBJS)\monolib_animatecmn.o: ../../src/common/animatecmn.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_calctrlcmn.o: ../../src/common/calctrlcmn.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_datavcmn.o: ../../src/common/datavcmn.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@ -9662,7 +9680,7 @@ $(OBJS)\monolib_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_calctrl.o: ../../src/generic/calctrl.cpp
$(OBJS)\monolib_calctrlg.o: ../../src/generic/calctrlg.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
@ -13381,6 +13399,9 @@ $(OBJS)\advdll_datectrl.o: ../../src/msw/datectrl.cpp
$(OBJS)\advdll_animatecmn.o: ../../src/common/animatecmn.cpp
$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advdll_calctrlcmn.o: ../../src/common/calctrlcmn.cpp
$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advdll_datavcmn.o: ../../src/common/datavcmn.cpp
$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
@ -13393,7 +13414,7 @@ $(OBJS)\advdll_aboutdlgg.o: ../../src/generic/aboutdlgg.cpp
$(OBJS)\advdll_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp
$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advdll_calctrl.o: ../../src/generic/calctrl.cpp
$(OBJS)\advdll_calctrlg.o: ../../src/generic/calctrlg.cpp
$(CXX) -c -o $@ $(ADVDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advdll_datavgen.o: ../../src/generic/datavgen.cpp
@ -13479,6 +13500,9 @@ $(OBJS)\advlib_datectrl.o: ../../src/msw/datectrl.cpp
$(OBJS)\advlib_animatecmn.o: ../../src/common/animatecmn.cpp
$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advlib_calctrlcmn.o: ../../src/common/calctrlcmn.cpp
$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advlib_datavcmn.o: ../../src/common/datavcmn.cpp
$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
@ -13491,7 +13515,7 @@ $(OBJS)\advlib_aboutdlgg.o: ../../src/generic/aboutdlgg.cpp
$(OBJS)\advlib_bmpcboxg.o: ../../src/generic/bmpcboxg.cpp
$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advlib_calctrl.o: ../../src/generic/calctrl.cpp
$(OBJS)\advlib_calctrlg.o: ../../src/generic/calctrlg.cpp
$(CXX) -c -o $@ $(ADVLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\advlib_datavgen.o: ../../src/generic/datavgen.cpp

View File

@ -2110,11 +2110,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_animatecmn.obj \
$(OBJS)\monodll_calctrlcmn.obj \
$(OBJS)\monodll_datavcmn.obj \
$(OBJS)\monodll_hyperlnkcmn.obj \
$(OBJS)\monodll_aboutdlgg.obj \
$(OBJS)\monodll_bmpcboxg.obj \
$(OBJS)\monodll_calctrl.obj \
$(OBJS)\monodll_calctrlg.obj \
$(OBJS)\monodll_datavgen.obj \
$(OBJS)\monodll_datectlg.obj \
$(OBJS)\monodll_editlbox.obj \
@ -2143,11 +2144,12 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_animatecmn.obj \
$(OBJS)\monodll_calctrlcmn.obj \
$(OBJS)\monodll_datavcmn.obj \
$(OBJS)\monodll_hyperlnkcmn.obj \
$(OBJS)\monodll_aboutdlgg.obj \
$(OBJS)\monodll_bmpcboxg.obj \
$(OBJS)\monodll_calctrl.obj \
$(OBJS)\monodll_calctrlg.obj \
$(OBJS)\monodll_datavgen.obj \
$(OBJS)\monodll_datectlg.obj \
$(OBJS)\monodll_editlbox.obj \
@ -2760,11 +2762,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_animatecmn.obj \
$(OBJS)\monolib_calctrlcmn.obj \
$(OBJS)\monolib_datavcmn.obj \
$(OBJS)\monolib_hyperlnkcmn.obj \
$(OBJS)\monolib_aboutdlgg.obj \
$(OBJS)\monolib_bmpcboxg.obj \
$(OBJS)\monolib_calctrl.obj \
$(OBJS)\monolib_calctrlg.obj \
$(OBJS)\monolib_datavgen.obj \
$(OBJS)\monolib_datectlg.obj \
$(OBJS)\monolib_editlbox.obj \
@ -2793,11 +2796,12 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_animatecmn.obj \
$(OBJS)\monolib_calctrlcmn.obj \
$(OBJS)\monolib_datavcmn.obj \
$(OBJS)\monolib_hyperlnkcmn.obj \
$(OBJS)\monolib_aboutdlgg.obj \
$(OBJS)\monolib_bmpcboxg.obj \
$(OBJS)\monolib_calctrl.obj \
$(OBJS)\monolib_calctrlg.obj \
$(OBJS)\monolib_datavgen.obj \
$(OBJS)\monolib_datectlg.obj \
$(OBJS)\monolib_editlbox.obj \
@ -3836,11 +3840,12 @@ __RUNTIME_LIBS_208 = $(__THREADSFLAG)
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\advdll_animatecmn.obj \
$(OBJS)\advdll_calctrlcmn.obj \
$(OBJS)\advdll_datavcmn.obj \
$(OBJS)\advdll_hyperlnkcmn.obj \
$(OBJS)\advdll_aboutdlgg.obj \
$(OBJS)\advdll_bmpcboxg.obj \
$(OBJS)\advdll_calctrl.obj \
$(OBJS)\advdll_calctrlg.obj \
$(OBJS)\advdll_datavgen.obj \
$(OBJS)\advdll_datectlg.obj \
$(OBJS)\advdll_editlbox.obj \
@ -3869,11 +3874,12 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\advdll_animatecmn.obj \
$(OBJS)\advdll_calctrlcmn.obj \
$(OBJS)\advdll_datavcmn.obj \
$(OBJS)\advdll_hyperlnkcmn.obj \
$(OBJS)\advdll_aboutdlgg.obj \
$(OBJS)\advdll_bmpcboxg.obj \
$(OBJS)\advdll_calctrl.obj \
$(OBJS)\advdll_calctrlg.obj \
$(OBJS)\advdll_datavgen.obj \
$(OBJS)\advdll_datectlg.obj \
$(OBJS)\advdll_editlbox.obj \
@ -3912,11 +3918,12 @@ __RUNTIME_LIBS_221 = $(__THREADSFLAG)
!if "$(WXUNIV)" == "0"
____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\advlib_animatecmn.obj \
$(OBJS)\advlib_calctrlcmn.obj \
$(OBJS)\advlib_datavcmn.obj \
$(OBJS)\advlib_hyperlnkcmn.obj \
$(OBJS)\advlib_aboutdlgg.obj \
$(OBJS)\advlib_bmpcboxg.obj \
$(OBJS)\advlib_calctrl.obj \
$(OBJS)\advlib_calctrlg.obj \
$(OBJS)\advlib_datavgen.obj \
$(OBJS)\advlib_datectlg.obj \
$(OBJS)\advlib_editlbox.obj \
@ -3945,11 +3952,12 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
!if "$(WXUNIV)" == "1"
____ADVANCED_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\advlib_animatecmn.obj \
$(OBJS)\advlib_calctrlcmn.obj \
$(OBJS)\advlib_datavcmn.obj \
$(OBJS)\advlib_hyperlnkcmn.obj \
$(OBJS)\advlib_aboutdlgg.obj \
$(OBJS)\advlib_bmpcboxg.obj \
$(OBJS)\advlib_calctrl.obj \
$(OBJS)\advlib_calctrlg.obj \
$(OBJS)\advlib_datavgen.obj \
$(OBJS)\advlib_datectlg.obj \
$(OBJS)\advlib_editlbox.obj \
@ -7484,6 +7492,11 @@ $(OBJS)\monodll_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -7505,8 +7518,8 @@ $(OBJS)\monodll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\monodll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
!endif
!if "$(USE_GUI)" == "1"
@ -9605,6 +9618,11 @@ $(OBJS)\monolib_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -9626,8 +9644,8 @@ $(OBJS)\monolib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\monolib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
!endif
!if "$(USE_GUI)" == "1"
@ -13119,6 +13137,9 @@ $(OBJS)\advdll_datectrl.obj: ..\..\src\msw\datectrl.cpp
$(OBJS)\advdll_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\animatecmn.cpp
$(OBJS)\advdll_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
$(OBJS)\advdll_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -13131,8 +13152,8 @@ $(OBJS)\advdll_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp
$(OBJS)\advdll_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp
$(OBJS)\advdll_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\advdll_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
$(OBJS)\advdll_datavgen.obj: ..\..\src\generic\datavgen.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVDLL_CXXFLAGS) ..\..\src\generic\datavgen.cpp
@ -13217,6 +13238,9 @@ $(OBJS)\advlib_datectrl.obj: ..\..\src\msw\datectrl.cpp
$(OBJS)\advlib_animatecmn.obj: ..\..\src\common\animatecmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\animatecmn.cpp
$(OBJS)\advlib_calctrlcmn.obj: ..\..\src\common\calctrlcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\calctrlcmn.cpp
$(OBJS)\advlib_datavcmn.obj: ..\..\src\common\datavcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\common\datavcmn.cpp
@ -13229,8 +13253,8 @@ $(OBJS)\advlib_aboutdlgg.obj: ..\..\src\generic\aboutdlgg.cpp
$(OBJS)\advlib_bmpcboxg.obj: ..\..\src\generic\bmpcboxg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\bmpcboxg.cpp
$(OBJS)\advlib_calctrl.obj: ..\..\src\generic\calctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrl.cpp
$(OBJS)\advlib_calctrlg.obj: ..\..\src\generic\calctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\calctrlg.cpp
$(OBJS)\advlib_datavgen.obj: ..\..\src\generic\datavgen.cpp
$(CXX) /c /nologo /TP /Fo$@ $(ADVLIB_CXXFLAGS) ..\..\src\generic\datavgen.cpp

View File

@ -676,11 +676,12 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS =
!ifeq WXUNIV 0
____ADVANCED_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_animatecmn.obj &
$(OBJS)\monodll_calctrlcmn.obj &
$(OBJS)\monodll_datavcmn.obj &
$(OBJS)\monodll_hyperlnkcmn.obj &
$(OBJS)\monodll_aboutdlgg.obj &
$(OBJS)\monodll_bmpcboxg.obj &
$(OBJS)\monodll_calctrl.obj &
$(OBJS)\monodll_calctrlg.obj &
$(OBJS)\monodll_datavgen.obj &
$(OBJS)\monodll_datectlg.obj &
$(OBJS)\monodll_editlbox.obj &
@ -709,11 +710,12 @@ ____ADVANCED_SRC_FILENAMES_OBJECTS = &
!ifeq WXUNIV 1
____ADVANCED_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_animatecmn.obj &
$(OBJS)\monodll_calctrlcmn.obj &
$(OBJS)\monodll_datavcmn.obj &
$(OBJS)\monodll_hyperlnkcmn.obj &
$(OBJS)\monodll_aboutdlgg.obj &
$(OBJS)\monodll_bmpcboxg.obj &
$(OBJS)\monodll_calctrl.obj &
$(OBJS)\monodll_calctrlg.obj &
$(OBJS)\monodll_datavgen.obj &
$(OBJS)\monodll_datectlg.obj &
$(OBJS)\monodll_editlbox.obj &
@ -1331,11 +1333,12 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS =
!ifeq WXUNIV 0
____ADVANCED_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_animatecmn.obj &
$(OBJS)\monolib_calctrlcmn.obj &
$(OBJS)\monolib_datavcmn.obj &
$(OBJS)\monolib_hyperlnkcmn.obj &
$(OBJS)\monolib_aboutdlgg.obj &
$(OBJS)\monolib_bmpcboxg.obj &
$(OBJS)\monolib_calctrl.obj &
$(OBJS)\monolib_calctrlg.obj &
$(OBJS)\monolib_datavgen.obj &
$(OBJS)\monolib_datectlg.obj &
$(OBJS)\monolib_editlbox.obj &
@ -1364,11 +1367,12 @@ ____ADVANCED_SRC_FILENAMES_1_OBJECTS = &
!ifeq WXUNIV 1
____ADVANCED_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_animatecmn.obj &
$(OBJS)\monolib_calctrlcmn.obj &
$(OBJS)\monolib_datavcmn.obj &
$(OBJS)\monolib_hyperlnkcmn.obj &
$(OBJS)\monolib_aboutdlgg.obj &
$(OBJS)\monolib_bmpcboxg.obj &
$(OBJS)\monolib_calctrl.obj &
$(OBJS)\monolib_calctrlg.obj &
$(OBJS)\monolib_datavgen.obj &
$(OBJS)\monolib_datectlg.obj &
$(OBJS)\monolib_editlbox.obj &
@ -2409,11 +2413,12 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS =
!ifeq WXUNIV 0
____ADVANCED_SRC_FILENAMES_2_OBJECTS = &
$(OBJS)\advdll_animatecmn.obj &
$(OBJS)\advdll_calctrlcmn.obj &
$(OBJS)\advdll_datavcmn.obj &
$(OBJS)\advdll_hyperlnkcmn.obj &
$(OBJS)\advdll_aboutdlgg.obj &
$(OBJS)\advdll_bmpcboxg.obj &
$(OBJS)\advdll_calctrl.obj &
$(OBJS)\advdll_calctrlg.obj &
$(OBJS)\advdll_datavgen.obj &
$(OBJS)\advdll_datectlg.obj &
$(OBJS)\advdll_editlbox.obj &
@ -2442,11 +2447,12 @@ ____ADVANCED_SRC_FILENAMES_2_OBJECTS = &
!ifeq WXUNIV 1
____ADVANCED_SRC_FILENAMES_2_OBJECTS = &
$(OBJS)\advdll_animatecmn.obj &
$(OBJS)\advdll_calctrlcmn.obj &
$(OBJS)\advdll_datavcmn.obj &
$(OBJS)\advdll_hyperlnkcmn.obj &
$(OBJS)\advdll_aboutdlgg.obj &
$(OBJS)\advdll_bmpcboxg.obj &
$(OBJS)\advdll_calctrl.obj &
$(OBJS)\advdll_calctrlg.obj &
$(OBJS)\advdll_datavgen.obj &
$(OBJS)\advdll_datectlg.obj &
$(OBJS)\advdll_editlbox.obj &
@ -2485,11 +2491,12 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS =
!ifeq WXUNIV 0
____ADVANCED_SRC_FILENAMES_3_OBJECTS = &
$(OBJS)\advlib_animatecmn.obj &
$(OBJS)\advlib_calctrlcmn.obj &
$(OBJS)\advlib_datavcmn.obj &
$(OBJS)\advlib_hyperlnkcmn.obj &
$(OBJS)\advlib_aboutdlgg.obj &
$(OBJS)\advlib_bmpcboxg.obj &
$(OBJS)\advlib_calctrl.obj &
$(OBJS)\advlib_calctrlg.obj &
$(OBJS)\advlib_datavgen.obj &
$(OBJS)\advlib_datectlg.obj &
$(OBJS)\advlib_editlbox.obj &
@ -2518,11 +2525,12 @@ ____ADVANCED_SRC_FILENAMES_3_OBJECTS = &
!ifeq WXUNIV 1
____ADVANCED_SRC_FILENAMES_3_OBJECTS = &
$(OBJS)\advlib_animatecmn.obj &
$(OBJS)\advlib_calctrlcmn.obj &
$(OBJS)\advlib_datavcmn.obj &
$(OBJS)\advlib_hyperlnkcmn.obj &
$(OBJS)\advlib_aboutdlgg.obj &
$(OBJS)\advlib_bmpcboxg.obj &
$(OBJS)\advlib_calctrl.obj &
$(OBJS)\advlib_calctrlg.obj &
$(OBJS)\advlib_datavgen.obj &
$(OBJS)\advlib_datectlg.obj &
$(OBJS)\advlib_editlbox.obj &
@ -7638,6 +7646,11 @@ $(OBJS)\monodll_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monodll_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monodll_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
@ -7659,7 +7672,7 @@ $(OBJS)\monodll_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp
!endif
!ifeq USE_GUI 1
$(OBJS)\monodll_calctrl.obj : .AUTODEPEND ..\..\src\generic\calctrl.cpp
$(OBJS)\monodll_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
!endif
@ -9873,6 +9886,11 @@ $(OBJS)\monolib_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monolib_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monolib_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
@ -9894,7 +9912,7 @@ $(OBJS)\monolib_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp
!endif
!ifeq USE_GUI 1
$(OBJS)\monolib_calctrl.obj : .AUTODEPEND ..\..\src\generic\calctrl.cpp
$(OBJS)\monolib_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
!endif
@ -13613,6 +13631,9 @@ $(OBJS)\advdll_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp
$(OBJS)\advdll_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
$(OBJS)\advdll_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
$(OBJS)\advdll_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
@ -13625,7 +13646,7 @@ $(OBJS)\advdll_aboutdlgg.obj : .AUTODEPEND ..\..\src\generic\aboutdlgg.cpp
$(OBJS)\advdll_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
$(OBJS)\advdll_calctrl.obj : .AUTODEPEND ..\..\src\generic\calctrl.cpp
$(OBJS)\advdll_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVDLL_CXXFLAGS) $<
$(OBJS)\advdll_datavgen.obj : .AUTODEPEND ..\..\src\generic\datavgen.cpp
@ -13711,6 +13732,9 @@ $(OBJS)\advlib_datectrl.obj : .AUTODEPEND ..\..\src\msw\datectrl.cpp
$(OBJS)\advlib_animatecmn.obj : .AUTODEPEND ..\..\src\common\animatecmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
$(OBJS)\advlib_calctrlcmn.obj : .AUTODEPEND ..\..\src\common\calctrlcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
$(OBJS)\advlib_datavcmn.obj : .AUTODEPEND ..\..\src\common\datavcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
@ -13723,7 +13747,7 @@ $(OBJS)\advlib_aboutdlgg.obj : .AUTODEPEND ..\..\src\generic\aboutdlgg.cpp
$(OBJS)\advlib_bmpcboxg.obj : .AUTODEPEND ..\..\src\generic\bmpcboxg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
$(OBJS)\advlib_calctrl.obj : .AUTODEPEND ..\..\src\generic\calctrl.cpp
$(OBJS)\advlib_calctrlg.obj : .AUTODEPEND ..\..\src\generic\calctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(ADVLIB_CXXFLAGS) $<
$(OBJS)\advlib_datavgen.obj : .AUTODEPEND ..\..\src\generic\datavgen.cpp

View File

@ -248,6 +248,10 @@ SOURCE=..\..\src\common\animatecmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\calctrlcmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\datavcmn.cpp
# End Source File
# Begin Source File
@ -403,7 +407,7 @@ SOURCE=..\..\src\generic\bmpcboxg.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\generic\calctrl.cpp
SOURCE=..\..\src\generic\calctrlg.cpp
# End Source File
# Begin Source File
@ -744,7 +748,7 @@ SOURCE=..\..\include\wx\generic\bmpcbox.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\generic\calctrl.h
SOURCE=..\..\include\wx\generic\calctrlg.h
# End Source File
# Begin Source File

View File

@ -5171,7 +5171,7 @@ SOURCE=..\..\include\wx\generic\buttonbar.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\generic\calctrl.h
SOURCE=..\..\include\wx\generic\calctrlg.h
# End Source File
# Begin Source File

View File

@ -586,6 +586,8 @@
UniqueIdentifier="{A6A5C30D-BDB6-5050-906D-10A96065136C}">
<File
RelativePath="..\..\src\common\animatecmn.cpp"/>
<File
RelativePath="..\..\src\common\calctrlcmn.cpp"/>
<File
RelativePath="..\..\src\common\datavcmn.cpp"/>
<File
@ -698,7 +700,7 @@
<File
RelativePath="..\..\src\generic\bmpcboxg.cpp"/>
<File
RelativePath="..\..\src\generic\calctrl.cpp"/>
RelativePath="..\..\src\generic\calctrlg.cpp"/>
<File
RelativePath="..\..\src\generic\datavgen.cpp"/>
<File
@ -929,7 +931,7 @@
<File
RelativePath="..\..\include\wx\generic\bmpcbox.h"/>
<File
RelativePath="..\..\include\wx\generic\calctrl.h"/>
RelativePath="..\..\include\wx\generic\calctrlg.h"/>
<File
RelativePath="..\..\include\wx\generic\dataview.h"/>
<File

View File

@ -2913,7 +2913,7 @@
<File
RelativePath="..\..\include\wx\generic\buttonbar.h"/>
<File
RelativePath="..\..\include\wx\generic\calctrl.h"/>
RelativePath="..\..\include\wx\generic\calctrlg.h"/>
<File
RelativePath="..\..\include\wx\generic\choicdgg.h"/>
<File

View File

@ -725,6 +725,9 @@
<File
RelativePath="..\..\src\common\animatecmn.cpp"
/>
<File
RelativePath="..\..\src\common\calctrlcmn.cpp"
/>
<File
RelativePath="..\..\src\common\datavcmn.cpp"
/>
@ -877,7 +880,7 @@
RelativePath="..\..\src\generic\bmpcboxg.cpp"
/>
<File
RelativePath="..\..\src\generic\calctrl.cpp"
RelativePath="..\..\src\generic\calctrlg.cpp"
/>
<File
RelativePath="..\..\src\generic\datavgen.cpp"
@ -1179,7 +1182,7 @@
RelativePath="..\..\include\wx\generic\bmpcbox.h"
/>
<File
RelativePath="..\..\include\wx\generic\calctrl.h"
RelativePath="..\..\include\wx\generic\calctrlg.h"
/>
<File
RelativePath="..\..\include\wx\generic\dataview.h"

View File

@ -3909,7 +3909,7 @@
RelativePath="..\..\include\wx\generic\buttonbar.h"
/>
<File
RelativePath="..\..\include\wx\generic\calctrl.h"
RelativePath="..\..\include\wx\generic\calctrlg.h"
/>
<File
RelativePath="..\..\include\wx\generic\choicdgg.h"

View File

@ -80,6 +80,11 @@ Changes in behaviour not resulting in compilation errors, please read this!
- wxWindow::Freeze/Thaw() are not virtual any more, if you overrode them in
your code you need to override DoFreeze/Thaw() instead now.
- wxCalendarCtrl has native implementation in wxGTK, but it has less features
than the generic one. The native implementation is used by default, but you
can still use wxGenericCalendarCtrl instead of wxCalendarCtrl in your code if
you need the extra features.
Changes in behaviour which may result in compilation errors
-----------------------------------------------------------
@ -176,6 +181,11 @@ Deprecated methods and their replacements
respectively a wxBrushStyle and a wxPenStyle value instead of a plain "int style";
use the new wxBrush/wxPen style names (wxBRUSHSTYLE_XXX and wxPENSTYLE_XXX) instead
of the old deprecated wxXXX styles (which however are still available).
- EVT_CALENDAR_DAY event has been deprecated, use EVT_CALENDAR_SEL_CHANGED.
- EVT_CALENDAR_MONTH and EVT_CALENDAR_YEAR events are deprecated,
use EVT_CALENDAR_PAGE_CHANGED which replaces both of them.
- wxCalendarCtrl::EnableYearChange() and wxCAL_NO_YEAR_CHANGE are deprecated.
Major new features in this release

View File

@ -9,13 +9,6 @@
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
/*
TODO
1. implement multiple selections for date ranges
2. background bitmap for the calendar?
*/
#ifndef _WX_CALCTRL_H_
#define _WX_CALCTRL_H_
@ -26,6 +19,7 @@
#include "wx/dateevt.h"
#include "wx/colour.h"
#include "wx/font.h"
#include "wx/control.h"
// ----------------------------------------------------------------------------
// wxCalendarCtrl flags
@ -43,6 +37,7 @@ enum
wxCAL_SHOW_HOLIDAYS = 0x0002,
// disable the year change control, show only the month change one
// deprecated
wxCAL_NO_YEAR_CHANGE = 0x0004,
// don't allow changing neither month nor year (implies
@ -85,20 +80,9 @@ enum wxCalendarDateBorder
class WXDLLIMPEXP_ADV wxCalendarDateAttr
{
#if !defined(__VISAGECPP__)
protected:
// This has to be before the use of Init(), for MSVC++ 1.5
// But dorks up Visualage!
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
{
m_border = border;
m_holiday = false;
}
#endif
public:
// ctors
wxCalendarDateAttr() { Init(); }
wxCalendarDateAttr(const wxColour& colText,
wxCalendarDateAttr(const wxColour& colText = wxNullColour,
const wxColour& colBack = wxNullColour,
const wxColour& colBorder = wxNullColour,
const wxFont& font = wxNullFont,
@ -137,16 +121,22 @@ public:
const wxColour& GetBorderColour() const { return m_colBorder; }
const wxFont& GetFont() const { return m_font; }
wxCalendarDateBorder GetBorder() const { return m_border; }
#if defined(__VISAGECPP__)
// get or change the "mark" attribute, i.e. the one used for the items
// marked with wxCalendarCtrl::Mark()
static const wxCalendarDateAttr& GetMark() { return m_mark; }
static void SetMark(wxCalendarDateAttr const& m) { m_mark = m; }
protected:
// This has to be here for VisualAge
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
{
m_border = border;
m_holiday = false;
}
#endif
private:
static wxCalendarDateAttr m_mark;
wxColour m_colText,
m_colBack,
m_colBorder;
@ -163,51 +153,120 @@ class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
{
friend class wxCalendarCtrl;
public:
wxCalendarEvent() { Init(); }
inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
wxCalendarEvent() : m_wday(wxDateTime::Inv_WeekDay) { }
wxCalendarEvent(wxWindow *win, const wxDateTime& dt, wxEventType type)
: wxDateEvent(win, dt, type),
m_wday(wxDateTime::Inv_WeekDay)
{
}
void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
protected:
void Init()
{
m_wday = wxDateTime::Inv_WeekDay;
}
private:
wxDateTime::WeekDay m_wday;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
};
// ----------------------------------------------------------------------------
// wxCalendarCtrlBase
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxCalendarCtrlBase : public wxControl
{
public:
// do we allow changing the month/year?
bool AllowMonthChange() const { return !HasFlag(wxCAL_NO_MONTH_CHANGE); }
// get/set the current date
virtual wxDateTime GetDate() const = 0;
virtual bool SetDate(const wxDateTime& date) = 0;
// 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)
//
// notice that this is not implemented in all versions
virtual wxCalendarHitTestResult
HitTest(const wxPoint& WXUNUSED(pos),
wxDateTime* WXUNUSED(date) = NULL,
wxDateTime::WeekDay* WXUNUSED(wd) = NULL)
{
return wxCAL_HITTEST_NOWHERE;
}
// allow or disable changing the current month (and year), return true if
// the value of this option really changed or false if it was already set
// to the required value
//
// NB: we provide implementation for this pure virtual function, derived
// classes should call it
virtual bool EnableMonthChange(bool enable) = 0;
// an item without custom attributes is drawn with the default colours and
// font and without border, setting custom attributes allows to modify this
//
// the day parameter should be in 1..31 range, for days 29, 30, 31 the
// corresponding attribute is just unused if there is no such day in the
// current month
//
// notice that currently arbitrary attributes are supported only in the
// generic version, the native controls only support Mark() which assigns
// some special appearance (which can be customized using SetMark() for the
// generic version) to the given day
virtual void Mark(size_t day, bool mark) = 0;
virtual wxCalendarDateAttr *GetAttr(size_t WXUNUSED(day)) const
{ return NULL; }
virtual void SetAttr(size_t WXUNUSED(day), wxCalendarDateAttr *attr)
{ delete attr; }
virtual void ResetAttr(size_t WXUNUSED(day)) { }
// implementation only from now on
// generate the given calendar event(s)
void GenerateEvent(wxEventType type)
{
wxCalendarEvent event(this, GetDate(), type);
HandleWindowEvent(event);
}
};
// ----------------------------------------------------------------------------
// wxCalendarCtrl
// ----------------------------------------------------------------------------
// so far we only have a generic version, so keep it simple
#include "wx/generic/calctrl.h"
#define wxCalendarNameStr "CalendarCtrl"
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
#define wxHAS_NATIVE_CALENDARCTRL
#include "wx/gtk/calctrl.h"
#define wxCalendarCtrl wxGtkCalendarCtrl
#else
#include "wx/generic/calctrlg.h"
#define wxCalendarCtrl wxGenericCalendarCtrl
#endif
// now we can define the inline ctor using wxCalendarCtrl
inline
wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
: wxDateEvent(cal, cal->GetDate(), type)
{
}
// ----------------------------------------------------------------------------
// calendar event types and macros for handling them
// ----------------------------------------------------------------------------
extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_SEL_CHANGED;
extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_PAGE_CHANGED;
extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_DOUBLECLICKED;
extern WXDLLIMPEXP_ADV const wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED;
// deprecated events
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&);
@ -219,10 +278,13 @@ typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
#define EVT_CALENDAR(id, fn) wx__DECLARE_CALEVT(DOUBLECLICKED, id, fn)
#define EVT_CALENDAR_SEL_CHANGED(id, fn) wx__DECLARE_CALEVT(SEL_CHANGED, id, fn)
#define EVT_CALENDAR_PAGE_CHANGED(id, fn) wx__DECLARE_CALEVT(PAGE_CHANGED, id, fn)
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
// deprecated events
#define EVT_CALENDAR_DAY(id, fn) wx__DECLARE_CALEVT(DAY_CHANGED, id, fn)
#define EVT_CALENDAR_MONTH(id, fn) wx__DECLARE_CALEVT(MONTH_CHANGED, id, fn)
#define EVT_CALENDAR_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn)
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
#endif // wxUSE_CALENDARCTRL

View File

@ -57,11 +57,5 @@ typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
#define EVT_DATE_CHANGED(id, fn) \
wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
#ifdef _WX_DEFINE_DATE_EVENTS_
const wxEventType wxEVT_DATE_CHANGED = wxNewEventType();
IMPLEMENT_DYNAMIC_CLASS(wxDateEvent, wxCommandEvent)
#endif
#endif // _WX_DATEEVT_H_

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: generic/calctrl.h
// Name: generic/calctrlg.h
// Purpose: generic implementation of date-picker control
// Author: Vadim Zeitlin
// Modified by:
@ -9,8 +9,8 @@
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GENERIC_CALCTRL_H
#define _WX_GENERIC_CALCTRL_H
#ifndef _WX_GENERIC_CALCTRLG_H
#define _WX_GENERIC_CALCTRLG_H
#include "wx/control.h" // the base class
#include "wx/dcclient.h" // for wxPaintDC
@ -19,52 +19,54 @@ class WXDLLIMPEXP_FWD_CORE wxComboBox;
class WXDLLIMPEXP_FWD_CORE wxStaticText;
class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
#define wxCalendarNameStr _T("CalendarCtrl")
// ----------------------------------------------------------------------------
// wxCalendarCtrl: a control allowing the user to pick a date interactively
// wxGenericCalendarCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxControl
class WXDLLIMPEXP_ADV wxGenericCalendarCtrl : public wxCalendarCtrlBase
{
public:
// construction
wxCalendarCtrl() { Init(); }
wxCalendarCtrl(wxWindow *parent,
wxWindowID id,
const wxDateTime& date = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
const wxString& name = wxCalendarNameStr);
wxGenericCalendarCtrl() { Init(); }
wxGenericCalendarCtrl(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);
bool Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& date = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxCAL_SHOW_HOLIDAYS | wxWANTS_CHARS,
long style = wxCAL_SHOW_HOLIDAYS,
const wxString& name = wxCalendarNameStr);
virtual ~wxCalendarCtrl();
virtual ~wxGenericCalendarCtrl();
virtual bool Destroy();
// set/get the current date
// ------------------------
bool SetDate(const wxDateTime& date); // we need to be able to control if the event should be sent in SetDateAndNotify(...)
const wxDateTime& GetDate() const { return m_date; }
virtual bool SetDate(const wxDateTime& date);
virtual wxDateTime GetDate() const { return m_date; }
// set/get the range in which selection can occur
// ---------------------------------------------
// all functions in this section are for generic version only
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);
bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
const wxDateTime& upperdate = wxDefaultDateTime);
// calendar mode
// -------------
@ -73,18 +75,23 @@ public:
// just using SetWindowStyle() and Refresh() and the functions below
// should be used instead for them
// corresponds to wxCAL_NO_YEAR_CHANGE bit
// corresponds to wxCAL_NO_MONTH_CHANGE bit
virtual bool EnableMonthChange(bool enable = true);
// corresponds to wxCAL_NO_YEAR_CHANGE bit, deprecated, generic only
void EnableYearChange(bool enable = true);
// corresponds to wxCAL_NO_MONTH_CHANGE bit
void EnableMonthChange(bool enable = true);
// corresponds to wxCAL_SHOW_HOLIDAYS bit
// corresponds to wxCAL_SHOW_HOLIDAYS bit, generic only
void EnableHolidayDisplay(bool display = true);
// customization
// -------------
virtual void Mark(size_t day, bool mark);
// all other functions in this section are for generic version only
// header colours are used for painting the weekdays at the top
void SetHeaderColours(const wxColour& colFg, const wxColour& colBg)
{
@ -115,21 +122,14 @@ public:
const wxColour& GetHolidayColourFg() const { return m_colHolidayFg; }
const wxColour& GetHolidayColourBg() const { return m_colHolidayBg; }
// an item without custom attributes is drawn with the default colours and
// font and without border, setting custom attributes allows to modify this
//
// the day parameter should be in 1..31 range, for days 29, 30, 31 the
// corresponding attribute is just unused if there is no such day in the
// current month
wxCalendarDateAttr *GetAttr(size_t day) const
virtual wxCalendarDateAttr *GetAttr(size_t day) const
{
wxCHECK_MSG( day > 0 && day < 32, NULL, _T("invalid day") );
return m_attrs[day - 1];
}
void SetAttr(size_t day, wxCalendarDateAttr *attr)
virtual void SetAttr(size_t day, wxCalendarDateAttr *attr)
{
wxCHECK_RET( day > 0 && day < 32, _T("invalid day") );
@ -137,16 +137,13 @@ public:
m_attrs[day - 1] = attr;
}
virtual void ResetAttr(size_t day) { SetAttr(day, NULL); }
void SetHoliday(size_t day);
void ResetAttr(size_t day) { SetAttr(day, (wxCalendarDateAttr *)NULL); }
// 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)
wxCalendarHitTestResult HitTest(const wxPoint& pos,
wxDateTime *date = NULL,
wxDateTime::WeekDay *wd = NULL);
virtual wxCalendarHitTestResult HitTest(const wxPoint& pos,
wxDateTime *date = NULL,
wxDateTime::WeekDay *wd = NULL);
// implementation only from now on
// -------------------------------
@ -223,25 +220,7 @@ private:
// reset all holidays
void ResetHolidayAttrs();
// generate the given calendar event(s)
void GenerateEvent(wxEventType type)
{
wxCalendarEvent event(this, type);
(void)GetEventHandler()->ProcessEvent(event);
}
void GenerateEvents(wxEventType type1, wxEventType type2)
{
GenerateEvent(type1);
GenerateEvent(type2);
}
// do we allow changing the month/year?
bool AllowMonthChange() const
{
return (GetWindowStyle() & wxCAL_NO_MONTH_CHANGE)
!= wxCAL_NO_MONTH_CHANGE;
}
// deprecated
bool AllowYearChange() const
{
return !(GetWindowStyle() & wxCAL_NO_YEAR_CHANGE);
@ -316,9 +295,9 @@ private:
// the year control
bool m_userChangedYear;
DECLARE_DYNAMIC_CLASS(wxCalendarCtrl)
DECLARE_DYNAMIC_CLASS(wxGenericCalendarCtrl)
DECLARE_EVENT_TABLE()
DECLARE_NO_COPY_CLASS(wxCalendarCtrl)
DECLARE_NO_COPY_CLASS(wxGenericCalendarCtrl)
};
#endif // _WX_GENERIC_CALCTRL_H
#endif // _WX_GENERIC_CALCTRLG_H

View File

@ -13,7 +13,7 @@
#define _WX_GENERIC_DATECTRL_H_
class WXDLLIMPEXP_FWD_ADV wxCalendarDateAttr;
class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
class WXDLLIMPEXP_FWD_ADV wxGenericCalendarCtrl;
class WXDLLIMPEXP_FWD_ADV wxCalendarEvent;
class WXDLLIMPEXP_FWD_CORE wxComboCtrl;
class WXDLLIMPEXP_FWD_ADV wxCalendarComboPopup;
@ -59,7 +59,7 @@ public:
// extra methods available only in this (generic) implementation
bool SetFormat(const wxString& fmt);
wxCalendarCtrl *GetCalendar() const;
wxGenericCalendarCtrl *GetCalendar() const;
// implementation only from now on

50
include/wx/gtk/calctrl.h Normal file
View File

@ -0,0 +1,50 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/gtk/calctrl.h
// Purpose: wxGtkCalendarCtrl control
// Author: Marcin Wojdyr
// RCS-ID: $Id$
// Copyright: (C) 2008 Marcin Wojdyr
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef GTK_CALCTRL_H__
#define GTK_CALCTRL_H__
class WXDLLIMPEXP_ADV wxGtkCalendarCtrl : public wxCalendarCtrlBase
{
public:
wxGtkCalendarCtrl() {}
wxGtkCalendarCtrl(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 ~wxGtkCalendarCtrl() {}
virtual bool SetDate(const wxDateTime& date);
virtual wxDateTime GetDate() const;
virtual bool EnableMonthChange(bool enable = true);
virtual void Mark(size_t day, bool mark);
private:
DECLARE_DYNAMIC_CLASS(wxGtkCalendarCtrl)
DECLARE_NO_COPY_CLASS(wxGtkCalendarCtrl)
};
#endif // GTK_CALCTRL_H__

View File

@ -29,8 +29,8 @@ public:
wxDateTime::WeekDay GetWeekDay() const;
/**
Sets the week day carried by the event, normally only used by the library
internally.
Sets the week day carried by the event,
normally only used by the library internally.
*/
void SetWeekDay(wxDateTime::WeekDay day);
};
@ -152,6 +152,17 @@ public:
Sets the text (foreground) colour to use.
*/
void SetTextColour(const wxColour& colText);
/**
Used (internally) by generic wxCalendarCtrl::Mark()
*/
static const wxCalendarDateAttr& GetMark();
/**
Set the attribute that will be used to Mark() days
on generic wxCalendarCtrl
*/
static void SetMark(wxCalendarDateAttr const& m);
};
@ -160,56 +171,69 @@ public:
@class wxCalendarCtrl
@wxheader{calctrl.h}
The calendar control allows the user to pick a date. For this,
it displays a window containing several parts: a control at the top to pick the
month
and the year (either or both of them may be disabled), and a month
area below them which shows all the days in the month. The user can move the
The calendar control allows the user to pick a date. The user can move the
current selection using the keyboard and select the date (generating
@c EVT_CALENDAR event) by pressing @c Return or double clicking it.
It has advanced possibilities for the customization of its display. All global
settings (such as colours and fonts used) can, of course, be changed. But
also, the display style for each day in the month can be set independently
using wxCalendarDateAttr class.
Generic calendar has advanced possibilities for the customization of its
display, described below. If you want to use these possibilities on
every platform, use wxGenericCalendarCtrl instead of wxCalendarCtrl.
All global settings (such as colours and fonts used) can, of course,
be changed. But also, the display style for each day in the month can
be set independently using wxCalendarDateAttr class.
An item without custom attributes is drawn with the default colours and
font and without border, but setting custom attributes with
wxCalendarCtrl::SetAttr allows to modify its appearance. Just
create a custom attribute object and set it for the day you want to be
displayed specially (note that the control will take ownership of the pointer,
i.e. it will delete it itself). A day may be marked as being a holiday, even
if it is not recognized as one by wxDateTime using
wxCalendarDateAttr::SetHoliday method.
displayed specially (note that the control will take ownership of
the pointer, i.e. it will delete it itself).
A day may be marked as being a holiday, even if it is not recognized as
one by wxDateTime using wxCalendarDateAttr::SetHoliday method.
As the attributes are specified for each day, they may change when the month
is changed, so you will often want to update them in
@c EVT_CALENDAR_MONTH event handler.
@c EVT_CALENDAR_PAGE_CHANGED event handler.
@beginStyleTable
@style{wxCAL_SUNDAY_FIRST}:
Show Sunday as the first day in the week
Show Sunday as the first day in the week (only generic)
@style{wxCAL_MONDAY_FIRST}:
Show Monday as the first day in the week
Show Monday as the first day in the week (only generic)
@style{wxCAL_SHOW_HOLIDAYS}:
Highlight holidays in the calendar
Highlight holidays in the calendar (only generic)
@style{wxCAL_NO_YEAR_CHANGE}:
Disable the year changing
Disable the year changing (deprecated, only generic)
@style{wxCAL_NO_MONTH_CHANGE}:
Disable the month (and, implicitly, the year) changing
@style{wxCAL_SHOW_SURROUNDING_WEEKS}:
Show the neighbouring weeks in the previous and next months
(only generic)
@style{wxCAL_SEQUENTIAL_MONTH_SELECTION}:
Use alternative, more compact, style for the month and year
selection controls.
selection controls. (only generic)
@endStyleTable
@beginEventTable
@event{EVT_CALENDAR(id, func)}:
A day was double clicked in the calendar.
@event{EVT_CALENDAR_SEL_CHANGED(id, func)}:
The selected date changed.
@event{EVT_CALENDAR_PAGE_CHANGED(id, func)}:
The selected month (and/or year) changed.
@event{EVT_CALENDAR_WEEKDAY_CLICKED(id, func)}:
User clicked on the week day header (only generic).
@endEventTable
@library{wxadv}
@category{ctrl}
@appearance{calendarctrl.png}
@nativeimpl{wxgtk}
@see @ref overview_samplecalendar "Calendar sample", wxCalendarDateAttr,
wxCalendarEvent
wxCalendarEvent, wxDatePickerCtrl
*/
class wxCalendarCtrl : public wxControl
{
@ -253,21 +277,26 @@ public:
/**
This function should be used instead of changing
@c wxCAL_NO_MONTH_CHANGE style bit. It allows or disallows the user to
change the month interactively. Note that if the month can not be changed, the
year can not be changed neither.
change the month interactively. Note that if the month can not
be changed, the year can not be changed neither.
@return @true if the value of this option really changed or @false
if it was already set to the requested value.
*/
void EnableMonthChange(bool enable = true);
bool EnableMonthChange(bool enable = true);
/**
@deprecated
This function should be used instead of changing @c wxCAL_NO_YEAR_CHANGE
style bit directly. It allows or disallows the user to change the year
interactively.
interactively. Only in generic wxCalendarCtrl.
*/
void EnableYearChange(bool enable = true);
/**
Returns the attribute for the given date (should be in the range 1...31).
The returned pointer may be @NULL.
The returned pointer may be @NULL. Only in generic wxCalendarCtrl.
*/
wxCalendarDateAttr* GetAttr(size_t day) const;
@ -285,20 +314,21 @@ public:
/**
Gets the foreground colour of the header part of the calendar window.
Only in generic wxCalendarCtrl.
@see SetHeaderColours()
*/
const wxColour GetHeaderColourFg() const;
/**
Gets the background highlight colour.
Gets the background highlight colour. Only in generic wxCalendarCtrl.
@see SetHighlightColours()
*/
const wxColour GetHighlightColourBg() const;
/**
Gets the foreground highlight colour.
Gets the foreground highlight colour. Only in generic wxCalendarCtrl.
@see SetHighlightColours()
*/
@ -306,6 +336,7 @@ public:
/**
Return the background colour currently used for holiday highlighting.
Only in generic wxCalendarCtrl.
@see SetHolidayColours()
*/
@ -313,6 +344,7 @@ public:
/**
Return the foreground colour currently used for holiday highlighting.
Only in generic wxCalendarCtrl.
@see SetHolidayColours()
*/
@ -320,8 +352,9 @@ public:
/**
Returns one of @c wxCAL_HITTEST_XXX
constants() and fills either @a date or
@a wd pointer with the corresponding value depending on the hit test code.
constants() and fills either @a date or @a wd pointer with
the corresponding value depending on the hit test code.
Only in generic wxCalendarCtrl.
*/
wxCalendarHitTestResult HitTest(const wxPoint& pos,
wxDateTime* date = NULL,
@ -330,12 +363,14 @@ public:
/**
Clears any attributes associated with the given day (in the range
1...31).
Only in generic wxCalendarCtrl.
*/
void ResetAttr(size_t day);
/**
Associates the attribute with the specified date (in the range 1...31).
If the pointer is @NULL, the items attribute is cleared.
Only in generic wxCalendarCtrl.
*/
void SetAttr(size_t day, wxCalendarDateAttr* attr);
@ -346,12 +381,14 @@ public:
/**
Set the colours used for painting the weekdays at the top of the control.
Only in generic wxCalendarCtrl.
*/
void SetHeaderColours(const wxColour& colFg,
const wxColour& colBg);
/**
Set the colours to be used for highlighting the currently selected date.
Only in generic wxCalendarCtrl.
*/
void SetHighlightColours(const wxColour& colFg,
const wxColour& colBg);
@ -364,8 +401,16 @@ public:
/**
Sets the colours to be used for the holidays highlighting (only used if the
window style includes @c wxCAL_SHOW_HOLIDAYS flag).
Only in generic wxCalendarCtrl.
*/
void SetHolidayColours(const wxColour& colFg,
const wxColour& colBg);
/**
Mark or unmark the day.
This day of month will be marked in every month.
In generic wxCalendarCtrl,
*/
void Mark(size_t day, bool mark);
};

View File

@ -42,6 +42,7 @@
#endif
#include "wx/calctrl.h"
#include "wx/splitter.h"
#if wxUSE_DATEPICKCTRL
#include "wx/datectrl.h"
@ -52,6 +53,10 @@
#include "../sample.xpm"
#ifdef wxHAS_NATIVE_CALENDARCTRL
#include "wx/generic/calctrlg.h"
#endif
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
@ -72,29 +77,40 @@ public:
class MyPanel : public wxPanel
{
public:
MyPanel(wxFrame *frame);
MyPanel(wxWindow *parent);
void OnCalendar(wxCalendarEvent& event);
void OnCalendarWeekDayClick(wxCalendarEvent& event);
void OnCalendarChange(wxCalendarEvent& event);
void OnCalMonthChange(wxCalendarEvent& event);
void OnCalYearChange(wxCalendarEvent& event);
wxCalendarCtrl *GetCal() const { return m_calendar; }
wxCalendarCtrlBase *GetCal() const { return m_calendar; }
// turn on/off the specified style bit on the calendar control
void ToggleCalStyle(bool on, int style);
bool IsUsingGeneric() const { return m_usingGeneric; }
void ToggleUseGeneric()
{
m_usingGeneric = !m_usingGeneric;
RecreateCalendar(m_calendar->GetWindowStyle());
}
void HighlightSpecial(bool on);
wxDateTime GetDate() const { return m_calendar->GetDate(); }
void SetDate(const wxDateTime& dt) { m_calendar->SetDate(dt); }
private:
wxCalendarCtrl *m_calendar;
void RecreateCalendar(long style);
wxCalendarCtrlBase *m_calendar;
wxStaticText *m_date;
wxSizer *m_sizer;
bool m_usingGeneric;
DECLARE_EVENT_TABLE()
};
@ -106,8 +122,9 @@ public:
MyFrame(const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnClearLog(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
#if wxUSE_DATEPICKCTRL
void OnAskDate(wxCommandEvent& event);
@ -115,12 +132,18 @@ public:
void OnUpdateUIStartWithNone(wxUpdateUIEvent& event);
#endif // wxUSE_DATEPICKCTRL
#ifdef wxHAS_NATIVE_CALENDARCTRL
void OnCalGeneric(wxCommandEvent& WXUNUSED(event))
{
m_panel->ToggleUseGeneric();
}
#endif // wxHAS_NATIVE_CALENDARCTRL
void OnCalMonday(wxCommandEvent& event);
void OnCalHolidays(wxCommandEvent& event);
void OnCalSpecial(wxCommandEvent& event);
void OnCalAllowMonth(wxCommandEvent& event);
void OnCalAllowYear(wxCommandEvent& event);
void OnCalSeqMonth(wxCommandEvent& event);
void OnCalShowSurroundingWeeks(wxCommandEvent& event);
@ -131,10 +154,14 @@ public:
void OnCalToggleResizable(wxCommandEvent& event);
void OnAllowYearUpdate(wxUpdateUIEvent& event);
void OnUpdateUIGenericOnly(wxUpdateUIEvent& event)
{
event.Enable(m_panel->IsUsingGeneric());
}
private:
MyPanel *m_panel;
wxTextCtrl *m_logWindow;
// any class wishing to process wxWidgets events must use this macro
DECLARE_EVENT_TABLE()
@ -172,12 +199,13 @@ enum
{
// menu items
Calendar_File_About = wxID_ABOUT,
Calendar_File_ClearLog = wxID_CLEAR,
Calendar_File_Quit = wxID_EXIT,
Calendar_Cal_Monday = 200,
Calendar_Cal_Generic = 200,
Calendar_Cal_Monday,
Calendar_Cal_Holidays,
Calendar_Cal_Special,
Calendar_Cal_Month,
Calendar_Cal_Year,
Calendar_Cal_SeqMonth,
Calendar_Cal_SurroundWeeks,
Calendar_Cal_SetDate,
@ -205,8 +233,9 @@ enum
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Calendar_File_Quit, MyFrame::OnQuit)
EVT_MENU(Calendar_File_About, MyFrame::OnAbout)
EVT_MENU(Calendar_File_ClearLog, MyFrame::OnClearLog)
EVT_MENU(Calendar_File_Quit, MyFrame::OnQuit)
#if wxUSE_DATEPICKCTRL
EVT_MENU(Calendar_DatePicker_AskDate, MyFrame::OnAskDate)
@ -215,12 +244,15 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
MyFrame::OnUpdateUIStartWithNone)
#endif // wxUSE_DATEPICKCTRL
#ifdef wxHAS_NATIVE_CALENDARCTRL
EVT_MENU(Calendar_Cal_Generic, MyFrame::OnCalGeneric)
#endif // wxHAS_NATIVE_CALENDARCTRL
EVT_MENU(Calendar_Cal_Monday, MyFrame::OnCalMonday)
EVT_MENU(Calendar_Cal_Holidays, MyFrame::OnCalHolidays)
EVT_MENU(Calendar_Cal_Special, MyFrame::OnCalSpecial)
EVT_MENU(Calendar_Cal_Month, MyFrame::OnCalAllowMonth)
EVT_MENU(Calendar_Cal_Year, MyFrame::OnCalAllowYear)
EVT_MENU(Calendar_Cal_SeqMonth, MyFrame::OnCalSeqMonth)
EVT_MENU(Calendar_Cal_SurroundWeeks, MyFrame::OnCalShowSurroundingWeeks)
@ -232,14 +264,17 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Calendar_Cal_Resizable, MyFrame::OnCalToggleResizable)
EVT_UPDATE_UI(Calendar_Cal_Year, MyFrame::OnAllowYearUpdate)
EVT_UPDATE_UI(Calendar_Cal_SeqMonth, MyFrame::OnUpdateUIGenericOnly)
EVT_UPDATE_UI(Calendar_Cal_Monday, MyFrame::OnUpdateUIGenericOnly)
EVT_UPDATE_UI(Calendar_Cal_Holidays, MyFrame::OnUpdateUIGenericOnly)
EVT_UPDATE_UI(Calendar_Cal_Special, MyFrame::OnUpdateUIGenericOnly)
EVT_UPDATE_UI(Calendar_Cal_SurroundWeeks, MyFrame::OnUpdateUIGenericOnly)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyPanel, wxPanel)
EVT_CALENDAR (Calendar_CalCtrl, MyPanel::OnCalendar)
EVT_CALENDAR_MONTH (Calendar_CalCtrl, MyPanel::OnCalMonthChange)
EVT_CALENDAR_YEAR (Calendar_CalCtrl, MyPanel::OnCalYearChange)
EVT_CALENDAR_SEL_CHANGED(Calendar_CalCtrl, MyPanel::OnCalendarChange)
EVT_CALENDAR(Calendar_CalCtrl, MyPanel::OnCalendar)
EVT_CALENDAR_PAGE_CHANGED(Calendar_CalCtrl, MyPanel::OnCalMonthChange)
EVT_CALENDAR_SEL_CHANGED(Calendar_CalCtrl, MyPanel::OnCalendarChange)
EVT_CALENDAR_WEEKDAY_CLICKED(Calendar_CalCtrl, MyPanel::OnCalendarWeekDayClick)
END_EVENT_TABLE()
@ -302,9 +337,16 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
wxMenu *menuFile = new wxMenu;
menuFile->Append(Calendar_File_About, _T("&About...\tCtrl-A"), _T("Show about dialog"));
menuFile->AppendSeparator();
menuFile->Append(Calendar_File_ClearLog, _T("&Clear log\tCtrl-L"));
menuFile->AppendSeparator();
menuFile->Append(Calendar_File_Quit, _T("E&xit\tAlt-X"), _T("Quit this program"));
wxMenu *menuCal = new wxMenu;
#ifdef wxHAS_NATIVE_CALENDARCTRL
menuCal->AppendCheckItem(Calendar_Cal_Generic, "Use &generic version\tCtrl-G",
"Toggle between native and generic control");
menuCal->AppendSeparator();
#endif // wxHAS_NATIVE_CALENDARCTRL
menuCal->Append(Calendar_Cal_Monday,
_T("Monday &first weekday\tCtrl-F"),
_T("Toggle between Mon and Sun as the first week day"),
@ -321,15 +363,12 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
true);
menuCal->AppendSeparator();
menuCal->Append(Calendar_Cal_SeqMonth,
_T("To&ggle month selector style\tCtrl-G"),
_T("Toggle month selector st&yle\tCtrl-Y"),
_T("Use another style for the calendar controls"),
true);
menuCal->Append(Calendar_Cal_Month, _T("&Month can be changed\tCtrl-M"),
_T("Allow changing the month in the calendar"),
true);
menuCal->Append(Calendar_Cal_Year, _T("&Year can be changed\tCtrl-Y"),
_T("Allow changing the year in the calendar"),
true);
menuCal->AppendSeparator();
menuCal->Append(Calendar_Cal_SetDate, _T("Call &SetDate(2005-12-24)"), _T("Set date to 2005-12-24."));
menuCal->Append(Calendar_Cal_Today, _T("Call &Today()"), _T("Set to the current date."));
@ -366,7 +405,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
menuBar->Check(Calendar_Cal_Monday, true);
menuBar->Check(Calendar_Cal_Holidays, true);
menuBar->Check(Calendar_Cal_Month, true);
menuBar->Check(Calendar_Cal_Year, true);
#if wxUSE_DATEPICKCTRL
menuBar->Check(Calendar_DatePicker_ShowCentury, true);
@ -375,13 +413,16 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
m_panel = new MyPanel(this);
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(_T("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR
wxSplitterWindow *splitter = new wxSplitterWindow(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
wxSP_NOBORDER);
m_panel = new MyPanel(splitter);
m_logWindow = new wxTextCtrl(splitter, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
wxTE_READONLY | wxTE_MULTILINE);
splitter->SplitHorizontally(m_panel, m_logWindow);
splitter->SetMinimumPaneSize(20);
wxLog::SetActiveTarget(new wxLogTextCtrl(m_logWindow));
}
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
@ -392,22 +433,29 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageBox(_T("wxCalendarCtrl sample\n(c) 2000 Vadim Zeitlin"),
wxMessageBox(_T("wxCalendarCtrl sample\n(c) 2000--2008 Vadim Zeitlin"),
_T("About Calendar"), wxOK | wxICON_INFORMATION, this);
}
void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))
{
m_logWindow->Clear();
}
void MyFrame::OnCalMonday(wxCommandEvent& event)
{
bool enable = GetMenuBar()->IsChecked(event.GetId());
m_panel->ToggleCalStyle(enable, wxCAL_MONDAY_FIRST);
m_panel->ToggleCalStyle(event.IsChecked(), wxCAL_MONDAY_FIRST);
}
void MyFrame::OnCalHolidays(wxCommandEvent& event)
{
bool enable = GetMenuBar()->IsChecked(event.GetId());
m_panel->GetCal()->EnableHolidayDisplay(enable);
wxCalendarCtrlBase * cal = m_panel->GetCal();
#ifdef wxHAS_NATIVE_CALENDARCTRL
wxStaticCast(cal, wxGenericCalendarCtrl)
#else
cal
#endif
->EnableHolidayDisplay(event.IsChecked());
}
void MyFrame::OnCalSpecial(wxCommandEvent& event)
@ -417,40 +465,23 @@ void MyFrame::OnCalSpecial(wxCommandEvent& event)
void MyFrame::OnCalAllowMonth(wxCommandEvent& event)
{
bool allow = GetMenuBar()->IsChecked(event.GetId());
m_panel->GetCal()->EnableMonthChange(allow);
}
void MyFrame::OnCalAllowYear(wxCommandEvent& event)
{
bool allow = GetMenuBar()->IsChecked(event.GetId());
m_panel->GetCal()->EnableYearChange(allow);
m_panel->GetCal()->EnableMonthChange(event.IsChecked());
}
void MyFrame::OnCalSeqMonth(wxCommandEvent& event)
{
bool allow = GetMenuBar()->IsChecked(event.GetId());
m_panel->ToggleCalStyle(allow, wxCAL_SEQUENTIAL_MONTH_SELECTION);
m_panel->ToggleCalStyle(event.IsChecked(),
wxCAL_SEQUENTIAL_MONTH_SELECTION);
}
void MyFrame::OnCalShowSurroundingWeeks(wxCommandEvent& event)
{
bool allow = GetMenuBar()->IsChecked(event.GetId());
m_panel->ToggleCalStyle(allow, wxCAL_SHOW_SURROUNDING_WEEKS);
}
void MyFrame::OnAllowYearUpdate(wxUpdateUIEvent& event)
{
event.Enable( GetMenuBar()->IsChecked(Calendar_Cal_Month));
m_panel->ToggleCalStyle(event.IsChecked(), wxCAL_SHOW_SURROUNDING_WEEKS);
}
void MyFrame::OnSetDate(wxCommandEvent &WXUNUSED(event))
{
m_panel->SetDate(wxDateTime(5, wxDateTime::Apr, 2008, 22, 00, 00));
m_panel->SetDate(wxDateTime(24, wxDateTime::Dec, 2005, 22, 00, 00));
}
void MyFrame::OnToday(wxCommandEvent &WXUNUSED(event))
@ -537,9 +568,15 @@ void MyFrame::OnAskDate(wxCommandEvent& WXUNUSED(event))
// MyPanel
// ----------------------------------------------------------------------------
MyPanel::MyPanel(wxFrame *frame)
: wxPanel(frame, wxID_ANY)
MyPanel::MyPanel(wxWindow *parent)
: wxPanel(parent, wxID_ANY)
{
#ifdef wxHAS_NATIVE_CALENDARCTRL
m_usingGeneric = false;
#else
m_usingGeneric = true;
#endif
wxString date;
date.Printf(wxT("Selected date: %s"),
wxDateTime::Today().FormatISODate().c_str());
@ -565,7 +602,8 @@ MyPanel::MyPanel(wxFrame *frame)
void MyPanel::OnCalendar(wxCalendarEvent& event)
{
wxLogMessage(wxT("Selected %s from calendar"),
m_calendar->Mark(event.GetDate().GetDay(), true);
wxLogMessage(wxT("Selected (and marked) %s from calendar."),
event.GetDate().FormatISODate().c_str());
}
@ -575,16 +613,14 @@ void MyPanel::OnCalendarChange(wxCalendarEvent& event)
s.Printf(wxT("Selected date: %s"), event.GetDate().FormatISODate().c_str());
m_date->SetLabel(s);
wxLogStatus(s);
}
void MyPanel::OnCalMonthChange(wxCalendarEvent& WXUNUSED(event))
void MyPanel::OnCalMonthChange(wxCalendarEvent& event)
{
wxLogStatus(wxT("Calendar month changed"));
}
void MyPanel::OnCalYearChange(wxCalendarEvent& WXUNUSED(event))
{
wxLogStatus(wxT("Calendar year changed"));
wxLogStatus(wxT("Calendar month changed to %s %d"),
wxDateTime::GetMonthName(event.GetDate().GetMonth()),
event.GetDate().GetYear());
}
void MyPanel::OnCalendarWeekDayClick(wxCalendarEvent& event)
@ -593,6 +629,31 @@ void MyPanel::OnCalendarWeekDayClick(wxCalendarEvent& event)
wxDateTime::GetWeekDayName(event.GetWeekDay()).c_str());
}
void MyPanel::RecreateCalendar(long style)
{
wxCalendarCtrlBase *calendar;
#ifdef wxHAS_NATIVE_CALENDARCTRL
if ( m_usingGeneric )
calendar = new wxGenericCalendarCtrl(this, Calendar_CalCtrl,
m_calendar->GetDate(),
wxDefaultPosition,
wxDefaultSize,
style);
else
#endif // wxHAS_NATIVE_CALENDARCTRL
calendar = new wxCalendarCtrl(this, Calendar_CalCtrl,
m_calendar->GetDate(),
wxDefaultPosition,
wxDefaultSize,
style);
m_sizer->Replace(m_calendar, calendar);
delete m_calendar;
m_calendar = calendar;
m_sizer->Layout();
}
void MyPanel::ToggleCalStyle(bool on, int flag)
{
long style = m_calendar->GetWindowStyle();
@ -604,16 +665,7 @@ void MyPanel::ToggleCalStyle(bool on, int flag)
if ( flag == wxCAL_SEQUENTIAL_MONTH_SELECTION )
{
// changing this style requires recreating the control
wxCalendarCtrl *calendar = new wxCalendarCtrl(this, Calendar_CalCtrl,
m_calendar->GetDate(),
wxDefaultPosition,
wxDefaultSize,
style);
m_sizer->Replace(m_calendar, calendar);
delete m_calendar;
m_calendar = calendar;
m_sizer->Layout();
RecreateCalendar(style);
}
else // just changing the style is enough
{
@ -646,6 +698,7 @@ void MyPanel::HighlightSpecial(bool on)
m_calendar->Refresh();
}
// ----------------------------------------------------------------------------
// MyDialog
// ----------------------------------------------------------------------------

64
src/common/calctrlcmn.cpp Normal file
View File

@ -0,0 +1,64 @@
///////////////////////////////////////////////////////////////////////////////
// Name: common/calctrlcmn.cpp
// Author: Marcin Wojdyr
// Created: 2008-03-26
// RCS-ID: $Id$
// Copyright: (C) Marcin Wojdyr
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#endif //WX_PRECOMP
#if wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL
#include "wx/dateevt.h"
IMPLEMENT_DYNAMIC_CLASS(wxDateEvent, wxCommandEvent)
DEFINE_EVENT_TYPE(wxEVT_DATE_CHANGED)
#endif // wxUSE_CALENDARCTRL || wxUSE_DATEPICKCTRL
#if wxUSE_CALENDARCTRL
#include "wx/calctrl.h"
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxDateEvent)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_SEL_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_PAGE_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DOUBLECLICKED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_WEEKDAY_CLICKED)
// deprecated events
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DAY_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_MONTH_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_YEAR_CHANGED)
wxCalendarDateAttr wxCalendarDateAttr::m_mark(wxCAL_BORDER_SQUARE);
bool wxCalendarCtrlBase::EnableMonthChange(bool enable)
{
const long styleOrig = GetWindowStyle();
long style = enable ? styleOrig & ~wxCAL_NO_MONTH_CHANGE
: styleOrig | wxCAL_NO_MONTH_CHANGE;
if ( style == styleOrig )
return false;
SetWindowStyle(style);
return true;
}
#endif // wxUSE_CALENDARCTRL

View File

@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////
// Name: src/generic/calctrl.cpp
// Purpose: implementation fo the generic wxCalendarCtrl
// Name: src/generic/calctrlg.cpp
// Purpose: implementation of the wxGenericCalendarCtrl
// Author: Vadim Zeitlin
// Modified by:
// Created: 29.12.99
@ -34,17 +34,12 @@
#include "wx/textctrl.h"
#endif //WX_PRECOMP
#if wxUSE_CALENDARCTRL
#include "wx/spinctrl.h"
// if wxDatePickerCtrl code doesn't define the date event, do it here as we
// need it as well
#if !wxUSE_DATEPICKCTRL
#define _WX_DEFINE_DATE_EVENTS_
#endif
#include "wx/calctrl.h"
#include "wx/generic/calctrlg.h"
#define DEBUG_PAINT 0
@ -52,15 +47,15 @@
// wxWin macros
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxCalendarCtrl, wxControl)
EVT_PAINT(wxCalendarCtrl::OnPaint)
BEGIN_EVENT_TABLE(wxGenericCalendarCtrl, wxControl)
EVT_PAINT(wxGenericCalendarCtrl::OnPaint)
EVT_CHAR(wxCalendarCtrl::OnChar)
EVT_CHAR(wxGenericCalendarCtrl::OnChar)
EVT_LEFT_DOWN(wxCalendarCtrl::OnClick)
EVT_LEFT_DCLICK(wxCalendarCtrl::OnDClick)
EVT_LEFT_DOWN(wxGenericCalendarCtrl::OnClick)
EVT_LEFT_DCLICK(wxGenericCalendarCtrl::OnDClick)
EVT_SYS_COLOUR_CHANGED(wxCalendarCtrl::OnSysColourChanged)
EVT_SYS_COLOUR_CHANGED(wxGenericCalendarCtrl::OnSysColourChanged)
END_EVENT_TABLE()
#if wxUSE_EXTENDED_RTTI
@ -104,57 +99,88 @@ wxBEGIN_FLAGS( wxCalendarCtrlStyle )
wxEND_FLAGS( wxCalendarCtrlStyle )
IMPLEMENT_DYNAMIC_CLASS_XTI(wxCalendarCtrl, wxControl,"wx/calctrl.h")
IMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericCalendarCtrl, wxControl,"wx/calctrl.h")
wxBEGIN_PROPERTIES_TABLE(wxCalendarCtrl)
wxBEGIN_PROPERTIES_TABLE(wxGenericCalendarCtrl)
wxEVENT_RANGE_PROPERTY( Updated , wxEVT_CALENDAR_SEL_CHANGED , wxEVT_CALENDAR_WEEKDAY_CLICKED , wxCalendarEvent )
wxHIDE_PROPERTY( Children )
wxPROPERTY( Date,wxDateTime, SetDate , GetDate, , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY_FLAGS( WindowStyle , wxCalendarCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxBEGIN_HANDLERS_TABLE(wxCalendarCtrl)
wxBEGIN_HANDLERS_TABLE(wxGenericCalendarCtrl)
wxEND_HANDLERS_TABLE()
wxCONSTRUCTOR_6( wxCalendarCtrl , wxWindow* , Parent , wxWindowID , Id , wxDateTime , Date , wxPoint , Position , wxSize , Size , long , WindowStyle )
wxCONSTRUCTOR_6( wxGenericCalendarCtrl , wxWindow* , Parent , wxWindowID , Id , wxDateTime , Date , wxPoint , Position , wxSize , Size , long , WindowStyle )
#else
IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxGenericCalendarCtrl, wxControl)
#endif
IMPLEMENT_DYNAMIC_CLASS(wxCalendarEvent, wxDateEvent)
// ----------------------------------------------------------------------------
// events
// ----------------------------------------------------------------------------
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_SEL_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DAY_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_MONTH_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_YEAR_CHANGED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_DOUBLECLICKED)
DEFINE_EVENT_TYPE(wxEVT_CALENDAR_WEEKDAY_CLICKED)
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// wxCalendarCtrl
// helper functions
// ----------------------------------------------------------------------------
wxCalendarCtrl::wxCalendarCtrl(wxWindow *parent,
wxWindowID id,
const wxDateTime& date,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
namespace
{
// add attributes that are set in attr
void AddAttr(wxCalendarDateAttr *self, const wxCalendarDateAttr& attr)
{
if (attr.HasTextColour())
self->SetTextColour(attr.GetTextColour());
if (attr.HasBackgroundColour())
self->SetBackgroundColour(attr.GetBackgroundColour());
if (attr.HasBorderColour())
self->SetBorderColour(attr.GetBorderColour());
if (attr.HasFont())
self->SetFont(attr.GetFont());
if (attr.HasBorder())
self->SetBorder(attr.GetBorder());
if (attr.IsHoliday())
self->SetHoliday(true);
}
// remove attributes that are set in attr
void DelAttr(wxCalendarDateAttr *self, const wxCalendarDateAttr &attr)
{
if (attr.HasTextColour())
self->SetTextColour(wxNullColour);
if (attr.HasBackgroundColour())
self->SetBackgroundColour(wxNullColour);
if (attr.HasBorderColour())
self->SetBorderColour(wxNullColour);
if (attr.HasFont())
self->SetFont(wxNullFont);
if (attr.HasBorder())
self->SetBorder(wxCAL_BORDER_NONE);
if (attr.IsHoliday())
self->SetHoliday(false);
}
} // anonymous namespace
// ----------------------------------------------------------------------------
// wxGenericCalendarCtrl
// ----------------------------------------------------------------------------
wxGenericCalendarCtrl::wxGenericCalendarCtrl(wxWindow *parent,
wxWindowID id,
const wxDateTime& date,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
Init();
(void)Create(parent, id, date, pos, size, style, name);
}
void wxCalendarCtrl::Init()
void wxGenericCalendarCtrl::Init()
{
m_comboMonth = NULL;
m_spinYear = NULL;
@ -180,7 +206,7 @@ void wxCalendarCtrl::Init()
InitColours();
}
void wxCalendarCtrl::InitColours()
void wxGenericCalendarCtrl::InitColours()
{
m_colHighlightFg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
m_colHighlightBg = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
@ -194,13 +220,13 @@ void wxCalendarCtrl::InitColours()
m_colHeaderBg = *wxLIGHT_GREY;
}
bool wxCalendarCtrl::Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& date,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
bool wxGenericCalendarCtrl::Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& date,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
if ( !wxControl::Create(parent, id, pos, size,
style | wxCLIP_CHILDREN | wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
@ -247,7 +273,7 @@ bool wxCalendarCtrl::Create(wxWindow *parent,
return true;
}
wxCalendarCtrl::~wxCalendarCtrl()
wxGenericCalendarCtrl::~wxGenericCalendarCtrl()
{
for ( size_t n = 0; n < WXSIZEOF(m_attrs); n++ )
{
@ -263,7 +289,7 @@ wxCalendarCtrl::~wxCalendarCtrl()
}
}
void wxCalendarCtrl::SetWindowStyleFlag(long style)
void wxGenericCalendarCtrl::SetWindowStyleFlag(long style)
{
// changing this style doesn't work because the controls are not
// created/shown/hidden accordingly
@ -278,7 +304,7 @@ void wxCalendarCtrl::SetWindowStyleFlag(long style)
// Create the wxComboBox and wxSpinCtrl
// ----------------------------------------------------------------------------
void wxCalendarCtrl::CreateMonthComboBox()
void wxGenericCalendarCtrl::CreateMonthComboBox()
{
m_comboMonth = new wxComboBox(GetParent(), wxID_ANY,
wxEmptyString,
@ -301,11 +327,11 @@ void wxCalendarCtrl::CreateMonthComboBox()
wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
m_comboMonth->Connect(m_comboMonth->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED,
wxCommandEventHandler(wxCalendarCtrl::OnMonthChange),
wxCommandEventHandler(wxGenericCalendarCtrl::OnMonthChange),
NULL, this);
}
void wxCalendarCtrl::CreateYearSpinCtrl()
void wxGenericCalendarCtrl::CreateYearSpinCtrl()
{
m_spinYear = new wxSpinCtrl(GetParent(), wxID_ANY,
GetDate().Format(_T("%Y")),
@ -315,11 +341,11 @@ void wxCalendarCtrl::CreateYearSpinCtrl()
-4300, 10000, GetDate().GetYear());
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
wxCommandEventHandler(wxCalendarCtrl::OnYearTextChange),
wxCommandEventHandler(wxGenericCalendarCtrl::OnYearTextChange),
NULL, this);
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_SPINCTRL_UPDATED,
wxCommandEventHandler(wxCalendarCtrl::OnYearChange),
wxCommandEventHandler(wxGenericCalendarCtrl::OnYearChange),
NULL, this);
}
@ -327,7 +353,7 @@ void wxCalendarCtrl::CreateYearSpinCtrl()
// forward wxWin functions to subcontrols
// ----------------------------------------------------------------------------
bool wxCalendarCtrl::Destroy()
bool wxGenericCalendarCtrl::Destroy()
{
if ( m_staticYear )
m_staticYear->Destroy();
@ -346,7 +372,7 @@ bool wxCalendarCtrl::Destroy()
return wxControl::Destroy();
}
bool wxCalendarCtrl::Show(bool show)
bool wxGenericCalendarCtrl::Show(bool show)
{
if ( !wxControl::Show(show) )
{
@ -365,7 +391,7 @@ bool wxCalendarCtrl::Show(bool show)
return true;
}
bool wxCalendarCtrl::Enable(bool enable)
bool wxGenericCalendarCtrl::Enable(bool enable)
{
if ( !wxControl::Enable(enable) )
{
@ -385,7 +411,7 @@ bool wxCalendarCtrl::Enable(bool enable)
// enable/disable month/year controls
// ----------------------------------------------------------------------------
void wxCalendarCtrl::ShowCurrentControls()
void wxGenericCalendarCtrl::ShowCurrentControls()
{
if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) )
{
@ -416,17 +442,17 @@ void wxCalendarCtrl::ShowCurrentControls()
//else: these controls are not even created, don't show/hide them
}
wxControl *wxCalendarCtrl::GetMonthControl() const
wxControl *wxGenericCalendarCtrl::GetMonthControl() const
{
return AllowMonthChange() ? (wxControl *)m_comboMonth : (wxControl *)m_staticMonth;
}
wxControl *wxCalendarCtrl::GetYearControl() const
wxControl *wxGenericCalendarCtrl::GetYearControl() const
{
return AllowYearChange() ? (wxControl *)m_spinYear : (wxControl *)m_staticYear;
}
void wxCalendarCtrl::EnableYearChange(bool enable)
void wxGenericCalendarCtrl::EnableYearChange(bool enable)
{
if ( enable != AllowYearChange() )
{
@ -445,30 +471,23 @@ void wxCalendarCtrl::EnableYearChange(bool enable)
}
}
void wxCalendarCtrl::EnableMonthChange(bool enable)
bool wxGenericCalendarCtrl::EnableMonthChange(bool enable)
{
if ( enable != AllowMonthChange() )
{
long style = GetWindowStyle();
if ( enable )
style &= ~wxCAL_NO_MONTH_CHANGE;
else
style |= wxCAL_NO_MONTH_CHANGE;
SetWindowStyle(style);
if ( !wxCalendarCtrlBase::EnableMonthChange(enable) )
return false;
ShowCurrentControls();
if ( GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION )
{
Refresh();
}
}
ShowCurrentControls();
if ( GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION )
Refresh();
return true;
}
// ----------------------------------------------------------------------------
// changing date
// ----------------------------------------------------------------------------
bool wxCalendarCtrl::SetDate(const wxDateTime& date)
bool wxGenericCalendarCtrl::SetDate(const wxDateTime& date)
{
bool retval = true;
@ -520,7 +539,7 @@ bool wxCalendarCtrl::SetDate(const wxDateTime& date)
return retval;
}
void wxCalendarCtrl::ChangeDay(const wxDateTime& date)
void wxGenericCalendarCtrl::ChangeDay(const wxDateTime& date)
{
if ( m_date != date )
{
@ -539,24 +558,29 @@ void wxCalendarCtrl::ChangeDay(const wxDateTime& date)
}
}
void wxCalendarCtrl::SetDateAndNotify(const wxDateTime& date)
void wxGenericCalendarCtrl::SetDateAndNotify(const wxDateTime& date)
{
wxDateTime::Tm tm1 = m_date.GetTm(),
tm2 = date.GetTm();
wxEventType type;
if ( tm1.year != tm2.year )
type = wxEVT_CALENDAR_YEAR_CHANGED;
else if ( tm1.mon != tm2.mon )
type = wxEVT_CALENDAR_MONTH_CHANGED;
else if ( tm1.mday != tm2.mday )
type = wxEVT_CALENDAR_DAY_CHANGED;
else
const bool pageChanged = tm1.year != tm2.year || tm1.mon != tm2.mon;
if ( !pageChanged && tm1.mday == tm2.mday )
return;
if ( SetDate(date) )
{
GenerateEvents(type, wxEVT_CALENDAR_SEL_CHANGED);
GenerateEvent(wxEVT_CALENDAR_SEL_CHANGED);
if ( !pageChanged )
GenerateEvent(wxEVT_CALENDAR_PAGE_CHANGED);
// send also one of the deprecated events
if ( tm1.year != tm2.year )
GenerateEvent(wxEVT_CALENDAR_YEAR_CHANGED);
else if ( tm1.mon != tm2.mon )
GenerateEvent(wxEVT_CALENDAR_MONTH_CHANGED);
else
GenerateEvent(wxEVT_CALENDAR_DAY_CHANGED);
}
}
@ -564,7 +588,7 @@ void wxCalendarCtrl::SetDateAndNotify(const wxDateTime& date)
// date range
// ----------------------------------------------------------------------------
bool wxCalendarCtrl::SetLowerDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
bool wxGenericCalendarCtrl::SetLowerDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
{
bool retval = true;
@ -580,7 +604,7 @@ bool wxCalendarCtrl::SetLowerDateLimit(const wxDateTime& date /* = wxDefaultDate
return retval;
}
bool wxCalendarCtrl::SetUpperDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
bool wxGenericCalendarCtrl::SetUpperDateLimit(const wxDateTime& date /* = wxDefaultDateTime */)
{
bool retval = true;
@ -596,7 +620,7 @@ bool wxCalendarCtrl::SetUpperDateLimit(const wxDateTime& date /* = wxDefaultDate
return retval;
}
bool wxCalendarCtrl::SetDateRange(const wxDateTime& lowerdate /* = wxDefaultDateTime */, const wxDateTime& upperdate /* = wxDefaultDateTime */)
bool wxGenericCalendarCtrl::SetDateRange(const wxDateTime& lowerdate /* = wxDefaultDateTime */, const wxDateTime& upperdate /* = wxDefaultDateTime */)
{
bool retval = true;
@ -619,7 +643,7 @@ bool wxCalendarCtrl::SetDateRange(const wxDateTime& lowerdate /* = wxDefaultDate
// date helpers
// ----------------------------------------------------------------------------
wxDateTime wxCalendarCtrl::GetStartDate() const
wxDateTime wxGenericCalendarCtrl::GetStartDate() const
{
wxDateTime::Tm tm = m_date.GetTm();
@ -641,7 +665,7 @@ wxDateTime wxCalendarCtrl::GetStartDate() const
return date;
}
bool wxCalendarCtrl::IsDateShown(const wxDateTime& date) const
bool wxGenericCalendarCtrl::IsDateShown(const wxDateTime& date) const
{
if ( !(GetWindowStyle() & wxCAL_SHOW_SURROUNDING_WEEKS) )
{
@ -653,14 +677,14 @@ bool wxCalendarCtrl::IsDateShown(const wxDateTime& date) const
}
}
bool wxCalendarCtrl::IsDateInRange(const wxDateTime& date) const
bool wxGenericCalendarCtrl::IsDateInRange(const wxDateTime& date) const
{
// Check if the given date is in the range specified
return ( ( ( m_lowdate.IsValid() ) ? ( date >= m_lowdate ) : true )
&& ( ( m_highdate.IsValid() ) ? ( date <= m_highdate ) : true ) );
}
bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
bool wxGenericCalendarCtrl::ChangeYear(wxDateTime* target) const
{
bool retval = false;
@ -699,7 +723,7 @@ bool wxCalendarCtrl::ChangeYear(wxDateTime* target) const
return retval;
}
bool wxCalendarCtrl::ChangeMonth(wxDateTime* target) const
bool wxGenericCalendarCtrl::ChangeMonth(wxDateTime* target) const
{
bool retval = true;
@ -720,7 +744,7 @@ bool wxCalendarCtrl::ChangeMonth(wxDateTime* target) const
return retval;
}
size_t wxCalendarCtrl::GetWeek(const wxDateTime& date) const
size_t wxGenericCalendarCtrl::GetWeek(const wxDateTime& date) const
{
size_t retval = date.GetWeekOfMonth(GetWindowStyle() & wxCAL_MONDAY_FIRST
? wxDateTime::Monday_First
@ -765,10 +789,10 @@ size_t wxCalendarCtrl::GetWeek(const wxDateTime& date) const
#else
#define HORZ_MARGIN 15 // spin
#endif
wxSize wxCalendarCtrl::DoGetBestSize() const
wxSize wxGenericCalendarCtrl::DoGetBestSize() const
{
// calc the size of the calendar
((wxCalendarCtrl *)this)->RecalcGeometry(); // const_cast
wx_const_cast(wxGenericCalendarCtrl *, this)->RecalcGeometry();
wxCoord width = 7*m_widthCol,
height = 7*m_heightRow + m_rowOffset + VERT_MARGIN;
@ -797,14 +821,14 @@ wxSize wxCalendarCtrl::DoGetBestSize() const
return best;
}
void wxCalendarCtrl::DoSetSize(int x, int y,
void wxGenericCalendarCtrl::DoSetSize(int x, int y,
int width, int height,
int sizeFlags)
{
wxControl::DoSetSize(x, y, width, height, sizeFlags);
}
void wxCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
void wxGenericCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
{
int yDiff;
@ -843,7 +867,7 @@ void wxCalendarCtrl::DoMoveWindow(int x, int y, int width, int height)
wxControl::DoMoveWindow(x, y + yDiff, width, height - yDiff);
}
void wxCalendarCtrl::DoGetPosition(int *x, int *y) const
void wxGenericCalendarCtrl::DoGetPosition(int *x, int *y) const
{
wxControl::DoGetPosition(x, y);
#ifndef __WXPM__
@ -858,7 +882,7 @@ void wxCalendarCtrl::DoGetPosition(int *x, int *y) const
#endif
}
void wxCalendarCtrl::DoGetSize(int *width, int *height) const
void wxGenericCalendarCtrl::DoGetSize(int *width, int *height) const
{
wxControl::DoGetSize(width, height);
#ifndef __WXPM__
@ -873,7 +897,7 @@ void wxCalendarCtrl::DoGetSize(int *width, int *height) const
#endif
}
void wxCalendarCtrl::RecalcGeometry()
void wxGenericCalendarCtrl::RecalcGeometry()
{
wxClientDC dc(this);
@ -915,7 +939,7 @@ void wxCalendarCtrl::RecalcGeometry()
// drawing
// ----------------------------------------------------------------------------
void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
@ -1209,7 +1233,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
#endif
}
void wxCalendarCtrl::RefreshDate(const wxDateTime& date)
void wxGenericCalendarCtrl::RefreshDate(const wxDateTime& date)
{
RecalcGeometry();
@ -1244,7 +1268,7 @@ void wxCalendarCtrl::RefreshDate(const wxDateTime& date)
Refresh(true, &rect);
}
void wxCalendarCtrl::HighlightRange(wxPaintDC* pDC, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pPen, const wxBrush* pBrush)
void wxGenericCalendarCtrl::HighlightRange(wxPaintDC* pDC, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pPen, const wxBrush* pBrush)
{
// Highlights the given range using pen and brush
// Does nothing if todate < fromdate
@ -1334,7 +1358,7 @@ void wxCalendarCtrl::HighlightRange(wxPaintDC* pDC, const wxDateTime& fromdate,
#endif
}
bool wxCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) const
bool wxGenericCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) const
{
bool retval = true;
@ -1427,7 +1451,7 @@ bool wxCalendarCtrl::GetDateCoord(const wxDateTime& date, int *day, int *week) c
// mouse handling
// ----------------------------------------------------------------------------
void wxCalendarCtrl::OnDClick(wxMouseEvent& event)
void wxGenericCalendarCtrl::OnDClick(wxMouseEvent& event)
{
if ( HitTest(event.GetPosition()) != wxCAL_HITTEST_DAY )
{
@ -1439,7 +1463,7 @@ void wxCalendarCtrl::OnDClick(wxMouseEvent& event)
}
}
void wxCalendarCtrl::OnClick(wxMouseEvent& event)
void wxGenericCalendarCtrl::OnClick(wxMouseEvent& event)
{
wxDateTime date;
wxDateTime::WeekDay wday;
@ -1450,15 +1474,16 @@ void wxCalendarCtrl::OnClick(wxMouseEvent& event)
{
ChangeDay(date);
GenerateEvents(wxEVT_CALENDAR_DAY_CHANGED,
wxEVT_CALENDAR_SEL_CHANGED);
GenerateEvent(wxEVT_CALENDAR_SEL_CHANGED);
GenerateEvent(wxEVT_CALENDAR_DAY_CHANGED);
}
break;
case wxCAL_HITTEST_HEADER:
{
wxCalendarEvent eventWd(this, wxEVT_CALENDAR_WEEKDAY_CLICKED);
eventWd.m_wday = wday;
wxCalendarEvent eventWd(this, GetDate(),
wxEVT_CALENDAR_WEEKDAY_CLICKED);
eventWd.SetWeekDay(wday);
(void)GetEventHandler()->ProcessEvent(eventWd);
}
break;
@ -1479,7 +1504,7 @@ void wxCalendarCtrl::OnClick(wxMouseEvent& event)
}
}
wxCalendarHitTestResult wxCalendarCtrl::HitTest(const wxPoint& pos,
wxCalendarHitTestResult wxGenericCalendarCtrl::HitTest(const wxPoint& pos,
wxDateTime *date,
wxDateTime::WeekDay *wd)
{
@ -1587,7 +1612,7 @@ wxCalendarHitTestResult wxCalendarCtrl::HitTest(const wxPoint& pos,
// subcontrols events handling
// ----------------------------------------------------------------------------
void wxCalendarCtrl::OnMonthChange(wxCommandEvent& event)
void wxGenericCalendarCtrl::OnMonthChange(wxCommandEvent& event)
{
wxDateTime::Tm tm = m_date.GetTm();
@ -1603,7 +1628,7 @@ void wxCalendarCtrl::OnMonthChange(wxCommandEvent& event)
SetDateAndNotify(target);
}
void wxCalendarCtrl::OnYearChange(wxCommandEvent& event)
void wxGenericCalendarCtrl::OnYearChange(wxCommandEvent& event)
{
int year = (int)event.GetInt();
if ( year == INT_MIN )
@ -1633,14 +1658,14 @@ void wxCalendarCtrl::OnYearChange(wxCommandEvent& event)
}
}
void wxCalendarCtrl::OnYearTextChange(wxCommandEvent& event)
void wxGenericCalendarCtrl::OnYearTextChange(wxCommandEvent& event)
{
SetUserChangedYear();
OnYearChange(event);
}
// Responds to colour changes, and passes event on to children.
void wxCalendarCtrl::OnSysColourChanged(wxSysColourChangedEvent& event)
void wxGenericCalendarCtrl::OnSysColourChanged(wxSysColourChangedEvent& event)
{
// reinit colours
InitColours();
@ -1657,7 +1682,7 @@ void wxCalendarCtrl::OnSysColourChanged(wxSysColourChangedEvent& event)
// keyboard interface
// ----------------------------------------------------------------------------
void wxCalendarCtrl::OnChar(wxKeyEvent& event)
void wxGenericCalendarCtrl::OnChar(wxKeyEvent& event)
{
wxDateTime target;
switch ( event.GetKeyCode() )
@ -1756,7 +1781,7 @@ void wxCalendarCtrl::OnChar(wxKeyEvent& event)
// holidays handling
// ----------------------------------------------------------------------------
void wxCalendarCtrl::EnableHolidayDisplay(bool display)
void wxGenericCalendarCtrl::EnableHolidayDisplay(bool display)
{
long style = GetWindowStyle();
if ( display )
@ -1774,7 +1799,7 @@ void wxCalendarCtrl::EnableHolidayDisplay(bool display)
Refresh();
}
void wxCalendarCtrl::SetHolidayAttrs()
void wxGenericCalendarCtrl::SetHolidayAttrs()
{
if ( GetWindowStyle() & wxCAL_SHOW_HOLIDAYS )
{
@ -1795,7 +1820,7 @@ void wxCalendarCtrl::SetHolidayAttrs()
}
}
void wxCalendarCtrl::SetHoliday(size_t day)
void wxGenericCalendarCtrl::SetHoliday(size_t day)
{
wxCHECK_RET( day > 0 && day < 32, _T("invalid day in SetHoliday") );
@ -1811,7 +1836,7 @@ void wxCalendarCtrl::SetHoliday(size_t day)
m_attrs[day - 1] = attr;
}
void wxCalendarCtrl::ResetHolidayAttrs()
void wxGenericCalendarCtrl::ResetHolidayAttrs()
{
for ( size_t day = 0; day < 31; day++ )
{
@ -1822,10 +1847,26 @@ void wxCalendarCtrl::ResetHolidayAttrs()
}
}
void wxGenericCalendarCtrl::Mark(size_t day, bool mark)
{
wxCHECK_RET( day > 0 && day < 32, _T("invalid day in Mark") );
const wxCalendarDateAttr& m = wxCalendarDateAttr::GetMark();
if (mark) {
if ( m_attrs[day - 1] )
AddAttr(m_attrs[day - 1], m);
else
SetAttr(day, new wxCalendarDateAttr(m));
}
else {
if ( m_attrs[day - 1] )
DelAttr(m_attrs[day - 1], m);
}
}
//static
wxVisualAttributes
wxCalendarCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
wxGenericCalendarCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
{
// Use the same color scheme as wxListBox
return wxListBox::GetClassDefaultAttributes(variant);

View File

@ -44,16 +44,12 @@
// this header is not included from wx/datectrl.h if we have a native
// version, but we do need it here
#include "wx/generic/datectrl.h"
#else
// we need to define _WX_DEFINE_DATE_EVENTS_ before including wx/dateevt.h to
// define the event types we use if we're the only date picker control version
// being compiled -- otherwise it's defined in the native version implementation
#define _WX_DEFINE_DATE_EVENTS_
#endif
#include "wx/dateevt.h"
#include "wx/calctrl.h"
#include "wx/generic/calctrlg.h"
#include "wx/combo.h"
// ----------------------------------------------------------------------------
@ -75,12 +71,12 @@
// local classes
// ----------------------------------------------------------------------------
class wxCalendarComboPopup : public wxCalendarCtrl,
class wxCalendarComboPopup : public wxGenericCalendarCtrl,
public wxComboPopup
{
public:
wxCalendarComboPopup() : wxCalendarCtrl(),
wxCalendarComboPopup() : wxGenericCalendarCtrl(),
wxComboPopup()
{
}
@ -94,12 +90,12 @@ public:
// certainly introduce new bugs.
virtual bool Create(wxWindow* parent)
{
if ( !wxCalendarCtrl::Create(parent, wxID_ANY, wxDefaultDateTime,
if ( !wxGenericCalendarCtrl::Create(parent, wxID_ANY, wxDefaultDateTime,
wxPoint(0, 0), wxDefaultSize,
wxCAL_SHOW_HOLIDAYS | wxBORDER_SUNKEN) )
return false;
wxWindow *yearControl = wxCalendarCtrl::GetYearControl();
wxWindow *yearControl = wxGenericCalendarCtrl::GetYearControl();
wxClientDC dc(yearControl);
dc.SetFont(yearControl->GetFont());
@ -107,7 +103,7 @@ public:
dc.GetTextExtent(wxT("2000"), &width, &dummy);
width += ConvertDialogToPixels(wxSize(20, 0)).x;
wxSize calSize = wxCalendarCtrl::GetBestSize();
wxSize calSize = wxGenericCalendarCtrl::GetBestSize();
wxSize yearSize = yearControl->GetSize();
yearSize.x = width;
@ -125,10 +121,10 @@ public:
calPos = 0;
width += 2;
}
wxCalendarCtrl::SetSize(calPos, 0, calSize.x, calSize.y);
wxGenericCalendarCtrl::SetSize(calPos, 0, calSize.x, calSize.y);
yearControl->SetSize(width-yearSize.x-CALBORDER/2, yearPosition.y,
yearSize.x, yearSize.y);
wxCalendarCtrl::GetMonthControl()->Move(0, 0);
wxGenericCalendarCtrl::GetMonthControl()->Move(0, 0);
m_useSize.x = width+CALBORDER/2;
m_useSize.y = calSize.y-2+CALBORDER;
@ -186,14 +182,10 @@ public:
void SendDateEvent(const wxDateTime& dt)
{
//
// Sends both wxCalendarEvent and wxDateEvent
wxWindow* datePicker = m_combo->GetParent();
wxCalendarEvent cev((wxCalendarCtrl*) this, wxEVT_CALENDAR_SEL_CHANGED);
cev.SetEventObject(datePicker);
cev.SetId(datePicker->GetId());
cev.SetDate(dt);
wxCalendarEvent cev(datePicker, dt, wxEVT_CALENDAR_SEL_CHANGED);
datePicker->GetEventHandler()->ProcessEvent(cev);
wxDateEvent event(datePicker, dt, wxEVT_DATE_CHANGED);
@ -353,12 +345,10 @@ private:
};
BEGIN_EVENT_TABLE(wxCalendarComboPopup, wxCalendarCtrl)
BEGIN_EVENT_TABLE(wxCalendarComboPopup, wxGenericCalendarCtrl)
EVT_KEY_DOWN(wxCalendarComboPopup::OnCalKey)
EVT_CALENDAR_SEL_CHANGED(wxID_ANY, wxCalendarComboPopup::OnSelChange)
EVT_CALENDAR_DAY(wxID_ANY, wxCalendarComboPopup::OnSelChange)
EVT_CALENDAR_MONTH(wxID_ANY, wxCalendarComboPopup::OnSelChange)
EVT_CALENDAR_YEAR(wxID_ANY, wxCalendarComboPopup::OnSelChange)
EVT_CALENDAR_PAGE_CHANGED(wxID_ANY, wxCalendarComboPopup::OnSelChange)
EVT_CALENDAR(wxID_ANY, wxCalendarComboPopup::OnSelChange)
END_EVENT_TABLE()
@ -493,7 +483,7 @@ wxDatePickerCtrlGeneric::SetRange(const wxDateTime &dt1, const wxDateTime &dt2)
m_popup->SetDateRange(dt1, dt2);
}
wxCalendarCtrl *wxDatePickerCtrlGeneric::GetCalendar() const
wxGenericCalendarCtrl *wxDatePickerCtrlGeneric::GetCalendar() const
{
return m_popup;
}

158
src/gtk/calctrl.cpp Normal file
View File

@ -0,0 +1,158 @@
///////////////////////////////////////////////////////////////////////////////
// Name: src/gtk/calctrl.cpp
// Purpose: implementation of the wxGtkCalendarCtrl
// Author: Marcin Wojdyr
// RCS-ID: $Id$
// Copyright: (c) 2008 Marcin Wojdyr
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#endif //WX_PRECOMP
#if wxUSE_CALENDARCTRL
#include "wx/gtk/private.h"
#include "wx/calctrl.h"
#include "wx/gtk/calctrl.h"
extern "C" {
static void gtk_day_selected_callback(GtkWidget *WXUNUSED(widget),
wxGtkCalendarCtrl *cal)
{
cal->GenerateEvent(wxEVT_CALENDAR_SEL_CHANGED);
cal->GenerateEvent(wxEVT_CALENDAR_DAY_CHANGED);
}
static void gtk_day_selected_double_click_callback(GtkWidget *WXUNUSED(widget),
wxGtkCalendarCtrl *cal)
{
cal->GenerateEvent(wxEVT_CALENDAR_DOUBLECLICKED);
}
static void gtk_month_changed_callback(GtkWidget *WXUNUSED(widget),
wxGtkCalendarCtrl *cal)
{
cal->GenerateEvent(wxEVT_CALENDAR_PAGE_CHANGED);
}
// callbacks that send deprecated events
static void gtk_prev_month_callback(GtkWidget *WXUNUSED(widget),
wxGtkCalendarCtrl *cal)
{
cal->GenerateEvent(wxEVT_CALENDAR_MONTH_CHANGED);
}
static void gtk_prev_year_callback(GtkWidget *WXUNUSED(widget),
wxGtkCalendarCtrl *cal)
{
cal->GenerateEvent(wxEVT_CALENDAR_YEAR_CHANGED);
}
}
// ----------------------------------------------------------------------------
// wxGtkCalendarCtrl
// ----------------------------------------------------------------------------
bool wxGtkCalendarCtrl::Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& date,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
if (!PreCreation(parent, pos, size) ||
!CreateBase(parent, id, pos, size, style, wxDefaultValidator, name))
{
wxFAIL_MSG(wxT("wxGtkCalendarCtrl creation failed"));
return false;
}
m_widget = gtk_calendar_new();
SetDate(date.IsValid() ? date : wxDateTime::Today());
if (style & wxCAL_NO_MONTH_CHANGE)
g_object_set (G_OBJECT (m_widget), "no-month-change", true, NULL);
g_signal_connect_after(m_widget, "day-selected",
G_CALLBACK (gtk_day_selected_callback),
this);
g_signal_connect_after(m_widget, "day-selected-double-click",
G_CALLBACK (gtk_day_selected_double_click_callback),
this);
g_signal_connect_after(m_widget, "month-changed",
G_CALLBACK (gtk_month_changed_callback),
this);
// connect callbacks that send deprecated events
g_signal_connect_after(m_widget, "prev-month",
G_CALLBACK (gtk_prev_month_callback),
this);
g_signal_connect_after(m_widget, "next-month",
G_CALLBACK (gtk_prev_month_callback),
this);
g_signal_connect_after(m_widget, "prev-year",
G_CALLBACK (gtk_prev_year_callback),
this);
g_signal_connect_after(m_widget, "next-year",
G_CALLBACK (gtk_prev_year_callback),
this);
m_parent->DoAddChild(this);
PostCreation(size);
return true;
}
bool wxGtkCalendarCtrl::EnableMonthChange(bool enable)
{
if ( !wxCalendarCtrlBase::EnableMonthChange(enable) )
return false;
g_object_set (G_OBJECT (m_widget), "no-month-change", !enable, NULL);
return true;
}
bool wxGtkCalendarCtrl::SetDate(const wxDateTime& date)
{
int year = date.GetYear();
int month = date.GetMonth();
int day = date.GetDay();
gtk_calendar_select_month(GTK_CALENDAR(m_widget), month, year);
gtk_calendar_select_day(GTK_CALENDAR(m_widget), day);
return true;
}
wxDateTime wxGtkCalendarCtrl::GetDate() const
{
guint year, month, day;
gtk_calendar_get_date(GTK_CALENDAR(m_widget), &year, &month, &day);
return wxDateTime(day, (wxDateTime::Month) month, year);
}
void wxGtkCalendarCtrl::Mark(size_t day, bool mark)
{
if (mark)
gtk_calendar_mark_day(GTK_CALENDAR(m_widget), day);
else
gtk_calendar_unmark_day(GTK_CALENDAR(m_widget), day);
}
IMPLEMENT_DYNAMIC_CLASS(wxGtkCalendarCtrl, wxControl)
#endif // wxUSE_CALENDARCTRL