wx/menu.h \
wx/msgdlg.h \
wx/numdlg.h \
+ wx/overlay.h \
wx/palette.h \
wx/panel.h \
wx/pen.h \
monodll_matrix.o \
monodll_menucmn.o \
monodll_nbkbase.o \
+ monodll_overlaycmn.o \
monodll_paper.o \
monodll_pickerbase.o \
monodll_popupcmn.o \
monodll_matrix.o \
monodll_menucmn.o \
monodll_nbkbase.o \
+ monodll_overlaycmn.o \
monodll_paper.o \
monodll_pickerbase.o \
monodll_popupcmn.o \
monodll_evtloop.o \
monodll_font.o \
monodll_fontenum.o \
+ monodll_overlay.o \
monodll_pen.o \
monodll_region.o \
monodll_settings.o \
monodll_minifram.o \
monodll_msgdlg.o \
monodll_notebmac.o \
+ monodll_overlay.o \
monodll_palette.o \
monodll_pen.o \
monodll_printdlg.o \
monodll_evtloop.o \
monodll_font.o \
monodll_fontenum.o \
+ monodll_overlay.o \
monodll_pen.o \
monodll_region.o \
monodll_settings.o \
monolib_matrix.o \
monolib_menucmn.o \
monolib_nbkbase.o \
+ monolib_overlaycmn.o \
monolib_paper.o \
monolib_pickerbase.o \
monolib_popupcmn.o \
monolib_matrix.o \
monolib_menucmn.o \
monolib_nbkbase.o \
+ monolib_overlaycmn.o \
monolib_paper.o \
monolib_pickerbase.o \
monolib_popupcmn.o \
monolib_evtloop.o \
monolib_font.o \
monolib_fontenum.o \
+ monolib_overlay.o \
monolib_pen.o \
monolib_region.o \
monolib_settings.o \
monolib_minifram.o \
monolib_msgdlg.o \
monolib_notebmac.o \
+ monolib_overlay.o \
monolib_palette.o \
monolib_pen.o \
monolib_printdlg.o \
monolib_evtloop.o \
monolib_font.o \
monolib_fontenum.o \
+ monolib_overlay.o \
monolib_pen.o \
monolib_region.o \
monolib_settings.o \
coredll_matrix.o \
coredll_menucmn.o \
coredll_nbkbase.o \
+ coredll_overlaycmn.o \
coredll_paper.o \
coredll_pickerbase.o \
coredll_popupcmn.o \
coredll_matrix.o \
coredll_menucmn.o \
coredll_nbkbase.o \
+ coredll_overlaycmn.o \
coredll_paper.o \
coredll_pickerbase.o \
coredll_popupcmn.o \
coredll_evtloop.o \
coredll_font.o \
coredll_fontenum.o \
+ coredll_overlay.o \
coredll_pen.o \
coredll_region.o \
coredll_settings.o \
coredll_minifram.o \
coredll_msgdlg.o \
coredll_notebmac.o \
+ coredll_overlay.o \
coredll_palette.o \
coredll_pen.o \
coredll_printdlg.o \
coredll_evtloop.o \
coredll_font.o \
coredll_fontenum.o \
+ coredll_overlay.o \
coredll_pen.o \
coredll_region.o \
coredll_settings.o \
corelib_matrix.o \
corelib_menucmn.o \
corelib_nbkbase.o \
+ corelib_overlaycmn.o \
corelib_paper.o \
corelib_pickerbase.o \
corelib_popupcmn.o \
corelib_matrix.o \
corelib_menucmn.o \
corelib_nbkbase.o \
+ corelib_overlaycmn.o \
corelib_paper.o \
corelib_pickerbase.o \
corelib_popupcmn.o \
corelib_evtloop.o \
corelib_font.o \
corelib_fontenum.o \
+ corelib_overlay.o \
corelib_pen.o \
corelib_region.o \
corelib_settings.o \
corelib_minifram.o \
corelib_msgdlg.o \
corelib_notebmac.o \
+ corelib_overlay.o \
corelib_palette.o \
corelib_pen.o \
corelib_printdlg.o \
corelib_evtloop.o \
corelib_font.o \
corelib_fontenum.o \
+ corelib_overlay.o \
corelib_pen.o \
corelib_region.o \
corelib_settings.o \
@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
@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
@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
@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
@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
@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
@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
@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
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
wx/menu.h
wx/msgdlg.h
wx/numdlg.h
+ wx/overlay.h
wx/palette.h
wx/panel.h
wx/pen.h
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
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
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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) $**
$(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) $**
$(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) $**
$(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) $**
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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) $<
$(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) $<
$(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) $<
$(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) $<
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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 \
$(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) $**
$(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) $**
$(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) $**
$(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) $**
$(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 &
$(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 &
$(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 &
$(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 &
$(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 &
$(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 &
$(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 &
$(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 &
$(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) $<
$(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) $<
$(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) $<
$(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) $<
# 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
# 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
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
#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:
DECLARE_NO_COPY_CLASS(wxCaretSuspend)
};
+#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
+
#endif // wxUSE_CARET
#endif // _WX_CARET_H_BASE_
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_
double m_mm_to_pix_x, m_mm_to_pix_y;
+ friend class WXDLLIMPEXP_CORE wxOverlayImpl; // for Init
+
DECLARE_DYNAMIC_CLASS(wxDC)
};
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)
};
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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_
class WXDLLIMPEXP_CORE wxFont;
class WXDLLIMPEXP_CORE wxTopLevelWindowDFB;
+class wxOverlayImpl;
+class wxDfbOverlaysList;
+
// ---------------------------------------------------------------------------
// wxWindow
// ---------------------------------------------------------------------------
// 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_);
// 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)
#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;
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:
// GTK specific initialization
void InitGeneric();
-#if wxUSE_OVERLAY
+#if wxHAS_CARET_USING_OVERLAYS
// the overlay for displaying the caret
wxOverlay m_overlay;
#else
#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:
// 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
}
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
// (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;
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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_
} // 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);
-}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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
+
+
{
wxCHECK_RET( win, _T("invalid window") );
+ m_win = win;
+
// obtain the surface used for painting:
wxPoint origin;
wxIDirectFBSurfacePtr surface;
}
else
{
+ m_winRect = r;
DFBRectangle dfbrect = { r.x, r.y, r.width, r.height };
surface = win->GetDfbSurface()->GetSubSurface(&dfbrect);
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 )
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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();
+ }
+}
#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")
// the window that has mouse capture
static wxWindowDFB *gs_mouseCapture = NULL;
+// ---------------------------------------------------------------------------
+// overlays support
+// ---------------------------------------------------------------------------
+
+WX_DEFINE_ARRAY_PTR(wxOverlayImpl*, wxDfbOverlaysList);
+
// ---------------------------------------------------------------------------
// event tables
// ---------------------------------------------------------------------------
m_isShown = true;
m_frozenness = 0;
m_tlw = NULL;
+ m_overlays = NULL;
}
// Destructor
// 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
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
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
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();
}
}
+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
{
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);
void wxCaret::DoMove()
{
-#if wxUSE_OVERLAY
+#if wxHAS_CARET_USING_OVERLAYS
m_overlay.Reset();
#endif
if ( IsVisible() )
m_countVisible = 0;
DoHide();
}
-#if wxUSE_OVERLAY
+#if wxHAS_CARET_USING_OVERLAYS
m_overlay.Reset();
#else
// Change bitmap size
{
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 )
{
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;
}
}
-#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)
{
if (m_windowDC)
{
-#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
+#if wxHAS_NATIVE_OVERLAY
m_overlay.Reset();
#else
m_windowDC->DestroyClippingRegion();
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
// 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);
//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);
}
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;
memDCTemp.SelectObject(wxNullBitmap);
memDC.SelectObject(wxNullBitmap);
-#endif
+#endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY
+
return true;
}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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
# 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
# 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