moved wxOverlay into overlay.* files and out of dc.h/dcbase.cpp; implemented wxOverlay for wxDirectFB port

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2006-10-24 12:29:14 +00:00
parent f8bf59a9f2
commit 30c841c84d
28 changed files with 1091 additions and 502 deletions

View File

@ -2844,6 +2844,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \
wx/menu.h \
wx/msgdlg.h \
wx/numdlg.h \
wx/overlay.h \
wx/palette.h \
wx/panel.h \
wx/pen.h \
@ -3432,6 +3433,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS = \
monodll_matrix.o \
monodll_menucmn.o \
monodll_nbkbase.o \
monodll_overlaycmn.o \
monodll_paper.o \
monodll_pickerbase.o \
monodll_popupcmn.o \
@ -3601,6 +3603,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS = \
monodll_matrix.o \
monodll_menucmn.o \
monodll_nbkbase.o \
monodll_overlaycmn.o \
monodll_paper.o \
monodll_pickerbase.o \
monodll_popupcmn.o \
@ -3673,6 +3676,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS = \
monodll_evtloop.o \
monodll_font.o \
monodll_fontenum.o \
monodll_overlay.o \
monodll_pen.o \
monodll_region.o \
monodll_settings.o \
@ -4182,6 +4186,7 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS = \
monodll_minifram.o \
monodll_msgdlg.o \
monodll_notebmac.o \
monodll_overlay.o \
monodll_palette.o \
monodll_pen.o \
monodll_printdlg.o \
@ -4499,6 +4504,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_1 = \
monodll_evtloop.o \
monodll_font.o \
monodll_fontenum.o \
monodll_overlay.o \
monodll_pen.o \
monodll_region.o \
monodll_settings.o \
@ -5176,6 +5182,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_1 = \
monolib_matrix.o \
monolib_menucmn.o \
monolib_nbkbase.o \
monolib_overlaycmn.o \
monolib_paper.o \
monolib_pickerbase.o \
monolib_popupcmn.o \
@ -5345,6 +5352,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1 = \
monolib_matrix.o \
monolib_menucmn.o \
monolib_nbkbase.o \
monolib_overlaycmn.o \
monolib_paper.o \
monolib_pickerbase.o \
monolib_popupcmn.o \
@ -5417,6 +5425,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_2 = \
monolib_evtloop.o \
monolib_font.o \
monolib_fontenum.o \
monolib_overlay.o \
monolib_pen.o \
monolib_region.o \
monolib_settings.o \
@ -5927,6 +5936,7 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS_1 = \
monolib_minifram.o \
monolib_msgdlg.o \
monolib_notebmac.o \
monolib_overlay.o \
monolib_palette.o \
monolib_pen.o \
monolib_printdlg.o \
@ -6244,6 +6254,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_3 = \
monolib_evtloop.o \
monolib_font.o \
monolib_fontenum.o \
monolib_overlay.o \
monolib_pen.o \
monolib_region.o \
monolib_settings.o \
@ -7133,6 +7144,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_2 = \
coredll_matrix.o \
coredll_menucmn.o \
coredll_nbkbase.o \
coredll_overlaycmn.o \
coredll_paper.o \
coredll_pickerbase.o \
coredll_popupcmn.o \
@ -7302,6 +7314,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2 = \
coredll_matrix.o \
coredll_menucmn.o \
coredll_nbkbase.o \
coredll_overlaycmn.o \
coredll_paper.o \
coredll_pickerbase.o \
coredll_popupcmn.o \
@ -7374,6 +7387,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_4 = \
coredll_evtloop.o \
coredll_font.o \
coredll_fontenum.o \
coredll_overlay.o \
coredll_pen.o \
coredll_region.o \
coredll_settings.o \
@ -7884,6 +7898,7 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS_2 = \
coredll_minifram.o \
coredll_msgdlg.o \
coredll_notebmac.o \
coredll_overlay.o \
coredll_palette.o \
coredll_pen.o \
coredll_printdlg.o \
@ -8201,6 +8216,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_5 = \
coredll_evtloop.o \
coredll_font.o \
coredll_fontenum.o \
coredll_overlay.o \
coredll_pen.o \
coredll_region.o \
coredll_settings.o \
@ -8560,6 +8576,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_3 = \
corelib_matrix.o \
corelib_menucmn.o \
corelib_nbkbase.o \
corelib_overlaycmn.o \
corelib_paper.o \
corelib_pickerbase.o \
corelib_popupcmn.o \
@ -8729,6 +8746,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3 = \
corelib_matrix.o \
corelib_menucmn.o \
corelib_nbkbase.o \
corelib_overlaycmn.o \
corelib_paper.o \
corelib_pickerbase.o \
corelib_popupcmn.o \
@ -8801,6 +8819,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_6 = \
corelib_evtloop.o \
corelib_font.o \
corelib_fontenum.o \
corelib_overlay.o \
corelib_pen.o \
corelib_region.o \
corelib_settings.o \
@ -9311,6 +9330,7 @@ COND_TOOLKIT_MAC___GUI_SRC_OBJECTS_3 = \
corelib_minifram.o \
corelib_msgdlg.o \
corelib_notebmac.o \
corelib_overlay.o \
corelib_palette.o \
corelib_pen.o \
corelib_printdlg.o \
@ -9628,6 +9648,7 @@ COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_7 = \
corelib_evtloop.o \
corelib_font.o \
corelib_fontenum.o \
corelib_overlay.o \
corelib_pen.o \
corelib_region.o \
corelib_settings.o \
@ -14383,6 +14404,12 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@monodll_dirmgl.o: $(srcdir)/src/mgl/dirmgl.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mgl/dirmgl.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@monodll_overlay.o: $(srcdir)/src/dfb/overlay.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/dfb/overlay.cpp
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monodll_overlay.o: $(srcdir)/src/mac/carbon/overlay.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/carbon/overlay.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@monodll_wrapdfb.o: $(srcdir)/src/dfb/wrapdfb.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/dfb/wrapdfb.cpp
@ -15748,6 +15775,9 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@monodll_nbkbase.o: $(srcdir)/src/common/nbkbase.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/nbkbase.cpp
@COND_USE_GUI_1@monodll_overlaycmn.o: $(srcdir)/src/common/overlaycmn.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/overlaycmn.cpp
@COND_USE_GUI_1@monodll_paper.o: $(srcdir)/src/common/paper.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/paper.cpp
@ -18442,6 +18472,12 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@monolib_dirmgl.o: $(srcdir)/src/mgl/dirmgl.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mgl/dirmgl.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@monolib_overlay.o: $(srcdir)/src/dfb/overlay.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/dfb/overlay.cpp
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monolib_overlay.o: $(srcdir)/src/mac/carbon/overlay.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/overlay.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@monolib_wrapdfb.o: $(srcdir)/src/dfb/wrapdfb.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/dfb/wrapdfb.cpp
@ -19807,6 +19843,9 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@monolib_nbkbase.o: $(srcdir)/src/common/nbkbase.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/nbkbase.cpp
@COND_USE_GUI_1@monolib_overlaycmn.o: $(srcdir)/src/common/overlaycmn.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/overlaycmn.cpp
@COND_USE_GUI_1@monolib_paper.o: $(srcdir)/src/common/paper.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/paper.cpp
@ -22867,6 +22906,12 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@coredll_dirmgl.o: $(srcdir)/src/mgl/dirmgl.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mgl/dirmgl.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@coredll_overlay.o: $(srcdir)/src/dfb/overlay.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/dfb/overlay.cpp
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@coredll_overlay.o: $(srcdir)/src/mac/carbon/overlay.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/overlay.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@coredll_wrapdfb.o: $(srcdir)/src/dfb/wrapdfb.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/dfb/wrapdfb.cpp
@ -24199,6 +24244,9 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@coredll_nbkbase.o: $(srcdir)/src/common/nbkbase.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/nbkbase.cpp
@COND_USE_GUI_1@coredll_overlaycmn.o: $(srcdir)/src/common/overlaycmn.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/overlaycmn.cpp
@COND_USE_GUI_1@coredll_paper.o: $(srcdir)/src/common/paper.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/paper.cpp
@ -25777,6 +25825,12 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@corelib_dirmgl.o: $(srcdir)/src/mgl/dirmgl.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MGL_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mgl/dirmgl.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@corelib_overlay.o: $(srcdir)/src/dfb/overlay.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/dfb/overlay.cpp
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@corelib_overlay.o: $(srcdir)/src/mac/carbon/overlay.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/carbon/overlay.cpp
@COND_TOOLKIT_DFB_USE_GUI_1@corelib_wrapdfb.o: $(srcdir)/src/dfb/wrapdfb.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/dfb/wrapdfb.cpp
@ -27109,6 +27163,9 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@corelib_nbkbase.o: $(srcdir)/src/common/nbkbase.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/nbkbase.cpp
@COND_USE_GUI_1@corelib_overlaycmn.o: $(srcdir)/src/common/overlaycmn.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/overlaycmn.cpp
@COND_USE_GUI_1@corelib_paper.o: $(srcdir)/src/common/paper.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/paper.cpp

