From c7db82dced50cce6ac8440a442a8fd3f6e25c2ab Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Aug 2007 21:10:14 +0000 Subject: [PATCH] add XRC handler for wxSearchCtrl (extended patch 1751516) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48140 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 | 20 ++++++++++-- build/msw/makefile.wat | 16 ++++++++++ build/msw/wx_core.dsp | 4 +++ build/msw/wx_xrc.dsp | 8 +++++ docs/changes.txt | 1 + include/wx/xrc/xh_all.h | 1 + include/wx/xrc/xh_srchctrl.h | 31 ++++++++++++++++++ samples/xrc/rc/controls.xrc | 15 +++++++++ src/xrc/xh_srchctrl.cpp | 61 ++++++++++++++++++++++++++++++++++++ src/xrc/xmlrsall.cpp | 3 ++ 14 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 include/wx/xrc/xh_srchctrl.h create mode 100644 src/xrc/xh_srchctrl.cpp diff --git a/Makefile.in b/Makefile.in index 7ad5c646b2..4be6647b50 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1536,6 +1536,7 @@ XRCDLL_OBJECTS = \ xrcdll_xh_slidr.o \ xrcdll_xh_spin.o \ xrcdll_xh_split.o \ + xrcdll_xh_srchctrl.o \ xrcdll_xh_statbar.o \ xrcdll_xh_stbmp.o \ xrcdll_xh_stbox.o \ @@ -1599,6 +1600,7 @@ XRCLIB_OBJECTS = \ xrclib_xh_slidr.o \ xrclib_xh_spin.o \ xrclib_xh_split.o \ + xrclib_xh_srchctrl.o \ xrclib_xh_statbar.o \ xrclib_xh_stbmp.o \ xrclib_xh_stbox.o \ @@ -3346,6 +3348,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \ wx/xrc/xh_slidr.h \ wx/xrc/xh_spin.h \ wx/xrc/xh_split.h \ + wx/xrc/xh_srchctrl.h \ wx/xrc/xh_statbar.h \ wx/xrc/xh_stbmp.h \ wx/xrc/xh_stbox.h \ @@ -3711,6 +3714,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \ monodll_xh_slidr.o \ monodll_xh_spin.o \ monodll_xh_split.o \ + monodll_xh_srchctrl.o \ monodll_xh_statbar.o \ monodll_xh_stbmp.o \ monodll_xh_stbox.o \ @@ -5555,6 +5559,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \ monolib_xh_slidr.o \ monolib_xh_spin.o \ monolib_xh_split.o \ + monolib_xh_srchctrl.o \ monolib_xh_statbar.o \ monolib_xh_stbmp.o \ monolib_xh_stbox.o \ @@ -14193,6 +14198,9 @@ monodll_xh_spin.o: $(srcdir)/src/xrc/xh_spin.cpp $(MONODLL_ODEP) monodll_xh_split.o: $(srcdir)/src/xrc/xh_split.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_split.cpp +monodll_xh_srchctrl.o: $(srcdir)/src/xrc/xh_srchctrl.cpp $(MONODLL_ODEP) + $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_srchctrl.cpp + monodll_xh_statbar.o: $(srcdir)/src/xrc/xh_statbar.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xh_statbar.cpp @@ -18516,6 +18524,9 @@ monolib_xh_spin.o: $(srcdir)/src/xrc/xh_spin.cpp $(MONOLIB_ODEP) monolib_xh_split.o: $(srcdir)/src/xrc/xh_split.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_split.cpp +monolib_xh_srchctrl.o: $(srcdir)/src/xrc/xh_srchctrl.cpp $(MONOLIB_ODEP) + $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_srchctrl.cpp + monolib_xh_statbar.o: $(srcdir)/src/xrc/xh_statbar.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_statbar.cpp @@ -30516,6 +30527,9 @@ xrcdll_xh_spin.o: $(srcdir)/src/xrc/xh_spin.cpp $(XRCDLL_ODEP) xrcdll_xh_split.o: $(srcdir)/src/xrc/xh_split.cpp $(XRCDLL_ODEP) $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_split.cpp +xrcdll_xh_srchctrl.o: $(srcdir)/src/xrc/xh_srchctrl.cpp $(XRCDLL_ODEP) + $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_srchctrl.cpp + xrcdll_xh_statbar.o: $(srcdir)/src/xrc/xh_statbar.cpp $(XRCDLL_ODEP) $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xh_statbar.cpp @@ -30684,6 +30698,9 @@ xrclib_xh_spin.o: $(srcdir)/src/xrc/xh_spin.cpp $(XRCLIB_ODEP) xrclib_xh_split.o: $(srcdir)/src/xrc/xh_split.cpp $(XRCLIB_ODEP) $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_split.cpp +xrclib_xh_srchctrl.o: $(srcdir)/src/xrc/xh_srchctrl.cpp $(XRCLIB_ODEP) + $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_srchctrl.cpp + xrclib_xh_statbar.o: $(srcdir)/src/xrc/xh_statbar.cpp $(XRCLIB_ODEP) $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xh_statbar.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 88189b4ef2..0f6daec06a 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3032,6 +3032,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/xrc/xh_slidr.cpp src/xrc/xh_spin.cpp src/xrc/xh_split.cpp + src/xrc/xh_srchctrl.cpp src/xrc/xh_statbar.cpp src/xrc/xh_stbmp.cpp src/xrc/xh_stbox.cpp @@ -3092,6 +3093,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/xrc/xh_slidr.h wx/xrc/xh_spin.h wx/xrc/xh_split.h + wx/xrc/xh_srchctrl.h wx/xrc/xh_statbar.h wx/xrc/xh_stbmp.h wx/xrc/xh_stbox.h diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index 9ad0dfa701..51e4f54c4a 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -1129,6 +1129,7 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_slidr.obj \ $(OBJS)\xrcdll_xh_spin.obj \ $(OBJS)\xrcdll_xh_split.obj \ + $(OBJS)\xrcdll_xh_srchctrl.obj \ $(OBJS)\xrcdll_xh_statbar.obj \ $(OBJS)\xrcdll_xh_stbmp.obj \ $(OBJS)\xrcdll_xh_stbox.obj \ @@ -1195,6 +1196,7 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_slidr.obj \ $(OBJS)\xrclib_xh_spin.obj \ $(OBJS)\xrclib_xh_split.obj \ + $(OBJS)\xrclib_xh_srchctrl.obj \ $(OBJS)\xrclib_xh_statbar.obj \ $(OBJS)\xrclib_xh_stbmp.obj \ $(OBJS)\xrclib_xh_stbox.obj \ @@ -1466,6 +1468,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_slidr.obj \ $(OBJS)\monodll_xh_spin.obj \ $(OBJS)\monodll_xh_split.obj \ + $(OBJS)\monodll_xh_srchctrl.obj \ $(OBJS)\monodll_xh_statbar.obj \ $(OBJS)\monodll_xh_stbmp.obj \ $(OBJS)\monodll_xh_stbox.obj \ @@ -2097,6 +2100,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_slidr.obj \ $(OBJS)\monolib_xh_spin.obj \ $(OBJS)\monolib_xh_split.obj \ + $(OBJS)\monolib_xh_srchctrl.obj \ $(OBJS)\monolib_xh_statbar.obj \ $(OBJS)\monolib_xh_stbmp.obj \ $(OBJS)\monolib_xh_stbox.obj \ @@ -5891,6 +5895,9 @@ $(OBJS)\monodll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\monodll_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $** +$(OBJS)\monodll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $** + $(OBJS)\monodll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $** @@ -7959,6 +7966,9 @@ $(OBJS)\monolib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\monolib_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $** +$(OBJS)\monolib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $** + $(OBJS)\monolib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $** @@ -13161,6 +13171,9 @@ $(OBJS)\xrcdll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\xrcdll_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) $** +$(OBJS)\xrcdll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) $** + $(OBJS)\xrcdll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) $** @@ -13332,6 +13345,9 @@ $(OBJS)\xrclib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\xrclib_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) $** +$(OBJS)\xrclib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) $** + $(OBJS)\xrclib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) $** diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index 71e37b1422..8b708f727b 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -1133,6 +1133,7 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_slidr.o \ $(OBJS)\xrcdll_xh_spin.o \ $(OBJS)\xrcdll_xh_split.o \ + $(OBJS)\xrcdll_xh_srchctrl.o \ $(OBJS)\xrcdll_xh_statbar.o \ $(OBJS)\xrcdll_xh_stbmp.o \ $(OBJS)\xrcdll_xh_stbox.o \ @@ -1199,6 +1200,7 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_slidr.o \ $(OBJS)\xrclib_xh_spin.o \ $(OBJS)\xrclib_xh_split.o \ + $(OBJS)\xrclib_xh_srchctrl.o \ $(OBJS)\xrclib_xh_statbar.o \ $(OBJS)\xrclib_xh_stbmp.o \ $(OBJS)\xrclib_xh_stbox.o \ @@ -1483,6 +1485,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_slidr.o \ $(OBJS)\monodll_xh_spin.o \ $(OBJS)\monodll_xh_split.o \ + $(OBJS)\monodll_xh_srchctrl.o \ $(OBJS)\monodll_xh_statbar.o \ $(OBJS)\monodll_xh_stbmp.o \ $(OBJS)\monodll_xh_stbox.o \ @@ -2120,6 +2123,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_slidr.o \ $(OBJS)\monolib_xh_spin.o \ $(OBJS)\monolib_xh_split.o \ + $(OBJS)\monolib_xh_srchctrl.o \ $(OBJS)\monolib_xh_statbar.o \ $(OBJS)\monolib_xh_stbmp.o \ $(OBJS)\monolib_xh_stbox.o \ @@ -6060,6 +6064,9 @@ $(OBJS)\monodll_xh_spin.o: ../../src/xrc/xh_spin.cpp $(OBJS)\monodll_xh_split.o: ../../src/xrc/xh_split.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\monodll_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\monodll_xh_statbar.o: ../../src/xrc/xh_statbar.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< @@ -8228,6 +8235,9 @@ $(OBJS)\monolib_xh_spin.o: ../../src/xrc/xh_spin.cpp $(OBJS)\monolib_xh_split.o: ../../src/xrc/xh_split.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\monolib_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\monolib_xh_statbar.o: ../../src/xrc/xh_statbar.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< @@ -13730,6 +13740,9 @@ $(OBJS)\xrcdll_xh_spin.o: ../../src/xrc/xh_spin.cpp $(OBJS)\xrcdll_xh_split.o: ../../src/xrc/xh_split.cpp $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\xrcdll_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\xrcdll_xh_statbar.o: ../../src/xrc/xh_statbar.cpp $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< @@ -13901,6 +13914,9 @@ $(OBJS)\xrclib_xh_spin.o: ../../src/xrc/xh_spin.cpp $(OBJS)\xrclib_xh_split.o: ../../src/xrc/xh_split.cpp $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\xrclib_xh_srchctrl.o: ../../src/xrc/xh_srchctrl.cpp + $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\xrclib_xh_statbar.o: ../../src/xrc/xh_statbar.cpp $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index dbf2a97482..3672e9a4fa 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -1214,6 +1214,7 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_slidr.obj \ $(OBJS)\xrcdll_xh_spin.obj \ $(OBJS)\xrcdll_xh_split.obj \ + $(OBJS)\xrcdll_xh_srchctrl.obj \ $(OBJS)\xrcdll_xh_statbar.obj \ $(OBJS)\xrcdll_xh_stbmp.obj \ $(OBJS)\xrcdll_xh_stbox.obj \ @@ -1283,6 +1284,7 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_slidr.obj \ $(OBJS)\xrclib_xh_spin.obj \ $(OBJS)\xrclib_xh_split.obj \ + $(OBJS)\xrclib_xh_srchctrl.obj \ $(OBJS)\xrclib_xh_statbar.obj \ $(OBJS)\xrclib_xh_stbmp.obj \ $(OBJS)\xrclib_xh_stbox.obj \ @@ -1654,6 +1656,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_slidr.obj \ $(OBJS)\monodll_xh_spin.obj \ $(OBJS)\monodll_xh_split.obj \ + $(OBJS)\monodll_xh_srchctrl.obj \ $(OBJS)\monodll_xh_statbar.obj \ $(OBJS)\monodll_xh_stbmp.obj \ $(OBJS)\monodll_xh_stbox.obj \ @@ -2291,6 +2294,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_slidr.obj \ $(OBJS)\monolib_xh_spin.obj \ $(OBJS)\monolib_xh_split.obj \ + $(OBJS)\monolib_xh_srchctrl.obj \ $(OBJS)\monolib_xh_statbar.obj \ $(OBJS)\monolib_xh_stbmp.obj \ $(OBJS)\monolib_xh_stbox.obj \ @@ -4539,7 +4543,7 @@ clean: -if exist $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib del $(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib cd ..\..\samples $(MAKE) -f makefile.vc $(MAKEARGS) clean - cd $(MAKEDIR) + cd "$(MAKEDIR)" setup_h: $(SETUPHDIR)\wx ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h $(SETUPHDIR)\wx\msw\rcdefs.h @@ -4892,7 +4896,7 @@ wxgl: $(____wxgl_namedll_DEP) $(____wxgl_namelib_DEP) sub_samples: cd ..\..\samples $(MAKE) -f makefile.vc $(MAKEARGS) all - cd $(MAKEDIR) + cd "$(MAKEDIR)" $(LIBDIRNAME): if not exist $(LIBDIRNAME) mkdir $(LIBDIRNAME) @@ -6253,6 +6257,9 @@ $(OBJS)\monodll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\monodll_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $** +$(OBJS)\monodll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $** + $(OBJS)\monodll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $** @@ -8321,6 +8328,9 @@ $(OBJS)\monolib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\monolib_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $** +$(OBJS)\monolib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $** + $(OBJS)\monolib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $** @@ -13523,6 +13533,9 @@ $(OBJS)\xrcdll_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\xrcdll_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) $** +$(OBJS)\xrcdll_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) $** + $(OBJS)\xrcdll_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) $** @@ -13694,6 +13707,9 @@ $(OBJS)\xrclib_xh_spin.obj: ..\..\src\xrc\xh_spin.cpp $(OBJS)\xrclib_xh_split.obj: ..\..\src\xrc\xh_split.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) $** +$(OBJS)\xrclib_xh_srchctrl.obj: ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) $** + $(OBJS)\xrclib_xh_statbar.obj: ..\..\src\xrc\xh_statbar.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) $** diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat index 6a454ec6c3..69323eb379 100644 --- a/build/msw/makefile.wat +++ b/build/msw/makefile.wat @@ -176,6 +176,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = & $(OBJS)\monodll_xh_slidr.obj & $(OBJS)\monodll_xh_spin.obj & $(OBJS)\monodll_xh_split.obj & + $(OBJS)\monodll_xh_srchctrl.obj & $(OBJS)\monodll_xh_statbar.obj & $(OBJS)\monodll_xh_stbmp.obj & $(OBJS)\monodll_xh_stbox.obj & @@ -818,6 +819,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = & $(OBJS)\monolib_xh_slidr.obj & $(OBJS)\monolib_xh_spin.obj & $(OBJS)\monolib_xh_split.obj & + $(OBJS)\monolib_xh_srchctrl.obj & $(OBJS)\monolib_xh_statbar.obj & $(OBJS)\monolib_xh_stbmp.obj & $(OBJS)\monolib_xh_stbox.obj & @@ -4070,6 +4072,7 @@ XRCDLL_OBJECTS = & $(OBJS)\xrcdll_xh_slidr.obj & $(OBJS)\xrcdll_xh_spin.obj & $(OBJS)\xrcdll_xh_split.obj & + $(OBJS)\xrcdll_xh_srchctrl.obj & $(OBJS)\xrcdll_xh_statbar.obj & $(OBJS)\xrcdll_xh_stbmp.obj & $(OBJS)\xrcdll_xh_stbox.obj & @@ -4136,6 +4139,7 @@ XRCLIB_OBJECTS = & $(OBJS)\xrclib_xh_slidr.obj & $(OBJS)\xrclib_xh_spin.obj & $(OBJS)\xrclib_xh_split.obj & + $(OBJS)\xrclib_xh_srchctrl.obj & $(OBJS)\xrclib_xh_statbar.obj & $(OBJS)\xrclib_xh_stbmp.obj & $(OBJS)\xrclib_xh_stbox.obj & @@ -6322,6 +6326,9 @@ $(OBJS)\monodll_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp $(OBJS)\monodll_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< +$(OBJS)\monodll_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< + $(OBJS)\monodll_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $< @@ -8490,6 +8497,9 @@ $(OBJS)\monolib_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp $(OBJS)\monolib_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< +$(OBJS)\monolib_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< + $(OBJS)\monolib_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $< @@ -13992,6 +14002,9 @@ $(OBJS)\xrcdll_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp $(OBJS)\xrcdll_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< +$(OBJS)\xrcdll_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< + $(OBJS)\xrcdll_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCDLL_CXXFLAGS) $< @@ -14163,6 +14176,9 @@ $(OBJS)\xrclib_xh_spin.obj : .AUTODEPEND ..\..\src\xrc\xh_spin.cpp $(OBJS)\xrclib_xh_split.obj : .AUTODEPEND ..\..\src\xrc\xh_split.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< +$(OBJS)\xrclib_xh_srchctrl.obj : .AUTODEPEND ..\..\src\xrc\xh_srchctrl.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< + $(OBJS)\xrclib_xh_statbar.obj : .AUTODEPEND ..\..\src\xrc\xh_statbar.cpp $(CXX) -bt=nt -zq -fo=$^@ $(XRCLIB_CXXFLAGS) $< diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp index fa94213945..b652951e8c 100644 --- a/build/msw/wx_core.dsp +++ b/build/msw/wx_core.dsp @@ -9645,6 +9645,10 @@ SOURCE=..\..\include\wx\xrc\xh_split.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\xrc\xh_srchctrl.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\xrc\xh_statbar.h # End Source File # Begin Source File diff --git a/build/msw/wx_xrc.dsp b/build/msw/wx_xrc.dsp index f6e2502e3e..038589143d 100644 --- a/build/msw/wx_xrc.dsp +++ b/build/msw/wx_xrc.dsp @@ -1146,6 +1146,10 @@ SOURCE=..\..\include\wx\xrc\xh_split.h # End Source File # Begin Source File +SOURCE=..\..\include\wx\xrc\xh_srchctrl.h +# End Source File +# Begin Source File + SOURCE=..\..\include\wx\xrc\xh_statbar.h # End Source File # Begin Source File @@ -1370,6 +1374,10 @@ SOURCE=..\..\src\xrc\xh_split.cpp # End Source File # Begin Source File +SOURCE=..\..\src\xrc\xh_srchctrl.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\xrc\xh_statbar.cpp # End Source File # Begin Source File diff --git a/docs/changes.txt b/docs/changes.txt index 5c131d3689..e45b89725f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -156,6 +156,7 @@ All (GUI): - Added support for two auxiliary mouse buttons to wxMouseEvent (Chris Weiland). - Added wxToolTip::SetAutoPop() and SetReshow() (Jan Knepper) - Added wxTaskBarIcon::Destroy() +- Added XRC handler for wxSearchCtrl (Sander Berents) wxGTK: diff --git a/include/wx/xrc/xh_all.h b/include/wx/xrc/xh_all.h index 41600a0852..34f459f655 100644 --- a/include/wx/xrc/xh_all.h +++ b/include/wx/xrc/xh_all.h @@ -56,6 +56,7 @@ #include "wx/xrc/xh_slidr.h" #include "wx/xrc/xh_spin.h" #include "wx/xrc/xh_split.h" +#include "wx/xrc/xh_srchctrl.h" #include "wx/xrc/xh_statbar.h" #include "wx/xrc/xh_stbox.h" #include "wx/xrc/xh_stbmp.h" diff --git a/include/wx/xrc/xh_srchctrl.h b/include/wx/xrc/xh_srchctrl.h new file mode 100644 index 0000000000..1c271d99c3 --- /dev/null +++ b/include/wx/xrc/xh_srchctrl.h @@ -0,0 +1,31 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/xrc/xh_srchctl.h +// Purpose: XRC resource handler for wxSearchCtrl +// Author: Sander Berents +// Created: 2007/07/12 +// RCS-ID: $Id$ +// Copyright: (c) 2007 Sander Berents +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SRCH_H_ +#define _WX_XH_SRCH_H_ + +#include "wx/xrc/xmlres.h" + +#if wxUSE_XRC && wxUSE_SEARCHCTRL + +class WXDLLIMPEXP_XRC wxSearchCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxSearchCtrlXmlHandler(); + + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + + DECLARE_DYNAMIC_CLASS(wxSearchCtrlXmlHandler) +}; + +#endif // wxUSE_XRC && wxUSE_SEARCHCTRL + +#endif // _WX_XH_SRCH_H_ diff --git a/samples/xrc/rc/controls.xrc b/samples/xrc/rc/controls.xrc index ffc6413fcc..d9cf1813b8 100644 --- a/samples/xrc/rc/controls.xrc +++ b/samples/xrc/rc/controls.xrc @@ -976,6 +976,21 @@ "So many pretty widgets" said Pooh, said he. "So many pretty widgets", said Pooh. + + wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + 180,-1 + true love + + diff --git a/src/xrc/xh_srchctrl.cpp b/src/xrc/xh_srchctrl.cpp new file mode 100644 index 0000000000..b467418aa8 --- /dev/null +++ b/src/xrc/xh_srchctrl.cpp @@ -0,0 +1,61 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/xrc/xh_srchctl.cpp +// Purpose: XRC resource handler for wxSearchCtrl +// Author: Sander Berents +// Created: 2007/07/12 +// RCS-ID: $Id$ +// Copyright: (c) 2007 Sander Berents +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_XRC && wxUSE_SEARCHCTRL + +#include "wx/xrc/xh_srchctrl.h" +#include "wx/srchctrl.h" + +IMPLEMENT_DYNAMIC_CLASS(wxSearchCtrlXmlHandler, wxXmlResourceHandler) + +wxSearchCtrlXmlHandler::wxSearchCtrlXmlHandler() : wxXmlResourceHandler() +{ + XRC_ADD_STYLE(wxTE_PROCESS_ENTER); + XRC_ADD_STYLE(wxTE_PROCESS_TAB); + XRC_ADD_STYLE(wxTE_NOHIDESEL); + XRC_ADD_STYLE(wxTE_LEFT); + XRC_ADD_STYLE(wxTE_CENTRE); + XRC_ADD_STYLE(wxTE_RIGHT); + XRC_ADD_STYLE(wxTE_CAPITALIZE); + + AddWindowStyles(); +} + +wxObject *wxSearchCtrlXmlHandler::DoCreateResource() +{ + XRC_MAKE_INSTANCE(ctrl, wxSearchCtrl) + + ctrl->Create(m_parentAsWindow, + GetID(), + GetText(wxT("value")), + GetPosition(), + GetSize(), + GetStyle(wxT("style"), wxTE_LEFT), + wxDefaultValidator, + GetName()); + + SetupWindow(ctrl); + + return ctrl; +} + +bool wxSearchCtrlXmlHandler::CanHandle(wxXmlNode *node) +{ + return IsOfClass(node, wxT("wxSearchCtrl")); +} + +#endif // wxUSE_XRC && wxUSE_SEARCHCTRL diff --git a/src/xrc/xmlrsall.cpp b/src/xrc/xmlrsall.cpp index 99648ca299..ccee1ef255 100644 --- a/src/xrc/xmlrsall.cpp +++ b/src/xrc/xmlrsall.cpp @@ -137,6 +137,9 @@ void wxXmlResource::InitAllHandlers() #if wxUSE_SCROLLBAR AddHandler(new wxScrollBarXmlHandler); #endif +#if wxUSE_SEARCHCTRL + AddHandler(new wxSearchCtrlXmlHandler); +#endif #if wxUSE_SLIDER AddHandler(new wxSliderXmlHandler); #endif -- 2.45.2