Add support for wxAuiManager and wxAuiPaneInfo to XRC

Add XRC handler for wxAuiManager and include the existing wxAuiNotebook
handler into it (but notice that wxAuiToolBar handler added by a later #15686
in f269f868d7 remains separate).

Also update the AUI dialog in the sample and stop hardcoding its size in
pixels.

See #13520.
This commit is contained in:
Andrea Zanellato 2016-03-09 01:08:42 +01:00 committed by Vadim Zeitlin
parent 6f80021950
commit cf5fa7d5f1
23 changed files with 667 additions and 286 deletions

View File

@ -1884,7 +1884,7 @@ AUIDLL_OBJECTS = \
auidll_auibar.o \
auidll_tabmdi.o \
auidll_tabart.o \
auidll_xh_auinotbk.o \
auidll_xh_aui.o \
auidll_xh_auitoolb.o \
$(__AUI_GTK_SRC_OBJECTS_2) \
$(__AUI_PLATFORM_SRC_OBJECTS_2)
@ -1902,7 +1902,7 @@ AUILIB_OBJECTS = \
auilib_auibar.o \
auilib_tabmdi.o \
auilib_tabart.o \
auilib_xh_auinotbk.o \
auilib_xh_aui.o \
auilib_xh_auitoolb.o \
$(__AUI_GTK_SRC_OBJECTS_3) \
$(__AUI_PLATFORM_SRC_OBJECTS_3)
@ -3974,7 +3974,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 \
wx/xrc/xh_aui.h \
wx/xrc/xh_auitoolb.h \
$(AUI_GTK_HDR) \
$(AUI_PLATFORM_HDR) \
@ -4280,7 +4280,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \
monodll_auibar.o \
monodll_tabmdi.o \
monodll_tabart.o \
monodll_xh_auinotbk.o \
monodll_xh_aui.o \
monodll_xh_auitoolb.o \
$(__AUI_GTK_SRC_OBJECTS) \
$(__AUI_PLATFORM_SRC_OBJECTS) \
@ -6294,7 +6294,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \
monolib_auibar.o \
monolib_tabmdi.o \
monolib_tabart.o \
monolib_xh_auinotbk.o \
monolib_xh_aui.o \
monolib_xh_auitoolb.o \
$(__AUI_GTK_SRC_OBJECTS_1) \
$(__AUI_PLATFORM_SRC_OBJECTS_1) \
@ -17047,8 +17047,8 @@ 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_xh_aui.o: $(srcdir)/src/xrc/xh_aui.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_aui.cpp
monodll_xh_auitoolb.o: $(srcdir)/src/xrc/xh_auitoolb.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_auitoolb.cpp
@ -21877,8 +21877,8 @@ 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_xh_aui.o: $(srcdir)/src/xrc/xh_aui.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_aui.cpp
monolib_xh_auitoolb.o: $(srcdir)/src/xrc/xh_auitoolb.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_auitoolb.cpp
@ -34705,8 +34705,8 @@ 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_xh_aui.o: $(srcdir)/src/xrc/xh_aui.cpp $(AUIDLL_ODEP)
$(CXXC) -c -o $@ $(AUIDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_aui.cpp
auidll_xh_auitoolb.o: $(srcdir)/src/xrc/xh_auitoolb.cpp $(AUIDLL_ODEP)
$(CXXC) -c -o $@ $(AUIDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_auitoolb.cpp
@ -34741,8 +34741,8 @@ 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_xh_aui.o: $(srcdir)/src/xrc/xh_aui.cpp $(AUILIB_ODEP)
$(CXXC) -c -o $@ $(AUILIB_CXXFLAGS) $(srcdir)/src/xrc/xh_aui.cpp
auilib_xh_auitoolb.o: $(srcdir)/src/xrc/xh_auitoolb.cpp $(AUILIB_ODEP)
$(CXXC) -c -o $@ $(AUILIB_CXXFLAGS) $(srcdir)/src/xrc/xh_auitoolb.cpp

View File

@ -3384,7 +3384,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
src/xrc/xh_aui.cpp
src/xrc/xh_auitoolb.cpp
</set>
<set var="AUI_SRC" hints="files">
@ -3401,7 +3401,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
wx/xrc/xh_aui.h
wx/xrc/xh_auitoolb.h
</set>
<set var="AUI_HDR" hints="files">

View File

@ -2994,7 +2994,7 @@ AUI_CMN_SRC =
src/aui/auibar.cpp
src/aui/tabmdi.cpp
src/aui/tabart.cpp
src/xrc/xh_auinotbk.cpp
src/xrc/xh_aui.cpp
src/xrc/xh_auitoolb.cpp
AUI_CMN_HDR =
wx/aui/framemanager.h
@ -3005,7 +3005,7 @@ AUI_CMN_HDR =
wx/aui/tabmdi.h
wx/aui/aui.h
wx/aui/tabart.h
wx/xrc/xh_auinotbk.h
wx/xrc/xh_aui.h
wx/xrc/xh_auitoolb.h
AUI_MSW_HDR =

View File

@ -1358,7 +1358,7 @@ AUIDLL_OBJECTS = \
$(OBJS)\auidll_auibar.obj \
$(OBJS)\auidll_tabmdi.obj \
$(OBJS)\auidll_tabart.obj \
$(OBJS)\auidll_xh_auinotbk.obj \
$(OBJS)\auidll_xh_aui.obj \
$(OBJS)\auidll_xh_auitoolb.obj \
$(OBJS)\auidll_tabartmsw.obj \
$(OBJS)\auidll_barartmsw.obj
@ -1379,7 +1379,7 @@ AUILIB_OBJECTS = \
$(OBJS)\auilib_auibar.obj \
$(OBJS)\auilib_tabmdi.obj \
$(OBJS)\auilib_tabart.obj \
$(OBJS)\auilib_xh_auinotbk.obj \
$(OBJS)\auilib_xh_aui.obj \
$(OBJS)\auilib_xh_auitoolb.obj \
$(OBJS)\auilib_tabartmsw.obj \
$(OBJS)\auilib_barartmsw.obj
@ -1741,7 +1741,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_xh_aui.obj \
$(OBJS)\monodll_xh_auitoolb.obj \
$(OBJS)\monodll_tabartmsw.obj \
$(OBJS)\monodll_barartmsw.obj \
@ -2572,7 +2572,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_xh_aui.obj \
$(OBJS)\monolib_xh_auitoolb.obj \
$(OBJS)\monolib_tabartmsw.obj \
$(OBJS)\monolib_barartmsw.obj \
@ -7440,8 +7440,8 @@ $(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_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\monodll_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp
@ -9975,8 +9975,8 @@ $(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_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\monolib_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp
@ -16220,8 +16220,8 @@ $(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)\auidll_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\auidll_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) -q -c -P -o$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp
@ -16256,8 +16256,8 @@ $(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)\auilib_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\auilib_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) -q -c -P -o$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp

View File

@ -1364,7 +1364,7 @@ AUIDLL_OBJECTS = \
$(OBJS)\auidll_auibar.o \
$(OBJS)\auidll_tabmdi.o \
$(OBJS)\auidll_tabart.o \
$(OBJS)\auidll_xh_auinotbk.o \
$(OBJS)\auidll_xh_aui.o \
$(OBJS)\auidll_xh_auitoolb.o \
$(OBJS)\auidll_tabartmsw.o \
$(OBJS)\auidll_barartmsw.o
@ -1385,7 +1385,7 @@ AUILIB_OBJECTS = \
$(OBJS)\auilib_auibar.o \
$(OBJS)\auilib_tabmdi.o \
$(OBJS)\auilib_tabart.o \
$(OBJS)\auilib_xh_auinotbk.o \
$(OBJS)\auilib_xh_aui.o \
$(OBJS)\auilib_xh_auitoolb.o \
$(OBJS)\auilib_tabartmsw.o \
$(OBJS)\auilib_barartmsw.o
@ -1759,7 +1759,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_xh_aui.o \
$(OBJS)\monodll_xh_auitoolb.o \
$(OBJS)\monodll_tabartmsw.o \
$(OBJS)\monodll_barartmsw.o \
@ -2596,7 +2596,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_xh_aui.o \
$(OBJS)\monolib_xh_auitoolb.o \
$(OBJS)\monolib_tabartmsw.o \
$(OBJS)\monolib_barartmsw.o \
@ -7615,7 +7615,7 @@ $(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
$(OBJS)\monodll_xh_aui.o: ../../src/xrc/xh_aui.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_xh_auitoolb.o: ../../src/xrc/xh_auitoolb.cpp
@ -10152,7 +10152,7 @@ $(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
$(OBJS)\monolib_xh_aui.o: ../../src/xrc/xh_aui.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monolib_xh_auitoolb.o: ../../src/xrc/xh_auitoolb.cpp
@ -16399,7 +16399,7 @@ $(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
$(OBJS)\auidll_xh_aui.o: ../../src/xrc/xh_aui.cpp
$(CXX) -c -o $@ $(AUIDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\auidll_xh_auitoolb.o: ../../src/xrc/xh_auitoolb.cpp
@ -16435,7 +16435,7 @@ $(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
$(OBJS)\auilib_xh_aui.o: ../../src/xrc/xh_aui.cpp
$(CXX) -c -o $@ $(AUILIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\auilib_xh_auitoolb.o: ../../src/xrc/xh_auitoolb.cpp

View File

@ -1502,7 +1502,7 @@ AUIDLL_OBJECTS = \
$(OBJS)\auidll_auibar.obj \
$(OBJS)\auidll_tabmdi.obj \
$(OBJS)\auidll_tabart.obj \
$(OBJS)\auidll_xh_auinotbk.obj \
$(OBJS)\auidll_xh_aui.obj \
$(OBJS)\auidll_xh_auitoolb.obj \
$(OBJS)\auidll_tabartmsw.obj \
$(OBJS)\auidll_barartmsw.obj
@ -1529,7 +1529,7 @@ AUILIB_OBJECTS = \
$(OBJS)\auilib_auibar.obj \
$(OBJS)\auilib_tabmdi.obj \
$(OBJS)\auilib_tabart.obj \
$(OBJS)\auilib_xh_auinotbk.obj \
$(OBJS)\auilib_xh_aui.obj \
$(OBJS)\auilib_xh_auitoolb.obj \
$(OBJS)\auilib_tabartmsw.obj \
$(OBJS)\auilib_barartmsw.obj
@ -2041,7 +2041,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_xh_aui.obj \
$(OBJS)\monodll_xh_auitoolb.obj \
$(OBJS)\monodll_tabartmsw.obj \
$(OBJS)\monodll_barartmsw.obj \
@ -2878,7 +2878,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_xh_aui.obj \
$(OBJS)\monolib_xh_auitoolb.obj \
$(OBJS)\monolib_tabartmsw.obj \
$(OBJS)\monolib_barartmsw.obj \
@ -8132,8 +8132,8 @@ $(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_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\monodll_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp
@ -10667,8 +10667,8 @@ $(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_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\monolib_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp
@ -16912,8 +16912,8 @@ $(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)\auidll_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\auidll_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) /c /nologo /TP /Fo$@ $(AUIDLL_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp
@ -16948,8 +16948,8 @@ $(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)\auilib_xh_aui.obj: ..\..\src\xrc\xh_aui.cpp
$(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_aui.cpp
$(OBJS)\auilib_xh_auitoolb.obj: ..\..\src\xrc\xh_auitoolb.cpp
$(CXX) /c /nologo /TP /Fo$@ $(AUILIB_CXXFLAGS) ..\..\src\xrc\xh_auitoolb.cpp

View File

@ -463,10 +463,10 @@
<ClCompile Include="..\..\src\aui\framemanager.cpp" />
<ClCompile Include="..\..\src\aui\tabart.cpp" />
<ClCompile Include="..\..\src\aui\tabmdi.cpp" />
<ClCompile Include="..\..\src\xrc\xh_auinotbk.cpp" />
<ClCompile Include="..\..\src\xrc\xh_auitoolb.cpp" />
<ClCompile Include="..\..\src\aui\tabartmsw.cpp" />
<ClCompile Include="..\..\src\aui\barartmsw.cpp" />
<ClCompile Include="..\..\src\xrc\xh_aui.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\msw\version.rc">
@ -505,10 +505,10 @@
<ClInclude Include="..\..\include\wx\aui\framemanager.h" />
<ClInclude Include="..\..\include\wx\aui\tabart.h" />
<ClInclude Include="..\..\include\wx\aui\tabmdi.h" />
<ClInclude Include="..\..\include\wx\xrc\xh_auinotbk.h" />
<ClInclude Include="..\..\include\wx\xrc\xh_auitoolb.h" />
<ClInclude Include="..\..\include\wx\aui\tabartmsw.h" />
<ClInclude Include="..\..\include\wx\aui\barartmsw.h" />
<ClInclude Include="..\..\include\wx\xrc\xh_aui.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -22,9 +22,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\common\dummy.cpp">
<Filter>Common Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\aui\auibar.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -52,7 +49,10 @@
<ClCompile Include="..\..\src\aui\tabmdi.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\xrc\xh_auinotbk.cpp">
<ClCompile Include="..\..\src\common\dummy.cpp">
<Filter>Common Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\src\xrc\xh_aui.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\xrc\xh_auitoolb.cpp">
@ -95,7 +95,7 @@
<ClInclude Include="..\..\include\wx\aui\tabmdi.h">
<Filter>Common Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\wx\xrc\xh_auinotbk.h">
<ClInclude Include="..\..\include\wx\xrc\xh_aui.h">
<Filter>Common Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\wx\xrc\xh_auitoolb.h">

View File

@ -444,7 +444,7 @@
RelativePath="..\..\include\wx\aui\tabmdi.h">
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auinotbk.h">
RelativePath="..\..\include\wx\xrc\xh_aui.h">
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auitoolb.h">
@ -482,7 +482,7 @@
RelativePath="..\..\src\aui\tabmdi.cpp">
</File>
<File
RelativePath="..\..\src\xrc\xh_auinotbk.cpp">
RelativePath="..\..\src\xrc\xh_aui.cpp">
</File>
<File
RelativePath="..\..\src\xrc\xh_auitoolb.cpp">

View File

@ -2751,7 +2751,7 @@
RelativePath="..\..\include\wx\xrc\xh_animatctrl.h">
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auinotbk.h">
RelativePath="..\..\include\wx\xrc\xh_aui.h">
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auitoolb.h">

View File

@ -1094,7 +1094,7 @@
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auinotbk.h"
RelativePath="..\..\include\wx\xrc\xh_aui.h"
>
</File>
<File
@ -1144,7 +1144,7 @@
>
</File>
<File
RelativePath="..\..\src\xrc\xh_auinotbk.cpp"
RelativePath="..\..\src\xrc\xh_aui.cpp"
>
</File>
<File

View File

@ -4169,7 +4169,7 @@
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auinotbk.h"
RelativePath="..\..\include\wx\xrc\xh_aui.h"
>
</File>
<File

View File

@ -1090,7 +1090,7 @@
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auinotbk.h"
RelativePath="..\..\include\wx\xrc\xh_aui.h"
>
</File>
<File
@ -1140,7 +1140,7 @@
>
</File>
<File
RelativePath="..\..\src\xrc\xh_auinotbk.cpp"
RelativePath="..\..\src\xrc\xh_aui.cpp"
>
</File>
<File

View File

@ -4165,7 +4165,7 @@
>
</File>
<File
RelativePath="..\..\include\wx\xrc\xh_auinotbk.h"
RelativePath="..\..\include\wx\xrc\xh_aui.h"
>
</File>
<File

View File

@ -65,6 +65,7 @@ All:
All (GUI):
- Add support for wxAuiManager and wxAuiPaneInfo to XRC (Andrea Zanellato).
- Update Scintilla to v3.6.3 (Paul Kulchenko).
wxGTK:

View File

@ -560,6 +560,96 @@ controls cannot have children.
@endTable
@subsubsection xrc_wxauimanager wxAuiManager
Notice that wxAUI support in XRC is available in wxWidgets 3.1.1 and
later only and you need to explicitly register its handler using
@code
#include <wx/xrc/xh_aui.h>
AddHandler(new wxAuiXmlHandler);
@endcode
to use it.
A wxAuiManager can have one or more child objects of the
wxAuiPaneInfo class.
wxAuiPaneInfo objects have the following properties:
@beginTable
@hdr3col{property, type, description}
@row3col{caption, @ref overview_xrcformat_type_text,
Sets the caption of the pane.}
@row3col{caption_visible, @ref overview_xrcformat_type_bool,
Indicates that a pane caption should be visible.}
@row3col{close_button, @ref overview_xrcformat_type_bool,
Indicates that a close button should be drawn for the pane.}
@row3col{maximize_button, @ref overview_xrcformat_type_bool,
Indicates that a maximize button should be drawn for the pane.}
@row3col{minimize_button, @ref overview_xrcformat_type_bool,
Indicates that a minimize button should be drawn for the pane.}
@row3col{pin_button, @ref overview_xrcformat_type_bool,
Indicates that a pin button should be drawn for the pane.}
@row3col{gripper, @ref overview_xrcformat_type_bool,
Indicates that a gripper should be drawn for the pane.}
@row3col{pane_border, @ref overview_xrcformat_type_bool,
Indicates that a border should be drawn for the pane.}
@row3col{dock, ,
Indicates that a pane should be docked.}
@row3col{float, ,
Indicates that a pane should be floated.}
@row3col{top_dockable, @ref overview_xrcformat_type_bool,
Indicates whether a pane can be docked at the top of the frame.}
@row3col{bottom_dockable, @ref overview_xrcformat_type_bool,
Indicates whether a pane can be docked at the bottom of the frame.}
@row3col{left_dockable, @ref overview_xrcformat_type_bool,
Indicates whether a pane can be docked on the left of the frame.}
@row3col{right_dockable, @ref overview_xrcformat_type_bool,
Indicates whether a pane can be docked on the right of the frame.}
@row3col{dock_fixed, @ref overview_xrcformat_type_bool,
Causes the containing dock to have no resize sash.}
@row3col{resizable, @ref overview_xrcformat_type_bool,
Allows a pane to be resized if the parameter is @true, and forces it
to be a fixed size if the parameter is @false.}
@row3col{movable, @ref overview_xrcformat_type_bool,
Indicates whether a pane can be moved.}
@row3col{floatable, @ref overview_xrcformat_type_bool,
Sets whether the user will be able to undock a pane and turn it
into a floating window.}
@row3col{best_size, @ref overview_xrcformat_type_size,
Sets the ideal size for the pane.}
@row3col{floating_size, @ref overview_xrcformat_type_size,
Sets the size of the floating pane.}
@row3col{min_size, @ref overview_xrcformat_type_size,
Sets the minimum size of the pane.}
@row3col{max_size, @ref overview_xrcformat_type_size,
Sets the maximum size of the pane.}
@row3col{default_pane, ,
Specifies that the pane should adopt the default pane settings.}
@row3col{toolbar_pane, ,
Specifies that the pane should adopt the default toolbar pane settings.}
@row3col{layer, , Determines the layer of the docked pane.}
@row3col{row, , Determines the row of the docked pane.}
@row3col{center_pane, ,
Specifies that the pane should adopt the default center pane settings.}
@row3col{centre_pane, ,
Same as center_pane.}
@row3col{direction, ,
Determines the direction of the docked pane.}
@row3col{top, ,
Sets the pane dock position to the top of the frame.}
@row3col{bottom, ,
Sets the pane dock position to the bottom side of the frame.}
@row3col{left, ,
Sets the pane dock position to the left side of the frame.}
@row3col{right, ,
Sets the pane dock position to the right side of the frame.}
@row3col{center, ,
Sets the pane dock position to the center of the frame.}
@row3col{centre, ,
Same as center.}
@endTable
@subsubsection xrc_wxauinotebook wxAuiNotebook
A wxAuiNotebook can have one or more child objects of the @c notebookpage
@ -592,14 +682,7 @@ Example:
</object>
@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 <wx/xrc/xh_auinotbk.h>
AddHandler(new wxAuiNotebookXmlHandler);
@endcode
to use it.
@note See @ref xrc_wxauimanager about using wxAUI classes in XRC.
@subsubsection xrc_wxauitoolbar wxAuiToolBar

51
include/wx/xrc/xh_aui.h Normal file
View File

@ -0,0 +1,51 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_aui.h
// Purpose: XRC resource handler for wxAUI
// Author: Andrea Zanellato, Steve Lamerton (wxAuiNotebook)
// Created: 2011-09-18
// Copyright: (c) 2011 wxWidgets Team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_AUI_H_
#define _WX_XH_AUI_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_AUI
#include "wx/vector.h"
class WXDLLIMPEXP_FWD_AUI wxAuiManager;
class WXDLLIMPEXP_FWD_AUI wxAuiNotebook;
class WXDLLIMPEXP_AUI wxAuiXmlHandler : public wxXmlResourceHandler
{
public:
wxAuiXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
// Returns the wxAuiManager for the specified window
wxAuiManager *GetAuiManager(wxWindow *managed) const;
private:
// Used to UnInit() the wxAuiManager before destroying its managed window
void OnManagedWindowClose(wxWindowDestroyEvent &event);
typedef wxVector<wxAuiManager*> Managers;
Managers m_managers; // all wxAuiManagers created in this handler
wxAuiManager *m_manager; // Current wxAuiManager
wxWindow *m_window; // Current managed wxWindow
wxAuiNotebook *m_notebook;
bool m_mgrInside; // Are we handling a wxAuiManager or panes inside it?
bool m_anbInside; // Are we handling a wxAuiNotebook or pages inside it?
wxDECLARE_DYNAMIC_CLASS(wxAuiXmlHandler);
};
#endif //wxUSE_XRC && wxUSE_AUI
#endif //_WX_XH_AUI_H_

View File

@ -1,35 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_auinotbk.h
// Purpose: XML resource handler for wxAuiNotebook
// Author: Steve Lamerton
// Created: 2009-06-12
// 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() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
private:
bool m_isInside;
wxAuiNotebook *m_notebook;
wxDECLARE_DYNAMIC_CLASS(wxAuiNotebookXmlHandler);
};
#endif // wxUSE_XRC && wxUSE_AUI
#endif // _WX_XRC_XH_AUINOTEBOOK_H_

View File

@ -282,7 +282,6 @@ void MyFrame::OnAuiDemoToolOrMenuCommand(wxCommandEvent& WXUNUSED(event))
#if wxUSE_AUI
wxDialog dlg;
wxXmlResource::Get()->LoadDialog(&dlg, this, wxS("aui_dialog"));
dlg.SetSize(-1,300);
dlg.ShowModal();
#else
wxLogWarning("wxUSE_AUI must be set to 1 in 'setup.h' to view the AUI demo.");

View File

@ -4,12 +4,163 @@
<title>AUI XRC demo</title>
<centered>1</centered>
<style>wxCAPTION|wxRESIZE_BORDER</style>
<size>500,300</size>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxAuiToolBar" name="aui_toolbar">
<object class="wxPanel" name="aui_client_area">
<object class="wxAuiManager" name="aui_manager">
<object class="wxAuiPaneInfo" name="aui_tool_bar_top">
<caption>Main Toolbar</caption>
<top/>
<left_dockable>0</left_dockable>
<right_dockable>0</right_dockable>
<toolbar_pane/>
<object class="wxToolBar">
<style>wxTB_FLAT|wxTB_NODIVIDER</style>
<margins>2,2</margins>
<object class="tool" name="New">
<bitmap stock_id="wxART_NEW"/>
<label>New</label>
</object>
<object class="tool" name="view_auto">
<bitmap stock_id="wxART_FILE_OPEN"/>
<label>View</label>
<dropdown>
<object class="wxMenu">
<object class="wxMenuItem" name="view_as_text">
<label>View as text</label>
</object>
<object class="wxMenuItem" name="view_as_hex">
<label>View as binary</label>
</object>
</object>
</dropdown>
</object>
<object class="separator"/>
<object class="tool" name="home">
<toggle>1</toggle>
<bitmap stock_id="wxART_GO_HOME"/>
<label>Home</label>
</object>
<object class="separator"/>
<object class="tool" name="up">
<radio>1</radio>
<bitmap stock_id="wxART_GO_UP"/>
<label>Up</label>
</object>
<object class="tool" name="down">
<radio>1</radio>
<bitmap stock_id="wxART_GO_DOWN"/>
<label>Down</label>
</object>
<object class="space"/>
<object class="wxComboBox">
<content>
<item>Just</item>
<item>a combobox</item>
<item>in the toolbar</item>
</content>
</object>
<object class="wxOwnerDrawnComboBox">
<content>
<item>Owner Drawn</item>
<item>combobox</item>
<item>in the toolbar</item>
</content>
</object>
</object>
</object>
<object class="wxAuiPaneInfo" name="TreeViewPane">
<caption>Tree View</caption>
<left/>
<close_button>0</close_button>
<top_dockable>0</top_dockable>
<bottom_dockable>0</bottom_dockable>
<floating_size>150,300</floating_size>
<min_size>90,-1</min_size>
<layer>1</layer>
<object class="wxTreeCtrl" name="TreeView"/>
</object>
<object class="wxAuiPaneInfo" name="aui_notebook">
<caption>Notebook</caption>
<min_size>-1,200</min_size>
<center/>
<close_button>0</close_button>
<maximize_button>1</maximize_button>
<dock_fixed>1</dock_fixed>
<object class="wxAuiNotebook" name="aui_notebook">
<object class="notebookpage">
<label>Page 1</label>
<bitmap stock_id="wxART_WARNING"/>
<object class="wxPanel" name="page1">
<object class="wxBoxSizer">
<object class="sizeritem">
<object class="wxTextCtrl" name="description_text">
<value>Notice the wxAuiToolBar added above this wxAuiNotebook</value>
<style>wxTE_MULTILINE|wxTE_READONLY</style>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
</object>
</object>
</object>
<object class="notebookpage">
<label>Page 2</label>
<bitmap stock_id="wxART_INFORMATION"/>
<object class="wxPanel" name="page2">
<object class="wxBoxSizer">
<object class="sizeritem">
<object class="wxTextCtrl" name="description_text">
<value>The wxAuiNotebook pages are added by XRC</value>
<style>wxTE_MULTILINE|wxTE_READONLY</style>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
</object>
</object>
</object>
<object class="notebookpage">
<label>Page 3</label>
<bitmap stock_id="wxART_QUESTION"/>
<object class="wxPanel" name="page3">
<object class="wxBoxSizer">
<object class="sizeritem">
<object class="wxTextCtrl" name="description_text">
<value></value>
<style>wxTE_MULTILINE|wxTE_READONLY</style>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="wxAuiPaneInfo" name="aui_text">
<caption>Just a test text</caption>
<bottom/>
<close_button>0</close_button>
<left_dockable>0</left_dockable>
<right_dockable>0</right_dockable>
<min_size>-1,60</min_size>
<floating_size>300,150</floating_size>
<object class="wxTextCtrl" name="TextLog">
<style>wxTE_MULTILINE</style>
<value>Notice that the toolbar above is a simple wxToolBar
inside wxAuiPaneInfo while the toolbar below is a wxAuiToolBar</value>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<flag>wxEXPAND</flag>
<object class="wxAuiToolBar" name="aui_toolbar_bottom">
<style>wxAUI_TB_TEXT|wxAUI_TB_GRIPPER</style>
<object class="label" name="label1">
<label>Tools:</label>
@ -53,60 +204,6 @@
</content>
</object>
<object class="space"/>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxAuiNotebook" name="aui_notebook">
<object class="notebookpage">
<label>Page 1</label>
<bitmap stock_id="wxART_WARNING"/>
<object class="wxPanel" name="page1">
<object class="wxBoxSizer">
<object class="sizeritem">
<object class="wxTextCtrl" name="description_text">
<value>Notice the wxAuiToolBar added above this wxAuiNotebook</value>
<style>wxTE_MULTILINE|wxTE_READONLY</style>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
</object>
</object>
</object>
<object class="notebookpage">
<label>Page 2</label>
<bitmap stock_id="wxART_INFORMATION"/>
<object class="wxPanel" name="page2">
<object class="wxBoxSizer">
<object class="sizeritem">
<object class="wxTextCtrl" name="description_text">
<value>The wxAuiNotebook pages are added by XRC</value>
<style>wxTE_MULTILINE|wxTE_READONLY</style>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
</object>
</object>
</object>
<object class="notebookpage">
<label>Page 3</label>
<bitmap stock_id="wxART_QUESTION"/>
<object class="wxPanel" name="page3">
<object class="wxBoxSizer">
<object class="sizeritem">
<object class="wxTextCtrl" name="description_text">
<value></value>
<style>wxTE_MULTILINE|wxTE_READONLY</style>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem">

View File

@ -42,7 +42,7 @@
#endif // wxUSE_RIBBON
#if wxUSE_AUI
#include "wx/xrc/xh_auinotbk.h"
#include "wx/xrc/xh_aui.h"
#include "wx/xrc/xh_auitoolb.h"
#endif // wxUSE_AUI
@ -91,7 +91,7 @@ bool MyApp::OnInit()
#endif
#if wxUSE_AUI
wxXmlResource::Get()->AddHandler(new wxAuiNotebookXmlHandler);
wxXmlResource::Get()->AddHandler(new wxAuiXmlHandler);
wxXmlResource::Get()->AddHandler(new wxAuiToolBarXmlHandler);
#endif

304
src/xrc/xh_aui.cpp Normal file
View File

@ -0,0 +1,304 @@
///////////////////////////////////////////////////////////////////////////////
// Name: src/xrc/xh_aui.cpp
// Purpose: Implementation of wxAUI XRC handler.
// Author: Andrea Zanellato, Steve Lamerton (wxAuiNotebook)
// Created: 2011-09-18
// Copyright: (c) 2011 wxWidgets Team
// 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_aui.h"
#include "wx/aui/framemanager.h"
#include "wx/aui/auibook.h"
wxIMPLEMENT_DYNAMIC_CLASS(wxAuiXmlHandler, wxXmlResourceHandler)
wxAuiXmlHandler::wxAuiXmlHandler()
: wxXmlResourceHandler(),
m_manager(NULL),
m_window(NULL),
m_notebook(NULL),
m_mgrInside(false),
m_anbInside(false)
{
XRC_ADD_STYLE(wxAUI_MGR_ALLOW_ACTIVE_PANE);
XRC_ADD_STYLE(wxAUI_MGR_ALLOW_FLOATING);
XRC_ADD_STYLE(wxAUI_MGR_DEFAULT);
XRC_ADD_STYLE(wxAUI_MGR_HINT_FADE);
XRC_ADD_STYLE(wxAUI_MGR_LIVE_RESIZE);
XRC_ADD_STYLE(wxAUI_MGR_NO_VENETIAN_BLINDS_FADE);
XRC_ADD_STYLE(wxAUI_MGR_RECTANGLE_HINT);
XRC_ADD_STYLE(wxAUI_MGR_TRANSPARENT_DRAG);
XRC_ADD_STYLE(wxAUI_MGR_TRANSPARENT_HINT);
XRC_ADD_STYLE(wxAUI_MGR_VENETIAN_BLINDS_HINT);
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();
}
wxAuiManager *wxAuiXmlHandler::GetAuiManager( wxWindow *managed ) const
{
for ( Managers::const_iterator it = m_managers.begin();
it != m_managers.end();
++it )
{
wxAuiManager* const mgr = *it;
if ( mgr->GetManagedWindow() == managed )
return mgr;
}
return NULL;
}
void wxAuiXmlHandler::OnManagedWindowClose( wxWindowDestroyEvent &event )
{
wxWindow *window = wxDynamicCast( event.GetEventObject(), wxWindow );
for ( Managers::iterator it = m_managers.begin();
it != m_managers.end();
++it )
{
wxAuiManager* const mgr = *it;
if ( mgr->GetManagedWindow() == window )
{
mgr->UnInit();
m_managers.erase(it);
break;
}
}
event.Skip();
}
wxObject *wxAuiXmlHandler::DoCreateResource()
{
if (m_class == wxS("wxAuiManager"))
{
wxAuiManager *manager = NULL;
if (m_parentAsWindow)
{
// Cache the previous values
bool old_ins = m_mgrInside;
wxAuiManager *old_mgr = m_manager;
wxWindow *old_win = m_window;
// Create the manager with the specified or default style and
// assign the new values related to this manager
m_window = m_parentAsWindow;
manager = new wxAuiManager( m_window,
GetStyle(wxS("style"), wxAUI_MGR_DEFAULT) );
m_manager = manager;
m_mgrInside = true;
// Add this manager to our manager vector
m_managers.push_back(m_manager);
// Connect the managed window destroy event to
// automatically UnInit() later this manager
m_window ->Bind(wxEVT_DESTROY, &wxAuiXmlHandler::OnManagedWindowClose, this);
// Add AUI panes to this manager
CreateChildren(m_manager);
// Load a custom perspective if any
if (HasParam(wxS("perspective")))
m_manager->LoadPerspective( GetParamValue(wxS("perspective")) );
m_manager->Update();
// Restore the previous values
m_window = old_win;
m_manager = old_mgr;
m_mgrInside = old_ins;
}
else
{
ReportError("No wxWindow derived class to manage for this wxAuiManager.");
}
return manager;
}
else if (m_class == "wxAuiPaneInfo")
{
wxXmlNode *node = GetParamNode(wxS("object"));
wxWindow *window = NULL;
if (!node)
node = GetParamNode(wxS("object_ref"));
if (node)
{
bool old_ins = m_mgrInside;
m_mgrInside = false;
wxObject *object = CreateResFromNode(node, m_window, NULL);
m_mgrInside = old_ins;
window = wxDynamicCast( object, wxWindow );
if (!window && object)
{
ReportError( node, "wxAuiPaneInfo child must be a window." );
}
}
if (window)
{
wxAuiPaneInfo paneInfo = wxAuiPaneInfo();
wxString name = GetName(); paneInfo.Name( name );
// Caption
if ( HasParam(wxS("caption")) ) paneInfo.Caption( GetText(wxS("caption")) );
if ( HasParam(wxS("caption_visible")) ) paneInfo.CaptionVisible( GetBool(wxS("caption_visible")) );
// Buttons
if ( HasParam(wxS("close_button")) ) paneInfo.CloseButton( GetBool(wxS("close_button")) );
if ( HasParam(wxS("minimize_button")) ) paneInfo.MinimizeButton( GetBool(wxS("minimize_button")) );
if ( HasParam(wxS("maximize_button")) ) paneInfo.MaximizeButton( GetBool(wxS("maximize_button")) );
if ( HasParam(wxS("pin_button")) ) paneInfo.PinButton( GetBool(wxS("pin_button")) );
if ( HasParam(wxS("gripper")) ) paneInfo.Gripper( GetBool(wxS("gripper")) );
// Appearance
if ( HasParam(wxS("pane_border")) ) paneInfo.PaneBorder( GetBool(wxS("pane_border")) );
// State
if ( HasParam(wxS("dock")) ) paneInfo.Dock();
else if ( HasParam(wxS("float")) ) paneInfo.Float();
// Dockable Directions
if ( HasParam(wxS("top_dockable")) ) paneInfo.TopDockable( GetBool(wxS("top_dockable")) );
if ( HasParam(wxS("bottom_dockable")) ) paneInfo.BottomDockable( GetBool(wxS("bottom_dockable")) );
if ( HasParam(wxS("left_dockable")) ) paneInfo.LeftDockable( GetBool(wxS("left_dockable")) );
if ( HasParam(wxS("right_dockable")) ) paneInfo.RightDockable( GetBool(wxS("right_dockable")) );
// Behaviours
if ( HasParam(wxS("dock_fixed")) ) paneInfo.DockFixed( GetBool(wxS("dock_fixed")) );
if ( HasParam(wxS("resizable")) ) paneInfo.Resizable( GetBool(wxS("resizable")) );
if ( HasParam(wxS("movable")) ) paneInfo.Movable( GetBool(wxS("movable")) );
if ( HasParam(wxS("floatable")) ) paneInfo.Floatable( GetBool(wxS("floatable")) );
// Sizes
if ( HasParam(wxS("floating_size")) ) paneInfo.FloatingSize( GetSize(wxS("floating_size")) );
if ( HasParam(wxS("min_size")) ) paneInfo.MinSize( GetSize(wxS("min_size")) );
if ( HasParam(wxS("max_size")) ) paneInfo.MaxSize( GetSize(wxS("max_size")) );
if ( HasParam(wxS("best_size")) ) paneInfo.BestSize( GetSize(wxS("best_size")) );
// Positions
if ( HasParam(wxS("row")) ) paneInfo.Row( GetLong(wxS("row")) );
if ( HasParam(wxS("layer")) ) paneInfo.Layer( GetLong(wxS("layer")) );
if ( HasParam(wxS("default_pane")) ) paneInfo.DefaultPane();
else if( HasParam(wxS("toolbar_pane")) ) paneInfo.ToolbarPane();
// Directions - CenterPane()/CentrePane != Center()/Centre()
if ( HasParam(wxS("center_pane") ) ||
HasParam(wxS("centre_pane")) ) paneInfo.CenterPane();
if ( HasParam(wxS("direction")) ) paneInfo.Direction( GetLong(wxS("direction")) );
else if ( HasParam(wxS("top")) ) paneInfo.Top();
else if ( HasParam(wxS("bottom")) ) paneInfo.Bottom();
else if ( HasParam(wxS("left")) ) paneInfo.Left();
else if ( HasParam(wxS("right")) ) paneInfo.Right();
else if ( HasParam(wxS("center")) ||
HasParam(wxS("centre")) ) paneInfo.Center();
m_manager->AddPane(window, paneInfo);
}
else
{
ReportError("No wxWindow derived class object specified inside wxAuiPaneInfo.");
}
return window;
}
else if (m_class == wxS("notebookpage"))
{
wxXmlNode *anb = GetParamNode(wxS("object"));
if (!anb)
anb = GetParamNode(wxS("object_ref"));
if (anb)
{
bool old_ins = m_anbInside;
m_anbInside = false;
wxObject *item = CreateResFromNode(anb, m_notebook, NULL);
m_anbInside = old_ins;
wxWindow *wnd = wxDynamicCast(item, wxWindow);
if (wnd)
{
if ( HasParam(wxS("bitmap")) )
{
m_notebook->AddPage(wnd,
GetText(wxS("label")),
GetBool(wxS("selected")),
GetBitmap(wxS("bitmap"), wxART_OTHER));
}
else
{
m_notebook->AddPage(wnd,
GetText(wxS("label")),
GetBool(wxS("selected")));
}
}
else
{
ReportError(anb, "notebookpage child must be a window");
}
return wnd;
}
else
{
ReportError("notebookpage must have a window child");
return NULL;
}
}
else // if (m_class == wxS("wxAuiNotebook"))
{
XRC_MAKE_INSTANCE(anb, wxAuiNotebook)
anb->Create(m_parentAsWindow,
GetID(),
GetPosition(),
GetSize(),
GetStyle(wxS("style")));
SetupWindow(anb);
wxAuiNotebook *old_par = m_notebook;
m_notebook = anb;
bool old_ins = m_anbInside;
m_anbInside = true;
CreateChildren(m_notebook, true/*only this handler*/);
m_anbInside = old_ins;
m_notebook = old_par;
return anb;
}
return NULL;
}
bool wxAuiXmlHandler::CanHandle( wxXmlNode *node )
{
return ((!m_mgrInside && IsOfClass(node, wxS("wxAuiManager"))) ||
(m_mgrInside && IsOfClass(node, wxS("wxAuiPaneInfo"))) ||
(!m_anbInside && IsOfClass(node, wxS("wxAuiNotebook"))) ||
(m_anbInside && IsOfClass(node, wxS("notebookpage"))) );
}
#endif // wxUSE_XRC && wxUSE_AUI

View File

@ -1,119 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: src/xrc/xh_auinotbk.cpp
// Purpose: XML resource handler for wxAuiNotebook
// Author: Steve Lamerton
// Created: 2009-06-12
// 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(),
m_isInside(false)
{
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