View File

@ -616,6 +616,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/common/matrix.cpp
src/common/menucmn.cpp
src/common/nbkbase.cpp
src/common/overlaycmn.cpp
src/common/paper.cpp
src/common/pickerbase.cpp
src/common/popupcmn.cpp
@ -734,6 +735,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/menu.h
wx/msgdlg.h
wx/numdlg.h
wx/overlay.h
wx/palette.h
wx/panel.h
wx/pen.h
@ -1810,6 +1812,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/dfb/evtloop.cpp
src/dfb/font.cpp
src/dfb/fontenum.cpp
src/dfb/overlay.cpp
src/dfb/pen.cpp
src/dfb/region.cpp
src/dfb/settings.cpp
@ -2099,6 +2102,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/mac/carbon/minifram.cpp
src/mac/carbon/msgdlg.cpp
src/mac/carbon/notebmac.cpp
src/mac/carbon/overlay.cpp
src/mac/carbon/palette.cpp
src/mac/carbon/pen.cpp
src/mac/carbon/printdlg.cpp

View File

@ -1445,6 +1445,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_matrix.obj \
$(OBJS)\monodll_menucmn.obj \
$(OBJS)\monodll_nbkbase.obj \
$(OBJS)\monodll_overlaycmn.obj \
$(OBJS)\monodll_paper.obj \
$(OBJS)\monodll_pickerbase.obj \
$(OBJS)\monodll_popupcmn.obj \
@ -1664,6 +1665,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_matrix.obj \
$(OBJS)\monodll_menucmn.obj \
$(OBJS)\monodll_nbkbase.obj \
$(OBJS)\monodll_overlaycmn.obj \
$(OBJS)\monodll_paper.obj \
$(OBJS)\monodll_pickerbase.obj \
$(OBJS)\monodll_popupcmn.obj \
@ -2048,6 +2050,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_matrix.obj \
$(OBJS)\monolib_menucmn.obj \
$(OBJS)\monolib_nbkbase.obj \
$(OBJS)\monolib_overlaycmn.obj \
$(OBJS)\monolib_paper.obj \
$(OBJS)\monolib_pickerbase.obj \
$(OBJS)\monolib_popupcmn.obj \
@ -2267,6 +2270,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_matrix.obj \
$(OBJS)\monolib_menucmn.obj \
$(OBJS)\monolib_nbkbase.obj \
$(OBJS)\monolib_overlaycmn.obj \
$(OBJS)\monolib_paper.obj \
$(OBJS)\monolib_pickerbase.obj \
$(OBJS)\monolib_popupcmn.obj \
@ -2562,6 +2566,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_matrix.obj \
$(OBJS)\coredll_menucmn.obj \
$(OBJS)\coredll_nbkbase.obj \
$(OBJS)\coredll_overlaycmn.obj \
$(OBJS)\coredll_paper.obj \
$(OBJS)\coredll_pickerbase.obj \
$(OBJS)\coredll_popupcmn.obj \
@ -2781,6 +2786,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_matrix.obj \
$(OBJS)\coredll_menucmn.obj \
$(OBJS)\coredll_nbkbase.obj \
$(OBJS)\coredll_overlaycmn.obj \
$(OBJS)\coredll_paper.obj \
$(OBJS)\coredll_pickerbase.obj \
$(OBJS)\coredll_popupcmn.obj \
@ -3001,6 +3007,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_matrix.obj \
$(OBJS)\corelib_menucmn.obj \
$(OBJS)\corelib_nbkbase.obj \
$(OBJS)\corelib_overlaycmn.obj \
$(OBJS)\corelib_paper.obj \
$(OBJS)\corelib_pickerbase.obj \
$(OBJS)\corelib_popupcmn.obj \
@ -3220,6 +3227,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_matrix.obj \
$(OBJS)\corelib_menucmn.obj \
$(OBJS)\corelib_nbkbase.obj \
$(OBJS)\corelib_overlaycmn.obj \
$(OBJS)\corelib_paper.obj \
$(OBJS)\corelib_pickerbase.obj \
$(OBJS)\corelib_popupcmn.obj \
@ -6010,6 +6018,11 @@ $(OBJS)\monodll_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_paper.obj: ..\..\src\common\paper.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
@ -7955,6 +7968,11 @@ $(OBJS)\monolib_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_paper.obj: ..\..\src\common\paper.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
@ -9915,6 +9933,11 @@ $(OBJS)\coredll_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_paper.obj: ..\..\src\common\paper.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
@ -11160,6 +11183,11 @@ $(OBJS)\corelib_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_paper.obj: ..\..\src\common\paper.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**

View File

@ -1455,6 +1455,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_matrix.o \
$(OBJS)\monodll_menucmn.o \
$(OBJS)\monodll_nbkbase.o \
$(OBJS)\monodll_overlaycmn.o \
$(OBJS)\monodll_paper.o \
$(OBJS)\monodll_pickerbase.o \
$(OBJS)\monodll_popupcmn.o \
@ -1676,6 +1677,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_matrix.o \
$(OBJS)\monodll_menucmn.o \
$(OBJS)\monodll_nbkbase.o \
$(OBJS)\monodll_overlaycmn.o \
$(OBJS)\monodll_paper.o \
$(OBJS)\monodll_pickerbase.o \
$(OBJS)\monodll_popupcmn.o \
@ -2064,6 +2066,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_matrix.o \
$(OBJS)\monolib_menucmn.o \
$(OBJS)\monolib_nbkbase.o \
$(OBJS)\monolib_overlaycmn.o \
$(OBJS)\monolib_paper.o \
$(OBJS)\monolib_pickerbase.o \
$(OBJS)\monolib_popupcmn.o \
@ -2285,6 +2288,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_matrix.o \
$(OBJS)\monolib_menucmn.o \
$(OBJS)\monolib_nbkbase.o \
$(OBJS)\monolib_overlaycmn.o \
$(OBJS)\monolib_paper.o \
$(OBJS)\monolib_pickerbase.o \
$(OBJS)\monolib_popupcmn.o \
@ -2594,6 +2598,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_matrix.o \
$(OBJS)\coredll_menucmn.o \
$(OBJS)\coredll_nbkbase.o \
$(OBJS)\coredll_overlaycmn.o \
$(OBJS)\coredll_paper.o \
$(OBJS)\coredll_pickerbase.o \
$(OBJS)\coredll_popupcmn.o \
@ -2815,6 +2820,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_matrix.o \
$(OBJS)\coredll_menucmn.o \
$(OBJS)\coredll_nbkbase.o \
$(OBJS)\coredll_overlaycmn.o \
$(OBJS)\coredll_paper.o \
$(OBJS)\coredll_pickerbase.o \
$(OBJS)\coredll_popupcmn.o \
@ -3041,6 +3047,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_matrix.o \
$(OBJS)\corelib_menucmn.o \
$(OBJS)\corelib_nbkbase.o \
$(OBJS)\corelib_overlaycmn.o \
$(OBJS)\corelib_paper.o \
$(OBJS)\corelib_pickerbase.o \
$(OBJS)\corelib_popupcmn.o \
@ -3262,6 +3269,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_matrix.o \
$(OBJS)\corelib_menucmn.o \
$(OBJS)\corelib_nbkbase.o \
$(OBJS)\corelib_overlaycmn.o \
$(OBJS)\corelib_paper.o \
$(OBJS)\corelib_pickerbase.o \
$(OBJS)\corelib_popupcmn.o \
@ -6227,6 +6235,11 @@ $(OBJS)\monodll_nbkbase.o: ../../src/common/nbkbase.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_overlaycmn.o: ../../src/common/overlaycmn.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_paper.o: ../../src/common/paper.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@ -8272,6 +8285,11 @@ $(OBJS)\monolib_nbkbase.o: ../../src/common/nbkbase.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_overlaycmn.o: ../../src/common/overlaycmn.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_paper.o: ../../src/common/paper.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@ -10332,6 +10350,11 @@ $(OBJS)\coredll_nbkbase.o: ../../src/common/nbkbase.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\coredll_overlaycmn.o: ../../src/common/overlaycmn.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\coredll_paper.o: ../../src/common/paper.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
@ -11677,6 +11700,11 @@ $(OBJS)\corelib_nbkbase.o: ../../src/common/nbkbase.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\corelib_overlaycmn.o: ../../src/common/overlaycmn.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
endif
ifeq ($(USE_GUI),1)
$(OBJS)\corelib_paper.o: ../../src/common/paper.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<

View File

