From 00b4e7c946860a23696ea5189c7da2eefbeb3e3b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Oct 2012 13:51:58 +0000 Subject: [PATCH] Add support for wxAuiNotebook to XRC. Add wxAuiNotebookXmlHandler to "aui" library, now that we can do it without adding a dependency of it on "xrc" one. Closes #10889. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 17 ++++ build/bakefiles/files.bkl | 2 + build/msw/makefile.bcc | 20 ++++- build/msw/makefile.gcc | 20 ++++- build/msw/makefile.vc | 20 ++++- build/msw/makefile.wat | 20 ++++- build/msw/wx_aui.dsp | 8 ++ build/msw/wx_core.dsp | 4 + build/msw/wx_vc7_aui.vcproj | 6 ++ build/msw/wx_vc7_core.vcproj | 3 + build/msw/wx_vc8_aui.vcproj | 8 ++ build/msw/wx_vc8_core.vcproj | 4 + build/msw/wx_vc9_aui.vcproj | 8 ++ build/msw/wx_vc9_core.vcproj | 4 + docs/changes.txt | 1 + docs/doxygen/overviews/xrc_format.h | 42 ++++++++++ include/wx/xrc/xh_auinotbk.h | 36 +++++++++ src/xrc/xh_auinotbk.cpp | 119 ++++++++++++++++++++++++++++ 18 files changed, 334 insertions(+), 8 deletions(-) create mode 100644 include/wx/xrc/xh_auinotbk.h create mode 100644 src/xrc/xh_auinotbk.cpp diff --git a/Makefile.in b/Makefile.in index 03d778e638..4b6c322e44 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1868,6 +1868,7 @@ AUIDLL_OBJECTS = \ auidll_auibar.o \ auidll_tabmdi.o \ auidll_tabart.o \ + auidll_xh_auinotbk.o \ $(__AUI_GTK_SRC_OBJECTS_2) AUIDLL_ODEP = $(_____pch_wxprec_auidll_wx_wxprec_h_gch___depname) AUILIB_CXXFLAGS = $(__auilib_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @@ -1883,6 +1884,7 @@ AUILIB_OBJECTS = \ auilib_auibar.o \ auilib_tabmdi.o \ auilib_tabart.o \ + auilib_xh_auinotbk.o \ $(__AUI_GTK_SRC_OBJECTS_3) AUILIB_ODEP = $(_____pch_wxprec_auilib_wx_wxprec_h_gch___depname) RIBBONDLL_CXXFLAGS = $(__ribbondll_PCH_INC) -D__WX$(TOOLKIT)__ \ @@ -4347,6 +4349,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \ wx/aui/tabmdi.h \ wx/aui/aui.h \ wx/aui/tabart.h \ + wx/xrc/xh_auinotbk.h \ $(AUI_GTK_HDR) \ wx/propgrid/advprops.h \ wx/propgrid/editors.h \ @@ -4669,6 +4672,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \ monodll_auibar.o \ monodll_tabmdi.o \ monodll_tabart.o \ + monodll_xh_auinotbk.o \ $(__AUI_GTK_SRC_OBJECTS) \ monodll_advprops.o \ monodll_editors.o \ @@ -6902,6 +6906,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \ monolib_auibar.o \ monolib_tabmdi.o \ monolib_tabart.o \ + monolib_xh_auinotbk.o \ $(__AUI_GTK_SRC_OBJECTS_1) \ monolib_advprops.o \ monolib_editors.o \ @@ -18577,6 +18582,9 @@ monodll_tabmdi.o: $(srcdir)/src/aui/tabmdi.cpp $(MONODLL_ODEP) monodll_tabart.o: $(srcdir)/src/aui/tabart.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/aui/tabart.cpp +monodll_xh_auinotbk.o: $(srcdir)/src/xrc/xh_auinotbk.cpp $(MONODLL_ODEP) + $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_auinotbk.cpp + monodll_tabartgtk.o: $(srcdir)/src/aui/tabartgtk.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/aui/tabartgtk.cpp @@ -24328,6 +24336,9 @@ monolib_tabmdi.o: $(srcdir)/src/aui/tabmdi.cpp $(MONOLIB_ODEP) monolib_tabart.o: $(srcdir)/src/aui/tabart.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/aui/tabart.cpp +monolib_xh_auinotbk.o: $(srcdir)/src/xrc/xh_auinotbk.cpp $(MONOLIB_ODEP) + $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_auinotbk.cpp + monolib_tabartgtk.o: $(srcdir)/src/aui/tabartgtk.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/aui/tabartgtk.cpp @@ -39574,6 +39585,9 @@ auidll_tabmdi.o: $(srcdir)/src/aui/tabmdi.cpp $(AUIDLL_ODEP) auidll_tabart.o: $(srcdir)/src/aui/tabart.cpp $(AUIDLL_ODEP) $(CXXC) -c -o $@ $(AUIDLL_CXXFLAGS) $(srcdir)/src/aui/tabart.cpp +auidll_xh_auinotbk.o: $(srcdir)/src/xrc/xh_auinotbk.cpp $(AUIDLL_ODEP) + $(CXXC) -c -o $@ $(AUIDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_auinotbk.cpp + auidll_tabartgtk.o: $(srcdir)/src/aui/tabartgtk.cpp $(AUIDLL_ODEP) $(CXXC) -c -o $@ $(AUIDLL_CXXFLAGS) $(srcdir)/src/aui/tabartgtk.cpp @@ -39598,6 +39612,9 @@ auilib_tabmdi.o: $(srcdir)/src/aui/tabmdi.cpp $(AUILIB_ODEP) auilib_tabart.o: $(srcdir)/src/aui/tabart.cpp $(AUILIB_ODEP) $(CXXC) -c -o $@ $(AUILIB_CXXFLAGS) $(srcdir)/src/aui/tabart.cpp +auilib_xh_auinotbk.o: $(srcdir)/src/xrc/xh_auinotbk.cpp $(AUILIB_ODEP) + $(CXXC) -c -o $@ $(AUILIB_CXXFLAGS) $(srcdir)/src/xrc/xh_auinotbk.cpp + auilib_tabartgtk.o: $(srcdir)/src/aui/tabartgtk.cpp $(AUILIB_ODEP) $(CXXC) -c -o $@ $(AUILIB_CXXFLAGS) $(srcdir)/src/aui/tabartgtk.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 9842bc800b..2d05bb647a 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3631,6 +3631,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/aui/auibar.cpp src/aui/tabmdi.cpp src/aui/tabart.cpp + src/xrc/xh_auinotbk.cpp $(AUI_GTK_SRC) @@ -3642,6 +3643,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/aui/tabmdi.h wx/aui/aui.h wx/aui/tabart.h + wx/xrc/xh_auinotbk.h $(AUI_GTK_HDR) diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index dd964ada80..66db2e49e6 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -1344,7 +1344,8 @@ AUIDLL_OBJECTS = \ $(OBJS)\auidll_auibook.obj \ $(OBJS)\auidll_auibar.obj \ $(OBJS)\auidll_tabmdi.obj \ - $(OBJS)\auidll_tabart.obj + $(OBJS)\auidll_tabart.obj \ + $(OBJS)\auidll_xh_auinotbk.obj AUILIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ @@ -1362,7 +1363,8 @@ AUILIB_OBJECTS = \ $(OBJS)\auilib_auibook.obj \ $(OBJS)\auilib_auibar.obj \ $(OBJS)\auilib_tabmdi.obj \ - $(OBJS)\auilib_tabart.obj + $(OBJS)\auilib_tabart.obj \ + $(OBJS)\auilib_xh_auinotbk.obj RIBBONDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ $(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ @@ -1722,6 +1724,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_auibar.obj \ $(OBJS)\monodll_tabmdi.obj \ $(OBJS)\monodll_tabart.obj \ + $(OBJS)\monodll_xh_auinotbk.obj \ $(OBJS)\monodll_advprops.obj \ $(OBJS)\monodll_editors.obj \ $(OBJS)\monodll_manager.obj \ @@ -2520,6 +2523,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_auibar.obj \ $(OBJS)\monolib_tabmdi.obj \ $(OBJS)\monolib_tabart.obj \ + $(OBJS)\monolib_xh_auinotbk.obj \ $(OBJS)\monolib_advprops.obj \ $(OBJS)\monolib_editors.obj \ $(OBJS)\monolib_manager.obj \ @@ -7214,6 +7218,9 @@ $(OBJS)\monodll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\monodll_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\monodll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\monodll_advprops.obj: ..\..\src\propgrid\advprops.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp @@ -9658,6 +9665,9 @@ $(OBJS)\monolib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\monolib_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\monolib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\monolib_advprops.obj: ..\..\src\propgrid\advprops.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\advprops.cpp @@ -15707,6 +15717,9 @@ $(OBJS)\auidll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\auidll_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\auidll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\auilib_dummy.obj: ..\..\src\common\dummy.cpp $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp @@ -15731,6 +15744,9 @@ $(OBJS)\auilib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\auilib_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\auilib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\ribbondll_dummy.obj: ..\..\src\common\dummy.cpp $(CXX) -q -c -P -o$@ $(RIBBONDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 573ede50e8..f401e0b6a6 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -1343,7 +1343,8 @@ AUIDLL_OBJECTS = \ $(OBJS)\auidll_auibook.o \ $(OBJS)\auidll_auibar.o \ $(OBJS)\auidll_tabmdi.o \ - $(OBJS)\auidll_tabart.o + $(OBJS)\auidll_tabart.o \ + $(OBJS)\auidll_xh_auinotbk.o AUILIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ @@ -1360,7 +1361,8 @@ AUILIB_OBJECTS = \ $(OBJS)\auilib_auibook.o \ $(OBJS)\auilib_auibar.o \ $(OBJS)\auilib_tabmdi.o \ - $(OBJS)\auilib_tabart.o + $(OBJS)\auilib_tabart.o \ + $(OBJS)\auilib_xh_auinotbk.o RIBBONDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ @@ -1734,6 +1736,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_auibar.o \ $(OBJS)\monodll_tabmdi.o \ $(OBJS)\monodll_tabart.o \ + $(OBJS)\monodll_xh_auinotbk.o \ $(OBJS)\monodll_advprops.o \ $(OBJS)\monodll_editors.o \ $(OBJS)\monodll_manager.o \ @@ -2538,6 +2541,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_auibar.o \ $(OBJS)\monolib_tabmdi.o \ $(OBJS)\monolib_tabart.o \ + $(OBJS)\monolib_xh_auinotbk.o \ $(OBJS)\monolib_advprops.o \ $(OBJS)\monolib_editors.o \ $(OBJS)\monolib_manager.o \ @@ -7383,6 +7387,9 @@ $(OBJS)\monodll_tabmdi.o: ../../src/aui/tabmdi.cpp $(OBJS)\monodll_tabart.o: ../../src/aui/tabart.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\monodll_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\monodll_advprops.o: ../../src/propgrid/advprops.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< @@ -9827,6 +9834,9 @@ $(OBJS)\monolib_tabmdi.o: ../../src/aui/tabmdi.cpp $(OBJS)\monolib_tabart.o: ../../src/aui/tabart.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\monolib_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\monolib_advprops.o: ../../src/propgrid/advprops.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< @@ -15876,6 +15886,9 @@ $(OBJS)\auidll_tabmdi.o: ../../src/aui/tabmdi.cpp $(OBJS)\auidll_tabart.o: ../../src/aui/tabart.cpp $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\auidll_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\auilib_dummy.o: ../../src/common/dummy.cpp $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< @@ -15900,6 +15913,9 @@ $(OBJS)\auilib_tabmdi.o: ../../src/aui/tabmdi.cpp $(OBJS)\auilib_tabart.o: ../../src/aui/tabart.cpp $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\auilib_xh_auinotbk.o: ../../src/xrc/xh_auinotbk.cpp + $(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\ribbondll_dummy.o: ../../src/common/dummy.cpp $(CXX) -c -o $@ $(RIBBONDLL_CXXFLAGS) $(CPPDEPS) $< diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index 20877a77d6..c8e12357e7 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -1481,7 +1481,8 @@ AUIDLL_OBJECTS = \ $(OBJS)\auidll_auibook.obj \ $(OBJS)\auidll_auibar.obj \ $(OBJS)\auidll_tabmdi.obj \ - $(OBJS)\auidll_tabart.obj + $(OBJS)\auidll_tabart.obj \ + $(OBJS)\auidll_xh_auinotbk.obj AUIDLL_RESOURCES = \ $(OBJS)\auidll_version.res AUILIB_CXXFLAGS = /M$(__RUNTIME_LIBS_472)$(__DEBUGRUNTIME) /DWIN32 \ @@ -1505,7 +1506,8 @@ AUILIB_OBJECTS = \ $(OBJS)\auilib_auibook.obj \ $(OBJS)\auilib_auibar.obj \ $(OBJS)\auilib_tabmdi.obj \ - $(OBJS)\auilib_tabart.obj + $(OBJS)\auilib_tabart.obj \ + $(OBJS)\auilib_xh_auinotbk.obj RIBBONDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_488)$(__DEBUGRUNTIME) /DWIN32 \ $(__DEBUGINFO) \ /Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG).pdb \ @@ -2014,6 +2016,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_auibar.obj \ $(OBJS)\monodll_tabmdi.obj \ $(OBJS)\monodll_tabart.obj \ + $(OBJS)\monodll_xh_auinotbk.obj \ $(OBJS)\monodll_advprops.obj \ $(OBJS)\monodll_editors.obj \ $(OBJS)\monodll_manager.obj \ @@ -2818,6 +2821,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_auibar.obj \ $(OBJS)\monolib_tabmdi.obj \ $(OBJS)\monolib_tabart.obj \ + $(OBJS)\monolib_xh_auinotbk.obj \ $(OBJS)\monolib_advprops.obj \ $(OBJS)\monolib_editors.obj \ $(OBJS)\monolib_manager.obj \ @@ -7898,6 +7902,9 @@ $(OBJS)\monodll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\monodll_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\monodll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\monodll_advprops.obj: ..\..\src\propgrid\advprops.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\propgrid\advprops.cpp @@ -10342,6 +10349,9 @@ $(OBJS)\monolib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\monolib_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\monolib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\monolib_advprops.obj: ..\..\src\propgrid\advprops.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\propgrid\advprops.cpp @@ -16391,6 +16401,9 @@ $(OBJS)\auidll_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\auidll_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\auidll_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\auilib_dummy.obj: ..\..\src\common\dummy.cpp $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp @@ -16415,6 +16428,9 @@ $(OBJS)\auilib_tabmdi.obj: ..\..\src\aui\tabmdi.cpp $(OBJS)\auilib_tabart.obj: ..\..\src\aui\tabart.cpp $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\aui\tabart.cpp +$(OBJS)\auilib_xh_auinotbk.obj: ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_auinotbk.cpp + $(OBJS)\ribbondll_dummy.obj: ..\..\src\common\dummy.cpp $(CXX) /c /nologo /TP /Fo$@ $(RIBBONDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat index daf9e756e8..9fbbb5556e 100644 --- a/build/msw/makefile.wat +++ b/build/msw/makefile.wat @@ -224,6 +224,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = & $(OBJS)\monodll_auibar.obj & $(OBJS)\monodll_tabmdi.obj & $(OBJS)\monodll_tabart.obj & + $(OBJS)\monodll_xh_auinotbk.obj & $(OBJS)\monodll_advprops.obj & $(OBJS)\monodll_editors.obj & $(OBJS)\monodll_manager.obj & @@ -1033,6 +1034,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = & $(OBJS)\monolib_auibar.obj & $(OBJS)\monolib_tabmdi.obj & $(OBJS)\monolib_tabart.obj & + $(OBJS)\monolib_xh_auinotbk.obj & $(OBJS)\monolib_advprops.obj & $(OBJS)\monolib_editors.obj & $(OBJS)\monolib_manager.obj & @@ -4929,7 +4931,8 @@ AUIDLL_OBJECTS = & $(OBJS)\auidll_auibook.obj & $(OBJS)\auidll_auibar.obj & $(OBJS)\auidll_tabmdi.obj & - $(OBJS)\auidll_tabart.obj + $(OBJS)\auidll_tabart.obj & + $(OBJS)\auidll_xh_auinotbk.obj AUILIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & @@ -4947,7 +4950,8 @@ AUILIB_OBJECTS = & $(OBJS)\auilib_auibook.obj & $(OBJS)\auilib_auibar.obj & $(OBJS)\auilib_tabmdi.obj & - $(OBJS)\auilib_tabart.obj + $(OBJS)\auilib_tabart.obj & + $(OBJS)\auilib_xh_auinotbk.obj RIBBONDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) & @@ -7656,6 +7660,9 @@ $(OBJS)\monodll_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp $(OBJS)\monodll_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +$(OBJS)\monodll_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + $(OBJS)\monodll_advprops.obj : .AUTODEPEND ..\..\src\propgrid\advprops.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< @@ -10100,6 +10107,9 @@ $(OBJS)\monolib_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp $(OBJS)\monolib_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +$(OBJS)\monolib_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + $(OBJS)\monolib_advprops.obj : .AUTODEPEND ..\..\src\propgrid\advprops.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< @@ -16149,6 +16159,9 @@ $(OBJS)\auidll_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp $(OBJS)\auidll_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< +$(OBJS)\auidll_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUIDLL_CXXFLAGS) $< + $(OBJS)\auilib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< @@ -16173,6 +16186,9 @@ $(OBJS)\auilib_tabmdi.obj : .AUTODEPEND ..\..\src\aui\tabmdi.cpp $(OBJS)\auilib_tabart.obj : .AUTODEPEND ..\..\src\aui\tabart.cpp $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< +$(OBJS)\auilib_xh_auinotbk.obj : .AUTODEPEND ..\..\src\xrc\xh_auinotbk.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(AUILIB_CXXFLAGS) $< + $(OBJS)\ribbondll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp $(CXX) -bt=nt -zq -fo=$^@ $(RIBBONDLL_CXXFLAGS) $< diff --git a/build/msw/wx_aui.dsp b/build/msw/wx_aui.dsp index bd93fab595..e68faf7712 100644 --- a/build/msw/wx_aui.dsp +++ b/build/msw/wx_aui.dsp @@ -560,6 +560,10 @@ SOURCE=..\..\include\wx\aui\tabart.h SOURCE=..\..\include\wx\aui\tabmdi.h # End Source File +# Begin Source File + +SOURCE=..\..\include\wx\xrc\xh_auinotbk.h +# End Source File # End Group # Begin Group "Source Files" @@ -592,6 +596,10 @@ SOURCE=..\..\src\aui\tabart.cpp SOURCE=..\..\src\aui\tabmdi.cpp # End Source File +# Begin Source File + +SOURCE=..\..\src\xrc\xh_auinotbk.cpp +# End Source File # End Group # End Target # End Project diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp index 6735899bed..1b39171a00 100644 --- a/build/msw/wx_core.dsp +++ b/build/msw/wx_core.dsp @@ -7108,6 +7108,10 @@ SOURCE=..\..\include\wx\xrc\xh_animatctrl.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\xrc\xh_auinotbk.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\xrc\xh_bannerwindow.h # End Source File # Begin Source File diff --git a/build/msw/wx_vc7_aui.vcproj b/build/msw/wx_vc7_aui.vcproj index 1fe55540f8..b52c9fd5f7 100644 --- a/build/msw/wx_vc7_aui.vcproj +++ b/build/msw/wx_vc7_aui.vcproj @@ -795,6 +795,9 @@ + + + + diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj index faa0dfc452..c1c298128d 100644 --- a/build/msw/wx_vc7_core.vcproj +++ b/build/msw/wx_vc7_core.vcproj @@ -5906,6 +5906,9 @@ + + diff --git a/build/msw/wx_vc8_aui.vcproj b/build/msw/wx_vc8_aui.vcproj index 0e43dc4a50..ffcc567bea 100644 --- a/build/msw/wx_vc8_aui.vcproj +++ b/build/msw/wx_vc8_aui.vcproj @@ -1082,6 +1082,10 @@ RelativePath="..\..\include\wx\aui\tabmdi.h" > + + + + diff --git a/build/msw/wx_vc8_core.vcproj b/build/msw/wx_vc8_core.vcproj index d1d4fe703c..675ded9eb4 100644 --- a/build/msw/wx_vc8_core.vcproj +++ b/build/msw/wx_vc8_core.vcproj @@ -7895,6 +7895,10 @@ RelativePath="..\..\include\wx\xrc\xh_animatctrl.h" > + + diff --git a/build/msw/wx_vc9_aui.vcproj b/build/msw/wx_vc9_aui.vcproj index 828c515329..fe8040e66f 100644 --- a/build/msw/wx_vc9_aui.vcproj +++ b/build/msw/wx_vc9_aui.vcproj @@ -1078,6 +1078,10 @@ RelativePath="..\..\include\wx\aui\tabmdi.h" > + + + + diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj index 3fcdf1b17a..b8f8506173 100644 --- a/build/msw/wx_vc9_core.vcproj +++ b/build/msw/wx_vc9_core.vcproj @@ -7891,6 +7891,10 @@ RelativePath="..\..\include\wx\xrc\xh_animatctrl.h" > + + diff --git a/docs/changes.txt b/docs/changes.txt index 4bd6cef11f..1d7fa1d4f7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -544,6 +544,7 @@ All: All (GUI): +- Add support for wxAuiNotebook to XRC (Steven Lamerton). - Add wxBITMAP_PNG() macro similar to wxBITMAP() but for PNG files. - Add new wxSimplebook class. - Support hexadecimal numbers in wxSpinCtrl. diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index be5cfce215..693792e42b 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -536,6 +536,48 @@ controls cannot have children. @endTable +@subsubsection xrc_wxauinotebook wxAuiNotebook + +A wxAuiNotebook can have one or more child objects of the @c notebookpage +pseudo-class. +@c notebookpage objects have the following properties: + +@beginTable +@hdr3col{property, type, description} +@row3col{label, @ref overview_xrcformat_type_text, + Page label (required).} +@row3col{bitmap, @ref overview_xrcformat_type_bitmap, + Bitmap shown alongside the label (default: none).} +@row3col{selected, @ref overview_xrcformat_type_bool, + Is the page selected initially (only one page can be selected; default: 0)?} +@endTable + +Each @c notebookpage must have exactly one non-toplevel window as its child. + +Example: +@code + + + + + bitmap.png + + ... + + + +@endcode + +Notice that wxAuiNotebook support in XRC is available in wxWidgets 2.9.5 and +later only and you need to explicitly register its handler using +@code + #include + + AddHandler(new wxAuiNotebookXmlHandler); +@endcode +to use it. + + @subsubsection xrc_wxbannerwindow wxBannerWindow @beginTable diff --git a/include/wx/xrc/xh_auinotbk.h b/include/wx/xrc/xh_auinotbk.h new file mode 100644 index 0000000000..10c9fdc5ef --- /dev/null +++ b/include/wx/xrc/xh_auinotbk.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_auinotbk.h +// Purpose: XML resource handler for wxAuiNotebook +// Author: Steve Lamerton +// Created: 2009-06-12 +// RCS-ID: $Id$ +// Copyright: (c) 2009 Steve Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XRC_XH_AUINOTEBOOK_H_ +#define _WX_XRC_XH_AUINOTEBOOK_H_ + +#include "wx/xrc/xmlres.h" + +class WXDLLIMPEXP_FWD_AUI wxAuiNotebook; + +#if wxUSE_XRC && wxUSE_AUI + +class WXDLLIMPEXP_AUI wxAuiNotebookXmlHandler : public wxXmlResourceHandler +{ +public: + wxAuiNotebookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxAuiNotebook *m_notebook; + + wxDECLARE_DYNAMIC_CLASS(wxAuiNotebookXmlHandler); +}; + +#endif // wxUSE_XRC && wxUSE_AUI + +#endif // _WX_XRC_XH_AUINOTEBOOK_H_ diff --git a/src/xrc/xh_auinotbk.cpp b/src/xrc/xh_auinotbk.cpp new file mode 100644 index 0000000000..f873597122 --- /dev/null +++ b/src/xrc/xh_auinotbk.cpp @@ -0,0 +1,119 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/xrc/xh_auinotbk.cpp +// Purpose: XML resource handler for wxAuiNotebook +// Author: Steve Lamerton +// Created: 2009-06-12 +// RCS-ID: $Id$ +// Copyright: (c) 2009 Steve Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_XRC && wxUSE_AUI + +#include "wx/xrc/xh_auinotbk.h" +#include "wx/aui/auibook.h" + +wxIMPLEMENT_DYNAMIC_CLASS(wxAuiNotebookXmlHandler, wxXmlResourceHandler); + +wxAuiNotebookXmlHandler::wxAuiNotebookXmlHandler() + : wxXmlResourceHandler() +{ + XRC_ADD_STYLE(wxAUI_NB_DEFAULT_STYLE); + XRC_ADD_STYLE(wxAUI_NB_TAB_SPLIT); + XRC_ADD_STYLE(wxAUI_NB_TAB_MOVE); + XRC_ADD_STYLE(wxAUI_NB_TAB_EXTERNAL_MOVE); + XRC_ADD_STYLE(wxAUI_NB_TAB_FIXED_WIDTH); + XRC_ADD_STYLE(wxAUI_NB_SCROLL_BUTTONS); + XRC_ADD_STYLE(wxAUI_NB_WINDOWLIST_BUTTON); + XRC_ADD_STYLE(wxAUI_NB_CLOSE_BUTTON); + XRC_ADD_STYLE(wxAUI_NB_CLOSE_ON_ACTIVE_TAB); + XRC_ADD_STYLE(wxAUI_NB_CLOSE_ON_ALL_TABS); + XRC_ADD_STYLE(wxAUI_NB_TOP); + XRC_ADD_STYLE(wxAUI_NB_BOTTOM); + + AddWindowStyles(); +} + +wxObject *wxAuiNotebookXmlHandler::DoCreateResource() +{ + if (m_class == wxT("notebookpage")) + { + wxXmlNode *anb = GetParamNode(wxT("object")); + + if (!anb) + anb = GetParamNode(wxT("object_ref")); + + if (anb) + { + bool old_ins = m_isInside; + m_isInside = false; + wxObject *item = CreateResFromNode(anb, m_notebook, NULL); + m_isInside = old_ins; + wxWindow *wnd = wxDynamicCast(item, wxWindow); + + if (wnd) + { + if ( HasParam(wxT("bitmap")) ) + { + m_notebook->AddPage(wnd, + GetText(wxT("label")), + GetBool(wxT("selected")), + GetBitmap(wxT("bitmap"), wxART_OTHER)); + } + else + { + m_notebook->AddPage(wnd, + GetText(wxT("label")), + GetBool(wxT("selected"))); + } + } + else + { + ReportError(anb, "notebookpage child must be a window"); + } + return wnd; + } + else + { + ReportError("notebookpage must have a window child"); + return NULL; + } + } + else + { + XRC_MAKE_INSTANCE(anb, wxAuiNotebook) + + anb->Create(m_parentAsWindow, + GetID(), + GetPosition(), + GetSize(), + GetStyle(wxT("style"))); + + SetupWindow(anb); + + wxAuiNotebook *old_par = m_notebook; + m_notebook = anb; + bool old_ins = m_isInside; + m_isInside = true; + CreateChildren(m_notebook, true/*only this handler*/); + m_isInside = old_ins; + m_notebook = old_par; + + return anb; + } +} + +bool wxAuiNotebookXmlHandler::CanHandle(wxXmlNode *node) +{ + return ((!m_isInside && IsOfClass(node, wxT("wxAuiNotebook"))) || + (m_isInside && IsOfClass(node, wxT("notebookpage")))); +} + +#endif // wxUSE_XRC && wxUSE_ANIMATIONCTRL -- 2.45.2