From 0d14e4f21d2aa9e7edf0cf08a352743619f41e0b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 12 Jun 2009 17:40:11 +0000 Subject: [PATCH] added XRC handler for wxFileCtrl (closes #10785) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 17 +++++++++ build/bakefiles/files.bkl | 2 + build/msw/makefile.bcc | 16 ++++++++ build/msw/makefile.gcc | 16 ++++++++ build/msw/makefile.vc | 16 ++++++++ build/msw/makefile.wat | 16 ++++++++ build/msw/wx_core.dsp | 4 ++ build/msw/wx_vc7_core.vcproj | 3 ++ build/msw/wx_vc7_xrc.vcproj | 6 +++ build/msw/wx_vc8_core.vcproj | 4 ++ build/msw/wx_vc8_xrc.vcproj | 8 ++++ build/msw/wx_vc9_core.vcproj | 4 ++ build/msw/wx_vc9_xrc.vcproj | 8 ++++ build/msw/wx_xrc.dsp | 8 ++++ docs/changes.txt | 1 + docs/doxygen/overviews/xrc_format.h | 17 ++++++++- include/wx/xrc/xh_all.h | 1 + include/wx/xrc/xh_filectrl.h | 31 +++++++++++++++ samples/xrc/rc/controls.xrc | 55 +++++++++++++++++---------- src/xrc/xh_filectrl.cpp | 59 +++++++++++++++++++++++++++++ src/xrc/xmlrsall.cpp | 3 ++ 21 files changed, 275 insertions(+), 20 deletions(-) create mode 100644 include/wx/xrc/xh_filectrl.h create mode 100644 src/xrc/xh_filectrl.cpp diff --git a/Makefile.in b/Makefile.in index f551d2e959..c5ef9306d1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1583,6 +1583,7 @@ XRCDLL_OBJECTS = \ xrcdll_xh_dirpicker.o \ xrcdll_xh_dlg.o \ xrcdll_xh_editlbox.o \ + xrcdll_xh_filectrl.o \ xrcdll_xh_filepicker.o \ xrcdll_xh_fontpicker.o \ xrcdll_xh_frame.o \ @@ -1650,6 +1651,7 @@ XRCLIB_OBJECTS = \ xrclib_xh_dirpicker.o \ xrclib_xh_dlg.o \ xrclib_xh_editlbox.o \ + xrclib_xh_filectrl.o \ xrclib_xh_filepicker.o \ xrclib_xh_fontpicker.o \ xrclib_xh_frame.o \ @@ -3727,6 +3729,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \ wx/xrc/xh_dirpicker.h \ wx/xrc/xh_dlg.h \ wx/xrc/xh_editlbox.h \ + wx/xrc/xh_filectrl.h \ wx/xrc/xh_filepicker.h \ wx/xrc/xh_fontpicker.h \ wx/xrc/xh_frame.h \ @@ -3985,6 +3988,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \ monodll_xh_dirpicker.o \ monodll_xh_dlg.o \ monodll_xh_editlbox.o \ + monodll_xh_filectrl.o \ monodll_xh_filepicker.o \ monodll_xh_fontpicker.o \ monodll_xh_frame.o \ @@ -5782,6 +5786,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \ monolib_xh_dirpicker.o \ monolib_xh_dlg.o \ monolib_xh_editlbox.o \ + monolib_xh_filectrl.o \ monolib_xh_filepicker.o \ monolib_xh_fontpicker.o \ monolib_xh_frame.o \ @@ -15769,6 +15774,9 @@ monodll_xh_dlg.o: $(srcdir)/src/xrc/xh_dlg.cpp $(MONODLL_ODEP) monodll_xh_editlbox.o: $(srcdir)/src/xrc/xh_editlbox.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_editlbox.cpp +monodll_xh_filectrl.o: $(srcdir)/src/xrc/xh_filectrl.cpp $(MONODLL_ODEP) + $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_filectrl.cpp + monodll_xh_filepicker.o: $(srcdir)/src/xrc/xh_filepicker.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_filepicker.cpp @@ -20488,6 +20496,9 @@ monolib_xh_dlg.o: $(srcdir)/src/xrc/xh_dlg.cpp $(MONOLIB_ODEP) monolib_xh_editlbox.o: $(srcdir)/src/xrc/xh_editlbox.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_editlbox.cpp +monolib_xh_filectrl.o: $(srcdir)/src/xrc/xh_filectrl.cpp $(MONOLIB_ODEP) + $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_filectrl.cpp + monolib_xh_filepicker.o: $(srcdir)/src/xrc/xh_filepicker.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_filepicker.cpp @@ -32521,6 +32532,9 @@ xrcdll_xh_dlg.o: $(srcdir)/src/xrc/xh_dlg.cpp $(XRCDLL_ODEP) xrcdll_xh_editlbox.o: $(srcdir)/src/xrc/xh_editlbox.cpp $(XRCDLL_ODEP) $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_editlbox.cpp +xrcdll_xh_filectrl.o: $(srcdir)/src/xrc/xh_filectrl.cpp $(XRCDLL_ODEP) + $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_filectrl.cpp + xrcdll_xh_filepicker.o: $(srcdir)/src/xrc/xh_filepicker.cpp $(XRCDLL_ODEP) $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_filepicker.cpp @@ -32701,6 +32715,9 @@ xrclib_xh_dlg.o: $(srcdir)/src/xrc/xh_dlg.cpp $(XRCLIB_ODEP) xrclib_xh_editlbox.o: $(srcdir)/src/xrc/xh_editlbox.cpp $(XRCLIB_ODEP) $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_editlbox.cpp +xrclib_xh_filectrl.o: $(srcdir)/src/xrc/xh_filectrl.cpp $(XRCLIB_ODEP) + $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_filectrl.cpp + xrclib_xh_filepicker.o: $(srcdir)/src/xrc/xh_filepicker.cpp $(XRCLIB_ODEP) $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_filepicker.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index a13a0940cb..e9998087fa 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3196,6 +3196,7 @@ src/osx/iphone/window.mm src/xrc/xh_dirpicker.cpp src/xrc/xh_dlg.cpp src/xrc/xh_editlbox.cpp + src/xrc/xh_filectrl.cpp src/xrc/xh_filepicker.cpp src/xrc/xh_fontpicker.cpp src/xrc/xh_frame.cpp @@ -3261,6 +3262,7 @@ src/osx/iphone/window.mm wx/xrc/xh_dirpicker.h wx/xrc/xh_dlg.h wx/xrc/xh_editlbox.h + wx/xrc/xh_filectrl.h wx/xrc/xh_filepicker.h wx/xrc/xh_fontpicker.h wx/xrc/xh_frame.h diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index 137018cb26..a66339d338 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -1086,6 +1086,7 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_dirpicker.obj \ $(OBJS)\xrcdll_xh_dlg.obj \ $(OBJS)\xrcdll_xh_editlbox.obj \ + $(OBJS)\xrcdll_xh_filectrl.obj \ $(OBJS)\xrcdll_xh_filepicker.obj \ $(OBJS)\xrcdll_xh_fontpicker.obj \ $(OBJS)\xrcdll_xh_frame.obj \ @@ -1156,6 +1157,7 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_dirpicker.obj \ $(OBJS)\xrclib_xh_dlg.obj \ $(OBJS)\xrclib_xh_editlbox.obj \ + $(OBJS)\xrclib_xh_filectrl.obj \ $(OBJS)\xrclib_xh_filepicker.obj \ $(OBJS)\xrclib_xh_fontpicker.obj \ $(OBJS)\xrclib_xh_frame.obj \ @@ -1465,6 +1467,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_dirpicker.obj \ $(OBJS)\monodll_xh_dlg.obj \ $(OBJS)\monodll_xh_editlbox.obj \ + $(OBJS)\monodll_xh_filectrl.obj \ $(OBJS)\monodll_xh_filepicker.obj \ $(OBJS)\monodll_xh_fontpicker.obj \ $(OBJS)\monodll_xh_frame.obj \ @@ -2150,6 +2153,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_dirpicker.obj \ $(OBJS)\monolib_xh_dlg.obj \ $(OBJS)\monolib_xh_editlbox.obj \ + $(OBJS)\monolib_xh_filectrl.obj \ $(OBJS)\monolib_xh_filepicker.obj \ $(OBJS)\monolib_xh_fontpicker.obj \ $(OBJS)\monolib_xh_frame.obj \ @@ -6050,6 +6054,9 @@ $(OBJS)\monodll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\monodll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\monodll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\monodll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp @@ -8284,6 +8291,9 @@ $(OBJS)\monolib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\monolib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\monolib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\monolib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp @@ -13871,6 +13881,9 @@ $(OBJS)\xrcdll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\xrcdll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\xrcdll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\xrcdll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp @@ -14054,6 +14067,9 @@ $(OBJS)\xrclib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\xrclib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\xrclib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\xrclib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 6c1420305c..f844422e1b 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -1088,6 +1088,7 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_dirpicker.o \ $(OBJS)\xrcdll_xh_dlg.o \ $(OBJS)\xrcdll_xh_editlbox.o \ + $(OBJS)\xrcdll_xh_filectrl.o \ $(OBJS)\xrcdll_xh_filepicker.o \ $(OBJS)\xrcdll_xh_fontpicker.o \ $(OBJS)\xrcdll_xh_frame.o \ @@ -1158,6 +1159,7 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_dirpicker.o \ $(OBJS)\xrclib_xh_dlg.o \ $(OBJS)\xrclib_xh_editlbox.o \ + $(OBJS)\xrclib_xh_filectrl.o \ $(OBJS)\xrclib_xh_filepicker.o \ $(OBJS)\xrclib_xh_fontpicker.o \ $(OBJS)\xrclib_xh_frame.o \ @@ -1482,6 +1484,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_dirpicker.o \ $(OBJS)\monodll_xh_dlg.o \ $(OBJS)\monodll_xh_editlbox.o \ + $(OBJS)\monodll_xh_filectrl.o \ $(OBJS)\monodll_xh_filepicker.o \ $(OBJS)\monodll_xh_fontpicker.o \ $(OBJS)\monodll_xh_frame.o \ @@ -2173,6 +2176,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_dirpicker.o \ $(OBJS)\monolib_xh_dlg.o \ $(OBJS)\monolib_xh_editlbox.o \ + $(OBJS)\monolib_xh_filectrl.o \ $(OBJS)\monolib_xh_filepicker.o \ $(OBJS)\monolib_xh_fontpicker.o \ $(OBJS)\monolib_xh_frame.o \ @@ -6202,6 +6206,9 @@ $(OBJS)\monodll_xh_dlg.o: ../../src/xrc/xh_dlg.cpp $(OBJS)\monodll_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\monodll_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\monodll_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< @@ -8548,6 +8555,9 @@ $(OBJS)\monolib_xh_dlg.o: ../../src/xrc/xh_dlg.cpp $(OBJS)\monolib_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\monolib_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\monolib_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< @@ -14471,6 +14481,9 @@ $(OBJS)\xrcdll_xh_dlg.o: ../../src/xrc/xh_dlg.cpp $(OBJS)\xrcdll_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\xrcdll_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\xrcdll_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< @@ -14654,6 +14667,9 @@ $(OBJS)\xrclib_xh_dlg.o: ../../src/xrc/xh_dlg.cpp $(OBJS)\xrclib_xh_editlbox.o: ../../src/xrc/xh_editlbox.cpp $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\xrclib_xh_filectrl.o: ../../src/xrc/xh_filectrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\xrclib_xh_filepicker.o: ../../src/xrc/xh_filepicker.cpp $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index 40149acf4a..5560dd63f6 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -1156,6 +1156,7 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_dirpicker.obj \ $(OBJS)\xrcdll_xh_dlg.obj \ $(OBJS)\xrcdll_xh_editlbox.obj \ + $(OBJS)\xrcdll_xh_filectrl.obj \ $(OBJS)\xrcdll_xh_filepicker.obj \ $(OBJS)\xrcdll_xh_fontpicker.obj \ $(OBJS)\xrcdll_xh_frame.obj \ @@ -1229,6 +1230,7 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_dirpicker.obj \ $(OBJS)\xrclib_xh_dlg.obj \ $(OBJS)\xrclib_xh_editlbox.obj \ + $(OBJS)\xrclib_xh_filectrl.obj \ $(OBJS)\xrclib_xh_filepicker.obj \ $(OBJS)\xrclib_xh_fontpicker.obj \ $(OBJS)\xrclib_xh_frame.obj \ @@ -1645,6 +1647,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_dirpicker.obj \ $(OBJS)\monodll_xh_dlg.obj \ $(OBJS)\monodll_xh_editlbox.obj \ + $(OBJS)\monodll_xh_filectrl.obj \ $(OBJS)\monodll_xh_filepicker.obj \ $(OBJS)\monodll_xh_fontpicker.obj \ $(OBJS)\monodll_xh_frame.obj \ @@ -2336,6 +2339,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_dirpicker.obj \ $(OBJS)\monolib_xh_dlg.obj \ $(OBJS)\monolib_xh_editlbox.obj \ + $(OBJS)\monolib_xh_filectrl.obj \ $(OBJS)\monolib_xh_filepicker.obj \ $(OBJS)\monolib_xh_fontpicker.obj \ $(OBJS)\monolib_xh_frame.obj \ @@ -6396,6 +6400,9 @@ $(OBJS)\monodll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\monodll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\monodll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\monodll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp @@ -8630,6 +8637,9 @@ $(OBJS)\monolib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\monolib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\monolib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\monolib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp @@ -14217,6 +14227,9 @@ $(OBJS)\xrcdll_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\xrcdll_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\xrcdll_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\xrcdll_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp @@ -14400,6 +14413,9 @@ $(OBJS)\xrclib_xh_dlg.obj: ..\..\src\xrc\xh_dlg.cpp $(OBJS)\xrclib_xh_editlbox.obj: ..\..\src\xrc\xh_editlbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_editlbox.cpp +$(OBJS)\xrclib_xh_filectrl.obj: ..\..\src\xrc\xh_filectrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filectrl.cpp + $(OBJS)\xrclib_xh_filepicker.obj: ..\..\src\xrc\xh_filepicker.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xh_filepicker.cpp diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat index f1de3f23ae..aa950ee3c8 100644 --- a/build/msw/makefile.wat +++ b/build/msw/makefile.wat @@ -152,6 +152,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = & $(OBJS)\monodll_xh_dirpicker.obj & $(OBJS)\monodll_xh_dlg.obj & $(OBJS)\monodll_xh_editlbox.obj & + $(OBJS)\monodll_xh_filectrl.obj & $(OBJS)\monodll_xh_filepicker.obj & $(OBJS)\monodll_xh_fontpicker.obj & $(OBJS)\monodll_xh_frame.obj & @@ -848,6 +849,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = & $(OBJS)\monolib_xh_dirpicker.obj & $(OBJS)\monolib_xh_dlg.obj & $(OBJS)\monolib_xh_editlbox.obj & + $(OBJS)\monolib_xh_filectrl.obj & $(OBJS)\monolib_xh_filepicker.obj & $(OBJS)\monolib_xh_fontpicker.obj & $(OBJS)\monolib_xh_frame.obj & @@ -4207,6 +4209,7 @@ XRCDLL_OBJECTS = & $(OBJS)\xrcdll_xh_dirpicker.obj & $(OBJS)\xrcdll_xh_dlg.obj & $(OBJS)\xrcdll_xh_editlbox.obj & + $(OBJS)\xrcdll_xh_filectrl.obj & $(OBJS)\xrcdll_xh_filepicker.obj & $(OBJS)\xrcdll_xh_fontpicker.obj & $(OBJS)\xrcdll_xh_frame.obj & @@ -4277,6 +4280,7 @@ XRCLIB_OBJECTS = & $(OBJS)\xrclib_xh_dirpicker.obj & $(OBJS)\xrclib_xh_dlg.obj & $(OBJS)\xrclib_xh_editlbox.obj & + $(OBJS)\xrclib_xh_filectrl.obj & $(OBJS)\xrclib_xh_filepicker.obj & $(OBJS)\xrclib_xh_fontpicker.obj & $(OBJS)\xrclib_xh_frame.obj & @@ -6451,6 +6455,9 @@ $(OBJS)\monodll_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp $(OBJS)\monodll_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +$(OBJS)\monodll_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + $(OBJS)\monodll_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< @@ -8797,6 +8804,9 @@ $(OBJS)\monolib_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp $(OBJS)\monolib_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +$(OBJS)\monolib_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + $(OBJS)\monolib_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< @@ -14720,6 +14730,9 @@ $(OBJS)\xrcdll_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp $(OBJS)\xrcdll_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< +$(OBJS)\xrcdll_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + $(OBJS)\xrcdll_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< @@ -14903,6 +14916,9 @@ $(OBJS)\xrclib_xh_dlg.obj : .AUTODEPEND ..\..\src\xrc\xh_dlg.cpp $(OBJS)\xrclib_xh_editlbox.obj : .AUTODEPEND ..\..\src\xrc\xh_editlbox.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< +$(OBJS)\xrclib_xh_filectrl.obj : .AUTODEPEND ..\..\src\xrc\xh_filectrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + $(OBJS)\xrclib_xh_filepicker.obj : .AUTODEPEND ..\..\src\xrc\xh_filepicker.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp index 207f62e8e4..95584b8b1e 100644 --- a/build/msw/wx_core.dsp +++ b/build/msw/wx_core.dsp @@ -6647,6 +6647,10 @@ SOURCE=..\..\include\wx\xrc\xh_editlbox.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\xrc\xh_filectrl.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\xrc\xh_filepicker.h # End Source File # Begin Source File diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj index 4ed4be8f38..9195a7be4d 100644 --- a/build/msw/wx_vc7_core.vcproj +++ b/build/msw/wx_vc7_core.vcproj @@ -5598,6 +5598,9 @@ + + diff --git a/build/msw/wx_vc7_xrc.vcproj b/build/msw/wx_vc7_xrc.vcproj index 5e5945e002..1f2589b860 100644 --- a/build/msw/wx_vc7_xrc.vcproj +++ b/build/msw/wx_vc7_xrc.vcproj @@ -832,6 +832,9 @@ + + @@ -1011,6 +1014,9 @@ + + diff --git a/build/msw/wx_vc8_core.vcproj b/build/msw/wx_vc8_core.vcproj index 06b2ef49f3..5c84543cc3 100644 --- a/build/msw/wx_vc8_core.vcproj +++ b/build/msw/wx_vc8_core.vcproj @@ -7483,6 +7483,10 @@ RelativePath="..\..\include\wx\xrc\xh_editlbox.h" > + + diff --git a/build/msw/wx_vc8_xrc.vcproj b/build/msw/wx_vc8_xrc.vcproj index 5fe153b5fe..46809450e2 100644 --- a/build/msw/wx_vc8_xrc.vcproj +++ b/build/msw/wx_vc8_xrc.vcproj @@ -1130,6 +1130,10 @@ RelativePath="..\..\include\wx\xrc\xh_editlbox.h" > + + @@ -1368,6 +1372,10 @@ RelativePath="..\..\src\xrc\xh_editlbox.cpp" > + + diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj index b5fee91993..97b3aa1338 100644 --- a/build/msw/wx_vc9_core.vcproj +++ b/build/msw/wx_vc9_core.vcproj @@ -7479,6 +7479,10 @@ RelativePath="..\..\include\wx\xrc\xh_editlbox.h" > + + diff --git a/build/msw/wx_vc9_xrc.vcproj b/build/msw/wx_vc9_xrc.vcproj index b35c52c43d..6323c46e4b 100644 --- a/build/msw/wx_vc9_xrc.vcproj +++ b/build/msw/wx_vc9_xrc.vcproj @@ -1126,6 +1126,10 @@ RelativePath="..\..\include\wx\xrc\xh_editlbox.h" > + + @@ -1364,6 +1368,10 @@ RelativePath="..\..\src\xrc\xh_editlbox.cpp" > + + diff --git a/build/msw/wx_xrc.dsp b/build/msw/wx_xrc.dsp index 256babdaa5..c243a306a5 100644 --- a/build/msw/wx_xrc.dsp +++ b/build/msw/wx_xrc.dsp @@ -606,6 +606,10 @@ SOURCE=..\..\include\wx\xrc\xh_editlbox.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\xrc\xh_filectrl.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\xrc\xh_filepicker.h # End Source File # Begin Source File @@ -842,6 +846,10 @@ SOURCE=..\..\src\xrc\xh_editlbox.cpp # End Source File # Begin Source File +SOURCE=..\..\src\xrc\xh_filectrl.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\xrc\xh_filepicker.cpp # End Source File # Begin Source File diff --git a/docs/changes.txt b/docs/changes.txt index 305e4254ad..2f65c0efd5 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -336,6 +336,7 @@ All (GUI): - wxWindow::SetAutoLayout() now works for all windows, not just panels. - Support wxListCtrl columns, items and image lists in XRC (Kinaou Hervé). +- Added support for wxFileCtrl to XRC (Kinaou Hervé). - Added wxEditableListBox XRC handler. - Added multiple selection support to wxDirCtrl (Steve Lamerton). - wxGrid: add possibility to prevent resizing of individual rows/columns. diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index f2e0164858..fd407a4923 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -771,6 +771,20 @@ objects. If sizer child is used, it sets @endTable +@subsubsection xrc_wxfilectrl wxFileCtrl + +@beginTable +@hdr3col{property, type, description} +@row3col{defaultdirectory, @ref overview_xrcformat_type_string, + Sets the current directory displayed in the control. } +@row3col{defaultfilename, @ref overview_xrcformat_type_string, + Selects a certain file.} +@row3col{wildcard, @ref overview_xrcformat_type_string, + Sets the wildcard, which can contain multiple file types, for example: + "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".} +@endTable + + @subsubsection xrc_wxfilepickerctrl wxFilePickerCtrl @beginTable @@ -780,7 +794,8 @@ objects. If sizer child is used, it sets @row3col{message, @ref overview_xrcformat_type_text, Message shown to the user in wxDirDialog shown by the control (required).} @row3col{wildcard, @ref overview_xrcformat_type_string, - Message shown to the user in wxDirDialog shown by the control (required).} + Sets the wildcard, which can contain multiple file types, for example: + "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif".} @endTable diff --git a/include/wx/xrc/xh_all.h b/include/wx/xrc/xh_all.h index cd917b9316..5c37387524 100644 --- a/include/wx/xrc/xh_all.h +++ b/include/wx/xrc/xh_all.h @@ -32,6 +32,7 @@ #include "wx/xrc/xh_dirpicker.h" #include "wx/xrc/xh_dlg.h" #include "wx/xrc/xh_editlbox.h" +#include "wx/xrc/xh_filectrl.h" #include "wx/xrc/xh_filepicker.h" #include "wx/xrc/xh_fontpicker.h" #include "wx/xrc/xh_frame.h" diff --git a/include/wx/xrc/xh_filectrl.h b/include/wx/xrc/xh_filectrl.h new file mode 100644 index 0000000000..82c5eac879 --- /dev/null +++ b/include/wx/xrc/xh_filectrl.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_filectrl.h +// Purpose: XML resource handler for wxFileCtrl +// Author: Kinaou Hervé +// Created: 2009-05-11 +// RCS-ID: $Id$ +// Copyright: (c) 2009 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_FILECTRL_H_ +#define _WX_XH_FILECTRL_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_FILECTRL + +class WXDLLIMPEXP_XRC wxFileCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxFileCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + DECLARE_DYNAMIC_CLASS(wxFileCtrlXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_FILECTRL + +#endif // _WX_XH_FILEPICKERCTRL_H_ diff --git a/samples/xrc/rc/controls.xrc b/samples/xrc/rc/controls.xrc index 3ce4f099fd..335f488d13 100644 --- a/samples/xrc/rc/controls.xrc +++ b/samples/xrc/rc/controls.xrc @@ -403,21 +403,21 @@ 2 - This is a - basicdlg.xpm - + This is a + basicdlg.xpm + - read-only - derivdlg.xpm - + read-only + derivdlg.xpm + - wxBitmapComboBox - uncenter.xpm - + wxBitmapComboBox + uncenter.xpm + - control - custclas.xpm - + control + custclas.xpm + @@ -471,15 +471,25 @@ - + - 1 - 0 - 0 - 0 - 0 - 0 + 2 + 1 + 1 + + wxALIGN_CENTRE|wxALL + + + + + + wxALIGN_CENTRE|wxALL + + + + + wxALIGN_CENTRE|wxALL 5 @@ -487,6 +497,13 @@ 200,200 + + wxEXPAND|wxALL + 5 + + Text files (*.txt) + + diff --git a/src/xrc/xh_filectrl.cpp b/src/xrc/xh_filectrl.cpp new file mode 100644 index 0000000000..be5e0f4d6c --- /dev/null +++ b/src/xrc/xh_filectrl.cpp @@ -0,0 +1,59 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/xrc/xh_filectrl.cpp +// Purpose: XML resource handler for wxFileCtrl +// Author: Kinaou Hervé +// Created: 2009-05-11 +// RCS-ID: $Id$ +// Copyright: (c) 2009 wxWidgets development 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_FILECTRL + +#include "wx/xrc/xh_filectrl.h" +#include "wx/filectrl.h" + +IMPLEMENT_DYNAMIC_CLASS(wxFileCtrlXmlHandler, wxXmlResourceHandler) + +wxFileCtrlXmlHandler::wxFileCtrlXmlHandler() : wxXmlResourceHandler() +{ + XRC_ADD_STYLE(wxFC_DEFAULT_STYLE); + XRC_ADD_STYLE(wxFC_OPEN); + XRC_ADD_STYLE(wxFC_SAVE); + XRC_ADD_STYLE(wxFC_MULTIPLE); + XRC_ADD_STYLE(wxFC_NOSHOWHIDDEN); + + AddWindowStyles(); +} + +wxObject *wxFileCtrlXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(filectrl, wxFileCtrl) + + filectrl->Create(m_parentAsWindow, + GetID(), + GetText(wxT("defaultdirectory")), + GetText(wxT("defaultfilename")), + GetParamValue(wxT("wildcard")), + GetStyle(_T("style"), wxFC_DEFAULT_STYLE), + GetPosition(), + GetSize(), + GetName()); + + SetupWindow(filectrl); + return filectrl; +} + +bool wxFileCtrlXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("wxFileCtrl")); +} + +#endif // wxUSE_XRC && wxUSE_FILECTRL diff --git a/src/xrc/xmlrsall.cpp b/src/xrc/xmlrsall.cpp index 3637dff786..038901da60 100644 --- a/src/xrc/xmlrsall.cpp +++ b/src/xrc/xmlrsall.cpp @@ -90,6 +90,9 @@ void wxXmlResource::InitAllHandlers() #if wxUSE_EDITABLELISTBOX AddHandler(new wxEditableListBoxXmlHandler); #endif +#if wxUSE_FILECTRL + AddHandler(new wxFileCtrlXmlHandler); +#endif #if wxUSE_FILEPICKERCTRL AddHandler(new wxFilePickerCtrlXmlHandler); #endif -- 2.45.2