@ -1612,6 +1612,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_matrix.obj \
$(OBJS)\monodll_menucmn.obj \
$(OBJS)\monodll_nbkbase.obj \
$(OBJS)\monodll_overlaycmn.obj \
$(OBJS)\monodll_paper.obj \
$(OBJS)\monodll_pickerbase.obj \
$(OBJS)\monodll_popupcmn.obj \
@ -1831,6 +1832,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_matrix.obj \
$(OBJS)\monodll_menucmn.obj \
$(OBJS)\monodll_nbkbase.obj \
$(OBJS)\monodll_overlaycmn.obj \
$(OBJS)\monodll_paper.obj \
$(OBJS)\monodll_pickerbase.obj \
$(OBJS)\monodll_popupcmn.obj \
@ -2221,6 +2223,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_matrix.obj \
$(OBJS)\monolib_menucmn.obj \
$(OBJS)\monolib_nbkbase.obj \
$(OBJS)\monolib_overlaycmn.obj \
$(OBJS)\monolib_paper.obj \
$(OBJS)\monolib_pickerbase.obj \
$(OBJS)\monolib_popupcmn.obj \
@ -2440,6 +2443,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_matrix.obj \
$(OBJS)\monolib_menucmn.obj \
$(OBJS)\monolib_nbkbase.obj \
$(OBJS)\monolib_overlaycmn.obj \
$(OBJS)\monolib_paper.obj \
$(OBJS)\monolib_pickerbase.obj \
$(OBJS)\monolib_popupcmn.obj \
@ -2765,6 +2769,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_matrix.obj \
$(OBJS)\coredll_menucmn.obj \
$(OBJS)\coredll_nbkbase.obj \
$(OBJS)\coredll_overlaycmn.obj \
$(OBJS)\coredll_paper.obj \
$(OBJS)\coredll_pickerbase.obj \
$(OBJS)\coredll_popupcmn.obj \
@ -2984,6 +2989,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_matrix.obj \
$(OBJS)\coredll_menucmn.obj \
$(OBJS)\coredll_nbkbase.obj \
$(OBJS)\coredll_overlaycmn.obj \
$(OBJS)\coredll_paper.obj \
$(OBJS)\coredll_pickerbase.obj \
$(OBJS)\coredll_popupcmn.obj \
@ -3210,6 +3216,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_matrix.obj \
$(OBJS)\corelib_menucmn.obj \
$(OBJS)\corelib_nbkbase.obj \
$(OBJS)\corelib_overlaycmn.obj \
$(OBJS)\corelib_paper.obj \
$(OBJS)\corelib_pickerbase.obj \
$(OBJS)\corelib_popupcmn.obj \
@ -3429,6 +3436,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_matrix.obj \
$(OBJS)\corelib_menucmn.obj \
$(OBJS)\corelib_nbkbase.obj \
$(OBJS)\corelib_overlaycmn.obj \
$(OBJS)\corelib_paper.obj \
$(OBJS)\corelib_pickerbase.obj \
$(OBJS)\corelib_popupcmn.obj \
@ -6343,6 +6351,11 @@ $(OBJS)\monodll_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_paper.obj: ..\..\src\common\paper.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
@ -8288,6 +8301,11 @@ $(OBJS)\monolib_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_paper.obj: ..\..\src\common\paper.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
@ -10248,6 +10266,11 @@ $(OBJS)\coredll_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_paper.obj: ..\..\src\common\paper.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
@ -11493,6 +11516,11 @@ $(OBJS)\corelib_nbkbase.obj: ..\..\src\common\nbkbase.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_overlaycmn.obj: ..\..\src\common\overlaycmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
!endif
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_paper.obj: ..\..\src\common\paper.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**

View File

@ -367,6 +367,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_matrix.obj &
$(OBJS)\monodll_menucmn.obj &
$(OBJS)\monodll_nbkbase.obj &
$(OBJS)\monodll_overlaycmn.obj &
$(OBJS)\monodll_paper.obj &
$(OBJS)\monodll_pickerbase.obj &
$(OBJS)\monodll_popupcmn.obj &
@ -588,6 +589,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_matrix.obj &
$(OBJS)\monodll_menucmn.obj &
$(OBJS)\monodll_nbkbase.obj &
$(OBJS)\monodll_overlaycmn.obj &
$(OBJS)\monodll_paper.obj &
$(OBJS)\monodll_pickerbase.obj &
$(OBJS)\monodll_popupcmn.obj &
@ -980,6 +982,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_matrix.obj &
$(OBJS)\monolib_menucmn.obj &
$(OBJS)\monolib_nbkbase.obj &
$(OBJS)\monolib_overlaycmn.obj &
$(OBJS)\monolib_paper.obj &
$(OBJS)\monolib_pickerbase.obj &
$(OBJS)\monolib_popupcmn.obj &
@ -1201,6 +1204,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_matrix.obj &
$(OBJS)\monolib_menucmn.obj &
$(OBJS)\monolib_nbkbase.obj &
$(OBJS)\monolib_overlaycmn.obj &
$(OBJS)\monolib_paper.obj &
$(OBJS)\monolib_pickerbase.obj &
$(OBJS)\monolib_popupcmn.obj &
@ -1517,6 +1521,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = &
$(OBJS)\coredll_matrix.obj &
$(OBJS)\coredll_menucmn.obj &
$(OBJS)\coredll_nbkbase.obj &
$(OBJS)\coredll_overlaycmn.obj &
$(OBJS)\coredll_paper.obj &
$(OBJS)\coredll_pickerbase.obj &
$(OBJS)\coredll_popupcmn.obj &
@ -1738,6 +1743,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = &
$(OBJS)\coredll_matrix.obj &
$(OBJS)\coredll_menucmn.obj &
$(OBJS)\coredll_nbkbase.obj &
$(OBJS)\coredll_overlaycmn.obj &
$(OBJS)\coredll_paper.obj &
$(OBJS)\coredll_pickerbase.obj &
$(OBJS)\coredll_popupcmn.obj &
@ -1966,6 +1972,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = &
$(OBJS)\corelib_matrix.obj &
$(OBJS)\corelib_menucmn.obj &
$(OBJS)\corelib_nbkbase.obj &
$(OBJS)\corelib_overlaycmn.obj &
$(OBJS)\corelib_paper.obj &
$(OBJS)\corelib_pickerbase.obj &
$(OBJS)\corelib_popupcmn.obj &
@ -2187,6 +2194,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = &
$(OBJS)\corelib_matrix.obj &
$(OBJS)\corelib_menucmn.obj &
$(OBJS)\corelib_nbkbase.obj &
$(OBJS)\corelib_overlaycmn.obj &
$(OBJS)\corelib_paper.obj &
$(OBJS)\corelib_pickerbase.obj &
$(OBJS)\corelib_popupcmn.obj &
@ -6455,6 +6463,11 @@ $(OBJS)\monodll_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monodll_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monodll_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
@ -8500,6 +8513,11 @@ $(OBJS)\monolib_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monolib_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\monolib_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
@ -10560,6 +10578,11 @@ $(OBJS)\coredll_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\coredll_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\coredll_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
@ -11905,6 +11928,11 @@ $(OBJS)\corelib_nbkbase.obj : .AUTODEPEND ..\..\src\common\nbkbase.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\corelib_overlaycmn.obj : .AUTODEPEND ..\..\src\common\overlaycmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
!endif
!ifeq USE_GUI 1
$(OBJS)\corelib_paper.obj : .AUTODEPEND ..\..\src\common\paper.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<

View File

@ -726,6 +726,10 @@ SOURCE=..\..\src\common\nbkbase.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\overlaycmn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\paper.cpp
# End Source File
# Begin Source File
@ -9085,6 +9089,10 @@ SOURCE=..\..\include\wx\odcombo.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\overlay.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\ownerdrw.h
# End Source File
# Begin Source File

View File

