diff --git a/Makefile.in b/Makefile.in
index 2cb5017f60..60dc83108a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3292,6 +3292,7 @@ COND_TOOLKIT_MSW_GUI_HDR = \
wx/msw/toplevel.h \
wx/msw/treectrl.h \
wx/msw/window.h \
+ wx/generic/collheaderctrl.h \
wx/msw/checklst.h \
wx/msw/fdrepdlg.h \
wx/msw/fontdlg.h \
@@ -3737,6 +3738,7 @@ COND_TOOLKIT_WINCE_GUI_HDR = \
wx/msw/toplevel.h \
wx/msw/treectrl.h \
wx/msw/window.h \
+ wx/generic/collheaderctrl.h \
wx/generic/fdrepdlg.h \
wx/generic/filedlgg.h \
wx/generic/fontdlgg.h \
@@ -4279,6 +4281,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \
wx/xpmhand.h \
wx/xrc/xmlreshandler.h \
wx/systhemectrl.h \
+ wx/collheaderctrl.h \
$(LOWLEVEL_HDR) \
$(GUI_CORE_HEADERS) \
$(ADVANCED_HDR) \
@@ -4952,6 +4955,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS = \
monodll_univ_toolbar.o \
monodll_topluniv.o \
monodll_winuniv.o \
+ monodll_collheaderctrlg.o \
monodll_gtk.o \
monodll_metal.o \
monodll_mono.o \
@@ -5620,7 +5624,8 @@ COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS = \
monodll_paletteg.o \
monodll_regiong.o \
monodll_generic_statusbr.o \
- monodll_generic_textmeasure.o
+ monodll_generic_textmeasure.o \
+ monodll_collheaderctrlg.o
@COND_TOOLKIT_COCOA@__GUI_SRC_OBJECTS = $(COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS)
COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS = \
monodll_generic_accel.o \
@@ -5666,7 +5671,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS = \
monodll_gtk1_stattext.o \
monodll_gtk1_toolbar.o \
monodll_gtk1_textctrl.o \
- monodll_gtk1_tglbtn.o
+ monodll_gtk1_tglbtn.o \
+ monodll_collheaderctrlg.o
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_@__GUI_SRC_OBJECTS = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS)
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS = \
monodll_generic_accel.o \
@@ -5844,7 +5850,8 @@ COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS = \
monodll_prntdlgg.o \
monodll_generic_statline.o \
monodll_generic_statusbr.o \
- monodll_tabg.o
+ monodll_tabg.o \
+ monodll_collheaderctrlg.o
@COND_TOOLKIT_MOTIF@__GUI_SRC_OBJECTS = $(COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS)
COND_TOOLKIT_MSW___GUI_SRC_OBJECTS = \
monodll_clrpickerg.o \
@@ -5907,6 +5914,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS = \
monodll_msw_tglbtn.o \
monodll_treectrl.o \
monodll_systhemectrl.o \
+ monodll_collheaderctrlg.o \
monodll_msw_checklst.o \
monodll_msw_fdrepdlg.o \
monodll_msw_fontdlg.o
@@ -6068,6 +6076,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS = \
monodll_msw_tglbtn.o \
monodll_treectrl.o \
monodll_systhemectrl.o \
+ monodll_collheaderctrlg.o \
monodll_dirdlgg.o \
monodll_generic_fdrepdlg.o \
monodll_filedlgg.o \
@@ -7326,6 +7335,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1 = \
monolib_univ_toolbar.o \
monolib_topluniv.o \
monolib_winuniv.o \
+ monolib_collheaderctrlg.o \
monolib_gtk.o \
monolib_metal.o \
monolib_mono.o \
@@ -7994,7 +8004,8 @@ COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS_1 = \
monolib_paletteg.o \
monolib_regiong.o \
monolib_generic_statusbr.o \
- monolib_generic_textmeasure.o
+ monolib_generic_textmeasure.o \
+ monolib_collheaderctrlg.o
@COND_TOOLKIT_COCOA@__GUI_SRC_OBJECTS_1 = $(COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS_1)
COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_1 = \
monolib_generic_accel.o \
@@ -8040,7 +8051,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_1 = \
monolib_gtk1_stattext.o \
monolib_gtk1_toolbar.o \
monolib_gtk1_textctrl.o \
- monolib_gtk1_tglbtn.o
+ monolib_gtk1_tglbtn.o \
+ monolib_collheaderctrlg.o
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_@__GUI_SRC_OBJECTS_1 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_1)
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS_1 = \
monolib_generic_accel.o \
@@ -8218,7 +8230,8 @@ COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_1 = \
monolib_prntdlgg.o \
monolib_generic_statline.o \
monolib_generic_statusbr.o \
- monolib_tabg.o
+ monolib_tabg.o \
+ monolib_collheaderctrlg.o
@COND_TOOLKIT_MOTIF@__GUI_SRC_OBJECTS_1 = $(COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_1)
COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_1 = \
monolib_clrpickerg.o \
@@ -8281,6 +8294,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_1 = \
monolib_msw_tglbtn.o \
monolib_treectrl.o \
monolib_systhemectrl.o \
+ monolib_collheaderctrlg.o \
monolib_msw_checklst.o \
monolib_msw_fdrepdlg.o \
monolib_msw_fontdlg.o
@@ -8442,6 +8456,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_1 = \
monolib_msw_tglbtn.o \
monolib_treectrl.o \
monolib_systhemectrl.o \
+ monolib_collheaderctrlg.o \
monolib_dirdlgg.o \
monolib_generic_fdrepdlg.o \
monolib_filedlgg.o \
@@ -9852,6 +9867,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2 = \
coredll_univ_toolbar.o \
coredll_topluniv.o \
coredll_winuniv.o \
+ coredll_collheaderctrlg.o \
coredll_gtk.o \
coredll_metal.o \
coredll_mono.o \
@@ -10520,7 +10536,8 @@ COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS_2 = \
coredll_paletteg.o \
coredll_regiong.o \
coredll_generic_statusbr.o \
- coredll_generic_textmeasure.o
+ coredll_generic_textmeasure.o \
+ coredll_collheaderctrlg.o
@COND_TOOLKIT_COCOA@__GUI_SRC_OBJECTS_2 = $(COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS_2)
COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_2 = \
coredll_generic_accel.o \
@@ -10566,7 +10583,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_2 = \
coredll_gtk1_stattext.o \
coredll_gtk1_toolbar.o \
coredll_gtk1_textctrl.o \
- coredll_gtk1_tglbtn.o
+ coredll_gtk1_tglbtn.o \
+ coredll_collheaderctrlg.o
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_@__GUI_SRC_OBJECTS_2 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_2)
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS_2 = \
coredll_generic_accel.o \
@@ -10744,7 +10762,8 @@ COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_2 = \
coredll_prntdlgg.o \
coredll_generic_statline.o \
coredll_generic_statusbr.o \
- coredll_tabg.o
+ coredll_tabg.o \
+ coredll_collheaderctrlg.o
@COND_TOOLKIT_MOTIF@__GUI_SRC_OBJECTS_2 = $(COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_2)
COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_2 = \
coredll_clrpickerg.o \
@@ -10807,6 +10826,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_2 = \
coredll_msw_tglbtn.o \
coredll_treectrl.o \
coredll_systhemectrl.o \
+ coredll_collheaderctrlg.o \
coredll_msw_checklst.o \
coredll_msw_fdrepdlg.o \
coredll_msw_fontdlg.o
@@ -10968,6 +10988,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_2 = \
coredll_msw_tglbtn.o \
coredll_treectrl.o \
coredll_systhemectrl.o \
+ coredll_collheaderctrlg.o \
coredll_dirdlgg.o \
coredll_generic_fdrepdlg.o \
coredll_filedlgg.o \
@@ -11633,6 +11654,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3 = \
corelib_univ_toolbar.o \
corelib_topluniv.o \
corelib_winuniv.o \
+ corelib_collheaderctrlg.o \
corelib_gtk.o \
corelib_metal.o \
corelib_mono.o \
@@ -12301,7 +12323,8 @@ COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS_3 = \
corelib_paletteg.o \
corelib_regiong.o \
corelib_generic_statusbr.o \
- corelib_generic_textmeasure.o
+ corelib_generic_textmeasure.o \
+ corelib_collheaderctrlg.o
@COND_TOOLKIT_COCOA@__GUI_SRC_OBJECTS_3 = $(COND_TOOLKIT_COCOA___GUI_SRC_OBJECTS_3)
COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_3 = \
corelib_generic_accel.o \
@@ -12347,7 +12370,8 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_3 = \
corelib_gtk1_stattext.o \
corelib_gtk1_toolbar.o \
corelib_gtk1_textctrl.o \
- corelib_gtk1_tglbtn.o
+ corelib_gtk1_tglbtn.o \
+ corelib_collheaderctrlg.o
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_@__GUI_SRC_OBJECTS_3 = $(COND_TOOLKIT_GTK_TOOLKIT_VERSION____GUI_SRC_OBJECTS_3)
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2___GUI_SRC_OBJECTS_3 = \
corelib_generic_accel.o \
@@ -12525,7 +12549,8 @@ COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_3 = \
corelib_prntdlgg.o \
corelib_generic_statline.o \
corelib_generic_statusbr.o \
- corelib_tabg.o
+ corelib_tabg.o \
+ corelib_collheaderctrlg.o
@COND_TOOLKIT_MOTIF@__GUI_SRC_OBJECTS_3 = $(COND_TOOLKIT_MOTIF___GUI_SRC_OBJECTS_3)
COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_3 = \
corelib_clrpickerg.o \
@@ -12588,6 +12613,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_3 = \
corelib_msw_tglbtn.o \
corelib_treectrl.o \
corelib_systhemectrl.o \
+ corelib_collheaderctrlg.o \
corelib_msw_checklst.o \
corelib_msw_fdrepdlg.o \
corelib_msw_fontdlg.o
@@ -12749,6 +12775,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_3 = \
corelib_msw_tglbtn.o \
corelib_treectrl.o \
corelib_systhemectrl.o \
+ corelib_collheaderctrlg.o \
corelib_dirdlgg.o \
corelib_generic_fdrepdlg.o \
corelib_filedlgg.o \
@@ -15108,6 +15135,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS = \
monodll_utilscocoa.o \
monodll_generic_caret.o \
monodll_clrpickerg.o \
+ monodll_collheaderctrlg.o \
monodll_collpaneg.o \
monodll_colrdlgg.o \
monodll_dirdlgg.o \
@@ -15254,6 +15282,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_12 = \
monolib_utilscocoa.o \
monolib_generic_caret.o \
monolib_clrpickerg.o \
+ monolib_collheaderctrlg.o \
monolib_collpaneg.o \
monolib_colrdlgg.o \
monolib_dirdlgg.o \
@@ -15400,6 +15429,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_14 = \
coredll_utilscocoa.o \
coredll_generic_caret.o \
coredll_clrpickerg.o \
+ coredll_collheaderctrlg.o \
coredll_collpaneg.o \
coredll_colrdlgg.o \
coredll_dirdlgg.o \
@@ -15531,6 +15561,7 @@ COND_PLATFORM_MACOSX_1___OSX_CARBON_COCOA_SRC_OBJECTS_1_0 = \
corelib_utilscocoa.o \
corelib_generic_caret.o \
corelib_clrpickerg.o \
+ corelib_collheaderctrlg.o \
corelib_collpaneg.o \
corelib_colrdlgg.o \
corelib_dirdlgg.o \
@@ -21461,6 +21492,33 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1_WXUNIV_1@monodll_filedlgg.o: $(srcdir)/src/generic/filedlgg.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/filedlgg.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_USE_GUI_1_WXUNIV_1@monodll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONODLL_ODEP)
+@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monodll_mdig.o: $(srcdir)/src/generic/mdig.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/mdig.cpp
@@ -27386,6 +27444,33 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1_WXUNIV_1@monolib_filedlgg.o: $(srcdir)/src/generic/filedlgg.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/filedlgg.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_USE_GUI_1_WXUNIV_1@monolib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(MONOLIB_ODEP)
+@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monolib_mdig.o: $(srcdir)/src/generic/mdig.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/mdig.cpp
@@ -33416,6 +33501,33 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1_WXUNIV_1@coredll_filedlgg.o: $(srcdir)/src/generic/filedlgg.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/filedlgg.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_USE_GUI_1_WXUNIV_1@coredll_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(COREDLL_ODEP)
+@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@coredll_mdig.o: $(srcdir)/src/generic/mdig.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/mdig.cpp
@@ -37826,6 +37938,33 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1_WXUNIV_1@corelib_filedlgg.o: $(srcdir)/src/generic/filedlgg.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/filedlgg.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_IPHONE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
+@COND_USE_GUI_1_WXUNIV_1@corelib_collheaderctrlg.o: $(srcdir)/src/generic/collheaderctrlg.cpp $(CORELIB_ODEP)
+@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/collheaderctrlg.cpp
+
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@corelib_mdig.o: $(srcdir)/src/generic/mdig.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/mdig.cpp
diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl
index 840133ddb2..1fe0abfdec 100644
--- a/build/bakefiles/files.bkl
+++ b/build/bakefiles/files.bkl
@@ -1194,6 +1194,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/xpmhand.h
wx/xrc/xmlreshandler.h
wx/systhemectrl.h
+ wx/collheaderctrl.h
@@ -1568,6 +1569,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/gtk1/toolbar.cpp
src/gtk1/textctrl.cpp
src/gtk1/tglbtn.cpp
+ src/generic/collheaderctrlg.cpp
wx/generic/clrpickerg.h
@@ -1709,6 +1711,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/statline.cpp
src/generic/statusbr.cpp
src/generic/tabg.cpp
+ src/generic/collheaderctrlg.cpp
wx/generic/clrpickerg.h
@@ -1994,6 +1997,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/msw/tglbtn.cpp
src/msw/treectrl.cpp
src/msw/systhemectrl.cpp
+ src/generic/collheaderctrlg.cpp
wx/generic/clrpickerg.h
@@ -2091,6 +2095,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/msw/toplevel.h
wx/msw/treectrl.h
wx/msw/window.h
+ wx/generic/collheaderctrl.h
@@ -2338,6 +2343,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/caret.cpp
src/generic/clrpickerg.cpp
+ src/generic/collheaderctrlg.cpp
src/generic/collpaneg.cpp
src/generic/colrdlgg.cpp
src/generic/dirdlgg.cpp
@@ -2696,6 +2702,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/regiong.cpp
src/generic/statusbr.cpp
src/generic/textmeasure.cpp
+ src/generic/collheaderctrlg.cpp
wx/cocoa/NSApplication.h
@@ -2862,6 +2869,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/univ/toolbar.cpp
src/univ/topluniv.cpp
src/univ/winuniv.cpp
+ src/generic/collheaderctrlg.cpp
$(UNIV_PLATFORM_HDR)
diff --git a/build/files b/build/files
index ff9515b6ce..9df6ef899e 100644
--- a/build/files
+++ b/build/files
@@ -668,6 +668,7 @@ GUI_CMN_HDR =
wx/choicdlg.h
wx/choice.h
wx/cmndata.h
+ wx/collheaderctrl.h
wx/collpane.h
wx/combo.h
wx/combobox.h
@@ -1188,6 +1189,7 @@ GTK1_SRC =
# Generic implementations used by wxGTK1:
src/generic/accel.cpp
src/generic/clrpickerg.cpp
+ src/generic/collheaderctrlg.cpp
src/generic/collpaneg.cpp
src/generic/colrdlgg.cpp
src/generic/dirdlgg.cpp
@@ -1352,6 +1354,7 @@ MOTIF_SRC =
src/motif/xmcombo/xmcombo.c
# Generic files used by wxMotif:
src/generic/clrpickerg.cpp
+ src/generic/collheaderctrlg.cpp
src/generic/collpaneg.cpp
src/generic/colrdlgg.cpp
src/generic/dirdlgg.cpp
@@ -1579,6 +1582,7 @@ MSW_DESKTOP_LOWLEVEL_HDR =
MSW_SRC =
src/generic/clrpickerg.cpp
+ src/generic/collheaderctrlg.cpp
src/generic/collpaneg.cpp
src/generic/filepickerg.cpp
src/generic/fontpickerg.cpp
@@ -1640,6 +1644,7 @@ MSW_SRC =
src/msw/treectrl.cpp
MSW_HDR =
wx/generic/clrpickerg.h
+ wx/generic/collheaderctrl.h
wx/generic/collpaneg.h
wx/generic/filepickerg.h
wx/generic/fontpickerg.h
@@ -1965,6 +1970,7 @@ OSX_CARBON_COCOA_SRC =
# Generic implementations used by wxOSX:
src/generic/caret.cpp
src/generic/clrpickerg.cpp
+ src/generic/collheaderctrlg.cpp
src/generic/collpaneg.cpp
src/generic/colrdlgg.cpp
src/generic/dirdlgg.cpp
@@ -2293,6 +2299,7 @@ COCOA_SRC =
src/generic/accel.cpp
src/generic/caret.cpp
src/generic/clrpickerg.cpp
+ src/generic/collheaderctrlg.cpp
src/generic/collpaneg.cpp
src/generic/colrdlgg.cpp
src/generic/fdrepdlg.cpp
@@ -2407,6 +2414,7 @@ UNIV_SRC =
$(UNIV_PLATFORM_SRC)
src/generic/accel.cpp
src/generic/clrpickerg.cpp
+ src/generic/collheaderctrlg.cpp
src/generic/collpaneg.cpp
src/generic/colrdlgg.cpp
src/generic/dirdlgg.cpp
diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc
index 510f0e3490..3bd0879673 100644
--- a/build/msw/makefile.bcc
+++ b/build/msw/makefile.bcc
@@ -1885,6 +1885,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_msw_tglbtn.obj \
$(OBJS)\monodll_treectrl.obj \
$(OBJS)\monodll_systhemectrl.obj \
+ $(OBJS)\monodll_collheaderctrlg.obj \
$(OBJS)\monodll_msw_checklst.obj \
$(OBJS)\monodll_msw_fdrepdlg.obj \
$(OBJS)\monodll_fontdlg.obj \
@@ -2161,6 +2162,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_univ_toolbar.obj \
$(OBJS)\monodll_topluniv.obj \
$(OBJS)\monodll_winuniv.obj \
+ $(OBJS)\monodll_collheaderctrlg.obj \
$(OBJS)\monodll_gtk.obj \
$(OBJS)\monodll_metal.obj \
$(OBJS)\monodll_mono.obj \
@@ -2704,6 +2706,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_msw_tglbtn.obj \
$(OBJS)\monolib_treectrl.obj \
$(OBJS)\monolib_systhemectrl.obj \
+ $(OBJS)\monolib_collheaderctrlg.obj \
$(OBJS)\monolib_msw_checklst.obj \
$(OBJS)\monolib_msw_fdrepdlg.obj \
$(OBJS)\monolib_fontdlg.obj \
@@ -2980,6 +2983,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_univ_toolbar.obj \
$(OBJS)\monolib_topluniv.obj \
$(OBJS)\monolib_winuniv.obj \
+ $(OBJS)\monolib_collheaderctrlg.obj \
$(OBJS)\monolib_gtk.obj \
$(OBJS)\monolib_metal.obj \
$(OBJS)\monolib_mono.obj \
@@ -3397,6 +3401,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_msw_tglbtn.obj \
$(OBJS)\coredll_treectrl.obj \
$(OBJS)\coredll_systhemectrl.obj \
+ $(OBJS)\coredll_collheaderctrlg.obj \
$(OBJS)\coredll_msw_checklst.obj \
$(OBJS)\coredll_msw_fdrepdlg.obj \
$(OBJS)\coredll_fontdlg.obj \
@@ -3673,6 +3678,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_univ_toolbar.obj \
$(OBJS)\coredll_topluniv.obj \
$(OBJS)\coredll_winuniv.obj \
+ $(OBJS)\coredll_collheaderctrlg.obj \
$(OBJS)\coredll_gtk.obj \
$(OBJS)\coredll_metal.obj \
$(OBJS)\coredll_mono.obj \
@@ -3963,6 +3969,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_msw_tglbtn.obj \
$(OBJS)\corelib_treectrl.obj \
$(OBJS)\corelib_systhemectrl.obj \
+ $(OBJS)\corelib_collheaderctrlg.obj \
$(OBJS)\corelib_msw_checklst.obj \
$(OBJS)\corelib_msw_fdrepdlg.obj \
$(OBJS)\corelib_fontdlg.obj \
@@ -4239,6 +4246,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_univ_toolbar.obj \
$(OBJS)\corelib_topluniv.obj \
$(OBJS)\corelib_winuniv.obj \
+ $(OBJS)\corelib_collheaderctrlg.obj \
$(OBJS)\corelib_gtk.obj \
$(OBJS)\corelib_metal.obj \
$(OBJS)\corelib_mono.obj \
@@ -7791,6 +7799,11 @@ $(OBJS)\monodll_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monodll_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp
@@ -10293,6 +10306,11 @@ $(OBJS)\monolib_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monolib_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp
@@ -12732,6 +12750,11 @@ $(OBJS)\coredll_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\coredll_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp
@@ -14196,6 +14219,11 @@ $(OBJS)\corelib_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\corelib_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp
diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc
index b3e780ac95..513accb221 100644
--- a/build/msw/makefile.gcc
+++ b/build/msw/makefile.gcc
@@ -1904,6 +1904,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_msw_tglbtn.o \
$(OBJS)\monodll_treectrl.o \
$(OBJS)\monodll_systhemectrl.o \
+ $(OBJS)\monodll_collheaderctrlg.o \
$(OBJS)\monodll_msw_checklst.o \
$(OBJS)\monodll_msw_fdrepdlg.o \
$(OBJS)\monodll_fontdlg.o \
@@ -2182,6 +2183,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_univ_toolbar.o \
$(OBJS)\monodll_topluniv.o \
$(OBJS)\monodll_winuniv.o \
+ $(OBJS)\monodll_collheaderctrlg.o \
$(OBJS)\monodll_gtk.o \
$(OBJS)\monodll_metal.o \
$(OBJS)\monodll_mono.o \
@@ -2729,6 +2731,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_msw_tglbtn.o \
$(OBJS)\monolib_treectrl.o \
$(OBJS)\monolib_systhemectrl.o \
+ $(OBJS)\monolib_collheaderctrlg.o \
$(OBJS)\monolib_msw_checklst.o \
$(OBJS)\monolib_msw_fdrepdlg.o \
$(OBJS)\monolib_fontdlg.o \
@@ -3007,6 +3010,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_univ_toolbar.o \
$(OBJS)\monolib_topluniv.o \
$(OBJS)\monolib_winuniv.o \
+ $(OBJS)\monolib_collheaderctrlg.o \
$(OBJS)\monolib_gtk.o \
$(OBJS)\monolib_metal.o \
$(OBJS)\monolib_mono.o \
@@ -3438,6 +3442,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_msw_tglbtn.o \
$(OBJS)\coredll_treectrl.o \
$(OBJS)\coredll_systhemectrl.o \
+ $(OBJS)\coredll_collheaderctrlg.o \
$(OBJS)\coredll_msw_checklst.o \
$(OBJS)\coredll_msw_fdrepdlg.o \
$(OBJS)\coredll_fontdlg.o \
@@ -3716,6 +3721,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_univ_toolbar.o \
$(OBJS)\coredll_topluniv.o \
$(OBJS)\coredll_winuniv.o \
+ $(OBJS)\coredll_collheaderctrlg.o \
$(OBJS)\coredll_gtk.o \
$(OBJS)\coredll_metal.o \
$(OBJS)\coredll_mono.o \
@@ -4012,6 +4018,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_msw_tglbtn.o \
$(OBJS)\corelib_treectrl.o \
$(OBJS)\corelib_systhemectrl.o \
+ $(OBJS)\corelib_collheaderctrlg.o \
$(OBJS)\corelib_msw_checklst.o \
$(OBJS)\corelib_msw_fdrepdlg.o \
$(OBJS)\corelib_fontdlg.o \
@@ -4290,6 +4297,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_univ_toolbar.o \
$(OBJS)\corelib_topluniv.o \
$(OBJS)\corelib_winuniv.o \
+ $(OBJS)\corelib_collheaderctrlg.o \
$(OBJS)\corelib_gtk.o \
$(OBJS)\corelib_metal.o \
$(OBJS)\corelib_mono.o \
@@ -7966,6 +7974,11 @@ $(OBJS)\monodll_evtloop.o: ../../src/msw/evtloop.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
+ifeq ($(USE_GUI),1)
+$(OBJS)\monodll_collheaderctrlg.o: ../../src/generic/collheaderctrlg.cpp
+ $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+endif
+
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_accelcmn.o: ../../src/common/accelcmn.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@@ -10468,6 +10481,11 @@ $(OBJS)\monolib_evtloop.o: ../../src/msw/evtloop.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
+ifeq ($(USE_GUI),1)
+$(OBJS)\monolib_collheaderctrlg.o: ../../src/generic/collheaderctrlg.cpp
+ $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+endif
+
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_accelcmn.o: ../../src/common/accelcmn.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@@ -12907,6 +12925,11 @@ $(OBJS)\coredll_evtloop.o: ../../src/msw/evtloop.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
endif
+ifeq ($(USE_GUI),1)
+$(OBJS)\coredll_collheaderctrlg.o: ../../src/generic/collheaderctrlg.cpp
+ $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
+endif
+
ifeq ($(USE_GUI),1)
$(OBJS)\coredll_accelcmn.o: ../../src/common/accelcmn.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
@@ -14371,6 +14394,11 @@ $(OBJS)\corelib_evtloop.o: ../../src/msw/evtloop.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
endif
+ifeq ($(USE_GUI),1)
+$(OBJS)\corelib_collheaderctrlg.o: ../../src/generic/collheaderctrlg.cpp
+ $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
+endif
+
ifeq ($(USE_GUI),1)
$(OBJS)\corelib_accelcmn.o: ../../src/common/accelcmn.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc
index 3c0e7a5c64..75f9d71f29 100644
--- a/build/msw/makefile.vc
+++ b/build/msw/makefile.vc
@@ -2185,6 +2185,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_msw_tglbtn.obj \
$(OBJS)\monodll_treectrl.obj \
$(OBJS)\monodll_systhemectrl.obj \
+ $(OBJS)\monodll_collheaderctrlg.obj \
$(OBJS)\monodll_msw_checklst.obj \
$(OBJS)\monodll_msw_fdrepdlg.obj \
$(OBJS)\monodll_fontdlg.obj \
@@ -2461,6 +2462,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_univ_toolbar.obj \
$(OBJS)\monodll_topluniv.obj \
$(OBJS)\monodll_winuniv.obj \
+ $(OBJS)\monodll_collheaderctrlg.obj \
$(OBJS)\monodll_gtk.obj \
$(OBJS)\monodll_metal.obj \
$(OBJS)\monodll_mono.obj \
@@ -3010,6 +3012,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_msw_tglbtn.obj \
$(OBJS)\monolib_treectrl.obj \
$(OBJS)\monolib_systhemectrl.obj \
+ $(OBJS)\monolib_collheaderctrlg.obj \
$(OBJS)\monolib_msw_checklst.obj \
$(OBJS)\monolib_msw_fdrepdlg.obj \
$(OBJS)\monolib_fontdlg.obj \
@@ -3286,6 +3289,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_univ_toolbar.obj \
$(OBJS)\monolib_topluniv.obj \
$(OBJS)\monolib_winuniv.obj \
+ $(OBJS)\monolib_collheaderctrlg.obj \
$(OBJS)\monolib_gtk.obj \
$(OBJS)\monolib_metal.obj \
$(OBJS)\monolib_mono.obj \
@@ -3769,6 +3773,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_msw_tglbtn.obj \
$(OBJS)\coredll_treectrl.obj \
$(OBJS)\coredll_systhemectrl.obj \
+ $(OBJS)\coredll_collheaderctrlg.obj \
$(OBJS)\coredll_msw_checklst.obj \
$(OBJS)\coredll_msw_fdrepdlg.obj \
$(OBJS)\coredll_fontdlg.obj \
@@ -4045,6 +4050,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_univ_toolbar.obj \
$(OBJS)\coredll_topluniv.obj \
$(OBJS)\coredll_winuniv.obj \
+ $(OBJS)\coredll_collheaderctrlg.obj \
$(OBJS)\coredll_gtk.obj \
$(OBJS)\coredll_metal.obj \
$(OBJS)\coredll_mono.obj \
@@ -4341,6 +4347,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_msw_tglbtn.obj \
$(OBJS)\corelib_treectrl.obj \
$(OBJS)\corelib_systhemectrl.obj \
+ $(OBJS)\corelib_collheaderctrlg.obj \
$(OBJS)\corelib_msw_checklst.obj \
$(OBJS)\corelib_msw_fdrepdlg.obj \
$(OBJS)\corelib_fontdlg.obj \
@@ -4617,6 +4624,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_univ_toolbar.obj \
$(OBJS)\corelib_topluniv.obj \
$(OBJS)\corelib_winuniv.obj \
+ $(OBJS)\corelib_collheaderctrlg.obj \
$(OBJS)\corelib_gtk.obj \
$(OBJS)\corelib_metal.obj \
$(OBJS)\corelib_mono.obj \
@@ -8483,6 +8491,11 @@ $(OBJS)\monodll_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monodll_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp
@@ -10985,6 +10998,11 @@ $(OBJS)\monolib_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\monolib_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp
@@ -13424,6 +13442,11 @@ $(OBJS)\coredll_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\coredll_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\accelcmn.cpp
@@ -14888,6 +14911,11 @@ $(OBJS)\corelib_evtloop.obj: ..\..\src\msw\evtloop.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\evtloop.cpp
!endif
+!if "$(USE_GUI)" == "1"
+$(OBJS)\corelib_collheaderctrlg.obj: ..\..\src\generic\collheaderctrlg.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\collheaderctrlg.cpp
+!endif
+
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_accelcmn.obj: ..\..\src\common\accelcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\accelcmn.cpp
diff --git a/build/msw/wx_core.vcxproj b/build/msw/wx_core.vcxproj
index 3f76dde06c..86d5b729cd 100644
--- a/build/msw/wx_core.vcxproj
+++ b/build/msw/wx_core.vcxproj
@@ -1005,6 +1005,7 @@
+
@@ -1375,6 +1376,8 @@
+
+
diff --git a/build/msw/wx_core.vcxproj.filters b/build/msw/wx_core.vcxproj.filters
index d4aefef7b0..6b958042db 100644
--- a/build/msw/wx_core.vcxproj.filters
+++ b/build/msw/wx_core.vcxproj.filters
@@ -438,6 +438,9 @@
Generic Sources
+
+ Generic Sources
+
Generic Sources
@@ -973,6 +976,9 @@
Common Headers
+
+ Common Headers
+
Common Headers
@@ -1144,6 +1150,9 @@
Generic Headers
+
+ Generic Headers
+
Generic Headers
@@ -1927,4 +1936,4 @@
MSW Headers
-
+
diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj
index c2536df2b1..c9e1dac5c3 100644
--- a/build/msw/wx_vc7_core.vcproj
+++ b/build/msw/wx_vc7_core.vcproj
@@ -1070,6 +1070,9 @@
+
+
@@ -1668,6 +1671,9 @@
+
+
@@ -1985,6 +1991,9 @@
+
+
diff --git a/build/msw/wx_vc8_core.vcproj b/build/msw/wx_vc8_core.vcproj
index ea1cf3cf49..113d6ba7e8 100644
--- a/build/msw/wx_vc8_core.vcproj
+++ b/build/msw/wx_vc8_core.vcproj
@@ -1839,6 +1839,10 @@
RelativePath="..\..\src\generic\clrpickerg.cpp"
>
+
+
@@ -2726,6 +2730,10 @@
RelativePath="..\..\include\wx\generic\clrpickerg.h"
>
+
+
@@ -3148,6 +3156,10 @@
RelativePath="..\..\include\wx\cmndata.h"
>
+
+
diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj
index ed41ad6fd7..33f4ebe891 100644
--- a/build/msw/wx_vc9_core.vcproj
+++ b/build/msw/wx_vc9_core.vcproj
@@ -1835,6 +1835,10 @@
RelativePath="..\..\src\generic\clrpickerg.cpp"
>
+
+
@@ -2722,6 +2726,10 @@
RelativePath="..\..\include\wx\generic\clrpickerg.h"
>
+
+
@@ -3144,6 +3152,10 @@
RelativePath="..\..\include\wx\cmndata.h"
>
+
+
diff --git a/include/wx/collheaderctrl.h b/include/wx/collheaderctrl.h
new file mode 100644
index 0000000000..27997b287d
--- /dev/null
+++ b/include/wx/collheaderctrl.h
@@ -0,0 +1,97 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/collheaderctrl.h
+// Purpose: wxCollapsibleHeaderCtrl
+// Author: Tobias Taschner
+// Created: 2015-09-19
+// Copyright: (c) 2015 wxWidgets development team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_COLLAPSIBLEHEADER_CTRL_H_
+#define _WX_COLLAPSIBLEHEADER_CTRL_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_COLLPANE
+
+#include "wx/control.h"
+
+// class name
+extern WXDLLIMPEXP_DATA_CORE(const char) wxCollapsibleHeaderCtrlNameStr[];
+
+//
+// wxGenericCollapsibleHeaderCtrl
+//
+
+class wxCollapsibleHeaderCtrlBase : public wxControl
+{
+public:
+ wxCollapsibleHeaderCtrlBase() { }
+
+ wxCollapsibleHeaderCtrlBase(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBORDER_NONE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCollapsibleHeaderCtrlNameStr)
+ {
+ Create(parent, id, label, pos, size, style, validator, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBORDER_NONE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCollapsibleHeaderCtrlNameStr);
+
+ virtual void SetCollapsed(bool collapsed = true) = 0;
+
+ virtual bool IsCollapsed() const = 0;
+
+private:
+
+ wxDECLARE_NO_COPY_CLASS(wxCollapsibleHeaderCtrlBase);
+};
+
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COLLAPSIBLEHEADER_CHANGED, wxCommandEvent);
+
+#define wxCollapsibleHeaderChangedHandler(func) \
+ wxEVENT_HANDLER_CAST(wxCommandEventFunction, func)
+
+#define EVT_COLLAPSIBLEHEADER_CHANGED(id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COLLAPSIBLEHEADER_CHANGED, id, wxCollapsibleHeaderChangedHandler(fn))
+
+// There currently only is the native implementation, use for all ports
+
+#include "wx/generic/collheaderctrl.h"
+
+class wxCollapsibleHeaderCtrl : public wxGenericCollapsibleHeaderCtrl
+{
+public:
+ wxCollapsibleHeaderCtrl() { }
+
+ wxCollapsibleHeaderCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBORDER_NONE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCollapsibleHeaderCtrlNameStr)
+ {
+ Create(parent, id, label, pos, size, style, validator, name);
+ }
+
+private:
+
+ wxDECLARE_NO_COPY_CLASS(wxCollapsibleHeaderCtrl);
+};
+
+#endif // wxUSE_COLLPANE
+
+#endif // _WX_COLLAPSIBLEHEADER_CTRL_H_
diff --git a/include/wx/generic/collheaderctrl.h b/include/wx/generic/collheaderctrl.h
new file mode 100644
index 0000000000..45612f5f1e
--- /dev/null
+++ b/include/wx/generic/collheaderctrl.h
@@ -0,0 +1,82 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/generic/collheaderctrl.h
+// Purpose: wxGenericCollapsibleHeaderCtrl
+// Author: Tobias Taschner
+// Created: 2015-09-19
+// Copyright: (c) 2015 wxWidgets development team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GENERIC_COLLAPSIBLEHEADER_CTRL_H_
+#define _WX_GENERIC_COLLAPSIBLEHEADER_CTRL_H_
+
+class wxGenericCollapsibleHeaderCtrl : public wxCollapsibleHeaderCtrlBase
+{
+public:
+ wxGenericCollapsibleHeaderCtrl() { Init(); }
+
+ wxGenericCollapsibleHeaderCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBORDER_NONE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCollapsibleHeaderCtrlNameStr)
+ {
+ Init();
+
+ Create(parent, id, label, pos, size, style, validator, name);
+ }
+
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBORDER_NONE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCollapsibleHeaderCtrlNameStr);
+
+ virtual void SetCollapsed(bool collapsed = true) wxOVERRIDE;
+
+ virtual bool IsCollapsed() const wxOVERRIDE
+ { return m_collapsed; }
+
+protected:
+
+ virtual wxSize DoGetBestClientSize() const wxOVERRIDE;
+
+private:
+ bool m_collapsed;
+ bool m_inWindow;
+ bool m_mouseDown;
+
+ void Init();
+
+ void OnPaint(wxPaintEvent& event);
+
+ // Handle set/kill focus events (invalidate for painting focus rect)
+ void OnFocus(wxFocusEvent& event);
+
+ // Handle click
+ void OnLeftUp(wxMouseEvent& event);
+
+ // Handle pressed state
+ void OnLeftDown(wxMouseEvent& event);
+
+ // Handle current state
+ void OnEnterWindow(wxMouseEvent& event);
+
+ void OnLeaveWindow(wxMouseEvent& event);
+
+ // Toggle on space
+ void OnChar(wxKeyEvent& event);
+
+ void DoSetCollapsed(bool collapsed);
+
+ wxDECLARE_NO_COPY_CLASS(wxGenericCollapsibleHeaderCtrl);
+};
+
+
+#endif // _WX_GENERIC_COLLAPSIBLEHEADER_CTRL_H_
diff --git a/include/wx/generic/collpaneg.h b/include/wx/generic/collpaneg.h
index 8c2e723e45..c0e9365eb5 100644
--- a/include/wx/generic/collpaneg.h
+++ b/include/wx/generic/collpaneg.h
@@ -12,11 +12,8 @@
#define _WX_COLLAPSABLE_PANE_H_GENERIC_
// forward declared
-class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxCollapsibleHeaderCtrl;
class WXDLLIMPEXP_FWD_CORE wxStaticLine;
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
-class WXDLLIMPEXP_FWD_CORE wxDisclosureTriangle;
-#endif
#include "wx/containr.h"
@@ -63,8 +60,7 @@ public:
{ return m_pPane==NULL || !m_pPane->IsShown(); }
virtual wxWindow *GetPane() const
{ return m_pPane; }
- virtual wxString GetLabel() const
- { return m_strLabel; }
+ virtual wxString GetLabel() const;
virtual bool Layout();
@@ -80,22 +76,14 @@ protected:
// overridden methods
virtual wxSize DoGetBestSize() const;
- wxString GetBtnLabel() const;
int GetBorder() const;
// child controls
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
- wxDisclosureTriangle *m_pButton;
-#else
- wxButton *m_pButton;
-#endif
+ wxCollapsibleHeaderCtrl *m_pButton;
wxStaticLine *m_pStaticLine;
wxWindow *m_pPane;
wxSizer *m_sz;
- // the button label without ">>" or "<<"
- wxString m_strLabel;
-
private:
void Init();
diff --git a/include/wx/osx/button.h b/include/wx/osx/button.h
index a845513197..5726b211b9 100644
--- a/include/wx/osx/button.h
+++ b/include/wx/osx/button.h
@@ -56,40 +56,4 @@ protected:
wxDECLARE_DYNAMIC_CLASS(wxButton);
};
-// OS X specific class, not part of public wx API
-class WXDLLIMPEXP_CORE wxDisclosureTriangle : public wxControl
-{
-public:
- wxDisclosureTriangle(wxWindow *parent,
- wxWindowID id,
- const wxString& label = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxBORDER_NONE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxButtonNameStr)
- {
- Create(parent, id, label, pos, size, style, validator, name);
- }
-
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxString& label = wxEmptyString,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxBORDER_NONE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxButtonNameStr);
-
- void SetOpen( bool open );
- bool IsOpen() const;
-
- // osx specific event handling common for all osx-ports
-
- virtual bool OSXHandleClicked( double timestampsec );
-
-protected:
- virtual wxSize DoGetBestSize() const ;
-};
-
#endif // _WX_OSX_BUTTON_H_
diff --git a/include/wx/renderer.h b/include/wx/renderer.h
index 173ae122f9..d854007e59 100644
--- a/include/wx/renderer.h
+++ b/include/wx/renderer.h
@@ -260,6 +260,17 @@ public:
const wxRect& rect,
int flags = 0) = 0;
+ // draw collapse button
+ //
+ // flags may use wxCONTROL_CHECKED, wxCONTROL_UNDETERMINED and wxCONTROL_CURRENT
+ virtual void DrawCollapseButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags = 0) = 0;
+
+ // Returns the default size of a collapse button
+ virtual wxSize GetCollapseButtonSize(wxWindow *win, wxDC& dc) = 0;
+
// draw rectangle indicating that an item in e.g. a list control
// has been selected or focused
//
@@ -470,6 +481,15 @@ public:
int flags = 0)
{ m_rendererNative.DrawPushButton( win, dc, rect, flags ); }
+ virtual void DrawCollapseButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags = 0)
+ { m_rendererNative.DrawCollapseButton(win, dc, rect, flags); }
+
+ virtual wxSize GetCollapseButtonSize(wxWindow *win, wxDC& dc)
+ { return m_rendererNative.GetCollapseButtonSize(win, dc); }
+
virtual void DrawItemSelectionRect(wxWindow *win,
wxDC& dc,
const wxRect& rect,
diff --git a/interface/wx/collheaderctrl.h b/interface/wx/collheaderctrl.h
new file mode 100644
index 0000000000..7e2182de6b
--- /dev/null
+++ b/interface/wx/collheaderctrl.h
@@ -0,0 +1,78 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: interface/collheaderctrl.h
+// Purpose: wxCollapsibleHeaderCtrl documentation
+// Author: Tobias Taschner
+// Created: 2015-09-19
+// Copyright: (c) 2015 wxWidgets development team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+ @class wxCollapsibleHeaderCtrl
+
+ Header control above a collapsible pane.
+
+ The collapsible header usually constists of a small indicator of the
+ collapsed state and the label text beside it.
+ This class is used by the generic implemetation of wxCollapsiblePane but
+ maybe used in more complex layouts for other uses.
+
+ @beginEventTable{wxCommandEvent}
+ @event{EVT_COLLAPSIBLEHEADER_CHANGED(id, func)}
+ User changed the collapsed state.
+ @endEventTable
+
+ @since 3.1.0
+
+ @library{wxcore}
+ @category{ctrl}
+
+ @see wxCollapsiblePane
+*/
+class wxCollapsibleHeaderCtrl : public wxControl
+{
+public:
+ wxCollapsibleHeaderCtrl() { }
+
+ /**
+ Constructor fully creating the control.
+
+ The arguments have the usual meanings and only @a parent is typically
+ required.
+ */
+ wxCollapsibleHeaderCtrl(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBORDER_NONE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCollapsibleHeaderCtrlNameStr);
+
+ /**
+ Create the control initialized using the default constructor.
+
+ This method can be used to finish the control creation if it hadn't
+ been done already by using the non-default constructor.
+ */
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxBORDER_NONE,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxCollapsibleHeaderCtrlNameStr);
+
+ /**
+ Set collpased state of the header.
+ */
+ virtual void SetCollapsed(bool collapsed = true);
+
+ /**
+ Returns @c true if the control is collapsed.
+
+ @see SetCollapsed()
+ */
+ virtual bool IsCollapsed() const;
+};
diff --git a/interface/wx/renderer.h b/interface/wx/renderer.h
index 37eb17b260..3ee7e7ae3f 100644
--- a/interface/wx/renderer.h
+++ b/interface/wx/renderer.h
@@ -37,7 +37,7 @@ enum
/** Only for the menu items. */
wxCONTROL_ISSUBMENU = wxCONTROL_SPECIAL,
- /** Only for the tree items. */
+ /** Only for the tree items and collapse buttons. */
wxCONTROL_EXPANDED = wxCONTROL_SPECIAL,
/** Only for the status bar panes. */
@@ -441,6 +441,24 @@ public:
virtual void DrawPushButton(wxWindow* win, wxDC& dc, const wxRect& rect,
int flags = 0) = 0;
+ /**
+ Draw a collapse button.
+
+ @a flags may have the @c wxCONTROL_EXPANDED or @c wxCONTROL_CURRENT
+ bit set, see @ref wxCONTROL_FLAGS.
+
+ @since 3.1.0
+ */
+ virtual void DrawCollapseButton(wxWindow *win, wxDC& dc,
+ const wxRect& rect, int flags = 0) = 0;
+
+ /**
+ Returns the size of a collapse button.
+
+ @since 3.1.0
+ */
+ virtual wxSize GetCollapseButtonSize(wxWindow *win, wxDC& dc) = 0;
+
/**
Draw the border for sash window: this border must be such that the sash
drawn by DrawSplitterSash() blends into it well.
diff --git a/samples/render/render.cpp b/samples/render/render.cpp
index f0623855fc..a18ac4b274 100644
--- a/samples/render/render.cpp
+++ b/samples/render/render.cpp
@@ -125,6 +125,8 @@ private:
{ OnToggleDrawFlag(event, wxCONTROL_CURRENT); }
void OnDrawUndetermined(wxCommandEvent &event)
{ OnToggleDrawFlag(event, wxCONTROL_UNDETERMINED); }
+ void OnDrawSpecial(wxCommandEvent &event)
+ { OnToggleDrawFlag(event, wxCONTROL_SPECIAL); }
void OnAlignLeft(wxCommandEvent& WXUNUSED(event))
{ OnChangeAlign(wxALIGN_LEFT); }
@@ -198,7 +200,9 @@ private:
flagsString += "wxCONTROL_CHECKED ";
if ( m_flags & wxCONTROL_UNDETERMINED )
flagsString += "wxCONTROL_UNDETERMINED ";
- if ( flagsString.empty() )
+ if (m_flags & wxCONTROL_SPECIAL)
+ flagsString += "wxCONTROL_SPECIAL ";
+ if (flagsString.empty())
flagsString = "(none)";
dc.DrawText("Using flags: " + flagsString, x1, y);
y += lineHeight*3;
@@ -242,6 +246,12 @@ private:
wxRect(wxPoint(x2, y), sizeCheck), m_flags);
y += lineHeight + sizeCheck.y;
+ dc.DrawText("DrawCollapseButton()", x1, y);
+ const wxSize sizeCollapse = renderer.GetCollapseButtonSize(this, dc);
+ renderer.DrawCollapseButton(this, dc,
+ wxRect(wxPoint(x2, y), sizeCollapse), m_flags);
+ y += lineHeight + sizeCollapse.y;
+
dc.DrawText("DrawTreeItemButton()", x1, y);
renderer.DrawTreeItemButton(this, dc,
wxRect(x2, y, 20, 20), m_flags);
@@ -316,6 +326,7 @@ enum
Render_DrawChecked,
Render_DrawHot,
Render_DrawUndetermined,
+ Render_DrawSpecial,
Render_AlignLeft,
Render_AlignCentre,
@@ -352,6 +363,7 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Render_DrawChecked, MyFrame::OnDrawChecked)
EVT_MENU(Render_DrawHot, MyFrame::OnDrawHot)
EVT_MENU(Render_DrawUndetermined, MyFrame::OnDrawUndetermined)
+ EVT_MENU(Render_DrawSpecial, MyFrame::OnDrawSpecial)
EVT_MENU(Render_AlignLeft, MyFrame::OnAlignLeft)
EVT_MENU(Render_AlignCentre, MyFrame::OnAlignCentre)
EVT_MENU(Render_AlignRight, MyFrame::OnAlignRight)
@@ -432,6 +444,8 @@ MyFrame::MyFrame()
"Draw in &hot state\tCtrl-H");
menuFile->AppendCheckItem(Render_DrawUndetermined,
"Draw in unde&termined state\tCtrl-T");
+ menuFile->AppendCheckItem(Render_DrawSpecial,
+ "Draw in &special state\tCtrl-S");
menuFile->AppendSeparator();
menuFile->AppendRadioItem(Render_AlignLeft, "&Left align\tCtrl-1");
diff --git a/src/generic/collheaderctrlg.cpp b/src/generic/collheaderctrlg.cpp
new file mode 100644
index 0000000000..fc4c152158
--- /dev/null
+++ b/src/generic/collheaderctrlg.cpp
@@ -0,0 +1,193 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: src/generic/collheaderctrlg.cpp
+// Purpose: Generic wxCollapsibleHeaderCtrl implementation
+// Author: Tobias Taschner
+// Created: 2015-09-19
+// Copyright: (c) 2015 wxWidgets development team
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/defs.h"
+
+#if wxUSE_COLLPANE
+
+#include "wx/collheaderctrl.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/sizer.h"
+#endif // !WX_PRECOMP
+
+#include "wx/renderer.h"
+
+// if we have another implementation of this class we should extract
+// the lines below to a common file
+
+const char wxCollapsibleHeaderCtrlNameStr[] = "collapsibleHeader";
+
+wxDEFINE_EVENT(wxEVT_COLLAPSIBLEHEADER_CHANGED, wxCommandEvent);
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+void wxGenericCollapsibleHeaderCtrl::Init()
+{
+ m_collapsed = true;
+ m_inWindow = false;
+ m_mouseDown = false;
+}
+
+bool wxGenericCollapsibleHeaderCtrl::Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& label,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxValidator& validator,
+ const wxString& name)
+{
+ if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
+ return false;
+
+ SetLabel(label);
+
+ Bind(wxEVT_PAINT, &wxGenericCollapsibleHeaderCtrl::OnPaint, this);
+ Bind(wxEVT_LEFT_DOWN, &wxGenericCollapsibleHeaderCtrl::OnLeftDown, this);
+ Bind(wxEVT_LEFT_UP, &wxGenericCollapsibleHeaderCtrl::OnLeftUp, this);
+ Bind(wxEVT_ENTER_WINDOW, &wxGenericCollapsibleHeaderCtrl::OnEnterWindow, this);
+ Bind(wxEVT_LEAVE_WINDOW, &wxGenericCollapsibleHeaderCtrl::OnLeaveWindow, this);
+ Bind(wxEVT_CHAR, &wxGenericCollapsibleHeaderCtrl::OnChar, this);
+ Bind(wxEVT_SET_FOCUS, &wxGenericCollapsibleHeaderCtrl::OnFocus, this);
+ Bind(wxEVT_KILL_FOCUS, &wxGenericCollapsibleHeaderCtrl::OnFocus, this);
+
+ return true;
+}
+
+wxSize wxGenericCollapsibleHeaderCtrl::DoGetBestClientSize() const
+{
+ wxClientDC dc(const_cast(this));
+ wxSize btnSize = wxRendererNative::Get().GetCollapseButtonSize(const_cast(this), dc);
+ wxString text;
+ wxControl::FindAccelIndex(GetLabel(), &text);
+ wxSize textSize = dc.GetTextExtent(text);
+ // Add some padding if the label is not empty
+ if ( textSize.x > 0 )
+ textSize.x += FromDIP(4);
+
+ return wxSize(btnSize.x + textSize.x,
+ wxMax(textSize.y, btnSize.y));
+}
+
+void wxGenericCollapsibleHeaderCtrl::SetCollapsed(bool collapsed)
+{
+ m_collapsed = collapsed;
+ Refresh();
+}
+
+void wxGenericCollapsibleHeaderCtrl::DoSetCollapsed(bool collapsed)
+{
+ SetCollapsed(collapsed);
+
+ wxCommandEvent evt(wxEVT_COLLAPSIBLEHEADER_CHANGED, GetId());
+ evt.SetEventObject(this);
+ ProcessEvent(evt);
+}
+
+void wxGenericCollapsibleHeaderCtrl::OnFocus(wxFocusEvent& event)
+{
+ Refresh();
+ event.Skip();
+}
+
+void wxGenericCollapsibleHeaderCtrl::OnChar(wxKeyEvent& event)
+{
+ switch (event.GetKeyCode())
+ {
+ case WXK_SPACE:
+ case WXK_RETURN:
+ DoSetCollapsed(!m_collapsed);
+ break;
+ default:
+ event.Skip();
+ break;
+ }
+}
+
+void wxGenericCollapsibleHeaderCtrl::OnEnterWindow(wxMouseEvent& event)
+{
+ m_inWindow = true;
+ Refresh();
+ event.Skip();
+}
+
+void wxGenericCollapsibleHeaderCtrl::OnLeaveWindow(wxMouseEvent& event)
+{
+ m_inWindow = false;
+ Refresh();
+ event.Skip();
+}
+
+void wxGenericCollapsibleHeaderCtrl::OnLeftUp(wxMouseEvent& event)
+{
+ m_mouseDown = false;
+ DoSetCollapsed(!m_collapsed);
+ event.Skip();
+}
+
+void wxGenericCollapsibleHeaderCtrl::OnLeftDown(wxMouseEvent& event)
+{
+ m_mouseDown = true;
+ Refresh();
+ event.Skip();
+}
+
+void wxGenericCollapsibleHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
+{
+ wxPaintDC dc(this);
+
+ wxRect rect(wxPoint(0, 0), GetClientSize());
+
+ wxSize btnSize = wxRendererNative::Get().GetCollapseButtonSize(this, dc);
+
+ wxRect btnRect(wxPoint(0, 0), btnSize);
+ btnRect = btnRect.CenterIn(rect, wxVERTICAL);
+
+ int flags = 0;
+
+ if ( m_inWindow )
+ flags |= wxCONTROL_CURRENT;
+
+ if ( m_mouseDown )
+ flags |= wxCONTROL_PRESSED;
+
+ if ( !m_collapsed )
+ flags |= wxCONTROL_EXPANDED;
+
+ wxRendererNative::Get().DrawCollapseButton(this, dc, btnRect, flags);
+
+ wxString text;
+ int indexAccel = wxControl::FindAccelIndex(GetLabel(), &text);
+
+ wxSize textSize = dc.GetTextExtent(text);
+
+ wxRect textRect(wxPoint(btnSize.x + FromDIP(2), 0), textSize);
+ textRect = textRect.CenterIn(rect, wxVERTICAL);
+
+ dc.DrawLabel(text, textRect, wxALIGN_CENTRE_VERTICAL, indexAccel);
+
+ if ( HasFocus() )
+ wxRendererNative::Get().DrawFocusRect(this, dc, textRect.Inflate(1), flags);
+}
+
+
+#endif // wxUSE_COLLPANE
diff --git a/src/generic/collpaneg.cpp b/src/generic/collpaneg.cpp
index b3b7bcf297..ce91488e67 100644
--- a/src/generic/collpaneg.cpp
+++ b/src/generic/collpaneg.cpp
@@ -28,12 +28,12 @@
#ifndef WX_PRECOMP
#include "wx/toplevel.h"
- #include "wx/button.h"
#include "wx/sizer.h"
#include "wx/panel.h"
#endif // !WX_PRECOMP
#include "wx/statline.h"
+#include "wx/collheaderctrl.h"
// ----------------------------------------------------------------------------
// constants
@@ -54,7 +54,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxGenericCollapsiblePane, wxControl);
wxIMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneEvent, wxCommandEvent);
wxBEGIN_EVENT_TABLE(wxGenericCollapsiblePane, wxControl)
- EVT_BUTTON(wxID_ANY, wxGenericCollapsiblePane::OnButton)
+ EVT_COLLAPSIBLEHEADER_CHANGED(wxID_ANY, wxGenericCollapsiblePane::OnButton)
EVT_SIZE(wxGenericCollapsiblePane::OnSize)
wxEND_EVENT_TABLE()
@@ -78,26 +78,21 @@ bool wxGenericCollapsiblePane::Create(wxWindow *parent,
if ( !wxControl::Create(parent, id, pos, size, style, val, name) )
return false;
- m_strLabel = label;
-
// sizer containing the expand button and possibly a static line
- m_sz = new wxBoxSizer(wxHORIZONTAL);
+ m_sz = new wxBoxSizer(wxVERTICAL);
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
- // on Mac we use the special disclosure triangle button
- m_pStaticLine = NULL;
- m_pButton = new wxDisclosureTriangle(this, wxID_ANY, GetBtnLabel());
- m_sz->Add(m_pButton);
-#else
// create children and lay them out using a wxBoxSizer
// (so that we automatically get RTL features)
- m_pButton = new wxButton(this, wxID_ANY, GetBtnLabel(), wxPoint(0, 0),
- wxDefaultSize, wxBU_EXACTFIT);
- m_pStaticLine = new wxStaticLine(this, wxID_ANY);
+ m_pButton = new wxCollapsibleHeaderCtrl(this, wxID_ANY, label, wxPoint(0, 0),
+ wxDefaultSize);
// on other platforms we put the static line and the button horizontally
m_sz->Add(m_pButton, 0, wxLEFT|wxTOP|wxBOTTOM, GetBorder());
- m_sz->Add(m_pStaticLine, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, GetBorder());
+
+#if !defined( __WXMAC__ ) || defined(__WXUNIVERSAL__)
+ m_pStaticLine = new wxStaticLine(this, wxID_ANY);
+ m_sz->Add(m_pStaticLine, 0, wxEXPAND, GetBorder());
+ m_pStaticLine->Hide();
#endif
// FIXME: at least under wxCE and wxGTK1 the background is black if we don't do
@@ -143,16 +138,6 @@ wxSize wxGenericCollapsiblePane::DoGetBestSize() const
return sz;
}
-wxString wxGenericCollapsiblePane::GetBtnLabel() const
-{
- // on mac the triangle indicates the state, no string change
-#ifdef __WXMAC__
- return m_strLabel;
-#else
- return m_strLabel + (IsCollapsed() ? wxT(" >>") : wxT(" <<"));
-#endif
-}
-
void wxGenericCollapsiblePane::OnStateChange(const wxSize& sz)
{
// minimal size has priority over the best size so set here our min size
@@ -194,13 +179,11 @@ void wxGenericCollapsiblePane::Collapse(bool collapse)
// update our state
m_pPane->Show(!collapse);
- // update button label
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
- m_pButton->SetOpen( !collapse );
-#else
+ // update button
// NB: this must be done after updating our "state"
- m_pButton->SetLabel(GetBtnLabel());
-#endif
+ m_pButton->SetCollapsed(collapse);
+ if ( m_pStaticLine )
+ m_pStaticLine->Show(!collapse);
OnStateChange(GetBestSize());
@@ -208,17 +191,17 @@ void wxGenericCollapsiblePane::Collapse(bool collapse)
void wxGenericCollapsiblePane::SetLabel(const wxString &label)
{
- m_strLabel = label;
-#ifdef __WXMAC__
- m_pButton->SetLabel(GetBtnLabel());
-#else
- m_pButton->SetLabel(GetBtnLabel());
+ m_pButton->SetLabel(label);
m_pButton->SetInitialSize();
-#endif
Layout();
}
+wxString wxGenericCollapsiblePane::GetLabel() const
+{
+ return m_pButton->GetLabel();
+}
+
bool wxGenericCollapsiblePane::Layout()
{
#ifdef __WXMAC__
diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp
index 74578c9aed..96f3ac40d9 100644
--- a/src/generic/renderg.cpp
+++ b/src/generic/renderg.cpp
@@ -113,6 +113,13 @@ public:
const wxRect& rect,
int flags = 0) wxOVERRIDE;
+ virtual void DrawCollapseButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags = 0);
+
+ virtual wxSize GetCollapseButtonSize(wxWindow *win, wxDC& dc);
+
virtual void DrawItemSelectionRect(wxWindow *win,
wxDC& dc,
const wxRect& rect,
@@ -686,6 +693,42 @@ wxRendererGeneric::DrawPushButton(wxWindow *win,
dc.DrawRectangle(rect);
}
+void
+wxRendererGeneric::DrawCollapseButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ int arrowHalf = rect.width / 5;
+ int rectMid = rect.width / 2;
+ int arrowTopY = (rect.height / 2) - (arrowHalf / 2);
+
+ wxPoint pt[3];
+ if (flags & wxCONTROL_EXPANDED)
+ {
+ // This should always result in arrow with odd width.
+ pt[0] = wxPoint(rectMid - arrowHalf, arrowTopY);
+ pt[1] = wxPoint(rectMid + arrowHalf, arrowTopY);
+ pt[2] = wxPoint(rectMid, arrowTopY + arrowHalf);
+ }
+ else
+ {
+ // This should always result in arrow with odd height.
+ pt[0] = wxPoint(arrowTopY, rectMid - arrowHalf);
+ pt[1] = wxPoint(arrowTopY + arrowHalf, rectMid);
+ pt[2] = wxPoint(arrowTopY, rectMid + arrowHalf);
+ }
+
+ dc.SetBrush(wxBrush(win->GetForegroundColour()));
+ dc.SetPen(wxPen(win->GetForegroundColour()));
+ dc.DrawPolygon(WXSIZEOF(pt), pt, rect.x, rect.y);
+}
+
+wxSize wxRendererGeneric::GetCollapseButtonSize(wxWindow *WXUNUSED(win), wxDC& WXUNUSED(dc))
+{
+ return wxSize(18, 18);
+}
+
void
wxRendererGeneric::DrawItemSelectionRect(wxWindow * win,
wxDC& dc,
diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp
index 2e9eb80a80..3511b9f0d2 100644
--- a/src/msw/renderer.cpp
+++ b/src/msw/renderer.cpp
@@ -114,6 +114,15 @@
#define DTT_TEXTCOLOR (1UL << 0) // crText has been specified
#define DTT_STATEID (1UL << 8) // IStateId has been specified
+
+ #define TDLG_EXPANDOBUTTON 13
+
+ #define TDLGEBS_NORMAL 1
+ #define TDLGEBS_HOVER 2
+ #define TDLGEBS_PRESSED 3
+ #define TDLGEBS_EXPANDEDNORMAL 4
+ #define TDLGEBS_EXPANDEDHOVER 5
+ #define TDLGEBS_EXPANDEDPRESSED 6
#endif
#if defined(__WXWINCE__)
@@ -294,6 +303,13 @@ public:
m_rendererNative.DrawPushButton(win, dc, rect, flags);
}
+ virtual void DrawCollapseButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags = 0);
+
+ virtual wxSize GetCollapseButtonSize(wxWindow *win, wxDC& dc);
+
virtual void DrawItemSelectionRect(wxWindow *win,
wxDC& dc,
const wxRect& rect,
@@ -858,6 +874,74 @@ wxRendererXP::DrawTitleBarBitmap(wxWindow *win,
DoDrawButtonLike(hTheme, part, dc, rect, flags);
}
+void
+wxRendererXP::DrawCollapseButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ wxUxThemeHandle hTheme(win, L"TASKDIALOG");
+ wxUxThemeEngine* const te = wxUxThemeEngine::Get();
+
+ int state;
+ if (flags & wxCONTROL_PRESSED)
+ state = TDLGEBS_PRESSED;
+ else if (flags & wxCONTROL_CURRENT)
+ state = TDLGEBS_HOVER;
+ else
+ state = TDLGEBS_NORMAL;
+
+ if ( flags & wxCONTROL_EXPANDED )
+ state += 3;
+
+ if ( te->IsThemePartDefined(hTheme, TDLG_EXPANDOBUTTON, state) )
+ {
+ if (flags & wxCONTROL_EXPANDED)
+ flags |= wxCONTROL_CHECKED;
+
+ wxRect adjustedRect = dc.GetImpl()->MSWApplyGDIPlusTransform(rect);
+
+ RECT r;
+ wxCopyRectToRECT(adjustedRect, r);
+
+ te->DrawThemeBackground
+ (
+ hTheme,
+ GetHdcOf(dc.GetTempHDC()),
+ TDLG_EXPANDOBUTTON,
+ state,
+ &r,
+ NULL
+ );
+ }
+ else
+ m_rendererNative.DrawCollapseButton(win, dc, rect, flags);
+}
+
+wxSize wxRendererXP::GetCollapseButtonSize(wxWindow *win, wxDC& dc)
+{
+ wxUxThemeHandle hTheme(win, L"TASKDIALOG");
+ wxUxThemeEngine* const te = wxUxThemeEngine::Get();
+
+ // EXPANDOBUTTON scales ugly if not using the correct size, get size from theme
+
+ if ( te->IsThemePartDefined(hTheme, TDLG_EXPANDOBUTTON, TDLGEBS_NORMAL) )
+ {
+ SIZE s;
+ te->GetThemePartSize(hTheme,
+ GetHdcOf(dc.GetTempHDC()),
+ TDLG_EXPANDOBUTTON,
+ TDLGEBS_NORMAL,
+ NULL,
+ TS_TRUE,
+ &s);
+
+ return wxSize(s.cx, s.cy);
+ }
+ else
+ return m_rendererNative.GetCollapseButtonSize(win, dc);
+}
+
void
wxRendererXP::DrawItemSelectionRect(wxWindow *win,
wxDC& dc,
diff --git a/src/osx/button_osx.cpp b/src/osx/button_osx.cpp
index e604d21483..4ca954edeb 100644
--- a/src/osx/button_osx.cpp
+++ b/src/osx/button_osx.cpp
@@ -138,57 +138,3 @@ wxSize wxButtonBase::GetDefaultSize()
{
return wxAnyButton::GetDefaultSize();
}
-
-//-------------------------------------------------------
-// wxDisclosureTriangle
-//-------------------------------------------------------
-
-bool wxDisclosureTriangle::Create(wxWindow *parent, wxWindowID id, const wxString& label,
- const wxPoint& pos, const wxSize& size, long style,const wxValidator& validator, const wxString& name )
-{
- DontCreatePeer();
- if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
- return false;
-
- SetPeer(wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() ));
-
- MacPostControlCreate( pos, size );
- // passing the text in the param doesn't seem to work, so let's do it again
- SetLabel( label );
-
- return true;
-}
-
-void wxDisclosureTriangle::SetOpen( bool open )
-{
- GetPeer()->SetValue( open ? 1 : 0 );
-}
-
-bool wxDisclosureTriangle::IsOpen() const
-{
- return GetPeer()->GetValue() == 1;
-}
-
-bool wxDisclosureTriangle::OSXHandleClicked( double WXUNUSED(timestampsec) )
-{
- // Just emit button event for now
- wxCommandEvent event(wxEVT_BUTTON, m_windowId);
- event.SetEventObject(this);
- ProcessCommand(event);
-
- return true;
-}
-
-wxSize wxDisclosureTriangle::DoGetBestSize() const
-{
- wxSize size = wxWindow::DoGetBestSize();
-
- // under Carbon the base class GetBestSize() implementation doesn't seem to
- // take the label into account at all, correct for it here
-#if wxOSX_USE_CARBON
- size.x += GetTextExtent(GetLabel()).x;
-#endif // wxOSX_USE_CARBON
-
- return size;
-}
-
diff --git a/src/osx/cocoa/button.mm b/src/osx/cocoa/button.mm
index 0d28e306cc..a0cfe24a6c 100644
--- a/src/osx/cocoa/button.mm
+++ b/src/osx/cocoa/button.mm
@@ -361,155 +361,3 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
}
#endif // wxUSE_BMPBUTTON
-
-//
-// wxDisclosureButton implementation
-//
-
-@interface wxDisclosureNSButton : NSButton
-{
-
- BOOL isOpen;
-}
-
-- (void) updateImage;
-
-- (void) toggle;
-
-+ (NSImage *)rotateImage: (NSImage *)image;
-
-@end
-
-static const char * disc_triangle_xpm[] = {
-"10 9 4 1",
-" c None",
-". c #737373",
-"+ c #989898",
-"- c #c6c6c6",
-" .- ",
-" ..+- ",
-" ....+ ",
-" ......- ",
-" .......- ",
-" ......- ",
-" ....+ ",
-" ..+- ",
-" .- ",
-};
-
-@implementation wxDisclosureNSButton
-
-+ (void)initialize
-{
- static BOOL initialized = NO;
- if (!initialized)
- {
- initialized = YES;
- wxOSXCocoaClassAddWXMethods( self );
- }
-}
-
-- (id) initWithFrame:(NSRect) frame
-{
- self = [super initWithFrame:frame];
- isOpen = NO;
- [self setImagePosition:NSImageLeft];
- [self updateImage];
- return self;
-}
-
-- (int) intValue
-{
- return isOpen ? 1 : 0;
-}
-
-- (void) setIntValue: (int) v
-{
- isOpen = ( v != 0 );
- [self updateImage];
-}
-
-- (void) toggle
-{
- isOpen = !isOpen;
- [self updateImage];
-}
-
-wxCFRef downArray ;
-
-- (void) updateImage
-{
- static wxBitmap trianglebm(disc_triangle_xpm);
- if ( downArray.get() == NULL )
- {
- downArray.reset( [[wxDisclosureNSButton rotateImage:trianglebm.GetNSImage()] retain] );
- }
-
- if ( isOpen )
- [self setImage:(NSImage*)downArray.get()];
- else
- [self setImage:trianglebm.GetNSImage()];
-}
-
-+ (NSImage *)rotateImage: (NSImage *)image
-{
- NSSize imageSize = [image size];
- NSSize newImageSize = NSMakeSize(imageSize.height, imageSize.width);
- NSImage* newImage = [[NSImage alloc] initWithSize: newImageSize];
-
- [newImage lockFocus];
-
- NSAffineTransform* tm = [NSAffineTransform transform];
- [tm translateXBy:newImageSize.width/2 yBy:newImageSize.height/2];
- [tm rotateByDegrees:-90];
- [tm translateXBy:-newImageSize.width/2 yBy:-newImageSize.height/2];
- [tm concat];
-
-
- [image drawInRect:NSMakeRect(0,0,newImageSize.width, newImageSize.height)
- fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
-
- [newImage unlockFocus];
- return [newImage autorelease];
-}
-
-@end
-
-class wxDisclosureTriangleCocoaImpl : public wxWidgetCocoaImpl
-{
-public :
- wxDisclosureTriangleCocoaImpl(wxWindowMac* peer , WXWidget w) :
- wxWidgetCocoaImpl(peer, w)
- {
- }
-
- ~wxDisclosureTriangleCocoaImpl()
- {
- }
-
- virtual void controlAction(WXWidget slf, void* _cmd, void *sender) wxOVERRIDE
- {
- wxDisclosureNSButton* db = (wxDisclosureNSButton*)m_osxView;
- [db toggle];
- wxWidgetCocoaImpl::controlAction(slf, _cmd, sender );
- }
-};
-
-wxWidgetImplType* wxWidgetImpl::CreateDisclosureTriangle( wxWindowMac* wxpeer,
- wxWindowMac* WXUNUSED(parent),
- wxWindowID winid,
- const wxString& label,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- long WXUNUSED(extraStyle))
-{
- NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
- wxDisclosureNSButton* v = [[wxDisclosureNSButton alloc] initWithFrame:r];
- if ( !label.empty() )
- [v setTitle:wxCFStringRef(label).AsNSString()];
-
- SetBezelStyleFromBorderFlags(v, style, winid, label);
-
- return new wxDisclosureTriangleCocoaImpl( wxpeer, v );
-}