diff --git a/Makefile.in b/Makefile.in index a6efede2b6..f47ff00145 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2960,6 +2960,7 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_GUI_HDR = \ wx/gtk/bmpcbox.h \ wx/gtk/dataview.h \ wx/gtk/dvrenderer.h \ + wx/gtk/srchctrl.h \ wx/generic/fontdlgg.h @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@GUI_HDR = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_GUI_HDR) COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_GUI_HDR = \ @@ -3022,7 +3023,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_GUI_HDR = \ wx/gtk/calctrl.h \ wx/gtk/bmpcbox.h \ wx/gtk/dataview.h \ - wx/gtk/dvrenderer.h + wx/gtk/dvrenderer.h \ + wx/gtk/srchctrl.h @COND_TOOLKIT_GTK_TOOLKIT_VERSION_3@GUI_HDR = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_GUI_HDR) COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_GUI_HDR = \ wx/generic/fdrepdlg.h \ @@ -3084,7 +3086,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_GUI_HDR = \ wx/gtk/calctrl.h \ wx/gtk/bmpcbox.h \ wx/gtk/dataview.h \ - wx/gtk/dvrenderer.h + wx/gtk/dvrenderer.h \ + wx/gtk/srchctrl.h @COND_TOOLKIT_GTK_TOOLKIT_VERSION_4@GUI_HDR = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_GUI_HDR) COND_TOOLKIT_MOTIF_GUI_HDR = \ wx/generic/clrpickerg.h \ @@ -5303,6 +5306,7 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS = \ monodll_gtk_dataview.o \ monodll_gtk_bmpcbox.o \ monodll_animate.o \ + monodll_gtk_srchctrl.o \ monodll_fontdlgg.o \ monodll_generic_activityindicator.o \ monodll_gtk_eggtrayicon.o @@ -5368,7 +5372,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS = \ monodll_gtk_taskbar.o \ monodll_gtk_dataview.o \ monodll_gtk_bmpcbox.o \ - monodll_animate.o + monodll_animate.o \ + monodll_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_3@__GUI_SRC_OBJECTS = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS) COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS = \ monodll_generic_accel.o \ @@ -5431,7 +5436,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS = \ monodll_gtk_taskbar.o \ monodll_gtk_dataview.o \ monodll_gtk_bmpcbox.o \ - monodll_animate.o + monodll_animate.o \ + monodll_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_4@__GUI_SRC_OBJECTS = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS) COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS = \ monodll_motif_accel.o \ @@ -5606,7 +5612,7 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS = \ monodll_cocoa_scrolbar.o \ monodll_cocoa_slider.o \ monodll_cocoa_spinbutt.o \ - monodll_srchctrl.o \ + monodll_cocoa_srchctrl.o \ monodll_cocoa_statbox.o \ monodll_cocoa_statline.o \ monodll_cocoa_stattext.o \ @@ -7289,6 +7295,7 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS_1 = \ monolib_gtk_dataview.o \ monolib_gtk_bmpcbox.o \ monolib_animate.o \ + monolib_gtk_srchctrl.o \ monolib_fontdlgg.o \ monolib_generic_activityindicator.o \ monolib_gtk_eggtrayicon.o @@ -7354,7 +7361,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS_1 = \ monolib_gtk_taskbar.o \ monolib_gtk_dataview.o \ monolib_gtk_bmpcbox.o \ - monolib_animate.o + monolib_animate.o \ + monolib_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_3@__GUI_SRC_OBJECTS_1 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS_1) COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_1 = \ monolib_generic_accel.o \ @@ -7417,7 +7425,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_1 = \ monolib_gtk_taskbar.o \ monolib_gtk_dataview.o \ monolib_gtk_bmpcbox.o \ - monolib_animate.o + monolib_animate.o \ + monolib_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_4@__GUI_SRC_OBJECTS_1 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_1) COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_1 = \ monolib_motif_accel.o \ @@ -7592,7 +7601,7 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_1 = \ monolib_cocoa_scrolbar.o \ monolib_cocoa_slider.o \ monolib_cocoa_spinbutt.o \ - monolib_srchctrl.o \ + monolib_cocoa_srchctrl.o \ monolib_cocoa_statbox.o \ monolib_cocoa_statline.o \ monolib_cocoa_stattext.o \ @@ -9420,6 +9429,7 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS_2 = \ coredll_gtk_dataview.o \ coredll_gtk_bmpcbox.o \ coredll_animate.o \ + coredll_gtk_srchctrl.o \ coredll_fontdlgg.o \ coredll_generic_activityindicator.o \ coredll_gtk_eggtrayicon.o @@ -9485,7 +9495,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS_2 = \ coredll_gtk_taskbar.o \ coredll_gtk_dataview.o \ coredll_gtk_bmpcbox.o \ - coredll_animate.o + coredll_animate.o \ + coredll_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_3@__GUI_SRC_OBJECTS_2 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS_2) COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_2 = \ coredll_generic_accel.o \ @@ -9548,7 +9559,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_2 = \ coredll_gtk_taskbar.o \ coredll_gtk_dataview.o \ coredll_gtk_bmpcbox.o \ - coredll_animate.o + coredll_animate.o \ + coredll_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_4@__GUI_SRC_OBJECTS_2 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_2) COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_2 = \ coredll_motif_accel.o \ @@ -9723,7 +9735,7 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_2 = \ coredll_cocoa_scrolbar.o \ coredll_cocoa_slider.o \ coredll_cocoa_spinbutt.o \ - coredll_srchctrl.o \ + coredll_cocoa_srchctrl.o \ coredll_cocoa_statbox.o \ coredll_cocoa_statline.o \ coredll_cocoa_stattext.o \ @@ -11142,6 +11154,7 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS_3 = \ corelib_gtk_dataview.o \ corelib_gtk_bmpcbox.o \ corelib_animate.o \ + corelib_gtk_srchctrl.o \ corelib_fontdlgg.o \ corelib_generic_activityindicator.o \ corelib_gtk_eggtrayicon.o @@ -11207,7 +11220,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS_3 = \ corelib_gtk_taskbar.o \ corelib_gtk_dataview.o \ corelib_gtk_bmpcbox.o \ - corelib_animate.o + corelib_animate.o \ + corelib_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_3@__GUI_SRC_OBJECTS_3 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_3___GUI_SRC_OBJECTS_3) COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_3 = \ corelib_generic_accel.o \ @@ -11270,7 +11284,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_3 = \ corelib_gtk_taskbar.o \ corelib_gtk_dataview.o \ corelib_gtk_bmpcbox.o \ - corelib_animate.o + corelib_animate.o \ + corelib_gtk_srchctrl.o @COND_TOOLKIT_GTK_TOOLKIT_VERSION_4@__GUI_SRC_OBJECTS_3 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION_4___GUI_SRC_OBJECTS_3) COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_3 = \ corelib_motif_accel.o \ @@ -11445,7 +11460,7 @@ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_3 = \ corelib_cocoa_scrolbar.o \ corelib_cocoa_slider.o \ corelib_cocoa_spinbutt.o \ - corelib_srchctrl.o \ + corelib_cocoa_srchctrl.o \ corelib_cocoa_statbox.o \ corelib_cocoa_statline.o \ corelib_cocoa_stattext.o \ @@ -16493,7 +16508,7 @@ monodll_cocoa_slider.o: $(srcdir)/src/osx/cocoa/slider.mm $(MONODLL_ODEP) monodll_cocoa_spinbutt.o: $(srcdir)/src/osx/cocoa/spinbutt.mm $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/spinbutt.mm -monodll_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(MONODLL_ODEP) +monodll_cocoa_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/srchctrl.mm monodll_cocoa_statbox.o: $(srcdir)/src/osx/cocoa/statbox.mm $(MONODLL_ODEP) @@ -19691,6 +19706,15 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monodll_animate.o: $(srcdir)/src/gtk/animate.cpp $(MONODLL_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@monodll_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(MONODLL_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@monodll_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(MONODLL_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monodll_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(MONODLL_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monodll_fontdlgg.o: $(srcdir)/src/generic/fontdlgg.cpp $(MONODLL_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/fontdlgg.cpp @@ -21761,7 +21785,7 @@ monolib_cocoa_slider.o: $(srcdir)/src/osx/cocoa/slider.mm $(MONOLIB_ODEP) monolib_cocoa_spinbutt.o: $(srcdir)/src/osx/cocoa/spinbutt.mm $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/spinbutt.mm -monolib_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(MONOLIB_ODEP) +monolib_cocoa_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/srchctrl.mm monolib_cocoa_statbox.o: $(srcdir)/src/osx/cocoa/statbox.mm $(MONOLIB_ODEP) @@ -24959,6 +24983,15 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monolib_animate.o: $(srcdir)/src/gtk/animate.cpp $(MONOLIB_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@monolib_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(MONOLIB_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@monolib_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(MONOLIB_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monolib_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(MONOLIB_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@monolib_fontdlgg.o: $(srcdir)/src/generic/fontdlgg.cpp $(MONOLIB_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/fontdlgg.cpp @@ -27686,7 +27719,7 @@ coredll_cocoa_slider.o: $(srcdir)/src/osx/cocoa/slider.mm $(COREDLL_ODEP) coredll_cocoa_spinbutt.o: $(srcdir)/src/osx/cocoa/spinbutt.mm $(COREDLL_ODEP) $(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/spinbutt.mm -coredll_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(COREDLL_ODEP) +coredll_cocoa_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(COREDLL_ODEP) $(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/srchctrl.mm coredll_cocoa_statbox.o: $(srcdir)/src/osx/cocoa/statbox.mm $(COREDLL_ODEP) @@ -30308,6 +30341,15 @@ coredll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(COREDLL_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@coredll_animate.o: $(srcdir)/src/gtk/animate.cpp $(COREDLL_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@coredll_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(COREDLL_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@coredll_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(COREDLL_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@coredll_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(COREDLL_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@coredll_fontdlgg.o: $(srcdir)/src/generic/fontdlgg.cpp $(COREDLL_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/fontdlgg.cpp @@ -31943,7 +31985,7 @@ corelib_cocoa_slider.o: $(srcdir)/src/osx/cocoa/slider.mm $(CORELIB_ODEP) corelib_cocoa_spinbutt.o: $(srcdir)/src/osx/cocoa/spinbutt.mm $(CORELIB_ODEP) $(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/spinbutt.mm -corelib_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(CORELIB_ODEP) +corelib_cocoa_srchctrl.o: $(srcdir)/src/osx/cocoa/srchctrl.mm $(CORELIB_ODEP) $(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/srchctrl.mm corelib_cocoa_statbox.o: $(srcdir)/src/osx/cocoa/statbox.mm $(CORELIB_ODEP) @@ -34565,6 +34607,15 @@ corelib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(CORELIB_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@corelib_animate.o: $(srcdir)/src/gtk/animate.cpp $(CORELIB_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/animate.cpp +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@corelib_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(CORELIB_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_4_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@corelib_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(CORELIB_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_3_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@corelib_gtk_srchctrl.o: $(srcdir)/src/gtk/srchctrl.cpp $(CORELIB_ODEP) +@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/srchctrl.cpp + @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@corelib_fontdlgg.o: $(srcdir)/src/generic/fontdlgg.cpp $(CORELIB_ODEP) @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/fontdlgg.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index b783e026ef..88ad21a562 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -1516,6 +1516,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/gtk/dataview.cpp src/gtk/bmpcbox.cpp src/gtk/animate.cpp + src/gtk/srchctrl.cpp $(GTK_SRC) @@ -1585,6 +1586,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/gtk/bmpcbox.h wx/gtk/dataview.h wx/gtk/dvrenderer.h + wx/gtk/srchctrl.h $(GTK_HDR) diff --git a/build/cmake/files.cmake b/build/cmake/files.cmake index cae8d70616..8df1296a50 100644 --- a/build/cmake/files.cmake +++ b/build/cmake/files.cmake @@ -1403,6 +1403,7 @@ set(GTK_SRC src/gtk/animate.cpp src/gtk/bmpcbox.cpp src/gtk/hyperlink.cpp + src/gtk/srchctrl.cpp ) set(GTK2_SRC @@ -1474,6 +1475,7 @@ set(GTK_HDR wx/gtk/taskbar.h wx/gtk/activityindicator.h wx/gtk/hyperlink.h + wx/gtk/srchctrl.h ) set(GTK2_HDR diff --git a/build/files b/build/files index 95cffdbdb1..31e387eaf6 100644 --- a/build/files +++ b/build/files @@ -1399,6 +1399,7 @@ GTK_SRC = src/gtk/slider.cpp src/gtk/spinbutt.cpp src/gtk/spinctrl.cpp + src/gtk/srchctrl.cpp src/gtk/statbmp.cpp src/gtk/statbox.cpp src/gtk/statline.cpp @@ -1469,6 +1470,7 @@ GTK_HDR = wx/gtk/slider.h wx/gtk/spinbutt.h wx/gtk/spinctrl.h + wx/gtk/srchctrl.h wx/gtk/statbmp.h wx/gtk/statbox.h wx/gtk/statline.h diff --git a/include/wx/gtk/srchctrl.h b/include/wx/gtk/srchctrl.h new file mode 100644 index 0000000000..8deeb5f87c --- /dev/null +++ b/include/wx/gtk/srchctrl.h @@ -0,0 +1,139 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/srchctrl.h +// Purpose: wxSearchCtrl class - native +// Author: Kettab Ali +// Created: 2019-12-23 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_SEARCHCTRL_H_ +#define _WX_GTK_SEARCHCTRL_H_ + +#if wxUSE_SEARCHCTRL + +// ---------------------------------------------------------------------------- +// wxSearchCtrl +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxSearchCtrl : public wxSearchCtrlBase +{ +public: + // creation + // -------- + + wxSearchCtrl() : wxSearchCtrlBase() + { + Init(); + } + + wxSearchCtrl(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSearchCtrlNameStr) + : wxSearchCtrlBase() + { + Init(); + Create(parent, id, value, pos, size, style, validator, name); + } + + virtual ~wxSearchCtrl(); + + bool Create(wxWindow *parent, wxWindowID id, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxSearchCtrlNameStr); + +#if wxUSE_MENUS + // get/set search button menu + // -------------------------- + virtual void SetMenu( wxMenu* menu ) wxOVERRIDE; + virtual wxMenu* GetMenu() wxOVERRIDE; +#endif // wxUSE_MENUS + + // get/set search options + // ---------------------- + virtual void ShowSearchButton( bool show ) wxOVERRIDE; + virtual bool IsSearchButtonVisible() const wxOVERRIDE; + + virtual void ShowCancelButton( bool show ) wxOVERRIDE; + virtual bool IsCancelButtonVisible() const wxOVERRIDE; + + virtual void SetDescriptiveText(const wxString& text) wxOVERRIDE; + virtual wxString GetDescriptiveText() const wxOVERRIDE; + + // accessors + // --------- + virtual int GetLineLength(long lineNo) const wxOVERRIDE; + virtual wxString GetLineText(long lineNo) const wxOVERRIDE; + virtual int GetNumberOfLines() const wxOVERRIDE; + + virtual bool IsModified() const wxOVERRIDE; + + // sets/clears the dirty flag + virtual void MarkDirty() wxOVERRIDE; + virtual void DiscardEdits() wxOVERRIDE; + + // translate between the position (which is just an index in the text ctrl + // considering all its contents as a single strings) and (x, y) coordinates + // which represent column and line. + virtual long XYToPosition(long x, long y) const wxOVERRIDE; + virtual bool PositionToXY(long pos, long *x, long *y) const wxOVERRIDE; + + virtual void ShowPosition(long pos) wxOVERRIDE; + + virtual void Clear() wxOVERRIDE; + +#if wxUSE_MENUS + void PopupSearchMenu(); +#endif // wxUSE_MENUS + +private: + // From wxTextEntry: + virtual wxWindow *GetEditableWindow() wxOVERRIDE { return this; } + virtual GtkEditable *GetEditable() const wxOVERRIDE; + + + void Init(); + + void GTKCreateSearchEntryWidget(); + + // Event handlers + void OnChar(wxKeyEvent& event); + void OnText(wxCommandEvent& event); + void OnTextEnter(wxCommandEvent& event); + + bool HasMenu() const + { +#if wxUSE_MENUS + return m_menu != NULL; +#else // !wxUSE_MENUS + return false; +#endif // wxUSE_MENUS/!wxUSE_MENUS + } + +private: + virtual GtkEntry *GetEntry() const wxOVERRIDE + { return m_entry; } + + GtkEntry *m_entry; + +#if wxUSE_MENUS + wxMenu *m_menu; +#endif // wxUSE_MENUS + + bool m_modified; + bool m_cancelButtonVisible; + + wxDECLARE_DYNAMIC_CLASS(wxSearchCtrl); + wxDECLARE_EVENT_TABLE(); +}; + +#endif // wxUSE_SEARCHCTRL + +#endif // _WX_GTK_SEARCHCTRL_H_ diff --git a/include/wx/srchctrl.h b/include/wx/srchctrl.h index 8a0fa4da73..ffee21e515 100644 --- a/include/wx/srchctrl.h +++ b/include/wx/srchctrl.h @@ -16,12 +16,7 @@ #include "wx/textctrl.h" -#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) - // search control was introduced in Mac OS X 10.3 Panther - #define wxUSE_NATIVE_SEARCH_CONTROL 1 - - #define wxSearchCtrlBaseBaseClass wxTextCtrl -#else +#if (!defined(__WXMAC__) && !defined(__WXGTK20__)) || defined(__WXUNIVERSAL__) // no native version, use the generic one #define wxUSE_NATIVE_SEARCH_CONTROL 0 @@ -33,6 +28,17 @@ public wxTextCtrlIface { }; +#elif defined(__WXMAC__) + // search control was introduced in Mac OS X 10.3 Panther + #define wxUSE_NATIVE_SEARCH_CONTROL 1 + + #define wxSearchCtrlBaseBaseClass wxTextCtrl +#elif defined(__WXGTK20__) + // Use GtkSearchEntry if available, construct a similar one using GtkEntry + // otherwise. + #define wxUSE_NATIVE_SEARCH_CONTROL 1 + + #define wxSearchCtrlBaseBaseClass wxTextCtrlBase #endif // ---------------------------------------------------------------------------- @@ -81,6 +87,8 @@ private: #if wxUSE_NATIVE_SEARCH_CONTROL #if defined(__WXMAC__) #include "wx/osx/srchctrl.h" + #elif defined(__WXGTK__) + #include "wx/gtk/srchctrl.h" #endif #else #include "wx/generic/srchctlg.h" diff --git a/src/gtk/srchctrl.cpp b/src/gtk/srchctrl.cpp new file mode 100644 index 0000000000..0445961290 --- /dev/null +++ b/src/gtk/srchctrl.cpp @@ -0,0 +1,430 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/gtk/srchctrl.cpp +// Purpose: wxSearchCtrl implementation - native +// Author: Kettab Ali +// Created: 2019-12-23 +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_SEARCHCTRL + +#include "wx/srchctrl.h" + +#ifndef WX_PRECOMP + #include "wx/menu.h" +#endif //WX_PRECOMP + +#include "wx/utils.h" +#include "wx/gtk/private.h" +#include "wx/gtk/private/gtk3-compat.h" + + +#if GTK_CHECK_VERSION(3,6,0) + // GtkSearchEntry is available only for GTK+ >= 3.6 + #define wxHAS_GTK_SEARCH_ENTRY +#endif // GTK >= 3.6 + +namespace // anonymous +{ + +// A more readable way to check for GtkSearchEntry availability. +inline bool HasGtkSearchEntry() +{ +#ifdef wxHAS_GTK_SEARCH_ENTRY + return wx_is_at_least_gtk3(6); +#else + return false; +#endif +} + +inline GtkWidget* CreateGtkSearchEntryIfAvailable() +{ +#ifdef wxHAS_GTK_SEARCH_ENTRY + if ( wx_is_at_least_gtk3(6) ) + { + return gtk_search_entry_new(); + } +#endif // wxHAS_GTK_SEARCH_ENTRY + + // No GtkSearchEntry! fallback to the plain GtkEntry. + return gtk_entry_new(); +} + +} + +// ============================================================================ +// signal handlers implementation +// ============================================================================ + +extern "C" { + +static void +wx_gtk_icon_press(GtkEntry* WXUNUSED(entry), + gint position, + GdkEventButton* WXUNUSED(event), + wxSearchCtrl* ctrl) +{ + if ( position == GTK_ENTRY_ICON_PRIMARY ) + { + // 1- Notice that contrary to the generic version, we don't generate the + // wxEVT_SEARCH event here, which is the native behaviour of the + // GtkSearchEntry (the search icon is inactive for a GtkSearchEntry). + // + // 2- If the wxSearchCtrl has a menu associated with it, we explicitly + // make the search icon clickable as a way to display the menu. + + ctrl->PopupSearchMenu(); + } + else // position == GTK_ENTRY_ICON_SECONDARY + { + if ( !HasGtkSearchEntry() ) + { + // No need to call this for a GtkSearchEntry. + ctrl->Clear(); + } + + wxCommandEvent event(wxEVT_SEARCH_CANCEL, ctrl->GetId()); + event.SetEventObject(ctrl); + ctrl->HandleWindowEvent(event); + } +} + +} + +// ============================================================================ +// wxSearchCtrl implementation +// ============================================================================ +wxBEGIN_EVENT_TABLE(wxSearchCtrl, wxSearchCtrlBase) + EVT_CHAR(wxSearchCtrl::OnChar) + EVT_TEXT(wxID_ANY, wxSearchCtrl::OnText) + EVT_TEXT_ENTER(wxID_ANY, wxSearchCtrl::OnTextEnter) +wxEND_EVENT_TABLE() + +wxIMPLEMENT_DYNAMIC_CLASS(wxSearchCtrl, wxSearchCtrlBase); + +// ---------------------------------------------------------------------------- +// creation/destruction +// ---------------------------------------------------------------------------- + +// destruction +// ----------- +wxSearchCtrl::~wxSearchCtrl() +{ +#if wxUSE_MENUS + delete m_menu; +#endif // wxUSE_MENUS +} + +// creation +// -------- + +void wxSearchCtrl::Init() +{ + m_entry = NULL; + +#if wxUSE_MENUS + m_menu = NULL; +#endif // wxUSE_MENUS + + m_cancelButtonVisible = false; +} + +bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id, + const wxString& value, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name) +{ + if ( !PreCreation(parent, pos, size) || + !CreateBase(parent, id, pos, size, style | wxTE_PROCESS_ENTER, + validator, name) ) + { + wxFAIL_MSG( "wxSearchCtrl creation failed" ); + return false; + } + + GTKCreateSearchEntryWidget(); + + if ( HasFlag(wxBORDER_NONE) ) + { + g_object_set (m_widget, "has-frame", FALSE, NULL); + } + + GtkEntry * const entry = GetEntry(); + + // Theoretically m_entry cannot be null, and the test here + // is just for safety reasons. + if ( !entry ) + return false; + + // Set it up to trigger default item on enter key press + gtk_entry_set_activates_default(entry, !HasFlag(wxTE_PROCESS_ENTER)); + + gtk_editable_set_editable(GTK_EDITABLE(entry), true); +#ifdef __WXGTK3__ + gtk_entry_set_width_chars(entry, 1); +#endif + + m_parent->DoAddChild(this); + + m_focusWidget = GTK_WIDGET(entry); + + PostCreation(size); + + gtk_entry_set_text(entry, wxGTK_CONV(value)); + + SetHint(_("Search")); + + GTKConnectChangedSignal(); + GTKConnectInsertTextSignal(entry); + GTKConnectClipboardSignals(GTK_WIDGET(entry)); + + return true; +} + +void wxSearchCtrl::GTKCreateSearchEntryWidget() +{ + m_widget = CreateGtkSearchEntryIfAvailable(); + + g_object_ref(m_widget); + + m_entry = GTK_ENTRY(m_widget); + + if ( !HasGtkSearchEntry() ) + { + // Add the search icon and make it looks as native as one would expect + // (i.e. GtkSearchEntry). + gtk_entry_set_icon_from_icon_name(m_entry, + GTK_ENTRY_ICON_PRIMARY, + "edit-find-symbolic"); + + gtk_entry_set_icon_sensitive(m_entry, GTK_ENTRY_ICON_PRIMARY, FALSE); + gtk_entry_set_icon_activatable(m_entry, GTK_ENTRY_ICON_PRIMARY, FALSE); + } + + g_signal_connect(m_entry, "icon-press", G_CALLBACK(wx_gtk_icon_press), this); +} + +GtkEditable *wxSearchCtrl::GetEditable() const +{ + return GTK_EDITABLE(m_entry); +} + +void wxSearchCtrl::Clear() +{ + wxTextEntry::Clear(); + ShowCancelButton(false); +} + +bool wxSearchCtrl::IsModified() const +{ + return m_modified; +} + +void wxSearchCtrl::MarkDirty() +{ + m_modified = true; +} + +void wxSearchCtrl::DiscardEdits() +{ + m_modified = false; +} + +bool wxSearchCtrl::PositionToXY(long pos, long *x, long *y ) const +{ + if (pos <= GTKGetEntryTextLength(GetEntry())) + { + if ( y ) + *y = 0; + if ( x ) + *x = pos; + } + else + { + // index out of bounds + return false; + } + + return true; +} + +long wxSearchCtrl::XYToPosition(long x, long y ) const +{ + if ( y != 0 || x > GTKGetEntryTextLength(GetEntry()) ) + return -1; + + return x; +} + +int wxSearchCtrl::GetLineLength(long lineNo) const +{ + const wxString str = GetLineText(lineNo); + return (int) str.length(); +} + +int wxSearchCtrl::GetNumberOfLines() const +{ + return 1; +} + +wxString wxSearchCtrl::GetLineText( long lineNo ) const +{ + if ( lineNo == 0 ) + return GetValue(); + + return wxString(); +} + +void wxSearchCtrl::ShowPosition( long pos ) +{ + gtk_editable_set_position(GetEditable(), pos); +} + +// search control specific interfaces +// ---------------------------------- +#if wxUSE_MENUS + +void wxSearchCtrl::SetMenu( wxMenu* menu ) +{ + if ( menu == m_menu ) + { + // no change + return; + } + + delete m_menu; + m_menu = menu; + + const bool hasMenu = m_menu != NULL; + + gtk_entry_set_icon_sensitive(m_entry, GTK_ENTRY_ICON_PRIMARY, hasMenu); + gtk_entry_set_icon_activatable(m_entry, GTK_ENTRY_ICON_PRIMARY, hasMenu); +} + +wxMenu* wxSearchCtrl::GetMenu() +{ + return m_menu; +} + +#endif // wxUSE_MENUS + +void wxSearchCtrl::ShowSearchButton(bool WXUNUSED(show)) +{ + // Search button is always shown in the native control. +} + +bool wxSearchCtrl::IsSearchButtonVisible() const +{ + // Search button is always shown in the native control. + return true; +} + +void wxSearchCtrl::ShowCancelButton(bool show) +{ + // The cancel button is shown/hidden automatically by the GtkSearchEntry. + if ( HasGtkSearchEntry() ) + return; + + if ( show == IsCancelButtonVisible() ) + { + // no change + return; + } + + gtk_entry_set_icon_from_icon_name(m_entry, + GTK_ENTRY_ICON_SECONDARY, + show ? "edit-clear-symbolic" : NULL); + + m_cancelButtonVisible = show; +} + +bool wxSearchCtrl::IsCancelButtonVisible() const +{ + if ( HasGtkSearchEntry() ) + { + return !IsEmpty(); + } + + return m_cancelButtonVisible; +} + +void wxSearchCtrl::SetDescriptiveText(const wxString& text) +{ + wxTextEntry::SetHint(text); +} + +wxString wxSearchCtrl::GetDescriptiveText() const +{ + return wxTextEntry::GetHint(); +} + +// Events +// ---------- + +void wxSearchCtrl::OnChar(wxKeyEvent& key_event) +{ + wxCHECK_RET( m_entry != NULL, "invalid search ctrl" ); + + if ( key_event.GetKeyCode() == WXK_RETURN ) + { + if ( HasFlag(wxTE_PROCESS_ENTER) ) + { + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); + event.SetEventObject(this); + event.SetString(GetValue()); + if ( HandleWindowEvent(event) ) + return; + + // We disable built-in default button activation when + // wxTE_PROCESS_ENTER is used, but we still should activate it + // if the event wasn't handled, so do it from here. + if ( ClickDefaultButtonIfPossible() ) + return; + } + } + + key_event.Skip(); +} + +void wxSearchCtrl::OnText(wxCommandEvent& event) +{ + ShowCancelButton(!IsEmpty()); + event.Skip(); +} + +void wxSearchCtrl::OnTextEnter(wxCommandEvent& WXUNUSED(event)) +{ + if ( !IsEmpty() ) + { + wxCommandEvent evt(wxEVT_SEARCH, GetId()); + evt.SetEventObject(this); + evt.SetString(GetValue()); + + ProcessWindowEvent(evt); + } +} + +#if wxUSE_MENUS + +void wxSearchCtrl::PopupSearchMenu() +{ + if ( m_menu ) + { + const wxSize size = GetSize(); + PopupMenu(m_menu, 0, size.y); + } +} + +#endif // wxUSE_MENUS + +#endif // wxUSE_SEARCHCTRL