@ -62,6 +62,7 @@ src/regex/regex.7
include/wx/*.h
include/wx/*.inl
include/wx/*.cpp
include/wx/private/*.h
include/wx/protocol/*.h
include/wx/wx_setup.vms
include/wx/unix/*.h

View File

@ -199,12 +199,29 @@ private:
#include "wx/generic/caret.h"
#endif // platform
#ifndef wxHAS_CARET_USING_OVERLAYS
#define wxHAS_CARET_USING_OVERLAYS 0
#endif
// ----------------------------------------------------------------------------
// wxCaretSuspend: a simple class which hides the caret in its ctor and
// restores it in the dtor, this should be used when drawing on the screen to
// avoid overdrawing the caret
// ----------------------------------------------------------------------------
#if wxHAS_CARET_USING_OVERLAYS
// we don't need to hide the caret if it's rendered using overlays
class WXDLLEXPORT wxCaretSuspend
{
public:
wxCaretSuspend(wxWindow *WXUNUSED(win)) {}
DECLARE_NO_COPY_CLASS(wxCaretSuspend)
};
#else // !wxHAS_CARET_USING_OVERLAYS
class WXDLLEXPORT wxCaretSuspend
{
public:
@ -232,6 +249,8 @@ private:
DECLARE_NO_COPY_CLASS(wxCaretSuspend)
};
#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
#endif // wxUSE_CARET
#endif // _WX_CARET_H_BASE_

View File

@ -968,72 +968,4 @@ private:
DECLARE_NO_COPY_CLASS(wxDCClipper)
};
// ----------------------------------------------------------------------------
// creates an overlay over an existing window, allowing for manipulations like
// rubberbanding etc. this API is not stable yet, not to be used outside wx
// internal code
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxOverlayImpl;
class WXDLLEXPORT wxWindowDC;
class WXDLLEXPORT wxOverlay
{
public:
wxOverlay();
~wxOverlay();
// clears the overlay without restoring the former state
// to be done eg when the window content has been changed and repainted
void Reset();
private:
friend class WXDLLEXPORT wxDCOverlay;
// returns true if it has been setup
bool IsOk();
void Init(wxWindowDC* dc, int x , int y , int width , int height);
void BeginDrawing(wxWindowDC* dc);
void EndDrawing(wxWindowDC* dc);
void Clear(wxWindowDC* dc);
wxOverlayImpl* m_impl;
bool m_inDrawing;
DECLARE_NO_COPY_CLASS(wxOverlay)
};
class WXDLLEXPORT wxDCOverlay
{
public:
// connects this overlay to the corresponding drawing dc, if the overlay is not initialized yet
// this call will do so
wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc, int x , int y , int width , int height);
// convenience wrapper that behaves the same using the entire area of the dc
wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc);
// removes the connection between the overlay and the dc
virtual ~wxDCOverlay();
// clears the layer, restoring the state at the last init
void Clear();
private:
void Init(wxWindowDC *dc, int x , int y , int width , int height);
wxOverlay& m_overlay;
wxWindowDC* m_dc;
DECLARE_NO_COPY_CLASS(wxDCOverlay)
};
#endif // _WX_DC_H_BASE_

View File

@ -216,6 +216,8 @@ protected:
double m_mm_to_pix_x, m_mm_to_pix_y;
friend class WXDLLIMPEXP_CORE wxOverlayImpl; // for Init
DECLARE_DYNAMIC_CLASS(wxDC)
};

View File

@ -26,14 +26,21 @@ public:
wxWindowDC(wxWindow *win);
virtual ~wxWindowDC();
virtual wxWindow *GetWindow() const { return m_win; }
protected:
// initializes the DC for painting on given window; if rect!=NULL, then
// for painting only on the given region of the window
void InitForWin(wxWindow *win, const wxRect *rect);
private:
wxWindow *m_win;
wxRect m_winRect; // rectangle of the window being painted
bool m_shouldFlip; // flip the surface when done?
friend class wxOverlayImpl; // for m_shouldFlip;
DECLARE_DYNAMIC_CLASS(wxWindowDC)
DECLARE_NO_COPY_CLASS(wxWindowDC)
};

View File

@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/dfb/private/overlay.h
// Purpose: wxOverlayImpl declaration
// Author: Vaclav Slavik
// Created: 2006-10-20
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DFB_PRIVATE_OVERLAY_H_
#define _WX_DFB_PRIVATE_OVERLAY_H_
#include "wx/dfb/dfbptr.h"
wxDFB_DECLARE_INTERFACE(IDirectFBSurface);
class WXDLLEXPORT wxWindow;
class wxOverlayImpl
{
public:
wxOverlayImpl();
~wxOverlayImpl();
void Reset();
bool IsOk();
void Init(wxWindowDC* dc, int x , int y , int width , int height);
void BeginDrawing(wxWindowDC* dc);
void EndDrawing(wxWindowDC* dc);
void Clear(wxWindowDC* dc);
// wxDFB specific methods:
bool IsEmpty() const { return m_isEmpty; }
wxRect GetRect() const { return m_rect; }
wxIDirectFBSurfacePtr GetDirectFBSurface() const { return m_surface; }
public:
// window the overlay is associated with
wxWindow *m_window;
// rectangle covered by the overlay, in m_window's window coordinates
wxRect m_rect;
// surface of the overlay, same size as m_rect
wxIDirectFBSurfacePtr m_surface;
// this flag is set to true if nothing was drawn on the overlay (either
// initially or Clear() was called)
bool m_isEmpty;
};
#endif // _WX_DFB_PRIVATE_OVERLAY_H_

View File

@ -23,6 +23,9 @@ struct wxDFBWindowEvent;
class WXDLLIMPEXP_CORE wxFont;
class WXDLLIMPEXP_CORE wxTopLevelWindowDFB;
class wxOverlayImpl;
class wxDfbOverlaysList;
// ---------------------------------------------------------------------------
// wxWindow
// ---------------------------------------------------------------------------
@ -144,10 +147,21 @@ protected:
// called by parent to render (part of) the window
void PaintWindow(const wxRect& rect);
// paint window's overlays (if any) on top of window's surface
void PaintOverlays(const wxRect& rect);
// refreshes the entire window (including non-client areas)
void DoRefreshWindow();
// refreshes given rectangle of the window (in window, _not_ client coords)
virtual void DoRefreshRect(const wxRect& rect);
// refreshes given rectangle; unlike RefreshRect(), the argument is in
// window, not client, coords and unlike DoRefreshRect() and like Refresh(),
// does nothing if the window is hidden or frozen
void RefreshWindowRect(const wxRect& rect);
// add/remove overlay for this window
void AddOverlay(wxOverlayImpl *overlay);
void RemoveOverlay(wxOverlayImpl *overlay);
// DirectFB events handling
void HandleKeyEvent(const wxDFBWindowEvent& event_);
@ -173,7 +187,12 @@ private:
// number of calls to Freeze() minus number of calls to Thaw()
unsigned m_frozenness;
// overlays for this window (or NULL if it doesn't have any)
wxDfbOverlaysList *m_overlays;
friend class wxTopLevelWindowDFB; // for HandleXXXEvent
friend class wxOverlayImpl; // for Add/RemoveOverlay
friend class wxWindowDC; // for PaintOverlays
DECLARE_DYNAMIC_CLASS(wxWindowDFB)
DECLARE_NO_COPY_CLASS(wxWindowDFB)

View File

@ -13,6 +13,12 @@
#define _WX_CARET_H_
#include "wx/timer.h"
#include "wx/dc.h"
#include "wx/overlay.h"
#if wxHAS_NATIVE_OVERLAY
#define wxHAS_CARET_USING_OVERLAYS 1
#endif
class WXDLLIMPEXP_CORE wxCaret;
@ -26,18 +32,6 @@ private:
wxCaret *m_caret;
};
#ifndef wxUSE_OVERLAY
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#define wxUSE_OVERLAY 1
#else
#define wxUSE_OVERLAY 0
#endif
#endif
#if wxUSE_OVERLAY
#include "wx/dc.h"
#endif
class WXDLLIMPEXP_CORE wxCaret : public wxCaretBase
{
public:
@ -82,7 +76,7 @@ private:
// GTK specific initialization
void InitGeneric();
#if wxUSE_OVERLAY
#if wxHAS_CARET_USING_OVERLAYS
// the overlay for displaying the caret
wxOverlay m_overlay;
#else

View File

@ -19,10 +19,7 @@
#include "wx/treectrl.h"
#include "wx/listctrl.h"
#include "wx/log.h"
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#include "wx/dc.h"
#endif
#include "wx/overlay.h"
/*
To use this class, create a wxDragImage when you start dragging, for example:
@ -163,8 +160,7 @@ public:
// For efficiency, tell wxGenericDragImage to use a bitmap that's already
// created (e.g. from last drag)
void SetBackingBitmap(wxBitmap* bitmap) {
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#else
#if !wxHAS_NATIVE_OVERLAY
m_pBackingBitmap = bitmap;
#endif
}
@ -251,7 +247,7 @@ protected:
wxWindow* m_window;
wxDC* m_windowDC;
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#if wxHAS_NATIVE_OVERLAY
wxOverlay m_overlay;
wxDCOverlay* m_dcOverlay;
#else
@ -261,7 +257,7 @@ protected:
// (pass to wxGenericDragImage as an efficiency measure)
// A temporary bitmap for repairing/redrawing
wxBitmap m_repairBitmap;
#endif
#endif // !wxHAS_NATIVE_OVERLAY
wxRect m_boundingRect;
bool m_fullScreen;

View File

@ -0,0 +1,58 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/carbon/private/overlay.h
// Purpose: wxOverlayImpl declaration
// Author: Stefan Csomor
// Modified by:
// Created: 2006-10-20
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
#define _WX_MAC_CARBON_PRIVATE_OVERLAY_H_
#include "wx/mac/private.h"
#include "wx/toplevel.h"
#include "wx/graphics.h"
class wxOverlayImpl
{
public:
wxOverlayImpl() ;
~wxOverlayImpl() ;
// clears the overlay without restoring the former state
// to be done eg when the window content has been changed and repainted
void Reset();
// returns true if it has been setup
bool IsOk();
void Init( wxWindowDC* dc, int x , int y , int width , int height );
void BeginDrawing( wxWindowDC* dc);
void EndDrawing( wxWindowDC* dc);
void Clear( wxWindowDC* dc);
private:
OSStatus CreateOverlayWindow();
void MacGetBounds( Rect *bounds );
WindowRef m_overlayWindow;
WindowRef m_overlayParentWindow;
CGContextRef m_overlayContext ;
// we store the window in case we would have to issue a Refresh()
wxWindow* m_window ;
int m_x ;
int m_y ;
int m_width ;
int m_height ;
} ;
#endif // _WX_MAC_CARBON_PRIVATE_OVERLAY_H_

99
include/wx/overlay.h Normal file
View File

@ -0,0 +1,99 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/overlay.h
// Purpose: wxOverlay class
// Author: Stefan Csomor
// Modified by:
// Created: 2006-10-20
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OVERLAY_H_
#define _WX_OVERLAY_H_
#include "wx/defs.h"
#ifndef wxHAS_NATIVE_OVERLAY
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#define wxHAS_NATIVE_OVERLAY 1
#elif defined(__WXDFB__)
#define wxHAS_NATIVE_OVERLAY 1
#else
#define wxHAS_NATIVE_OVERLAY 0
#endif
#endif
// ----------------------------------------------------------------------------
// creates an overlay over an existing window, allowing for manipulations like
// rubberbanding etc. This API is not stable yet, not to be used outside wx
// internal code
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxOverlayImpl;
class WXDLLEXPORT wxWindowDC;
class WXDLLEXPORT wxOverlay
{
public:
wxOverlay();
~wxOverlay();
// clears the overlay without restoring the former state
// to be done eg when the window content has been changed and repainted
void Reset();
// returns (port-specific) implementation of the overlay
wxOverlayImpl *GetImpl() { return m_impl; }
private:
friend class WXDLLEXPORT wxDCOverlay;
// returns true if it has been setup
bool IsOk();
void Init(wxWindowDC* dc, int x , int y , int width , int height);
void BeginDrawing(wxWindowDC* dc);
void EndDrawing(wxWindowDC* dc);
void Clear(wxWindowDC* dc);
wxOverlayImpl* m_impl;
bool m_inDrawing;
DECLARE_NO_COPY_CLASS(wxOverlay)
};
class WXDLLEXPORT wxDCOverlay
{
public:
// connects this overlay to the corresponding drawing dc, if the overlay is
// not initialized yet this call will do so
wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc, int x , int y , int width , int height);
// convenience wrapper that behaves the same using the entire area of the dc
wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc);
// removes the connection between the overlay and the dc
virtual ~wxDCOverlay();
// clears the layer, restoring the state at the last init
void Clear();
private:
void Init(wxWindowDC *dc, int x , int y , int width , int height);
wxOverlay& m_overlay;
wxWindowDC* m_dc;
DECLARE_NO_COPY_CLASS(wxDCOverlay)
};
#endif // _WX_OVERLAY_H_

View File

@ -0,0 +1,68 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/private/overlay.h
// Purpose: wxOverlayImpl declaration
// Author: Stefan Csomor
// Modified by:
// Created: 2006-10-20
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRIVATE_OVERLAY_H_
#define _WX_PRIVATE_OVERLAY_H_
#include "wx/overlay.h"
#if wxHAS_NATIVE_OVERLAY
#if defined(__WXMAC__)
#include "wx/mac/carbon/private/overlay.h"
#elif defined(__WXDFB__)
#include "wx/dfb/private/overlay.h"
#else
#error "unknown native wxOverlay implementation"
#endif
#else // !wxHAS_NATIVE_OVERLAY
// generic implementation of wxOverlay
class wxOverlayImpl
{
public:
wxOverlayImpl();
~wxOverlayImpl();
// clears the overlay without restoring the former state
// to be done eg when the window content has been changed and repainted
void Reset();
// returns true if it has been setup
bool IsOk();
void Init(wxWindowDC* dc, int x , int y , int width , int height);
void BeginDrawing(wxWindowDC* dc);
void EndDrawing(wxWindowDC* dc);
void Clear(wxWindowDC* dc);
private:
wxBitmap m_bmpSaved ;
int m_x ;
int m_y ;
int m_width ;
int m_height ;
// this is to enable wxMOTIF and UNIV to compile....
// currently (10 oct 06) we don't use m_window
// ce - how do we fix this
#if defined(__WXGTK__) || defined(__WXMSW__)
wxWindow* m_window ;
#endif
} ;
#endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY
#endif // _WX_PRIVATE_OVERLAY_H_

View File

@ -1150,377 +1150,3 @@ void wxDCBase::CalculateEllipticPoints( wxList* points,
} // CalculateEllipticPoints
#endif
//
// temporary home for wxOverlay
//
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#include "wx/mac/private.h"
#include "wx/toplevel.h"
#include "wx/graphics.h"
class wxOverlayImpl
{
public:
wxOverlayImpl() ;
~wxOverlayImpl() ;
// clears the overlay without restoring the former state
// to be done eg when the window content has been changed and repainted
void Reset();
// returns true if it has been setup
bool IsOk();
void Init( wxWindowDC* dc, int x , int y , int width , int height );
void BeginDrawing( wxWindowDC* dc);
void EndDrawing( wxWindowDC* dc);
void Clear( wxWindowDC* dc);
private:
OSStatus CreateOverlayWindow();
void MacGetBounds( Rect *bounds );
WindowRef m_overlayWindow;
WindowRef m_overlayParentWindow;
CGContextRef m_overlayContext ;
// we store the window in case we would have to issue a Refresh()
wxWindow* m_window ;
int m_x ;
int m_y ;
int m_width ;
int m_height ;
} ;
wxOverlayImpl::wxOverlayImpl()
{
m_window = NULL ;
m_overlayContext = NULL ;
m_overlayWindow = NULL ;
}
wxOverlayImpl::~wxOverlayImpl()
{
Reset();
}
bool wxOverlayImpl::IsOk()
{
return m_overlayWindow != NULL ;
}
void wxOverlayImpl::MacGetBounds( Rect *bounds )
{
wxPoint origin(0,0);
origin = m_window->ClientToScreen( origin );
bounds->top = origin.y;
bounds->left = origin.x;
bounds->bottom = origin.y+m_y+m_height;
bounds->right = origin.x+m_x+m_width;
}
OSStatus wxOverlayImpl::CreateOverlayWindow()
{
OSStatus err;
WindowAttributes overlayAttributes = kWindowIgnoreClicksAttribute;
if ( m_window )
{
m_overlayParentWindow =(WindowRef) m_window->MacGetTopLevelWindowRef();
Rect bounds ;
MacGetBounds(&bounds);
err = CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, &m_overlayWindow );
if ( err == noErr )
{
SetWindowGroup( m_overlayWindow, GetWindowGroup(m_overlayParentWindow)); // Put them in the same group so that their window layers are consistent
}
}
else
{
m_overlayParentWindow = NULL ;
CGRect cgbounds ;
cgbounds = CGDisplayBounds(CGMainDisplayID());
Rect bounds;
bounds.top = cgbounds.origin.y;
bounds.left = cgbounds.origin.x;
bounds.bottom = bounds.top + cgbounds.size.height;
bounds.right = bounds.left + cgbounds.size.width;
err = CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, &m_overlayWindow );
}
ShowWindow(m_overlayWindow);
return err;
}
void wxOverlayImpl::Init( wxWindowDC* dc, int x , int y , int width , int height )
{
wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") );
m_window = dc->GetWindow();
m_x = x ;
m_y = y ;
m_width = width ;
m_height = height ;
OSStatus err = CreateOverlayWindow();
wxASSERT_MSG( err == noErr , _("Couldn't create the overlay window") );
#ifndef __LP64__
err = QDBeginCGContext(GetWindowPort(m_overlayWindow), &m_overlayContext);
#endif
CGContextTranslateCTM( m_overlayContext, 0, m_height+m_y );
CGContextScaleCTM( m_overlayContext, 1, -1 );
wxASSERT_MSG( err == noErr , _("Couldn't init the context on the overlay window") );
}
void wxOverlayImpl::BeginDrawing( wxWindowDC* dc)
{
// TODO CS
dc->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) );
/*
delete dc->m_graphicContext ;
dc->m_graphicContext = new wxMacCGContext( m_overlayContext );
// we are right now startin at 0,0 not at the wxWindow's origin, so most of the calculations
// int dc are already corect
// just to make sure :
dc->m_macLocalOrigin.x = 0 ;
dc->m_macLocalOrigin.y = 0 ;
*/
wxSize size = dc->GetSize() ;
dc->SetClippingRegion( 0 , 0 , size.x , size.y ) ;
}
void wxOverlayImpl::EndDrawing( wxWindowDC* dc)
{
dc->SetGraphicsContext(NULL);
}
void wxOverlayImpl::Clear(wxWindowDC* dc)
{
wxASSERT_MSG( IsOk() , _("You cannot Clear an overlay that is not inited") );
CGRect box = CGRectMake( m_x - 1, m_y - 1 , m_width + 2 , m_height + 2 );
CGContextClearRect( m_overlayContext, box );
}
void wxOverlayImpl::Reset()
{
if ( m_overlayContext )
{
#ifndef __LP64__
OSStatus err = QDEndCGContext(GetWindowPort(m_overlayWindow), &m_overlayContext);
wxASSERT_MSG( err == noErr , _("Couldn't end the context on the overlay window") );
#endif
m_overlayContext = NULL ;
}
// todo : don't dispose, only hide and reposition on next run
if (m_overlayWindow)
{
DisposeWindow(m_overlayWindow);
m_overlayWindow = NULL ;
}
}
//
//
//
#else // ie not wxMAC_USE_CORE_GRAPHICS
class wxOverlayImpl
{
public:
wxOverlayImpl() ;
~wxOverlayImpl() ;
// clears the overlay without restoring the former state
// to be done eg when the window content has been changed and repainted
void Reset();
// returns true if it has been setup
bool IsOk();
void Init( wxWindowDC* dc, int x , int y , int width , int height );
void BeginDrawing( wxWindowDC* dc);
void EndDrawing( wxWindowDC* dc);
void Clear( wxWindowDC* dc);
private:
wxBitmap m_bmpSaved ;
int m_x ;
int m_y ;
int m_width ;
int m_height ;
// this is to enable wxMOTIF and UNIV to compile....
// currently (10 oct 06) we don't use m_window
// ce - how do we fix this
#if defined(__WXGTK__) || defined(__WXMSW__)
//
wxWindow* m_window ;
#endif
} ;
wxOverlayImpl::wxOverlayImpl()
{
#if defined(__WXGTK__) || defined(__WXMSW__)
m_window = NULL ;
#endif
m_x = m_y = m_width = m_height = 0 ;
}
wxOverlayImpl::~wxOverlayImpl()
{
}
bool wxOverlayImpl::IsOk()
{
return m_bmpSaved.Ok() ;
}
void wxOverlayImpl::Init( wxWindowDC* dc, int x , int y , int width , int height )
{
#if defined(__WXGTK__)
m_window = dc->m_owner;
#else
#if defined (__WXMSW__)
m_window = dc->GetWindow();
#endif // __WXMSW__
#endif
wxMemoryDC dcMem ;
m_bmpSaved.Create( width, height );
dcMem.SelectObject( m_bmpSaved );
m_x = x ;
m_y = y ;
m_width = width ;
m_height = height ;
#if defined(__WXGTK__) && !defined(__WX_DC_BLIT_FIXED__)
wxPoint pt = dc->GetDeviceOrigin();
x += pt.x;
y += pt.y;
#endif // broken wxGTK wxDC::Blit
dcMem.Blit(0, 0, m_width, m_height,
dc, x, y);
dcMem.SelectObject( wxNullBitmap );
}
void wxOverlayImpl::Clear(wxWindowDC* dc)
{
wxMemoryDC dcMem ;
dcMem.SelectObject( m_bmpSaved );
dc->Blit( m_x, m_y, m_width, m_height , &dcMem , 0 , 0 );
dcMem.SelectObject( wxNullBitmap );
}
void wxOverlayImpl::Reset()
{
m_bmpSaved = wxBitmap();
}
void wxOverlayImpl::BeginDrawing(wxWindowDC* WXUNUSED(dc))
{
}
void wxOverlayImpl::EndDrawing(wxWindowDC* WXUNUSED(dc))
{
}
#endif
// common code
wxOverlay::wxOverlay()
{
m_impl = new wxOverlayImpl();
m_inDrawing = false;
}
wxOverlay::~wxOverlay()
{
wxDELETE( m_impl );
}
bool wxOverlay::IsOk()
{
return m_impl->IsOk();
}
void wxOverlay::Init( wxWindowDC* dc, int x , int y , int width , int height )
{
m_impl->Init(dc, x, y, width, height);
}
void wxOverlay::BeginDrawing( wxWindowDC* dc)
{
m_impl->BeginDrawing(dc);
m_inDrawing = true ;
}
void wxOverlay::EndDrawing( wxWindowDC* dc)
{
m_impl->EndDrawing(dc);
m_inDrawing = false ;
}
void wxOverlay::Clear( wxWindowDC* dc)
{
m_impl->Clear(dc);
}
void wxOverlay::Reset()
{
wxASSERT_MSG(m_inDrawing==false,wxT("cannot reset overlay during drawing"));
m_impl->Reset();
}
// dc connector
wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc, int x , int y , int width , int height) :
m_overlay(overlay)
{
Init(dc, x, y, width, height);
}
wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc) :
m_overlay(overlay)
{
int width;
int height;
dc->GetSize(&width,&height);
Init(dc, 0, 0, width, height);
}
wxDCOverlay::~wxDCOverlay()
{
m_overlay.EndDrawing(m_dc);
}
void wxDCOverlay::Init(wxWindowDC *dc, int x , int y , int width , int height )
{
m_dc = dc ;
if ( !m_overlay.IsOk() )
{
m_overlay.Init(dc,x,y,width,height);
}
m_overlay.BeginDrawing(dc);
}
void wxDCOverlay::Clear()
{
m_overlay.Clear(m_dc);
}

