From: Vadim Zeitlin Date: Sun, 20 Mar 2011 00:00:49 +0000 (+0000) Subject: Add wxPanel::SetBackgroundBitmap(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cd95f7e65c4e1ee61a5d90eb13687ff468cb13ad Add wxPanel::SetBackgroundBitmap(). This method provides a simple way to set a background bitmap without defining an EVT_ERASE_BACKGROUND handler and, more importantly, one that works correctly in wxMSW for a window with children as it paints the background of transparent children too. Add a test of this method to the erase sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/Makefile.in b/Makefile.in index 92c9649f61..f12ceb16e3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4616,6 +4616,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS = \ monodll_markuptext.o \ monodll_msgdlgg.o \ monodll_numdlgg.o \ + monodll_panelg.o \ monodll_progdlgg.o \ monodll_printps.o \ monodll_renderg.o \ @@ -4831,6 +4832,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS = \ monodll_markuptext.o \ monodll_msgdlgg.o \ monodll_numdlgg.o \ + monodll_panelg.o \ monodll_progdlgg.o \ monodll_printps.o \ monodll_renderg.o \ @@ -6536,6 +6538,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_1 = \ monolib_markuptext.o \ monolib_msgdlgg.o \ monolib_numdlgg.o \ + monolib_panelg.o \ monolib_progdlgg.o \ monolib_printps.o \ monolib_renderg.o \ @@ -6751,6 +6754,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1 = \ monolib_markuptext.o \ monolib_msgdlgg.o \ monolib_numdlgg.o \ + monolib_panelg.o \ monolib_progdlgg.o \ monolib_printps.o \ monolib_renderg.o \ @@ -8640,6 +8644,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_2 = \ coredll_markuptext.o \ coredll_msgdlgg.o \ coredll_numdlgg.o \ + coredll_panelg.o \ coredll_progdlgg.o \ coredll_printps.o \ coredll_renderg.o \ @@ -8855,6 +8860,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2 = \ coredll_markuptext.o \ coredll_msgdlgg.o \ coredll_numdlgg.o \ + coredll_panelg.o \ coredll_progdlgg.o \ coredll_printps.o \ coredll_renderg.o \ @@ -10222,6 +10228,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_3 = \ corelib_markuptext.o \ corelib_msgdlgg.o \ corelib_numdlgg.o \ + corelib_panelg.o \ corelib_progdlgg.o \ corelib_printps.o \ corelib_renderg.o \ @@ -10437,6 +10444,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3 = \ corelib_markuptext.o \ corelib_msgdlgg.o \ corelib_numdlgg.o \ + corelib_panelg.o \ corelib_progdlgg.o \ corelib_printps.o \ corelib_renderg.o \ @@ -20173,6 +20181,9 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP) @COND_USE_GUI_1@monodll_numdlgg.o: $(srcdir)/src/generic/numdlgg.cpp $(MONODLL_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/numdlgg.cpp +@COND_USE_GUI_1@monodll_panelg.o: $(srcdir)/src/generic/panelg.cpp $(MONODLL_ODEP) +@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/panelg.cpp + @COND_USE_GUI_1@monodll_progdlgg.o: $(srcdir)/src/generic/progdlgg.cpp $(MONODLL_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/progdlgg.cpp @@ -25465,6 +25476,9 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP) @COND_USE_GUI_1@monolib_numdlgg.o: $(srcdir)/src/generic/numdlgg.cpp $(MONOLIB_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/numdlgg.cpp +@COND_USE_GUI_1@monolib_panelg.o: $(srcdir)/src/generic/panelg.cpp $(MONOLIB_ODEP) +@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/panelg.cpp + @COND_USE_GUI_1@monolib_progdlgg.o: $(srcdir)/src/generic/progdlgg.cpp $(MONOLIB_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/progdlgg.cpp @@ -30937,6 +30951,9 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP) @COND_USE_GUI_1@coredll_numdlgg.o: $(srcdir)/src/generic/numdlgg.cpp $(COREDLL_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/numdlgg.cpp +@COND_USE_GUI_1@coredll_panelg.o: $(srcdir)/src/generic/panelg.cpp $(COREDLL_ODEP) +@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/panelg.cpp + @COND_USE_GUI_1@coredll_progdlgg.o: $(srcdir)/src/generic/progdlgg.cpp $(COREDLL_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/progdlgg.cpp @@ -34912,6 +34929,9 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP) @COND_USE_GUI_1@corelib_numdlgg.o: $(srcdir)/src/generic/numdlgg.cpp $(CORELIB_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/numdlgg.cpp +@COND_USE_GUI_1@corelib_panelg.o: $(srcdir)/src/generic/panelg.cpp $(CORELIB_ODEP) +@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/panelg.cpp + @COND_USE_GUI_1@corelib_progdlgg.o: $(srcdir)/src/generic/progdlgg.cpp $(CORELIB_ODEP) @COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/progdlgg.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 09bdf1928e..91bbedc40a 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -788,6 +788,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/generic/markuptext.cpp src/generic/msgdlgg.cpp src/generic/numdlgg.cpp + src/generic/panelg.cpp src/generic/progdlgg.cpp src/generic/printps.cpp src/generic/renderg.cpp diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index 3cae13b177..6ff6d5b451 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -1926,11 +1926,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_listbkg.obj \ $(OBJS)\monodll_logg.obj \ $(OBJS)\monodll_markuptext.obj \ - $(OBJS)\monodll_msgdlgg.obj \ - $(OBJS)\monodll_numdlgg.obj \ - $(OBJS)\monodll_progdlgg.obj \ - $(OBJS)\monodll_printps.obj \ - $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_panelg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ $(OBJS)\monodll_richmsgdlgg.obj \ $(OBJS)\monodll_scrlwing.obj \ $(OBJS)\monodll_selstore.obj \ @@ -2191,11 +2192,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_listbkg.obj \ $(OBJS)\monodll_logg.obj \ $(OBJS)\monodll_markuptext.obj \ - $(OBJS)\monodll_msgdlgg.obj \ - $(OBJS)\monodll_numdlgg.obj \ - $(OBJS)\monodll_progdlgg.obj \ - $(OBJS)\monodll_printps.obj \ - $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_panelg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ $(OBJS)\monodll_richmsgdlgg.obj \ $(OBJS)\monodll_scrlwing.obj \ $(OBJS)\monodll_selstore.obj \ @@ -2687,11 +2689,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_listbkg.obj \ $(OBJS)\monolib_logg.obj \ $(OBJS)\monolib_markuptext.obj \ - $(OBJS)\monolib_msgdlgg.obj \ - $(OBJS)\monolib_numdlgg.obj \ - $(OBJS)\monolib_progdlgg.obj \ - $(OBJS)\monolib_printps.obj \ - $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_panelg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ $(OBJS)\monolib_richmsgdlgg.obj \ $(OBJS)\monolib_scrlwing.obj \ $(OBJS)\monolib_selstore.obj \ @@ -2952,11 +2955,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_listbkg.obj \ $(OBJS)\monolib_logg.obj \ $(OBJS)\monolib_markuptext.obj \ - $(OBJS)\monolib_msgdlgg.obj \ - $(OBJS)\monolib_numdlgg.obj \ - $(OBJS)\monolib_progdlgg.obj \ - $(OBJS)\monolib_printps.obj \ - $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_panelg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ $(OBJS)\monolib_richmsgdlgg.obj \ $(OBJS)\monolib_scrlwing.obj \ $(OBJS)\monolib_selstore.obj \ @@ -3336,11 +3340,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_listbkg.obj \ $(OBJS)\coredll_logg.obj \ $(OBJS)\coredll_markuptext.obj \ - $(OBJS)\coredll_msgdlgg.obj \ - $(OBJS)\coredll_numdlgg.obj \ - $(OBJS)\coredll_progdlgg.obj \ - $(OBJS)\coredll_printps.obj \ - $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_panelg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ $(OBJS)\coredll_richmsgdlgg.obj \ $(OBJS)\coredll_scrlwing.obj \ $(OBJS)\coredll_selstore.obj \ @@ -3601,11 +3606,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_listbkg.obj \ $(OBJS)\coredll_logg.obj \ $(OBJS)\coredll_markuptext.obj \ - $(OBJS)\coredll_msgdlgg.obj \ - $(OBJS)\coredll_numdlgg.obj \ - $(OBJS)\coredll_progdlgg.obj \ - $(OBJS)\coredll_printps.obj \ - $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_panelg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ $(OBJS)\coredll_richmsgdlgg.obj \ $(OBJS)\coredll_scrlwing.obj \ $(OBJS)\coredll_selstore.obj \ @@ -3874,11 +3880,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_listbkg.obj \ $(OBJS)\corelib_logg.obj \ $(OBJS)\corelib_markuptext.obj \ - $(OBJS)\corelib_msgdlgg.obj \ - $(OBJS)\corelib_numdlgg.obj \ - $(OBJS)\corelib_progdlgg.obj \ - $(OBJS)\corelib_printps.obj \ - $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_panelg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ $(OBJS)\corelib_richmsgdlgg.obj \ $(OBJS)\corelib_scrlwing.obj \ $(OBJS)\corelib_selstore.obj \ @@ -4139,11 +4146,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_listbkg.obj \ $(OBJS)\corelib_logg.obj \ $(OBJS)\corelib_markuptext.obj \ - $(OBJS)\corelib_msgdlgg.obj \ - $(OBJS)\corelib_numdlgg.obj \ - $(OBJS)\corelib_progdlgg.obj \ - $(OBJS)\corelib_printps.obj \ - $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_panelg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ $(OBJS)\corelib_richmsgdlgg.obj \ $(OBJS)\corelib_scrlwing.obj \ $(OBJS)\corelib_selstore.obj \ @@ -7961,6 +7969,11 @@ $(OBJS)\monodll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\monodll_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monodll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif @@ -10303,6 +10316,11 @@ $(OBJS)\monolib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\monolib_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monolib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif @@ -12639,6 +12657,11 @@ $(OBJS)\coredll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\coredll_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\coredll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif @@ -14036,6 +14059,11 @@ $(OBJS)\corelib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\corelib_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\corelib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 79c2013b0e..94fa2604b7 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -1937,11 +1937,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_listbkg.o \ $(OBJS)\monodll_logg.o \ $(OBJS)\monodll_markuptext.o \ - $(OBJS)\monodll_msgdlgg.o \ - $(OBJS)\monodll_numdlgg.o \ - $(OBJS)\monodll_progdlgg.o \ - $(OBJS)\monodll_printps.o \ - $(OBJS)\monodll_renderg.o \ + $(OBJS)\monodll_msgdlgg.o \ + $(OBJS)\monodll_numdlgg.o \ + $(OBJS)\monodll_panelg.o \ + $(OBJS)\monodll_progdlgg.o \ + $(OBJS)\monodll_printps.o \ + $(OBJS)\monodll_renderg.o \ $(OBJS)\monodll_richmsgdlgg.o \ $(OBJS)\monodll_scrlwing.o \ $(OBJS)\monodll_selstore.o \ @@ -2204,11 +2205,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_listbkg.o \ $(OBJS)\monodll_logg.o \ $(OBJS)\monodll_markuptext.o \ - $(OBJS)\monodll_msgdlgg.o \ - $(OBJS)\monodll_numdlgg.o \ - $(OBJS)\monodll_progdlgg.o \ - $(OBJS)\monodll_printps.o \ - $(OBJS)\monodll_renderg.o \ + $(OBJS)\monodll_msgdlgg.o \ + $(OBJS)\monodll_numdlgg.o \ + $(OBJS)\monodll_panelg.o \ + $(OBJS)\monodll_progdlgg.o \ + $(OBJS)\monodll_printps.o \ + $(OBJS)\monodll_renderg.o \ $(OBJS)\monodll_richmsgdlgg.o \ $(OBJS)\monodll_scrlwing.o \ $(OBJS)\monodll_selstore.o \ @@ -2704,11 +2706,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_listbkg.o \ $(OBJS)\monolib_logg.o \ $(OBJS)\monolib_markuptext.o \ - $(OBJS)\monolib_msgdlgg.o \ - $(OBJS)\monolib_numdlgg.o \ - $(OBJS)\monolib_progdlgg.o \ - $(OBJS)\monolib_printps.o \ - $(OBJS)\monolib_renderg.o \ + $(OBJS)\monolib_msgdlgg.o \ + $(OBJS)\monolib_numdlgg.o \ + $(OBJS)\monolib_panelg.o \ + $(OBJS)\monolib_progdlgg.o \ + $(OBJS)\monolib_printps.o \ + $(OBJS)\monolib_renderg.o \ $(OBJS)\monolib_richmsgdlgg.o \ $(OBJS)\monolib_scrlwing.o \ $(OBJS)\monolib_selstore.o \ @@ -2971,11 +2974,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_listbkg.o \ $(OBJS)\monolib_logg.o \ $(OBJS)\monolib_markuptext.o \ - $(OBJS)\monolib_msgdlgg.o \ - $(OBJS)\monolib_numdlgg.o \ - $(OBJS)\monolib_progdlgg.o \ - $(OBJS)\monolib_printps.o \ - $(OBJS)\monolib_renderg.o \ + $(OBJS)\monolib_msgdlgg.o \ + $(OBJS)\monolib_numdlgg.o \ + $(OBJS)\monolib_panelg.o \ + $(OBJS)\monolib_progdlgg.o \ + $(OBJS)\monolib_printps.o \ + $(OBJS)\monolib_renderg.o \ $(OBJS)\monolib_richmsgdlgg.o \ $(OBJS)\monolib_scrlwing.o \ $(OBJS)\monolib_selstore.o \ @@ -3369,11 +3373,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_listbkg.o \ $(OBJS)\coredll_logg.o \ $(OBJS)\coredll_markuptext.o \ - $(OBJS)\coredll_msgdlgg.o \ - $(OBJS)\coredll_numdlgg.o \ - $(OBJS)\coredll_progdlgg.o \ - $(OBJS)\coredll_printps.o \ - $(OBJS)\coredll_renderg.o \ + $(OBJS)\coredll_msgdlgg.o \ + $(OBJS)\coredll_numdlgg.o \ + $(OBJS)\coredll_panelg.o \ + $(OBJS)\coredll_progdlgg.o \ + $(OBJS)\coredll_printps.o \ + $(OBJS)\coredll_renderg.o \ $(OBJS)\coredll_richmsgdlgg.o \ $(OBJS)\coredll_scrlwing.o \ $(OBJS)\coredll_selstore.o \ @@ -3636,11 +3641,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_listbkg.o \ $(OBJS)\coredll_logg.o \ $(OBJS)\coredll_markuptext.o \ - $(OBJS)\coredll_msgdlgg.o \ - $(OBJS)\coredll_numdlgg.o \ - $(OBJS)\coredll_progdlgg.o \ - $(OBJS)\coredll_printps.o \ - $(OBJS)\coredll_renderg.o \ + $(OBJS)\coredll_msgdlgg.o \ + $(OBJS)\coredll_numdlgg.o \ + $(OBJS)\coredll_panelg.o \ + $(OBJS)\coredll_progdlgg.o \ + $(OBJS)\coredll_printps.o \ + $(OBJS)\coredll_renderg.o \ $(OBJS)\coredll_richmsgdlgg.o \ $(OBJS)\coredll_scrlwing.o \ $(OBJS)\coredll_selstore.o \ @@ -3915,11 +3921,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_listbkg.o \ $(OBJS)\corelib_logg.o \ $(OBJS)\corelib_markuptext.o \ - $(OBJS)\corelib_msgdlgg.o \ - $(OBJS)\corelib_numdlgg.o \ - $(OBJS)\corelib_progdlgg.o \ - $(OBJS)\corelib_printps.o \ - $(OBJS)\corelib_renderg.o \ + $(OBJS)\corelib_msgdlgg.o \ + $(OBJS)\corelib_numdlgg.o \ + $(OBJS)\corelib_panelg.o \ + $(OBJS)\corelib_progdlgg.o \ + $(OBJS)\corelib_printps.o \ + $(OBJS)\corelib_renderg.o \ $(OBJS)\corelib_richmsgdlgg.o \ $(OBJS)\corelib_scrlwing.o \ $(OBJS)\corelib_selstore.o \ @@ -4182,11 +4189,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_listbkg.o \ $(OBJS)\corelib_logg.o \ $(OBJS)\corelib_markuptext.o \ - $(OBJS)\corelib_msgdlgg.o \ - $(OBJS)\corelib_numdlgg.o \ - $(OBJS)\corelib_progdlgg.o \ - $(OBJS)\corelib_printps.o \ - $(OBJS)\corelib_renderg.o \ + $(OBJS)\corelib_msgdlgg.o \ + $(OBJS)\corelib_numdlgg.o \ + $(OBJS)\corelib_panelg.o \ + $(OBJS)\corelib_progdlgg.o \ + $(OBJS)\corelib_printps.o \ + $(OBJS)\corelib_renderg.o \ $(OBJS)\corelib_richmsgdlgg.o \ $(OBJS)\corelib_scrlwing.o \ $(OBJS)\corelib_selstore.o \ @@ -8111,6 +8119,11 @@ $(OBJS)\monodll_numdlgg.o: ../../src/generic/numdlgg.cpp endif ifeq ($(USE_GUI),1) +$(OBJS)\monodll_panelg.o: ../../src/generic/panelg.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\monodll_progdlgg.o: ../../src/generic/progdlgg.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< endif @@ -10453,6 +10466,11 @@ $(OBJS)\monolib_numdlgg.o: ../../src/generic/numdlgg.cpp endif ifeq ($(USE_GUI),1) +$(OBJS)\monolib_panelg.o: ../../src/generic/panelg.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\monolib_progdlgg.o: ../../src/generic/progdlgg.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< endif @@ -12789,6 +12807,11 @@ $(OBJS)\coredll_numdlgg.o: ../../src/generic/numdlgg.cpp endif ifeq ($(USE_GUI),1) +$(OBJS)\coredll_panelg.o: ../../src/generic/panelg.cpp + $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\coredll_progdlgg.o: ../../src/generic/progdlgg.cpp $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $< endif @@ -14186,6 +14209,11 @@ $(OBJS)\corelib_numdlgg.o: ../../src/generic/numdlgg.cpp endif ifeq ($(USE_GUI),1) +$(OBJS)\corelib_panelg.o: ../../src/generic/panelg.cpp + $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< +endif + +ifeq ($(USE_GUI),1) $(OBJS)\corelib_progdlgg.o: ../../src/generic/progdlgg.cpp $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $< endif diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index dbd4a94bbc..0d81658935 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -2134,11 +2134,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_listbkg.obj \ $(OBJS)\monodll_logg.obj \ $(OBJS)\monodll_markuptext.obj \ - $(OBJS)\monodll_msgdlgg.obj \ - $(OBJS)\monodll_numdlgg.obj \ - $(OBJS)\monodll_progdlgg.obj \ - $(OBJS)\monodll_printps.obj \ - $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_panelg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ $(OBJS)\monodll_richmsgdlgg.obj \ $(OBJS)\monodll_scrlwing.obj \ $(OBJS)\monodll_selstore.obj \ @@ -2399,11 +2400,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_listbkg.obj \ $(OBJS)\monodll_logg.obj \ $(OBJS)\monodll_markuptext.obj \ - $(OBJS)\monodll_msgdlgg.obj \ - $(OBJS)\monodll_numdlgg.obj \ - $(OBJS)\monodll_progdlgg.obj \ - $(OBJS)\monodll_printps.obj \ - $(OBJS)\monodll_renderg.obj \ + $(OBJS)\monodll_msgdlgg.obj \ + $(OBJS)\monodll_numdlgg.obj \ + $(OBJS)\monodll_panelg.obj \ + $(OBJS)\monodll_progdlgg.obj \ + $(OBJS)\monodll_printps.obj \ + $(OBJS)\monodll_renderg.obj \ $(OBJS)\monodll_richmsgdlgg.obj \ $(OBJS)\monodll_scrlwing.obj \ $(OBJS)\monodll_selstore.obj \ @@ -2901,11 +2903,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_listbkg.obj \ $(OBJS)\monolib_logg.obj \ $(OBJS)\monolib_markuptext.obj \ - $(OBJS)\monolib_msgdlgg.obj \ - $(OBJS)\monolib_numdlgg.obj \ - $(OBJS)\monolib_progdlgg.obj \ - $(OBJS)\monolib_printps.obj \ - $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_panelg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ $(OBJS)\monolib_richmsgdlgg.obj \ $(OBJS)\monolib_scrlwing.obj \ $(OBJS)\monolib_selstore.obj \ @@ -3166,11 +3169,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_listbkg.obj \ $(OBJS)\monolib_logg.obj \ $(OBJS)\monolib_markuptext.obj \ - $(OBJS)\monolib_msgdlgg.obj \ - $(OBJS)\monolib_numdlgg.obj \ - $(OBJS)\monolib_progdlgg.obj \ - $(OBJS)\monolib_printps.obj \ - $(OBJS)\monolib_renderg.obj \ + $(OBJS)\monolib_msgdlgg.obj \ + $(OBJS)\monolib_numdlgg.obj \ + $(OBJS)\monolib_panelg.obj \ + $(OBJS)\monolib_progdlgg.obj \ + $(OBJS)\monolib_printps.obj \ + $(OBJS)\monolib_renderg.obj \ $(OBJS)\monolib_richmsgdlgg.obj \ $(OBJS)\monolib_scrlwing.obj \ $(OBJS)\monolib_selstore.obj \ @@ -3616,11 +3620,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_listbkg.obj \ $(OBJS)\coredll_logg.obj \ $(OBJS)\coredll_markuptext.obj \ - $(OBJS)\coredll_msgdlgg.obj \ - $(OBJS)\coredll_numdlgg.obj \ - $(OBJS)\coredll_progdlgg.obj \ - $(OBJS)\coredll_printps.obj \ - $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_panelg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ $(OBJS)\coredll_richmsgdlgg.obj \ $(OBJS)\coredll_scrlwing.obj \ $(OBJS)\coredll_selstore.obj \ @@ -3881,11 +3886,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \ $(OBJS)\coredll_listbkg.obj \ $(OBJS)\coredll_logg.obj \ $(OBJS)\coredll_markuptext.obj \ - $(OBJS)\coredll_msgdlgg.obj \ - $(OBJS)\coredll_numdlgg.obj \ - $(OBJS)\coredll_progdlgg.obj \ - $(OBJS)\coredll_printps.obj \ - $(OBJS)\coredll_renderg.obj \ + $(OBJS)\coredll_msgdlgg.obj \ + $(OBJS)\coredll_numdlgg.obj \ + $(OBJS)\coredll_panelg.obj \ + $(OBJS)\coredll_progdlgg.obj \ + $(OBJS)\coredll_printps.obj \ + $(OBJS)\coredll_renderg.obj \ $(OBJS)\coredll_richmsgdlgg.obj \ $(OBJS)\coredll_scrlwing.obj \ $(OBJS)\coredll_selstore.obj \ @@ -4160,11 +4166,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_listbkg.obj \ $(OBJS)\corelib_logg.obj \ $(OBJS)\corelib_markuptext.obj \ - $(OBJS)\corelib_msgdlgg.obj \ - $(OBJS)\corelib_numdlgg.obj \ - $(OBJS)\corelib_progdlgg.obj \ - $(OBJS)\corelib_printps.obj \ - $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_panelg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ $(OBJS)\corelib_richmsgdlgg.obj \ $(OBJS)\corelib_scrlwing.obj \ $(OBJS)\corelib_selstore.obj \ @@ -4425,11 +4432,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \ $(OBJS)\corelib_listbkg.obj \ $(OBJS)\corelib_logg.obj \ $(OBJS)\corelib_markuptext.obj \ - $(OBJS)\corelib_msgdlgg.obj \ - $(OBJS)\corelib_numdlgg.obj \ - $(OBJS)\corelib_progdlgg.obj \ - $(OBJS)\corelib_printps.obj \ - $(OBJS)\corelib_renderg.obj \ + $(OBJS)\corelib_msgdlgg.obj \ + $(OBJS)\corelib_numdlgg.obj \ + $(OBJS)\corelib_panelg.obj \ + $(OBJS)\corelib_progdlgg.obj \ + $(OBJS)\corelib_printps.obj \ + $(OBJS)\corelib_renderg.obj \ $(OBJS)\corelib_richmsgdlgg.obj \ $(OBJS)\corelib_scrlwing.obj \ $(OBJS)\corelib_selstore.obj \ @@ -8541,6 +8549,11 @@ $(OBJS)\monodll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\monodll_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monodll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif @@ -10883,6 +10896,11 @@ $(OBJS)\monolib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\monolib_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\monolib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif @@ -13219,6 +13237,11 @@ $(OBJS)\coredll_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\coredll_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\coredll_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif @@ -14616,6 +14639,11 @@ $(OBJS)\corelib_numdlgg.obj: ..\..\src\generic\numdlgg.cpp !endif !if "$(USE_GUI)" == "1" +$(OBJS)\corelib_panelg.obj: ..\..\src\generic\panelg.cpp + $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\panelg.cpp +!endif + +!if "$(USE_GUI)" == "1" $(OBJS)\corelib_progdlgg.obj: ..\..\src\generic\progdlgg.cpp $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\progdlgg.cpp !endif diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat index 3a623ac6f5..d27edd2b75 100644 --- a/build/msw/makefile.wat +++ b/build/msw/makefile.wat @@ -488,11 +488,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = & $(OBJS)\monodll_listbkg.obj & $(OBJS)\monodll_logg.obj & $(OBJS)\monodll_markuptext.obj & - $(OBJS)\monodll_msgdlgg.obj & - $(OBJS)\monodll_numdlgg.obj & - $(OBJS)\monodll_progdlgg.obj & - $(OBJS)\monodll_printps.obj & - $(OBJS)\monodll_renderg.obj & + $(OBJS)\monodll_msgdlgg.obj & + $(OBJS)\monodll_numdlgg.obj & + $(OBJS)\monodll_panelg.obj & + $(OBJS)\monodll_progdlgg.obj & + $(OBJS)\monodll_printps.obj & + $(OBJS)\monodll_renderg.obj & $(OBJS)\monodll_richmsgdlgg.obj & $(OBJS)\monodll_scrlwing.obj & $(OBJS)\monodll_selstore.obj & @@ -755,11 +756,12 @@ ____CORE_SRC_FILENAMES_OBJECTS = & $(OBJS)\monodll_listbkg.obj & $(OBJS)\monodll_logg.obj & $(OBJS)\monodll_markuptext.obj & - $(OBJS)\monodll_msgdlgg.obj & - $(OBJS)\monodll_numdlgg.obj & - $(OBJS)\monodll_progdlgg.obj & - $(OBJS)\monodll_printps.obj & - $(OBJS)\monodll_renderg.obj & + $(OBJS)\monodll_msgdlgg.obj & + $(OBJS)\monodll_numdlgg.obj & + $(OBJS)\monodll_panelg.obj & + $(OBJS)\monodll_progdlgg.obj & + $(OBJS)\monodll_printps.obj & + $(OBJS)\monodll_renderg.obj & $(OBJS)\monodll_richmsgdlgg.obj & $(OBJS)\monodll_scrlwing.obj & $(OBJS)\monodll_selstore.obj & @@ -1260,11 +1262,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = & $(OBJS)\monolib_listbkg.obj & $(OBJS)\monolib_logg.obj & $(OBJS)\monolib_markuptext.obj & - $(OBJS)\monolib_msgdlgg.obj & - $(OBJS)\monolib_numdlgg.obj & - $(OBJS)\monolib_progdlgg.obj & - $(OBJS)\monolib_printps.obj & - $(OBJS)\monolib_renderg.obj & + $(OBJS)\monolib_msgdlgg.obj & + $(OBJS)\monolib_numdlgg.obj & + $(OBJS)\monolib_panelg.obj & + $(OBJS)\monolib_progdlgg.obj & + $(OBJS)\monolib_printps.obj & + $(OBJS)\monolib_renderg.obj & $(OBJS)\monolib_richmsgdlgg.obj & $(OBJS)\monolib_scrlwing.obj & $(OBJS)\monolib_selstore.obj & @@ -1527,11 +1530,12 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = & $(OBJS)\monolib_listbkg.obj & $(OBJS)\monolib_logg.obj & $(OBJS)\monolib_markuptext.obj & - $(OBJS)\monolib_msgdlgg.obj & - $(OBJS)\monolib_numdlgg.obj & - $(OBJS)\monolib_progdlgg.obj & - $(OBJS)\monolib_printps.obj & - $(OBJS)\monolib_renderg.obj & + $(OBJS)\monolib_msgdlgg.obj & + $(OBJS)\monolib_numdlgg.obj & + $(OBJS)\monolib_panelg.obj & + $(OBJS)\monolib_progdlgg.obj & + $(OBJS)\monolib_printps.obj & + $(OBJS)\monolib_renderg.obj & $(OBJS)\monolib_richmsgdlgg.obj & $(OBJS)\monolib_scrlwing.obj & $(OBJS)\monolib_selstore.obj & @@ -1936,11 +1940,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = & $(OBJS)\coredll_listbkg.obj & $(OBJS)\coredll_logg.obj & $(OBJS)\coredll_markuptext.obj & - $(OBJS)\coredll_msgdlgg.obj & - $(OBJS)\coredll_numdlgg.obj & - $(OBJS)\coredll_progdlgg.obj & - $(OBJS)\coredll_printps.obj & - $(OBJS)\coredll_renderg.obj & + $(OBJS)\coredll_msgdlgg.obj & + $(OBJS)\coredll_numdlgg.obj & + $(OBJS)\coredll_panelg.obj & + $(OBJS)\coredll_progdlgg.obj & + $(OBJS)\coredll_printps.obj & + $(OBJS)\coredll_renderg.obj & $(OBJS)\coredll_richmsgdlgg.obj & $(OBJS)\coredll_scrlwing.obj & $(OBJS)\coredll_selstore.obj & @@ -2203,11 +2208,12 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = & $(OBJS)\coredll_listbkg.obj & $(OBJS)\coredll_logg.obj & $(OBJS)\coredll_markuptext.obj & - $(OBJS)\coredll_msgdlgg.obj & - $(OBJS)\coredll_numdlgg.obj & - $(OBJS)\coredll_progdlgg.obj & - $(OBJS)\coredll_printps.obj & - $(OBJS)\coredll_renderg.obj & + $(OBJS)\coredll_msgdlgg.obj & + $(OBJS)\coredll_numdlgg.obj & + $(OBJS)\coredll_panelg.obj & + $(OBJS)\coredll_progdlgg.obj & + $(OBJS)\coredll_printps.obj & + $(OBJS)\coredll_renderg.obj & $(OBJS)\coredll_richmsgdlgg.obj & $(OBJS)\coredll_scrlwing.obj & $(OBJS)\coredll_selstore.obj & @@ -2484,11 +2490,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = & $(OBJS)\corelib_listbkg.obj & $(OBJS)\corelib_logg.obj & $(OBJS)\corelib_markuptext.obj & - $(OBJS)\corelib_msgdlgg.obj & - $(OBJS)\corelib_numdlgg.obj & - $(OBJS)\corelib_progdlgg.obj & - $(OBJS)\corelib_printps.obj & - $(OBJS)\corelib_renderg.obj & + $(OBJS)\corelib_msgdlgg.obj & + $(OBJS)\corelib_numdlgg.obj & + $(OBJS)\corelib_panelg.obj & + $(OBJS)\corelib_progdlgg.obj & + $(OBJS)\corelib_printps.obj & + $(OBJS)\corelib_renderg.obj & $(OBJS)\corelib_richmsgdlgg.obj & $(OBJS)\corelib_scrlwing.obj & $(OBJS)\corelib_selstore.obj & @@ -2751,11 +2758,12 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = & $(OBJS)\corelib_listbkg.obj & $(OBJS)\corelib_logg.obj & $(OBJS)\corelib_markuptext.obj & - $(OBJS)\corelib_msgdlgg.obj & - $(OBJS)\corelib_numdlgg.obj & - $(OBJS)\corelib_progdlgg.obj & - $(OBJS)\corelib_printps.obj & - $(OBJS)\corelib_renderg.obj & + $(OBJS)\corelib_msgdlgg.obj & + $(OBJS)\corelib_numdlgg.obj & + $(OBJS)\corelib_panelg.obj & + $(OBJS)\corelib_progdlgg.obj & + $(OBJS)\corelib_printps.obj & + $(OBJS)\corelib_renderg.obj & $(OBJS)\corelib_richmsgdlgg.obj & $(OBJS)\corelib_scrlwing.obj & $(OBJS)\corelib_selstore.obj & @@ -8370,6 +8378,11 @@ $(OBJS)\monodll_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp !endif !ifeq USE_GUI 1 +$(OBJS)\monodll_panelg.obj : .AUTODEPEND ..\..\src\generic\panelg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\monodll_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< !endif @@ -10712,6 +10725,11 @@ $(OBJS)\monolib_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp !endif !ifeq USE_GUI 1 +$(OBJS)\monolib_panelg.obj : .AUTODEPEND ..\..\src\generic\panelg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\monolib_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< !endif @@ -13048,6 +13066,11 @@ $(OBJS)\coredll_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp !endif !ifeq USE_GUI 1 +$(OBJS)\coredll_panelg.obj : .AUTODEPEND ..\..\src\generic\panelg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\coredll_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $< !endif @@ -14445,6 +14468,11 @@ $(OBJS)\corelib_numdlgg.obj : .AUTODEPEND ..\..\src\generic\numdlgg.cpp !endif !ifeq USE_GUI 1 +$(OBJS)\corelib_panelg.obj : .AUTODEPEND ..\..\src\generic\panelg.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< +!endif + +!ifeq USE_GUI 1 $(OBJS)\corelib_progdlgg.obj : .AUTODEPEND ..\..\src\generic\progdlgg.cpp $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $< !endif diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp index 7848f4842d..cfb0d02cb4 100644 --- a/build/msw/wx_core.dsp +++ b/build/msw/wx_core.dsp @@ -3170,6 +3170,10 @@ SOURCE=..\..\src\generic\numdlgg.cpp # End Source File # Begin Source File +SOURCE=..\..\src\generic\panelg.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\generic\printps.cpp # End Source File # Begin Source File diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj index 52709cd698..cb6d859d93 100644 --- a/build/msw/wx_vc7_core.vcproj +++ b/build/msw/wx_vc7_core.vcproj @@ -2817,6 +2817,9 @@ RelativePath="..\..\src\generic\numdlgg.cpp"> + + + + diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj index d612227094..298bad8643 100644 --- a/build/msw/wx_vc9_core.vcproj +++ b/build/msw/wx_vc9_core.vcproj @@ -3785,6 +3785,10 @@ > + + diff --git a/docs/changes.txt b/docs/changes.txt index c67e4d91d0..9b8f73900a 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -464,6 +464,7 @@ All (GUI): - Added wxUIActionSimulator (Steven Lamerton, GSoC 2010 project). - wxAUI: support auto-orientable toolbars (wsu). - wxAUI: add support for icons in pane title bars (triton). +- Added wxPanel::SetBackgroundBitmap(). - Added wxDataViewCtrl::Set/GetCurrentItem(). - Added possibility to disable individual wxDataViewCtrl items (Neno Ganchev). - wxHTML: render in RTL order inside RTL window (Richard Bullington-McGuire). diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h index 9376b27adf..9b87ee1a39 100644 --- a/include/wx/generic/panelg.h +++ b/include/wx/generic/panelg.h @@ -12,6 +12,8 @@ #ifndef _WX_GENERIC_PANELG_H_ #define _WX_GENERIC_PANELG_H_ +#include "wx/bitmap.h" + class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase { public: @@ -40,7 +42,18 @@ public: ) #endif // WXWIN_COMPATIBILITY_2_8 +protected: + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp); + private: + // Event handler for erasing the background which is only used when we have + // a valid background bitmap. + void OnEraseBackground(wxEraseEvent& event); + + + // The bitmap used for painting the background if valid. + wxBitmap m_bitmapBg; + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); }; diff --git a/include/wx/msw/panel.h b/include/wx/msw/panel.h index a061720078..5073fe30ba 100644 --- a/include/wx/msw/panel.h +++ b/include/wx/msw/panel.h @@ -11,6 +11,8 @@ #ifndef _WX_MSW_PANEL_H_ #define _WX_MSW_PANEL_H_ +class WXDLLIMPEXP_FWD_CORE wxBrush; + // ---------------------------------------------------------------------------- // wxPanel // ---------------------------------------------------------------------------- @@ -18,7 +20,7 @@ class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase { public: - wxPanel() { } + wxPanel() { Init(); } wxPanel(wxWindow *parent, wxWindowID winid = wxID_ANY, @@ -27,6 +29,8 @@ public: long style = wxTAB_TRAVERSAL | wxNO_BORDER, const wxString& name = wxPanelNameStr) { + Init(); + Create(parent, winid, pos, size, style, name); } @@ -48,7 +52,18 @@ public: ) #endif // WXWIN_COMPATIBILITY_2_8 +protected: + void Init() + { + m_backgroundBrush = NULL; + } + + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp); + virtual WXHBRUSH MSWGetCustomBgBrush(); + private: + wxBrush *m_backgroundBrush; + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); }; diff --git a/include/wx/panel.h b/include/wx/panel.h index 396a2af9cf..74016c64f4 100644 --- a/include/wx/panel.h +++ b/include/wx/panel.h @@ -52,6 +52,18 @@ public: const wxString& name = wxPanelNameStr); + // Use the given bitmap to tile the background of this panel. This bitmap + // will show through any transparent children. + // + // Notice that you must not prevent the base class EVT_ERASE_BACKGROUND + // handler from running (i.e. not to handle this event yourself) for this + // to work. + void SetBackgroundBitmap(const wxBitmap& bmp) + { + DoSetBackgroundBitmap(bmp); + } + + // implementation from now on // -------------------------- @@ -59,6 +71,9 @@ public: WX_DECLARE_CONTROL_CONTAINER(); +protected: + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) = 0; + private: wxDECLARE_EVENT_TABLE(); @@ -70,6 +85,7 @@ private: #elif defined(__WXMSW__) #include "wx/msw/panel.h" #else + #define wxHAS_GENERIC_PANEL #include "wx/generic/panelg.h" #endif diff --git a/include/wx/univ/panel.h b/include/wx/univ/panel.h index 19f0d52dc0..f6bd7c2137 100644 --- a/include/wx/univ/panel.h +++ b/include/wx/univ/panel.h @@ -44,6 +44,13 @@ public: ) #endif // WXWIN_COMPATIBILITY_2_8 +protected: + virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) + { + // We have support for background bitmap even at the base class level. + SetBackground(bmp, wxALIGN_NOT, wxTILE); + } + private: wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); }; diff --git a/interface/wx/panel.h b/interface/wx/panel.h index b1e83bd223..cc65780d66 100644 --- a/interface/wx/panel.h +++ b/interface/wx/panel.h @@ -124,6 +124,21 @@ public: */ void OnSysColourChanged(wxSysColourChangedEvent& event); + /** + Set the background bitmap for this panel. + + If @a bmp is a valid bitmap, this bitmap will be tiled over the panel + background and show through any of its transparent children. Passing an + invalid bitmap reverts to the default background appearance. + + Notice that you must not prevent the base class EVT_ERASE_BACKGROUND + handler from running (i.e. not to handle this event yourself) for this + to work. + + @since 2.9.2 + */ + void SetBackgroundBitmap(const wxBitmap& bmp); + /** Overrides wxWindow::SetFocus(). diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index 99de17e1ba..d35028c06f 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -60,6 +60,14 @@ public: void UseBuffer(bool useBuffer) { m_useBuffer = useBuffer; Refresh(); } bool UsesBuffer() const { return m_useBuffer; } + void UseBgBitmap(bool useBgBmp) + { + m_useBgBmp = useBgBmp; + SetBackgroundBitmap(m_useBgBmp ? GetBgBitmap() : wxBitmap()); + + Refresh(); + } + void EraseBgInPaint(bool erase) { m_eraseBgInPaint = erase; Refresh(); } private: @@ -69,6 +77,24 @@ private: void DoPaint(wxDC& dc); + // Create an easily recognizable background bitmap. + static wxBitmap GetBgBitmap() + { + static const int BMP_SIZE = 40; + + wxBitmap bmp(BMP_SIZE, BMP_SIZE); + wxMemoryDC dc(bmp); + dc.SetBackground(*wxCYAN); + dc.Clear(); + + dc.SetPen(*wxBLUE_PEN); + dc.DrawLine(0, BMP_SIZE/2, BMP_SIZE/2, 0); + dc.DrawLine(BMP_SIZE/2, 0, BMP_SIZE, BMP_SIZE/2); + dc.DrawLine(BMP_SIZE, BMP_SIZE/2, BMP_SIZE/2, BMP_SIZE); + dc.DrawLine(BMP_SIZE/2, BMP_SIZE, 0, BMP_SIZE/2); + + return bmp; + } wxBitmap m_bitmap; wxString m_text; @@ -76,6 +102,9 @@ private: // use wxMemoryDC in OnPaint()? bool m_useBuffer; + // use background bitmap? + bool m_useBgBmp; + // erase background in OnPaint()? bool m_eraseBgInPaint; @@ -90,6 +119,7 @@ public: private: void OnUseBuffer(wxCommandEvent& event); + void OnUseBgBitmap(wxCommandEvent& event); void OnEraseBgInPaint(wxCommandEvent& event); void OnChangeBgStyle(wxCommandEvent& event); void OnQuit(wxCommandEvent& event); @@ -120,6 +150,7 @@ enum { // menu items Erase_Menu_UseBuffer = 100, + Erase_Menu_UseBgBitmap, Erase_Menu_EraseBgInPaint, Erase_Menu_BgStyleErase, Erase_Menu_BgStyleSystem, @@ -153,6 +184,7 @@ bool MyApp::OnInit() BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Erase_Menu_UseBuffer, MyFrame::OnUseBuffer) + EVT_MENU(Erase_Menu_UseBgBitmap, MyFrame::OnUseBgBitmap) EVT_MENU(Erase_Menu_EraseBgInPaint, MyFrame::OnEraseBgInPaint) EVT_MENU_RANGE(Erase_Menu_BgStyleErase, Erase_Menu_BgStylePaint, MyFrame::OnChangeBgStyle) @@ -174,6 +206,8 @@ MyFrame::MyFrame() wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF); menuFile->AppendCheckItem(Erase_Menu_UseBuffer, "&Use memory DC\tCtrl-M"); + menuFile->AppendCheckItem(Erase_Menu_UseBgBitmap, + "Use background &bitmap\tCtrl-B"); menuFile->AppendCheckItem(Erase_Menu_EraseBgInPaint, "&Erase background in EVT_PAINT\tCtrl-R"); menuFile->AppendSeparator(); @@ -205,6 +239,11 @@ void MyFrame::OnUseBuffer(wxCommandEvent& event) m_canvas->UseBuffer(event.IsChecked()); } +void MyFrame::OnUseBgBitmap(wxCommandEvent& event) +{ + m_canvas->UseBgBitmap(event.IsChecked()); +} + void MyFrame::OnEraseBgInPaint(wxCommandEvent& event) { m_canvas->EraseBgInPaint(event.IsChecked()); @@ -249,6 +288,7 @@ MyCanvas::MyCanvas(wxFrame *parent) : wxScrolledWindow(parent, wxID_ANY) { m_useBuffer = false; + m_useBgBmp = false; m_eraseBgInPaint = false; SetScrollbars( 10, 10, 40, 100, 0, 0 ); @@ -310,7 +350,7 @@ void MyCanvas::DoPaint(wxDC& dc) dc.DrawBitmap( m_bitmap, 20, 20, true ); - dc.SetTextForeground(*wxWHITE); + dc.SetTextForeground(*wxRED); dc.DrawText("This text is drawn from OnPaint", 65, 65); wxString tmp; @@ -342,6 +382,14 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) void MyCanvas::OnEraseBackground( wxEraseEvent& event ) { + // We must not erase the background ourselves if we asked wxPanel to erase + // it using a background bitmap. + if ( m_useBgBmp ) + { + event.Skip(); + return; + } + wxASSERT_MSG ( GetBackgroundStyle() == wxBG_STYLE_ERASE, diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp new file mode 100644 index 0000000000..8e86b172d7 --- /dev/null +++ b/src/generic/panelg.cpp @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/generic/panelg.cpp +// Purpose: Generic wxPanel implementation. +// Author: Vadim Zeitlin +// Created: 2011-03-20 +// RCS-ID: $Id: wxhead.cpp,v 1.11 2010-04-22 12:44:51 zeitlin Exp $ +// Copyright: (c) 2011 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifdef wxHAS_GENERIC_PANEL + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/panel.h" +#endif // WX_PRECOMP + +// ============================================================================ +// implementation +// ============================================================================ + +void wxPanel::DoSetBackgroundBitmap(const wxBitmap& bmp) +{ + m_bitmapBg = bmp; + + if ( m_bitmapBg.IsOk() ) + { + Connect(wxEVT_ERASE_BACKGROUND, + wxEraseEventHandler(wxPanel::OnEraseBackground)); + } + else + { + Disconnect(wxEVT_ERASE_BACKGROUND, + wxEraseEventHandler(wxPanel::OnEraseBackground)); + } +} + +void wxPanel::OnEraseBackground(wxEraseEvent& event) +{ + wxDC& dc = *event.GetDC(); + + const wxSize clientSize = GetClientSize(); + const wxSize bitmapSize = m_bitmapBg.GetSize(); + + for ( int x = 0; x < clientSize.x; x += bitmapSize.x ) + { + for ( int y = 0; y < clientSize.y; y += bitmapSize.y ) + { + dc.DrawBitmap(m_bitmapBg, x, y); + } + } +} + +#endif // wxHAS_GENERIC_PANEL diff --git a/src/msw/panel.cpp b/src/msw/panel.cpp index 65a25144c8..bc73d1267a 100644 --- a/src/msw/panel.cpp +++ b/src/msw/panel.cpp @@ -24,6 +24,7 @@ #endif #ifndef WX_PRECOMP + #include "wx/brush.h" #include "wx/panel.h" #endif // WX_PRECOMP @@ -44,3 +45,17 @@ bool wxPanel::HasTransparentBackground() return false; } + +void wxPanel::DoSetBackgroundBitmap(const wxBitmap& bmp) +{ + delete m_backgroundBrush; + m_backgroundBrush = bmp.IsOk() ? new wxBrush(bmp) : NULL; +} + +WXHBRUSH wxPanel::MSWGetCustomBgBrush() +{ + if ( m_backgroundBrush ) + return (WXHBRUSH)m_backgroundBrush->GetResourceHandle(); + + return wxPanelBase::MSWGetCustomBgBrush(); +}