From a9e41db760792a4e666492d77290f4c51e9c5b19 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 3 Jan 2011 11:24:13 +0000 Subject: [PATCH] Add wxCompositeWindow<> and use it in wxDatePickerCtrlGeneric. wxCompositeWindow<> is a convenient base class for composite windows, i.e. windows consisting of several other wxWindows. Currently it just automatically forwards various attributes setters calls to all of the composite window parts but it could become more useful in the future. Similarly, for now it is only used in wxDatePickerCtrlGeneric but it could (and should) be used for other composite controls later and we probably should even make this class public to allow its use in the client code. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 1 + build/bakefiles/files.bkl | 1 + build/msw/makefile.bcc | 56 ++++++++--------- build/msw/makefile.gcc | 56 ++++++++--------- build/msw/makefile.vc | 56 ++++++++--------- build/msw/makefile.wat | 56 ++++++++--------- build/msw/wx_core.dsp | 12 ++-- build/msw/wx_vc7_core.vcproj | 9 ++- build/msw/wx_vc8_core.vcproj | 12 ++-- build/msw/wx_vc9_core.vcproj | 12 ++-- include/wx/compositewin.h | 110 ++++++++++++++++++++++++++++++++++ include/wx/generic/datectrl.h | 8 ++- src/generic/datectlg.cpp | 8 +++ 13 files changed, 269 insertions(+), 128 deletions(-) create mode 100644 include/wx/compositewin.h diff --git a/Makefile.in b/Makefile.in index ca752ad369..21347e4ca7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3823,6 +3823,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \ wx/collpane.h \ wx/combo.h \ wx/combobox.h \ + wx/compositewin.h \ wx/control.h \ wx/ctrlsub.h \ wx/cursor.h \ diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 70811b5a50..05c8696fb8 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -797,6 +797,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/collpane.h wx/combo.h wx/combobox.h + wx/compositewin.h wx/control.h wx/ctrlsub.h wx/cursor.h diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index 154e89f542..fc026cc228 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -1789,7 +1789,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_appcmn.obj \ $(OBJS)\monodll_artprov.obj \ $(OBJS)\monodll_artstd.obj \ - $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_arttango.obj \ $(OBJS)\monodll_bmpbase.obj \ $(OBJS)\monodll_bookctrl.obj \ $(OBJS)\monodll_btncmn.obj \ @@ -2037,7 +2037,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_appcmn.obj \ $(OBJS)\monodll_artprov.obj \ $(OBJS)\monodll_artstd.obj \ - $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_arttango.obj \ $(OBJS)\monodll_bmpbase.obj \ $(OBJS)\monodll_bookctrl.obj \ $(OBJS)\monodll_btncmn.obj \ @@ -2513,7 +2513,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_appcmn.obj \ $(OBJS)\monolib_artprov.obj \ $(OBJS)\monolib_artstd.obj \ - $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_arttango.obj \ $(OBJS)\monolib_bmpbase.obj \ $(OBJS)\monolib_bookctrl.obj \ $(OBJS)\monolib_btncmn.obj \ @@ -2761,7 +2761,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_appcmn.obj \ $(OBJS)\monolib_artprov.obj \ $(OBJS)\monolib_artstd.obj \ - $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_arttango.obj \ $(OBJS)\monolib_bmpbase.obj \ $(OBJS)\monolib_bookctrl.obj \ $(OBJS)\monolib_btncmn.obj \ @@ -3125,7 +3125,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_appcmn.obj \ $(OBJS)\coredll_artprov.obj \ $(OBJS)\coredll_artstd.obj \ - $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_arttango.obj \ $(OBJS)\coredll_bmpbase.obj \ $(OBJS)\coredll_bookctrl.obj \ $(OBJS)\coredll_btncmn.obj \ @@ -3373,7 +3373,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_appcmn.obj \ $(OBJS)\coredll_artprov.obj \ $(OBJS)\coredll_artstd.obj \ - $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_arttango.obj \ $(OBJS)\coredll_bmpbase.obj \ $(OBJS)\coredll_bookctrl.obj \ $(OBJS)\coredll_btncmn.obj \ @@ -3630,7 +3630,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_appcmn.obj \ $(OBJS)\corelib_artprov.obj \ $(OBJS)\corelib_artstd.obj \ - $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_arttango.obj \ $(OBJS)\corelib_bmpbase.obj \ $(OBJS)\corelib_bookctrl.obj \ $(OBJS)\corelib_btncmn.obj \ @@ -3878,7 +3878,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_appcmn.obj \ $(OBJS)\corelib_artprov.obj \ $(OBJS)\corelib_artstd.obj \ - $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_arttango.obj \ $(OBJS)\corelib_bmpbase.obj \ $(OBJS)\corelib_bookctrl.obj \ $(OBJS)\corelib_btncmn.obj \ @@ -7129,11 +7129,11 @@ $(OBJS)\monodll_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\monodll_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monodll_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif @@ -9376,11 +9376,11 @@ $(OBJS)\monolib_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\monolib_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monolib_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif @@ -11614,11 +11614,11 @@ $(OBJS)\coredll_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\coredll_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\coredll_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif @@ -12929,11 +12929,11 @@ $(OBJS)\corelib_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\corelib_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\corelib_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 885a3702b2..7716e034a1 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -1800,7 +1800,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_appcmn.o \ $(OBJS)\monodll_artprov.o \ $(OBJS)\monodll_artstd.o \ - $(OBJS)\monodll_arttango.o \ + $(OBJS)\monodll_arttango.o \ $(OBJS)\monodll_bmpbase.o \ $(OBJS)\monodll_bookctrl.o \ $(OBJS)\monodll_btncmn.o \ @@ -2050,7 +2050,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_appcmn.o \ $(OBJS)\monodll_artprov.o \ $(OBJS)\monodll_artstd.o \ - $(OBJS)\monodll_arttango.o \ + $(OBJS)\monodll_arttango.o \ $(OBJS)\monodll_bmpbase.o \ $(OBJS)\monodll_bookctrl.o \ $(OBJS)\monodll_btncmn.o \ @@ -2530,7 +2530,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_appcmn.o \ $(OBJS)\monolib_artprov.o \ $(OBJS)\monolib_artstd.o \ - $(OBJS)\monolib_arttango.o \ + $(OBJS)\monolib_arttango.o \ $(OBJS)\monolib_bmpbase.o \ $(OBJS)\monolib_bookctrl.o \ $(OBJS)\monolib_btncmn.o \ @@ -2780,7 +2780,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_appcmn.o \ $(OBJS)\monolib_artprov.o \ $(OBJS)\monolib_artstd.o \ - $(OBJS)\monolib_arttango.o \ + $(OBJS)\monolib_arttango.o \ $(OBJS)\monolib_bmpbase.o \ $(OBJS)\monolib_bookctrl.o \ $(OBJS)\monolib_btncmn.o \ @@ -3158,7 +3158,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_appcmn.o \ $(OBJS)\coredll_artprov.o \ $(OBJS)\coredll_artstd.o \ - $(OBJS)\coredll_arttango.o \ + $(OBJS)\coredll_arttango.o \ $(OBJS)\coredll_bmpbase.o \ $(OBJS)\coredll_bookctrl.o \ $(OBJS)\coredll_btncmn.o \ @@ -3408,7 +3408,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_appcmn.o \ $(OBJS)\coredll_artprov.o \ $(OBJS)\coredll_artstd.o \ - $(OBJS)\coredll_arttango.o \ + $(OBJS)\coredll_arttango.o \ $(OBJS)\coredll_bmpbase.o \ $(OBJS)\coredll_bookctrl.o \ $(OBJS)\coredll_btncmn.o \ @@ -3671,7 +3671,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_appcmn.o \ $(OBJS)\corelib_artprov.o \ $(OBJS)\corelib_artstd.o \ - $(OBJS)\corelib_arttango.o \ + $(OBJS)\corelib_arttango.o \ $(OBJS)\corelib_bmpbase.o \ $(OBJS)\corelib_bookctrl.o \ $(OBJS)\corelib_btncmn.o \ @@ -3921,7 +3921,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_appcmn.o \ $(OBJS)\corelib_artprov.o \ $(OBJS)\corelib_artstd.o \ - $(OBJS)\corelib_arttango.o \ + $(OBJS)\corelib_arttango.o \ $(OBJS)\corelib_bmpbase.o \ $(OBJS)\corelib_bookctrl.o \ $(OBJS)\corelib_btncmn.o \ @@ -7279,11 +7279,11 @@ $(OBJS)\monodll_artstd.o: ../../src/common/artstd.cpp endif ifeq ($(USE_GUI),1) -$(OBJS)\monodll_arttango.o: ../../src/common/arttango.cpp - $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< -endif - -ifeq ($(USE_GUI),1) +$(OBJS)\monodll_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\monodll_bmpbase.o: ../../src/common/bmpbase.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< endif @@ -9526,11 +9526,11 @@ $(OBJS)\monolib_artstd.o: ../../src/common/artstd.cpp endif ifeq ($(USE_GUI),1) -$(OBJS)\monolib_arttango.o: ../../src/common/arttango.cpp - $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< -endif - -ifeq ($(USE_GUI),1) +$(OBJS)\monolib_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\monolib_bmpbase.o: ../../src/common/bmpbase.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< endif @@ -11764,11 +11764,11 @@ $(OBJS)\coredll_artstd.o: ../../src/common/artstd.cpp endif ifeq ($(USE_GUI),1) -$(OBJS)\coredll_arttango.o: ../../src/common/arttango.cpp - $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< -endif - -ifeq ($(USE_GUI),1) +$(OBJS)\coredll_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\coredll_bmpbase.o: ../../src/common/bmpbase.cpp $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< endif @@ -13079,11 +13079,11 @@ $(OBJS)\corelib_artstd.o: ../../src/common/artstd.cpp endif ifeq ($(USE_GUI),1) -$(OBJS)\corelib_arttango.o: ../../src/common/arttango.cpp - $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< -endif - -ifeq ($(USE_GUI),1) +$(OBJS)\corelib_arttango.o: ../../src/common/arttango.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\corelib_bmpbase.o: ../../src/common/bmpbase.cpp $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< endif diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index 9db3845e9a..b178e1f125 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -1997,7 +1997,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_appcmn.obj \ $(OBJS)\monodll_artprov.obj \ $(OBJS)\monodll_artstd.obj \ - $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_arttango.obj \ $(OBJS)\monodll_bmpbase.obj \ $(OBJS)\monodll_bookctrl.obj \ $(OBJS)\monodll_btncmn.obj \ @@ -2245,7 +2245,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_appcmn.obj \ $(OBJS)\monodll_artprov.obj \ $(OBJS)\monodll_artstd.obj \ - $(OBJS)\monodll_arttango.obj \ + $(OBJS)\monodll_arttango.obj \ $(OBJS)\monodll_bmpbase.obj \ $(OBJS)\monodll_bookctrl.obj \ $(OBJS)\monodll_btncmn.obj \ @@ -2727,7 +2727,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_appcmn.obj \ $(OBJS)\monolib_artprov.obj \ $(OBJS)\monolib_artstd.obj \ - $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_arttango.obj \ $(OBJS)\monolib_bmpbase.obj \ $(OBJS)\monolib_bookctrl.obj \ $(OBJS)\monolib_btncmn.obj \ @@ -2975,7 +2975,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_appcmn.obj \ $(OBJS)\monolib_artprov.obj \ $(OBJS)\monolib_artstd.obj \ - $(OBJS)\monolib_arttango.obj \ + $(OBJS)\monolib_arttango.obj \ $(OBJS)\monolib_bmpbase.obj \ $(OBJS)\monolib_bookctrl.obj \ $(OBJS)\monolib_btncmn.obj \ @@ -3405,7 +3405,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_appcmn.obj \ $(OBJS)\coredll_artprov.obj \ $(OBJS)\coredll_artstd.obj \ - $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_arttango.obj \ $(OBJS)\coredll_bmpbase.obj \ $(OBJS)\coredll_bookctrl.obj \ $(OBJS)\coredll_btncmn.obj \ @@ -3653,7 +3653,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_appcmn.obj \ $(OBJS)\coredll_artprov.obj \ $(OBJS)\coredll_artstd.obj \ - $(OBJS)\coredll_arttango.obj \ + $(OBJS)\coredll_arttango.obj \ $(OBJS)\coredll_bmpbase.obj \ $(OBJS)\coredll_bookctrl.obj \ $(OBJS)\coredll_btncmn.obj \ @@ -3916,7 +3916,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_appcmn.obj \ $(OBJS)\corelib_artprov.obj \ $(OBJS)\corelib_artstd.obj \ - $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_arttango.obj \ $(OBJS)\corelib_bmpbase.obj \ $(OBJS)\corelib_bookctrl.obj \ $(OBJS)\corelib_btncmn.obj \ @@ -4164,7 +4164,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_appcmn.obj \ $(OBJS)\corelib_artprov.obj \ $(OBJS)\corelib_artstd.obj \ - $(OBJS)\corelib_arttango.obj \ + $(OBJS)\corelib_arttango.obj \ $(OBJS)\corelib_bmpbase.obj \ $(OBJS)\corelib_bookctrl.obj \ $(OBJS)\corelib_btncmn.obj \ @@ -7709,11 +7709,11 @@ $(OBJS)\monodll_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\monodll_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\monodll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monodll_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif @@ -9956,11 +9956,11 @@ $(OBJS)\monolib_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\monolib_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\monolib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monolib_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif @@ -12194,11 +12194,11 @@ $(OBJS)\coredll_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\coredll_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\coredll_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\coredll_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif @@ -13509,11 +13509,11 @@ $(OBJS)\corelib_artstd.obj: ..\..\src\common\artstd.cpp !endif !if "$(USE_GUI)" == "1" -$(OBJS)\corelib_arttango.obj: ..\..\src\common\arttango.cpp - $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\arttango.cpp -!endif - -!if "$(USE_GUI)" == "1" +$(OBJS)\corelib_arttango.obj: ..\..\src\common\arttango.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\arttango.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\corelib_bmpbase.obj: ..\..\src\common\bmpbase.cpp $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\bmpbase.cpp !endif diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat index 083226e665..944fdd8c6d 100644 --- a/build/msw/makefile.wat +++ b/build/msw/makefile.wat @@ -355,7 +355,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = & $(OBJS)\monodll_appcmn.obj & $(OBJS)\monodll_artprov.obj & $(OBJS)\monodll_artstd.obj & - $(OBJS)\monodll_arttango.obj & + $(OBJS)\monodll_arttango.obj & $(OBJS)\monodll_bmpbase.obj & $(OBJS)\monodll_bookctrl.obj & $(OBJS)\monodll_btncmn.obj & @@ -605,7 +605,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = & $(OBJS)\monodll_appcmn.obj & $(OBJS)\monodll_artprov.obj & $(OBJS)\monodll_artstd.obj & - $(OBJS)\monodll_arttango.obj & + $(OBJS)\monodll_arttango.obj & $(OBJS)\monodll_bmpbase.obj & $(OBJS)\monodll_bookctrl.obj & $(OBJS)\monodll_btncmn.obj & @@ -1090,7 +1090,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = & $(OBJS)\monolib_appcmn.obj & $(OBJS)\monolib_artprov.obj & $(OBJS)\monolib_artstd.obj & - $(OBJS)\monolib_arttango.obj & + $(OBJS)\monolib_arttango.obj & $(OBJS)\monolib_bmpbase.obj & $(OBJS)\monolib_bookctrl.obj & $(OBJS)\monolib_btncmn.obj & @@ -1340,7 +1340,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = & $(OBJS)\monolib_appcmn.obj & $(OBJS)\monolib_artprov.obj & $(OBJS)\monolib_artstd.obj & - $(OBJS)\monolib_arttango.obj & + $(OBJS)\monolib_arttango.obj & $(OBJS)\monolib_bmpbase.obj & $(OBJS)\monolib_bookctrl.obj & $(OBJS)\monolib_btncmn.obj & @@ -1729,7 +1729,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = & $(OBJS)\coredll_appcmn.obj & $(OBJS)\coredll_artprov.obj & $(OBJS)\coredll_artstd.obj & - $(OBJS)\coredll_arttango.obj & + $(OBJS)\coredll_arttango.obj & $(OBJS)\coredll_bmpbase.obj & $(OBJS)\coredll_bookctrl.obj & $(OBJS)\coredll_btncmn.obj & @@ -1979,7 +1979,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = & $(OBJS)\coredll_appcmn.obj & $(OBJS)\coredll_artprov.obj & $(OBJS)\coredll_artstd.obj & - $(OBJS)\coredll_arttango.obj & + $(OBJS)\coredll_arttango.obj & $(OBJS)\coredll_bmpbase.obj & $(OBJS)\coredll_bookctrl.obj & $(OBJS)\coredll_btncmn.obj & @@ -2244,7 +2244,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = & $(OBJS)\corelib_appcmn.obj & $(OBJS)\corelib_artprov.obj & $(OBJS)\corelib_artstd.obj & - $(OBJS)\corelib_arttango.obj & + $(OBJS)\corelib_arttango.obj & $(OBJS)\corelib_bmpbase.obj & $(OBJS)\corelib_bookctrl.obj & $(OBJS)\corelib_btncmn.obj & @@ -2494,7 +2494,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = & $(OBJS)\corelib_appcmn.obj & $(OBJS)\corelib_artprov.obj & $(OBJS)\corelib_artstd.obj & - $(OBJS)\corelib_arttango.obj & + $(OBJS)\corelib_arttango.obj & $(OBJS)\corelib_bmpbase.obj & $(OBJS)\corelib_bookctrl.obj & $(OBJS)\corelib_btncmn.obj & @@ -7538,11 +7538,11 @@ $(OBJS)\monodll_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp !endif !ifeq USE_GUI 1 -$(OBJS)\monodll_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp - $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< -!endif - -!ifeq USE_GUI 1 +$(OBJS)\monodll_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\monodll_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< !endif @@ -9785,11 +9785,11 @@ $(OBJS)\monolib_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp !endif !ifeq USE_GUI 1 -$(OBJS)\monolib_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp - $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< -!endif - -!ifeq USE_GUI 1 +$(OBJS)\monolib_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\monolib_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< !endif @@ -12023,11 +12023,11 @@ $(OBJS)\coredll_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp !endif !ifeq USE_GUI 1 -$(OBJS)\coredll_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp - $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< -!endif - -!ifeq USE_GUI 1 +$(OBJS)\coredll_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\coredll_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< !endif @@ -13338,11 +13338,11 @@ $(OBJS)\corelib_artstd.obj : .AUTODEPEND ..\..\src\common\artstd.cpp !endif !ifeq USE_GUI 1 -$(OBJS)\corelib_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp - $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< -!endif - -!ifeq USE_GUI 1 +$(OBJS)\corelib_arttango.obj : .AUTODEPEND ..\..\src\common\arttango.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\corelib_bmpbase.obj : .AUTODEPEND ..\..\src\common\bmpbase.cpp $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< !endif diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp index c984f1a51d..c6ae284ca6 100644 --- a/build/msw/wx_core.dsp +++ b/build/msw/wx_core.dsp @@ -268,10 +268,10 @@ SOURCE=..\..\src\common\artstd.cpp # End Source File # Begin Source File -SOURCE=..\..\src\common\arttango.cpp -# End Source File -# Begin Source File - +SOURCE=..\..\src\common\arttango.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\common\bmpbase.cpp # End Source File # Begin Source File @@ -5965,6 +5965,10 @@ SOURCE=..\..\include\wx\commandlinkbutton.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\compositewin.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\control.h # End Source File # Begin Source File diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj index 2ed13aa776..1e7264a86c 100644 --- a/build/msw/wx_vc7_core.vcproj +++ b/build/msw/wx_vc7_core.vcproj @@ -547,9 +547,9 @@ RelativePath="..\..\src\common\artstd.cpp"> - - + + + + diff --git a/build/msw/wx_vc8_core.vcproj b/build/msw/wx_vc8_core.vcproj index 867e6c89b9..d0215bf848 100644 --- a/build/msw/wx_vc8_core.vcproj +++ b/build/msw/wx_vc8_core.vcproj @@ -763,10 +763,10 @@ > - - + + @@ -6775,6 +6775,10 @@ RelativePath="..\..\include\wx\commandlinkbutton.h" > + + diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj index f6657b805d..ed98e2162d 100644 --- a/build/msw/wx_vc9_core.vcproj +++ b/build/msw/wx_vc9_core.vcproj @@ -759,10 +759,10 @@ > - - + + @@ -6771,6 +6771,10 @@ RelativePath="..\..\include\wx\commandlinkbutton.h" > + + diff --git a/include/wx/compositewin.h b/include/wx/compositewin.h new file mode 100644 index 0000000000..f5110ba9b9 --- /dev/null +++ b/include/wx/compositewin.h @@ -0,0 +1,110 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/compositewin.h +// Purpose: wxCompositeWindow<> declaration +// Author: Vadim Zeitlin +// Created: 2011-01-02 +// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $ +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_COMPOSITEWIN_H_ +#define _WX_COMPOSITEWIN_H_ + +#include "wx/window.h" + +// NB: This is an experimental and, as for now, undocumented class used only by +// wxWidgets itself internally. Don't use it in your code until its API is +// officially stabilized unless you are ready to change it with the next +// wxWidgets release. + +// ---------------------------------------------------------------------------- +// wxCompositeWindow is a helper for implementing composite windows: to define +// a class using subwindows, simply inherit from it specialized with the real +// base class name and implement GetCompositeWindowParts() pure virtual method. +// ---------------------------------------------------------------------------- + +// The template parameter W must be a wxWindow-derived class. +template +class wxCompositeWindow : public W +{ +public: + typedef W BaseWindowClass; + + // Default ctor doesn't do anything. + wxCompositeWindow() { } + + // Override all wxWindow methods which must be forwarded to the composite + // window parts. + + // Attribute setters group. + // + // NB: Unfortunately we can't factor out the call for the setter itself + // into DoSetForAllParts() because we can't call the function passed to + // it non-virtually and we need to do this to avoid infinite recursion, + // so we work around this by calling the method of this object itself + // manually in each function. + virtual bool SetForegroundColour(const wxColour& colour) + { + if ( !BaseWindowClass::SetForegroundColour(colour) ) + return false; + + DoSetForAllParts(&wxWindow::SetForegroundColour, colour); + + return true; + } + + virtual bool SetBackgroundColour(const wxColour& colour) + { + if ( !BaseWindowClass::SetBackgroundColour(colour) ) + return false; + + DoSetForAllParts(&wxWindow::SetBackgroundColour, colour); + + return true; + } + + virtual bool SetFont(const wxFont& font) + { + if ( !BaseWindowClass::SetFont(font) ) + return false; + + DoSetForAllParts(&wxWindow::SetFont, font); + + return true; + } + + virtual bool SetCursor(const wxCursor& cursor) + { + if ( !BaseWindowClass::SetCursor(cursor) ) + return false; + + DoSetForAllParts(&wxWindow::SetCursor, cursor); + + return true; + } + +private: + // Must be implemented by the derived class to return all children to which + // the public methods we override should forward to. + virtual wxWindowList GetCompositeWindowParts() const = 0; + + template + void DoSetForAllParts(bool (wxWindow::*func)(const T&), const T& arg) + { + // Simply call the setters for all parts of this composite window. + const wxWindowList parts = GetCompositeWindowParts(); + for ( wxWindowList::const_iterator i = parts.begin(); + i != parts.end(); + ++i ) + { + wxWindow * const child = *i; + + (child->*func)(arg); + } + } + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCompositeWindow, W); +}; + +#endif // _WX_COMPOSITEWIN_H_ diff --git a/include/wx/generic/datectrl.h b/include/wx/generic/datectrl.h index e1b5ad3563..9e5c45aa89 100644 --- a/include/wx/generic/datectrl.h +++ b/include/wx/generic/datectrl.h @@ -12,12 +12,15 @@ #ifndef _WX_GENERIC_DATECTRL_H_ #define _WX_GENERIC_DATECTRL_H_ +#include "wx/compositewin.h" + class WXDLLIMPEXP_FWD_CORE wxComboCtrl; class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl; class WXDLLIMPEXP_FWD_ADV wxCalendarComboPopup; -class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric : public wxDatePickerCtrlBase +class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric + : public wxCompositeWindow { public: // creating the control @@ -72,6 +75,9 @@ protected: private: void Init(); + // return the list of the windows composing this one + virtual wxWindowList GetCompositeWindowParts() const; + void OnText(wxCommandEvent &event); void OnSize(wxSizeEvent& event); void OnFocus(wxFocusEvent& event); diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index c5b7b84a53..2ebe9c7c4b 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -378,6 +378,14 @@ wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const return m_combo->GetBestSize(); } +wxWindowList wxDatePickerCtrlGeneric::GetCompositeWindowParts() const +{ + wxWindowList parts; + parts.push_back(m_combo); + parts.push_back(m_popup); + return parts; +} + // ---------------------------------------------------------------------------- // wxDatePickerCtrlGeneric API // ---------------------------------------------------------------------------- -- 2.45.2