197
src/common/overlaycmn.cpp Normal file
View File

@ -0,0 +1,197 @@
/////////////////////////////////////////////////////////////////////////////
// Name: src/common/overlaycmn.cpp
// Purpose: common wxOverlay code
// Author: Stefan Csomor
// Modified by:
// Created: 2006-10-20
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/overlay.h"
#include "wx/private/overlay.h"
#include "wx/dcclient.h"
#include "wx/dcmemory.h"
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// wxOverlay
// ----------------------------------------------------------------------------
wxOverlay::wxOverlay()
{
m_impl = new wxOverlayImpl();
m_inDrawing = false;
}
wxOverlay::~wxOverlay()
{
m_impl;
}
bool wxOverlay::IsOk()
{
return m_impl->IsOk();
}
void wxOverlay::Init( wxWindowDC* dc, int x , int y , int width , int height )
{
m_impl->Init(dc, x, y, width, height);
}
void wxOverlay::BeginDrawing( wxWindowDC* dc)
{
m_impl->BeginDrawing(dc);
m_inDrawing = true ;
}
void wxOverlay::EndDrawing( wxWindowDC* dc)
{
m_impl->EndDrawing(dc);
m_inDrawing = false ;
}
void wxOverlay::Clear( wxWindowDC* dc)
{
m_impl->Clear(dc);
}
void wxOverlay::Reset()
{
wxASSERT_MSG(m_inDrawing==false,wxT("cannot reset overlay during drawing"));
m_impl->Reset();
}
// ----------------------------------------------------------------------------
// wxDCOverlay
// ----------------------------------------------------------------------------
wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc, int x , int y , int width , int height) :
m_overlay(overlay)
{
Init(dc, x, y, width, height);
}
wxDCOverlay::wxDCOverlay(wxOverlay &overlay, wxWindowDC *dc) :
m_overlay(overlay)
{
int width;
int height;
dc->GetSize(&width,&height);
Init(dc, 0, 0, width, height);
}
wxDCOverlay::~wxDCOverlay()
{
m_overlay.EndDrawing(m_dc);
}
void wxDCOverlay::Init(wxWindowDC *dc, int x , int y , int width , int height )
{
m_dc = dc ;
if ( !m_overlay.IsOk() )
{
m_overlay.Init(dc,x,y,width,height);
}
m_overlay.BeginDrawing(dc);
}
void wxDCOverlay::Clear()
{
m_overlay.Clear(m_dc);
}
// ----------------------------------------------------------------------------
// generic implementation of wxOverlayImpl
// ----------------------------------------------------------------------------
#if !wxHAS_NATIVE_OVERLAY
wxOverlayImpl::wxOverlayImpl()
{
#if defined(__WXGTK__) || defined(__WXMSW__)
m_window = NULL ;
#endif
m_x = m_y = m_width = m_height = 0 ;
}
wxOverlayImpl::~wxOverlayImpl()
{
}
bool wxOverlayImpl::IsOk()
{
return m_bmpSaved.Ok() ;
}
void wxOverlayImpl::Init( wxWindowDC* dc, int x , int y , int width , int height )
{
#if defined(__WXGTK__)
m_window = dc->m_owner;
#else
#if defined (__WXMSW__)
m_window = dc->GetWindow();
#endif // __WXMSW__
#endif
wxMemoryDC dcMem ;
m_bmpSaved.Create( width, height );
dcMem.SelectObject( m_bmpSaved );
m_x = x ;
m_y = y ;
m_width = width ;
m_height = height ;
#if defined(__WXGTK__) && !defined(__WX_DC_BLIT_FIXED__)
wxPoint pt = dc->GetDeviceOrigin();
x += pt.x;
y += pt.y;
#endif // broken wxGTK wxDC::Blit
dcMem.Blit(0, 0, m_width, m_height,
dc, x, y);
dcMem.SelectObject( wxNullBitmap );
}
void wxOverlayImpl::Clear(wxWindowDC* dc)
{
wxMemoryDC dcMem ;
dcMem.SelectObject( m_bmpSaved );
dc->Blit( m_x, m_y, m_width, m_height , &dcMem , 0 , 0 );
dcMem.SelectObject( wxNullBitmap );
}
void wxOverlayImpl::Reset()
{
m_bmpSaved = wxBitmap();
}
void wxOverlayImpl::BeginDrawing(wxWindowDC* WXUNUSED(dc))
{
}
void wxOverlayImpl::EndDrawing(wxWindowDC* WXUNUSED(dc))
{
}
#endif // !wxHAS_NATIVE_OVERLAY

View File

@ -96,6 +96,8 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect)
{
wxCHECK_RET( win, _T("invalid window") );
m_win = win;
// obtain the surface used for painting:
wxPoint origin;
wxIDirectFBSurfacePtr surface;
@ -154,6 +156,7 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect)
}
else
{
m_winRect = r;
DFBRectangle dfbrect = { r.x, r.y, r.width, r.height };
surface = win->GetDfbSurface()->GetSubSurface(&dfbrect);
@ -195,6 +198,10 @@ wxWindowDC::~wxWindowDC()
if ( m_shouldFlip )
{
// paint overlays on top of the surface being drawn to by this DC
// before showing anything on the screen:
m_win->PaintOverlays(m_winRect);
DFBSurfaceCapabilities caps = DSCAPS_NONE;
surface->GetCapabilities(&caps);
if ( caps & DSCAPS_DOUBLE )

109
src/dfb/overlay.cpp Normal file
View File

@ -0,0 +1,109 @@
/////////////////////////////////////////////////////////////////////////////
// Name: src/dfb/overlay.cpp
// Purpose: wxOverlay implementation for wxDFB
// Author: Vaclav Slavik
// Created: 2006-10-20
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/private/overlay.h"
#include "wx/dfb/private.h"
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// wxOverlay
// ----------------------------------------------------------------------------
wxOverlayImpl::wxOverlayImpl()
{
m_window = NULL;
m_isEmpty = true;
}
wxOverlayImpl::~wxOverlayImpl()
{
Reset();
}
bool wxOverlayImpl::IsOk()
{
return m_window != NULL;
}
void wxOverlayImpl::Init(wxWindowDC *dc, int x, int y, int width, int height)
{
wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") );
m_window = dc->GetWindow();
m_rect = wxRect(x, y, width, height);
m_rect.Offset(m_window->GetClientAreaOrigin());
// FIXME: create surface with transparency or key color (?)
m_surface =
dc->GetDirectFBSurface()->CreateCompatible
(
m_rect.GetSize(),
wxIDirectFBSurface::CreateCompatible_NoBackBuffer
);
m_window->AddOverlay(this);
}
void wxOverlayImpl::BeginDrawing(wxWindowDC *dc)
{
wxPoint origin(m_rect.GetPosition() - m_window->GetClientAreaOrigin());
// drawing on overlay "hijacks" existing wxWindowDC rather then using
// another DC, so we have to change the DC to draw on the overlay's surface.
// Setting m_shouldFlip is done to avoid flipping and drawing of overlays
// in ~wxWindowDC (we do it EndDrawing).
dc->Init(m_surface);
dc->SetDeviceOrigin(-origin.x, -origin.y);
dc->m_shouldFlip = false;
m_isEmpty = false;
}
void wxOverlayImpl::EndDrawing(wxWindowDC *dc)
{
m_window->RefreshWindowRect(m_rect);
}
void wxOverlayImpl::Clear(wxWindowDC *dc)
{
wxASSERT_MSG( IsOk(),
_T("You cannot Clear an overlay that is not initialized") );
m_isEmpty = true;
}
void wxOverlayImpl::Reset()
{
if ( m_window )
{
m_window->RemoveOverlay(this);
m_window = NULL;
m_surface.Reset();
}
}

View File

@ -31,8 +31,10 @@
#endif
#include "wx/caret.h"
#include "wx/dynarray.h"
#include "wx/dfb/private.h"
#include "wx/private/overlay.h"
#define TRACE_EVENTS _T("events")
#define TRACE_PAINT _T("paint")
@ -53,6 +55,12 @@ static wxWindow *gs_toBeFocusedWindow = NULL;
// the window that has mouse capture
static wxWindowDFB *gs_mouseCapture = NULL;
// ---------------------------------------------------------------------------
// overlays support
// ---------------------------------------------------------------------------
WX_DEFINE_ARRAY_PTR(wxOverlayImpl*, wxDfbOverlaysList);
// ---------------------------------------------------------------------------
// event tables
// ---------------------------------------------------------------------------
@ -72,6 +80,7 @@ void wxWindowDFB::Init()
m_isShown = true;
m_frozenness = 0;
m_tlw = NULL;
m_overlays = NULL;
}
// Destructor
@ -623,7 +632,7 @@ void wxWindowDFB::Refresh(bool WXUNUSED(eraseBack), const wxRect *rect)
// NB[1]: We intentionally ignore the eraseBack argument here. This is
// because of the way wxDFB's painting is implemented: the refresh
// request is probagated up to wxTLW, which is then painted in
// request is propagated up to wxTLW, which is then painted in
// top-down order. This means that this window's area is first
// painted by its parent and this window is then painted over it, so
// it's not safe to not paint this window's background even if
@ -638,6 +647,14 @@ void wxWindowDFB::Refresh(bool WXUNUSED(eraseBack), const wxRect *rect)
DoRefreshWindow();
}
void wxWindowDFB::RefreshWindowRect(const wxRect& rect)
{
if ( !IsShown() || IsFrozen() )
return;
DoRefreshRect(rect);
}
void wxWindowDFB::DoRefreshWindow()
{
// NB: DoRefreshRect() takes window coords, not client, so this is correct
@ -701,17 +718,6 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
this, GetName().c_str(),
rect.x, rect.y, rect.GetRight(), rect.GetBottom());
#if wxUSE_CARET
// FIXME: we're doing this before setting m_updateRegion because wxDFB
// clips all DCs for this window to it, but this results in flicker,
// it should be fixed by using overlays for the caret
// must hide caret temporarily, otherwise we'd get rendering artifacts
wxCaret *caret = GetCaret();
if ( caret )
caret->Hide();
#endif // wxUSE_CARET
m_updateRegion = rect;
// FIXME_DFB: don't waste time rendering the area if it's fully covered
@ -752,14 +758,10 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
this, GetName().c_str());
}
m_updateRegion.Clear();
// draw window's overlays on top of the painted window, if we have any:
PaintOverlays(rect);
#if wxUSE_CARET
// FIXME: this should be ideally done before m_updateRegion.Clear() or not
// at all, see the comment where the caret is hidden
if ( caret )
caret->Show();
#endif // wxUSE_CARET
m_updateRegion.Clear();
// paint the children:
wxPoint origin = GetClientAreaOrigin();
@ -786,6 +788,59 @@ void wxWindowDFB::PaintWindow(const wxRect& rect)
}
}
void wxWindowDFB::PaintOverlays(const wxRect& rect)
{
if ( !m_overlays )
return;
for ( wxDfbOverlaysList::const_iterator i = m_overlays->begin();
i != m_overlays->end(); ++i )
{
wxOverlayImpl *overlay = *i;
wxRect orectOrig(overlay->GetRect());
wxRect orect(orectOrig);
orect.Intersect(rect);
if ( orect.IsEmpty() )
continue;
if ( overlay->IsEmpty() )
continue; // nothing to paint
DFBRectangle dfbRect = { orect.x - orectOrig.x, orect.y - orectOrig.y,
orect.width, orect.height };
GetDfbSurface()->Blit
(
overlay->GetDirectFBSurface(),
&dfbRect,
orect.x, orect.y
);
}
}
void wxWindowDFB::AddOverlay(wxOverlayImpl *overlay)
{
if ( !m_overlays )
m_overlays = new wxDfbOverlaysList;
m_overlays->Add(overlay);
}
void wxWindowDFB::RemoveOverlay(wxOverlayImpl *overlay)
{
wxCHECK_RET( m_overlays, _T("no overlays to remove") );
m_overlays->Remove(overlay);
if ( m_overlays->empty() )
{
wxDELETE(m_overlays);
}
if ( !m_isBeingDeleted )
RefreshWindowRect(overlay->GetRect());
}
// ---------------------------------------------------------------------------
// events handling

View File

@ -88,7 +88,7 @@ void wxCaret::InitGeneric()
{
m_hasFocus = true;
m_blinkedOut = true;
#if wxUSE_OVERLAY == 0
#if !wxHAS_CARET_USING_OVERLAYS
m_xOld =
m_yOld = -1;
m_bmpUnderCaret.Create(m_width, m_height);
@ -131,7 +131,7 @@ void wxCaret::DoHide()
void wxCaret::DoMove()
{
#if wxUSE_OVERLAY
#if wxHAS_CARET_USING_OVERLAYS
m_overlay.Reset();
#endif
if ( IsVisible() )
@ -158,7 +158,7 @@ void wxCaret::DoSize()
m_countVisible = 0;
DoHide();
}
#if wxUSE_OVERLAY
#if wxHAS_CARET_USING_OVERLAYS
m_overlay.Reset();
#else
// Change bitmap size
@ -217,7 +217,7 @@ void wxCaret::Refresh()
{
wxClientDC dcWin(GetWindow());
// this is the new code, switch to 0 if this gives problems
#if wxUSE_OVERLAY
#if wxHAS_CARET_USING_OVERLAYS
wxDCOverlay dcOverlay( m_overlay, &dcWin, m_x, m_y, m_width , m_height );
if ( m_blinkedOut )
{

View File

@ -72,7 +72,7 @@ void wxGenericDragImage::Init()
m_windowDC = (wxDC*) NULL;
m_window = (wxWindow*) NULL;
m_fullScreen = false;
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#if wxHAS_NATIVE_OVERLAY
m_dcOverlay = NULL;
#else
m_pBackingBitmap = (wxBitmap*) NULL;
@ -288,14 +288,12 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
}
}
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
// nothing to setup here
#else
#if !wxHAS_NATIVE_OVERLAY
wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap);
if (!backing->Ok() || (backing->GetWidth() < clientSize.x || backing->GetHeight() < clientSize.y))
(*backing) = wxBitmap(clientSize.x, clientSize.y);
#endif
#endif // !wxHAS_NATIVE_OVERLAY
if (!m_fullScreen)
{
@ -358,7 +356,7 @@ bool wxGenericDragImage::EndDrag()
if (m_windowDC)
{
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#if wxHAS_NATIVE_OVERLAY
m_overlay.Reset();
#else
m_windowDC->DestroyClippingRegion();
@ -367,9 +365,7 @@ bool wxGenericDragImage::EndDrag()
m_windowDC = (wxDC*) NULL;
}
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
// nothing to do for overlays
#else
#if !wxHAS_NATIVE_OVERLAY
m_repairBitmap = wxNullBitmap;
#endif
@ -413,9 +409,7 @@ bool wxGenericDragImage::Show()
// This is where we restore the backing bitmap, in case
// something has changed on the window.
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
// overlay will be set up in the drawing routine
#else
#if !wxHAS_NATIVE_OVERLAY
wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap);
wxMemoryDC memDC;
memDC.SelectObject(* backing);
@ -424,7 +418,7 @@ bool wxGenericDragImage::Show()
//memDC.Blit(0, 0, m_boundingRect.width, m_boundingRect.height, m_windowDC, m_boundingRect.x, m_boundingRect.y);
memDC.SelectObject(wxNullBitmap);
#endif
#endif // !wxHAS_NATIVE_OVERLAY
RedrawImage(m_position - m_offset, m_position - m_offset, false, true);
}
@ -466,13 +460,13 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, const wxPoint& newPo
if (!m_windowDC)
return false;
#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
#if wxHAS_NATIVE_OVERLAY
wxDCOverlay dcoverlay( m_overlay, (wxWindowDC*) m_windowDC ) ;
if ( eraseOld )
dcoverlay.Clear() ;
if (drawNew)
DoDrawImage(*m_windowDC, newPos);
#else
#else // !wxHAS_NATIVE_OVERLAY
wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap);
if (!backing->Ok())
return false;
@ -538,7 +532,8 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, const wxPoint& newPo
memDCTemp.SelectObject(wxNullBitmap);
memDC.SelectObject(wxNullBitmap);
#endif
#endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY
return true;
}

165
src/mac/carbon/overlay.cpp Normal file
View File

@ -0,0 +1,165 @@
/////////////////////////////////////////////////////////////////////////////
// Name: src/mac/carbon/overlay.cpp
// Purpose: common wxOverlay code
// Author: Stefan Csomor
// Modified by:
// Created: 2006-10-20
// RCS-ID: $Id$
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/overlay.h"
#include "wx/private/overlay.h"
#if wxHAS_NATIVE_OVERLAY
// ============================================================================
// implementation
// ============================================================================
wxOverlayImpl::wxOverlayImpl()
{
m_window = NULL ;
m_overlayContext = NULL ;
m_overlayWindow = NULL ;
}
wxOverlayImpl::~wxOverlayImpl()
{
Reset();
}
bool wxOverlayImpl::IsOk()
{
return m_overlayWindow != NULL ;
}
void wxOverlayImpl::MacGetBounds( Rect *bounds )
{
wxPoint origin(0,0);
origin = m_window->ClientToScreen( origin );
bounds->top = origin.y;
bounds->left = origin.x;
bounds->bottom = origin.y+m_y+m_height;
bounds->right = origin.x+m_x+m_width;
}
OSStatus wxOverlayImpl::CreateOverlayWindow()
{
OSStatus err;
WindowAttributes overlayAttributes = kWindowIgnoreClicksAttribute;
if ( m_window )
{
m_overlayParentWindow =(WindowRef) m_window->MacGetTopLevelWindowRef();
Rect bounds ;
MacGetBounds(&bounds);
err = CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, &m_overlayWindow );
if ( err == noErr )
{
SetWindowGroup( m_overlayWindow, GetWindowGroup(m_overlayParentWindow)); // Put them in the same group so that their window layers are consistent
}
}
else
{
m_overlayParentWindow = NULL ;
CGRect cgbounds ;
cgbounds = CGDisplayBounds(CGMainDisplayID());
Rect bounds;
bounds.top = cgbounds.origin.y;
bounds.left = cgbounds.origin.x;
bounds.bottom = bounds.top + cgbounds.size.height;
bounds.right = bounds.left + cgbounds.size.width;
err = CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, &m_overlayWindow );
}
ShowWindow(m_overlayWindow);
return err;
}
void wxOverlayImpl::Init( wxWindowDC* dc, int x , int y , int width , int height )
{
wxASSERT_MSG( !IsOk() , _("You cannot Init an overlay twice") );
m_window = dc->GetWindow();
m_x = x ;
m_y = y ;
m_width = width ;
m_height = height ;
OSStatus err = CreateOverlayWindow();
wxASSERT_MSG( err == noErr , _("Couldn't create the overlay window") );
#ifndef __LP64__
err = QDBeginCGContext(GetWindowPort(m_overlayWindow), &m_overlayContext);
#endif
CGContextTranslateCTM( m_overlayContext, 0, m_height+m_y );
CGContextScaleCTM( m_overlayContext, 1, -1 );
wxASSERT_MSG( err == noErr , _("Couldn't init the context on the overlay window") );
}
void wxOverlayImpl::BeginDrawing( wxWindowDC* dc)
{
// TODO CS
dc->SetGraphicsContext( wxGraphicsContext::CreateFromNative( m_overlayContext ) );
/*
delete dc->m_graphicContext ;
dc->m_graphicContext = new wxMacCGContext( m_overlayContext );
// we are right now startin at 0,0 not at the wxWindow's origin, so most of the calculations
// int dc are already corect
// just to make sure :
dc->m_macLocalOrigin.x = 0 ;
dc->m_macLocalOrigin.y = 0 ;
*/
wxSize size = dc->GetSize() ;
dc->SetClippingRegion( 0 , 0 , size.x , size.y ) ;
}
void wxOverlayImpl::EndDrawing( wxWindowDC* dc)
{
dc->SetGraphicsContext(NULL);
}
void wxOverlayImpl::Clear(wxWindowDC* dc)
{
wxASSERT_MSG( IsOk() , _("You cannot Clear an overlay that is not inited") );
CGRect box = CGRectMake( m_x - 1, m_y - 1 , m_width + 2 , m_height + 2 );
CGContextClearRect( m_overlayContext, box );
}
void wxOverlayImpl::Reset()
{
if ( m_overlayContext )
{
#ifndef __LP64__
OSStatus err = QDEndCGContext(GetWindowPort(m_overlayWindow), &m_overlayContext);
wxASSERT_MSG( err == noErr , _("Couldn't end the context on the overlay window") );
#endif
m_overlayContext = NULL ;
}
// todo : don't dispose, only hide and reposition on next run
if (m_overlayWindow)
{
DisposeWindow(m_overlayWindow);
m_overlayWindow = NULL ;
}
}
#endif // wxHAS_NATIVE_OVERLAY

View File

@ -755,6 +755,10 @@ SOURCE=.\common\object.cpp
# End Source File
# Begin Source File
SOURCE=.\common\overlaycmn.cpp
# End Source File
# Begin Source File
SOURCE=.\common\paper.cpp
# End Source File
# Begin Source File
@ -2959,6 +2963,10 @@ SOURCE=..\include\wx\odcombo.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\overlay.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\ownerdrw.h
# End Source File
# Begin Source File