diff --git a/Makefile.in b/Makefile.in
index adbe666d46..88126075e8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2744,7 +2744,6 @@ COND_TOOLKIT_MSW_GUI_HDR = \
wx/msw/frame.h \
wx/msw/gauge.h \
wx/msw/gdiimage.h \
- wx/msw/headercol.h \
wx/msw/headerctrl.h \
wx/msw/icon.h \
wx/msw/imaglist.h \
@@ -3285,7 +3284,6 @@ COND_TOOLKIT_WINCE_GUI_HDR = \
wx/msw/frame.h \
wx/msw/gauge.h \
wx/msw/gdiimage.h \
- wx/msw/headercol.h \
wx/msw/headerctrl.h \
wx/msw/icon.h \
wx/msw/imaglist.h \
@@ -3639,7 +3637,6 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \
wx/generic/dirctrlg.h \
wx/generic/dragimgg.h \
wx/generic/filectrlg.h \
- wx/generic/headercol.h \
wx/generic/headerctrl.h \
wx/generic/logg.h \
wx/generic/msgdlgg.h \
@@ -4282,7 +4279,6 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS = \
monodll_dirctrlg.o \
monodll_dragimgg.o \
monodll_filectrlg.o \
- monodll_headercolg.o \
monodll_headerctrlg.o \
monodll_listbkg.o \
monodll_logg.o \
@@ -4473,7 +4469,6 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS = \
monodll_dirctrlg.o \
monodll_dragimgg.o \
monodll_filectrlg.o \
- monodll_headercolg.o \
monodll_headerctrlg.o \
monodll_listbkg.o \
monodll_logg.o \
@@ -5084,7 +5079,6 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS = \
monodll_msw_filedlg.o \
monodll_msw_frame.o \
monodll_msw_gauge.o \
- monodll_headercol.o \
monodll_headerctrl.o \
monodll_msw_iniconf.o \
monodll_msw_listbox.o \
@@ -5321,7 +5315,6 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS = \
monodll_msw_filedlg.o \
monodll_msw_frame.o \
monodll_msw_gauge.o \
- monodll_headercol.o \
monodll_headerctrl.o \
monodll_msw_iniconf.o \
monodll_msw_listbox.o \
@@ -6106,7 +6099,6 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_1 = \
monolib_dirctrlg.o \
monolib_dragimgg.o \
monolib_filectrlg.o \
- monolib_headercolg.o \
monolib_headerctrlg.o \
monolib_listbkg.o \
monolib_logg.o \
@@ -6297,7 +6289,6 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1 = \
monolib_dirctrlg.o \
monolib_dragimgg.o \
monolib_filectrlg.o \
- monolib_headercolg.o \
monolib_headerctrlg.o \
monolib_listbkg.o \
monolib_logg.o \
@@ -6908,7 +6899,6 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_1 = \
monolib_msw_filedlg.o \
monolib_msw_frame.o \
monolib_msw_gauge.o \
- monolib_headercol.o \
monolib_headerctrl.o \
monolib_msw_iniconf.o \
monolib_msw_listbox.o \
@@ -7145,7 +7135,6 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_1 = \
monolib_msw_filedlg.o \
monolib_msw_frame.o \
monolib_msw_gauge.o \
- monolib_headercol.o \
monolib_headerctrl.o \
monolib_msw_iniconf.o \
monolib_msw_listbox.o \
@@ -8080,7 +8069,6 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_2 = \
coredll_dirctrlg.o \
coredll_dragimgg.o \
coredll_filectrlg.o \
- coredll_headercolg.o \
coredll_headerctrlg.o \
coredll_listbkg.o \
coredll_logg.o \
@@ -8271,7 +8259,6 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2 = \
coredll_dirctrlg.o \
coredll_dragimgg.o \
coredll_filectrlg.o \
- coredll_headercolg.o \
coredll_headerctrlg.o \
coredll_listbkg.o \
coredll_logg.o \
@@ -8882,7 +8869,6 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_2 = \
coredll_msw_filedlg.o \
coredll_msw_frame.o \
coredll_msw_gauge.o \
- coredll_headercol.o \
coredll_headerctrl.o \
coredll_msw_iniconf.o \
coredll_msw_listbox.o \
@@ -9119,7 +9105,6 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_2 = \
coredll_msw_filedlg.o \
coredll_msw_frame.o \
coredll_msw_gauge.o \
- coredll_headercol.o \
coredll_headerctrl.o \
coredll_msw_iniconf.o \
coredll_msw_listbox.o \
@@ -9596,7 +9581,6 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_3 = \
corelib_dirctrlg.o \
corelib_dragimgg.o \
corelib_filectrlg.o \
- corelib_headercolg.o \
corelib_headerctrlg.o \
corelib_listbkg.o \
corelib_logg.o \
@@ -9787,7 +9771,6 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3 = \
corelib_dirctrlg.o \
corelib_dragimgg.o \
corelib_filectrlg.o \
- corelib_headercolg.o \
corelib_headerctrlg.o \
corelib_listbkg.o \
corelib_logg.o \
@@ -10398,7 +10381,6 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_3 = \
corelib_msw_filedlg.o \
corelib_msw_frame.o \
corelib_msw_gauge.o \
- corelib_headercol.o \
corelib_headerctrl.o \
corelib_msw_iniconf.o \
corelib_msw_listbox.o \
@@ -10635,7 +10617,6 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_3 = \
corelib_msw_filedlg.o \
corelib_msw_frame.o \
corelib_msw_gauge.o \
- corelib_headercol.o \
corelib_headerctrl.o \
corelib_msw_iniconf.o \
corelib_msw_listbox.o \
@@ -17778,12 +17759,6 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_msw_gauge.o: $(srcdir)/src/msw/gauge.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/gauge.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_headercol.o: $(srcdir)/src/msw/headercol.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_headercol.o: $(srcdir)/src/msw/headercol.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_headerctrl.o: $(srcdir)/src/msw/headerctrl.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/headerctrl.cpp
@@ -18477,9 +18452,6 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@monodll_filectrlg.o: $(srcdir)/src/generic/filectrlg.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/filectrlg.cpp
-@COND_USE_GUI_1@monodll_headercolg.o: $(srcdir)/src/generic/headercolg.cpp $(MONODLL_ODEP)
-@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/headercolg.cpp
-
@COND_USE_GUI_1@monodll_headerctrlg.o: $(srcdir)/src/generic/headerctrlg.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/generic/headerctrlg.cpp
@@ -22482,12 +22454,6 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_msw_gauge.o: $(srcdir)/src/msw/gauge.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/gauge.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_headercol.o: $(srcdir)/src/msw/headercol.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_headercol.o: $(srcdir)/src/msw/headercol.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_headerctrl.o: $(srcdir)/src/msw/headerctrl.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/headerctrl.cpp
@@ -23181,9 +23147,6 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@monolib_filectrlg.o: $(srcdir)/src/generic/filectrlg.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/filectrlg.cpp
-@COND_USE_GUI_1@monolib_headercolg.o: $(srcdir)/src/generic/headercolg.cpp $(MONOLIB_ODEP)
-@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/headercolg.cpp
-
@COND_USE_GUI_1@monolib_headerctrlg.o: $(srcdir)/src/generic/headerctrlg.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/generic/headerctrlg.cpp
@@ -27375,12 +27338,6 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_msw_gauge.o: $(srcdir)/src/msw/gauge.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/gauge.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_headercol.o: $(srcdir)/src/msw/headercol.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_headercol.o: $(srcdir)/src/msw/headercol.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_headerctrl.o: $(srcdir)/src/msw/headerctrl.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/headerctrl.cpp
@@ -28074,9 +28031,6 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@coredll_filectrlg.o: $(srcdir)/src/generic/filectrlg.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/filectrlg.cpp
-@COND_USE_GUI_1@coredll_headercolg.o: $(srcdir)/src/generic/headercolg.cpp $(COREDLL_ODEP)
-@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/headercolg.cpp
-
@COND_USE_GUI_1@coredll_headerctrlg.o: $(srcdir)/src/generic/headerctrlg.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/headerctrlg.cpp
@@ -30906,12 +30860,6 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_msw_gauge.o: $(srcdir)/src/msw/gauge.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/gauge.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_headercol.o: $(srcdir)/src/msw/headercol.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_headercol.o: $(srcdir)/src/msw/headercol.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/headercol.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_headerctrl.o: $(srcdir)/src/msw/headerctrl.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/headerctrl.cpp
@@ -31605,9 +31553,6 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@corelib_filectrlg.o: $(srcdir)/src/generic/filectrlg.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/filectrlg.cpp
-@COND_USE_GUI_1@corelib_headercolg.o: $(srcdir)/src/generic/headercolg.cpp $(CORELIB_ODEP)
-@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/headercolg.cpp
-
@COND_USE_GUI_1@corelib_headerctrlg.o: $(srcdir)/src/generic/headerctrlg.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/headerctrlg.cpp
diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl
index 12ae0f58cd..91b1c34f4d 100644
--- a/build/bakefiles/files.bkl
+++ b/build/bakefiles/files.bkl
@@ -713,7 +713,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/dirctrlg.cpp
src/generic/dragimgg.cpp
src/generic/filectrlg.cpp
- src/generic/headercolg.cpp
src/generic/headerctrlg.cpp
src/generic/listbkg.cpp
src/generic/logg.cpp
@@ -778,7 +777,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/generic/dirctrlg.h
wx/generic/dragimgg.h
wx/generic/filectrlg.h
- wx/generic/headercol.h
wx/generic/headerctrl.h
wx/generic/logg.h
wx/generic/msgdlgg.h
@@ -1647,7 +1645,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/msw/filedlg.cpp
src/msw/frame.cpp
src/msw/gauge.cpp
- src/msw/headercol.cpp
src/msw/headerctrl.cpp
src/msw/iniconf.cpp
src/msw/listbox.cpp
@@ -1718,7 +1715,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/msw/frame.h
wx/msw/gauge.h
wx/msw/gdiimage.h
- wx/msw/headercol.h
wx/msw/headerctrl.h
wx/msw/icon.h
wx/msw/imaglist.h
diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc
index acccaaccce..90b61eba64 100644
--- a/build/msw/makefile.bcc
+++ b/build/msw/makefile.bcc
@@ -1599,7 +1599,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_filedlg.obj \
$(OBJS)\monodll_frame.obj \
$(OBJS)\monodll_gauge.obj \
- $(OBJS)\monodll_headercol.obj \
$(OBJS)\monodll_headerctrl.obj \
$(OBJS)\monodll_iniconf.obj \
$(OBJS)\monodll_listbox.obj \
@@ -1743,7 +1742,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_dirctrlg.obj \
$(OBJS)\monodll_dragimgg.obj \
$(OBJS)\monodll_filectrlg.obj \
- $(OBJS)\monodll_headercolg.obj \
$(OBJS)\monodll_headerctrlg.obj \
$(OBJS)\monodll_listbkg.obj \
$(OBJS)\monodll_logg.obj \
@@ -1981,7 +1979,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_dirctrlg.obj \
$(OBJS)\monodll_dragimgg.obj \
$(OBJS)\monodll_filectrlg.obj \
- $(OBJS)\monodll_headercolg.obj \
$(OBJS)\monodll_headerctrlg.obj \
$(OBJS)\monodll_listbkg.obj \
$(OBJS)\monodll_logg.obj \
@@ -2277,7 +2274,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_filedlg.obj \
$(OBJS)\monolib_frame.obj \
$(OBJS)\monolib_gauge.obj \
- $(OBJS)\monolib_headercol.obj \
$(OBJS)\monolib_headerctrl.obj \
$(OBJS)\monolib_iniconf.obj \
$(OBJS)\monolib_listbox.obj \
@@ -2421,7 +2417,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_dirctrlg.obj \
$(OBJS)\monolib_dragimgg.obj \
$(OBJS)\monolib_filectrlg.obj \
- $(OBJS)\monolib_headercolg.obj \
$(OBJS)\monolib_headerctrlg.obj \
$(OBJS)\monolib_listbkg.obj \
$(OBJS)\monolib_logg.obj \
@@ -2659,7 +2654,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_dirctrlg.obj \
$(OBJS)\monolib_dragimgg.obj \
$(OBJS)\monolib_filectrlg.obj \
- $(OBJS)\monolib_headercolg.obj \
$(OBJS)\monolib_headerctrlg.obj \
$(OBJS)\monolib_listbkg.obj \
$(OBJS)\monolib_logg.obj \
@@ -2860,7 +2854,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_filedlg.obj \
$(OBJS)\coredll_frame.obj \
$(OBJS)\coredll_gauge.obj \
- $(OBJS)\coredll_headercol.obj \
$(OBJS)\coredll_headerctrl.obj \
$(OBJS)\coredll_iniconf.obj \
$(OBJS)\coredll_listbox.obj \
@@ -3004,7 +2997,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_dirctrlg.obj \
$(OBJS)\coredll_dragimgg.obj \
$(OBJS)\coredll_filectrlg.obj \
- $(OBJS)\coredll_headercolg.obj \
$(OBJS)\coredll_headerctrlg.obj \
$(OBJS)\coredll_listbkg.obj \
$(OBJS)\coredll_logg.obj \
@@ -3242,7 +3234,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_dirctrlg.obj \
$(OBJS)\coredll_dragimgg.obj \
$(OBJS)\coredll_filectrlg.obj \
- $(OBJS)\coredll_headercolg.obj \
$(OBJS)\coredll_headerctrlg.obj \
$(OBJS)\coredll_listbkg.obj \
$(OBJS)\coredll_logg.obj \
@@ -3342,7 +3333,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_filedlg.obj \
$(OBJS)\corelib_frame.obj \
$(OBJS)\corelib_gauge.obj \
- $(OBJS)\corelib_headercol.obj \
$(OBJS)\corelib_headerctrl.obj \
$(OBJS)\corelib_iniconf.obj \
$(OBJS)\corelib_listbox.obj \
@@ -3486,7 +3476,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_dirctrlg.obj \
$(OBJS)\corelib_dragimgg.obj \
$(OBJS)\corelib_filectrlg.obj \
- $(OBJS)\corelib_headercolg.obj \
$(OBJS)\corelib_headerctrlg.obj \
$(OBJS)\corelib_listbkg.obj \
$(OBJS)\corelib_logg.obj \
@@ -3724,7 +3713,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_dirctrlg.obj \
$(OBJS)\corelib_dragimgg.obj \
$(OBJS)\corelib_filectrlg.obj \
- $(OBJS)\corelib_headercolg.obj \
$(OBJS)\corelib_headerctrlg.obj \
$(OBJS)\corelib_listbkg.obj \
$(OBJS)\corelib_logg.obj \
@@ -5751,9 +5739,6 @@ $(OBJS)\monodll_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\monodll_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\monodll_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\monodll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -7321,11 +7306,6 @@ $(OBJS)\monodll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monodll_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
@@ -7968,9 +7948,6 @@ $(OBJS)\monolib_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\monolib_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\monolib_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\monolib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -9538,11 +9515,6 @@ $(OBJS)\monolib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monolib_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
@@ -10572,9 +10544,6 @@ $(OBJS)\coredll_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\coredll_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\coredll_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\coredll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -11779,11 +11748,6 @@ $(OBJS)\coredll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\coredll_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
@@ -11942,9 +11906,6 @@ $(OBJS)\corelib_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\corelib_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\corelib_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\corelib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -13149,11 +13110,6 @@ $(OBJS)\corelib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\corelib_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc
index 4d43d226a0..663281f906 100644
--- a/build/msw/makefile.gcc
+++ b/build/msw/makefile.gcc
@@ -1617,7 +1617,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_filedlg.o \
$(OBJS)\monodll_frame.o \
$(OBJS)\monodll_gauge.o \
- $(OBJS)\monodll_headercol.o \
$(OBJS)\monodll_headerctrl.o \
$(OBJS)\monodll_iniconf.o \
$(OBJS)\monodll_listbox.o \
@@ -1761,7 +1760,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_dirctrlg.o \
$(OBJS)\monodll_dragimgg.o \
$(OBJS)\monodll_filectrlg.o \
- $(OBJS)\monodll_headercolg.o \
$(OBJS)\monodll_headerctrlg.o \
$(OBJS)\monodll_listbkg.o \
$(OBJS)\monodll_logg.o \
@@ -2001,7 +1999,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_dirctrlg.o \
$(OBJS)\monodll_dragimgg.o \
$(OBJS)\monodll_filectrlg.o \
- $(OBJS)\monodll_headercolg.o \
$(OBJS)\monodll_headerctrlg.o \
$(OBJS)\monodll_listbkg.o \
$(OBJS)\monodll_logg.o \
@@ -2301,7 +2298,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_filedlg.o \
$(OBJS)\monolib_frame.o \
$(OBJS)\monolib_gauge.o \
- $(OBJS)\monolib_headercol.o \
$(OBJS)\monolib_headerctrl.o \
$(OBJS)\monolib_iniconf.o \
$(OBJS)\monolib_listbox.o \
@@ -2445,7 +2441,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_dirctrlg.o \
$(OBJS)\monolib_dragimgg.o \
$(OBJS)\monolib_filectrlg.o \
- $(OBJS)\monolib_headercolg.o \
$(OBJS)\monolib_headerctrlg.o \
$(OBJS)\monolib_listbkg.o \
$(OBJS)\monolib_logg.o \
@@ -2685,7 +2680,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_dirctrlg.o \
$(OBJS)\monolib_dragimgg.o \
$(OBJS)\monolib_filectrlg.o \
- $(OBJS)\monolib_headercolg.o \
$(OBJS)\monolib_headerctrlg.o \
$(OBJS)\monolib_listbkg.o \
$(OBJS)\monolib_logg.o \
@@ -2900,7 +2894,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_filedlg.o \
$(OBJS)\coredll_frame.o \
$(OBJS)\coredll_gauge.o \
- $(OBJS)\coredll_headercol.o \
$(OBJS)\coredll_headerctrl.o \
$(OBJS)\coredll_iniconf.o \
$(OBJS)\coredll_listbox.o \
@@ -3044,7 +3037,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_dirctrlg.o \
$(OBJS)\coredll_dragimgg.o \
$(OBJS)\coredll_filectrlg.o \
- $(OBJS)\coredll_headercolg.o \
$(OBJS)\coredll_headerctrlg.o \
$(OBJS)\coredll_listbkg.o \
$(OBJS)\coredll_logg.o \
@@ -3284,7 +3276,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_dirctrlg.o \
$(OBJS)\coredll_dragimgg.o \
$(OBJS)\coredll_filectrlg.o \
- $(OBJS)\coredll_headercolg.o \
$(OBJS)\coredll_headerctrlg.o \
$(OBJS)\coredll_listbkg.o \
$(OBJS)\coredll_logg.o \
@@ -3390,7 +3381,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_filedlg.o \
$(OBJS)\corelib_frame.o \
$(OBJS)\corelib_gauge.o \
- $(OBJS)\corelib_headercol.o \
$(OBJS)\corelib_headerctrl.o \
$(OBJS)\corelib_iniconf.o \
$(OBJS)\corelib_listbox.o \
@@ -3534,7 +3524,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_dirctrlg.o \
$(OBJS)\corelib_dragimgg.o \
$(OBJS)\corelib_filectrlg.o \
- $(OBJS)\corelib_headercolg.o \
$(OBJS)\corelib_headerctrlg.o \
$(OBJS)\corelib_listbkg.o \
$(OBJS)\corelib_logg.o \
@@ -3774,7 +3763,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_dirctrlg.o \
$(OBJS)\corelib_dragimgg.o \
$(OBJS)\corelib_filectrlg.o \
- $(OBJS)\corelib_headercolg.o \
$(OBJS)\corelib_headerctrlg.o \
$(OBJS)\corelib_listbkg.o \
$(OBJS)\corelib_logg.o \
@@ -5903,9 +5891,6 @@ $(OBJS)\monodll_filedlg.o: ../../src/msw/filedlg.cpp
$(OBJS)\monodll_frame.o: ../../src/msw/frame.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
-$(OBJS)\monodll_headercol.o: ../../src/msw/headercol.cpp
- $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
-
$(OBJS)\monodll_headerctrl.o: ../../src/msw/headerctrl.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@@ -7585,11 +7570,6 @@ $(OBJS)\monodll_filectrlg.o: ../../src/generic/filectrlg.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\monodll_headercolg.o: ../../src/generic/headercolg.cpp
- $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_headerctrlg.o: ../../src/generic/headerctrlg.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@@ -8234,9 +8214,6 @@ $(OBJS)\monolib_filedlg.o: ../../src/msw/filedlg.cpp
$(OBJS)\monolib_frame.o: ../../src/msw/frame.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
-$(OBJS)\monolib_headercol.o: ../../src/msw/headercol.cpp
- $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
-
$(OBJS)\monolib_headerctrl.o: ../../src/msw/headerctrl.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@@ -9916,11 +9893,6 @@ $(OBJS)\monolib_filectrlg.o: ../../src/generic/filectrlg.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\monolib_headercolg.o: ../../src/generic/headercolg.cpp
- $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_headerctrlg.o: ../../src/generic/headerctrlg.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@@ -10952,9 +10924,6 @@ $(OBJS)\coredll_filedlg.o: ../../src/msw/filedlg.cpp
$(OBJS)\coredll_frame.o: ../../src/msw/frame.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
-$(OBJS)\coredll_headercol.o: ../../src/msw/headercol.cpp
- $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
-
$(OBJS)\coredll_headerctrl.o: ../../src/msw/headerctrl.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
@@ -12271,11 +12240,6 @@ $(OBJS)\coredll_filectrlg.o: ../../src/generic/filectrlg.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\coredll_headercolg.o: ../../src/generic/headercolg.cpp
- $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\coredll_headerctrlg.o: ../../src/generic/headerctrlg.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
@@ -12434,9 +12398,6 @@ $(OBJS)\corelib_filedlg.o: ../../src/msw/filedlg.cpp
$(OBJS)\corelib_frame.o: ../../src/msw/frame.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
-$(OBJS)\corelib_headercol.o: ../../src/msw/headercol.cpp
- $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
-
$(OBJS)\corelib_headerctrl.o: ../../src/msw/headerctrl.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
@@ -13753,11 +13714,6 @@ $(OBJS)\corelib_filectrlg.o: ../../src/generic/filectrlg.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\corelib_headercolg.o: ../../src/generic/headercolg.cpp
- $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\corelib_headerctrlg.o: ../../src/generic/headerctrlg.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc
index ebb6d00ec8..2ed31907f2 100644
--- a/build/msw/makefile.vc
+++ b/build/msw/makefile.vc
@@ -1779,7 +1779,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_filedlg.obj \
$(OBJS)\monodll_frame.obj \
$(OBJS)\monodll_gauge.obj \
- $(OBJS)\monodll_headercol.obj \
$(OBJS)\monodll_headerctrl.obj \
$(OBJS)\monodll_iniconf.obj \
$(OBJS)\monodll_listbox.obj \
@@ -1923,7 +1922,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_dirctrlg.obj \
$(OBJS)\monodll_dragimgg.obj \
$(OBJS)\monodll_filectrlg.obj \
- $(OBJS)\monodll_headercolg.obj \
$(OBJS)\monodll_headerctrlg.obj \
$(OBJS)\monodll_listbkg.obj \
$(OBJS)\monodll_logg.obj \
@@ -2161,7 +2159,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_dirctrlg.obj \
$(OBJS)\monodll_dragimgg.obj \
$(OBJS)\monodll_filectrlg.obj \
- $(OBJS)\monodll_headercolg.obj \
$(OBJS)\monodll_headerctrlg.obj \
$(OBJS)\monodll_listbkg.obj \
$(OBJS)\monodll_logg.obj \
@@ -2463,7 +2460,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_filedlg.obj \
$(OBJS)\monolib_frame.obj \
$(OBJS)\monolib_gauge.obj \
- $(OBJS)\monolib_headercol.obj \
$(OBJS)\monolib_headerctrl.obj \
$(OBJS)\monolib_iniconf.obj \
$(OBJS)\monolib_listbox.obj \
@@ -2607,7 +2603,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_dirctrlg.obj \
$(OBJS)\monolib_dragimgg.obj \
$(OBJS)\monolib_filectrlg.obj \
- $(OBJS)\monolib_headercolg.obj \
$(OBJS)\monolib_headerctrlg.obj \
$(OBJS)\monolib_listbkg.obj \
$(OBJS)\monolib_logg.obj \
@@ -2845,7 +2840,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_dirctrlg.obj \
$(OBJS)\monolib_dragimgg.obj \
$(OBJS)\monolib_filectrlg.obj \
- $(OBJS)\monolib_headercolg.obj \
$(OBJS)\monolib_headerctrlg.obj \
$(OBJS)\monolib_listbkg.obj \
$(OBJS)\monolib_logg.obj \
@@ -3076,7 +3070,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_filedlg.obj \
$(OBJS)\coredll_frame.obj \
$(OBJS)\coredll_gauge.obj \
- $(OBJS)\coredll_headercol.obj \
$(OBJS)\coredll_headerctrl.obj \
$(OBJS)\coredll_iniconf.obj \
$(OBJS)\coredll_listbox.obj \
@@ -3220,7 +3213,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_dirctrlg.obj \
$(OBJS)\coredll_dragimgg.obj \
$(OBJS)\coredll_filectrlg.obj \
- $(OBJS)\coredll_headercolg.obj \
$(OBJS)\coredll_headerctrlg.obj \
$(OBJS)\coredll_listbkg.obj \
$(OBJS)\coredll_logg.obj \
@@ -3458,7 +3450,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
$(OBJS)\coredll_dirctrlg.obj \
$(OBJS)\coredll_dragimgg.obj \
$(OBJS)\coredll_filectrlg.obj \
- $(OBJS)\coredll_headercolg.obj \
$(OBJS)\coredll_headerctrlg.obj \
$(OBJS)\coredll_listbkg.obj \
$(OBJS)\coredll_logg.obj \
@@ -3564,7 +3555,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_filedlg.obj \
$(OBJS)\corelib_frame.obj \
$(OBJS)\corelib_gauge.obj \
- $(OBJS)\corelib_headercol.obj \
$(OBJS)\corelib_headerctrl.obj \
$(OBJS)\corelib_iniconf.obj \
$(OBJS)\corelib_listbox.obj \
@@ -3708,7 +3698,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_dirctrlg.obj \
$(OBJS)\corelib_dragimgg.obj \
$(OBJS)\corelib_filectrlg.obj \
- $(OBJS)\corelib_headercolg.obj \
$(OBJS)\corelib_headerctrlg.obj \
$(OBJS)\corelib_listbkg.obj \
$(OBJS)\corelib_logg.obj \
@@ -3946,7 +3935,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
$(OBJS)\corelib_dirctrlg.obj \
$(OBJS)\corelib_dragimgg.obj \
$(OBJS)\corelib_filectrlg.obj \
- $(OBJS)\corelib_headercolg.obj \
$(OBJS)\corelib_headerctrlg.obj \
$(OBJS)\corelib_listbkg.obj \
$(OBJS)\corelib_logg.obj \
@@ -6097,9 +6085,6 @@ $(OBJS)\monodll_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\monodll_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\monodll_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\monodll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -7667,11 +7652,6 @@ $(OBJS)\monodll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monodll_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
@@ -8314,9 +8294,6 @@ $(OBJS)\monolib_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\monolib_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\monolib_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\monolib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -9884,11 +9861,6 @@ $(OBJS)\monolib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monolib_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
@@ -10918,9 +10890,6 @@ $(OBJS)\coredll_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\coredll_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\coredll_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\coredll_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -12125,11 +12094,6 @@ $(OBJS)\coredll_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\coredll_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
@@ -12288,9 +12252,6 @@ $(OBJS)\corelib_filedlg.obj: ..\..\src\msw\filedlg.cpp
$(OBJS)\corelib_frame.obj: ..\..\src\msw\frame.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\frame.cpp
-$(OBJS)\corelib_headercol.obj: ..\..\src\msw\headercol.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\headercol.cpp
-
$(OBJS)\corelib_headerctrl.obj: ..\..\src\msw\headerctrl.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\headerctrl.cpp
@@ -13495,11 +13456,6 @@ $(OBJS)\corelib_filectrlg.obj: ..\..\src\generic\filectrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\filectrlg.cpp
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\corelib_headercolg.obj: ..\..\src\generic\headercolg.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\headercolg.cpp
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_headerctrlg.obj: ..\..\src\generic\headerctrlg.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\generic\headerctrlg.cpp
diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat
index a039bfa0b7..873d10674d 100644
--- a/build/msw/makefile.wat
+++ b/build/msw/makefile.wat
@@ -290,7 +290,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_filedlg.obj &
$(OBJS)\monodll_frame.obj &
$(OBJS)\monodll_gauge.obj &
- $(OBJS)\monodll_headercol.obj &
$(OBJS)\monodll_headerctrl.obj &
$(OBJS)\monodll_iniconf.obj &
$(OBJS)\monodll_listbox.obj &
@@ -434,7 +433,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_dirctrlg.obj &
$(OBJS)\monodll_dragimgg.obj &
$(OBJS)\monodll_filectrlg.obj &
- $(OBJS)\monodll_headercolg.obj &
$(OBJS)\monodll_headerctrlg.obj &
$(OBJS)\monodll_listbkg.obj &
$(OBJS)\monodll_logg.obj &
@@ -674,7 +672,6 @@ ____CORE_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_dirctrlg.obj &
$(OBJS)\monodll_dragimgg.obj &
$(OBJS)\monodll_filectrlg.obj &
- $(OBJS)\monodll_headercolg.obj &
$(OBJS)\monodll_headerctrlg.obj &
$(OBJS)\monodll_listbkg.obj &
$(OBJS)\monodll_logg.obj &
@@ -979,7 +976,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_filedlg.obj &
$(OBJS)\monolib_frame.obj &
$(OBJS)\monolib_gauge.obj &
- $(OBJS)\monolib_headercol.obj &
$(OBJS)\monolib_headerctrl.obj &
$(OBJS)\monolib_iniconf.obj &
$(OBJS)\monolib_listbox.obj &
@@ -1123,7 +1119,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_dirctrlg.obj &
$(OBJS)\monolib_dragimgg.obj &
$(OBJS)\monolib_filectrlg.obj &
- $(OBJS)\monolib_headercolg.obj &
$(OBJS)\monolib_headerctrlg.obj &
$(OBJS)\monolib_listbkg.obj &
$(OBJS)\monolib_logg.obj &
@@ -1363,7 +1358,6 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_dirctrlg.obj &
$(OBJS)\monolib_dragimgg.obj &
$(OBJS)\monolib_filectrlg.obj &
- $(OBJS)\monolib_headercolg.obj &
$(OBJS)\monolib_headerctrlg.obj &
$(OBJS)\monolib_listbkg.obj &
$(OBJS)\monolib_logg.obj &
@@ -1589,7 +1583,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = &
$(OBJS)\coredll_filedlg.obj &
$(OBJS)\coredll_frame.obj &
$(OBJS)\coredll_gauge.obj &
- $(OBJS)\coredll_headercol.obj &
$(OBJS)\coredll_headerctrl.obj &
$(OBJS)\coredll_iniconf.obj &
$(OBJS)\coredll_listbox.obj &
@@ -1733,7 +1726,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = &
$(OBJS)\coredll_dirctrlg.obj &
$(OBJS)\coredll_dragimgg.obj &
$(OBJS)\coredll_filectrlg.obj &
- $(OBJS)\coredll_headercolg.obj &
$(OBJS)\coredll_headerctrlg.obj &
$(OBJS)\coredll_listbkg.obj &
$(OBJS)\coredll_logg.obj &
@@ -1973,7 +1965,6 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = &
$(OBJS)\coredll_dirctrlg.obj &
$(OBJS)\coredll_dragimgg.obj &
$(OBJS)\coredll_filectrlg.obj &
- $(OBJS)\coredll_headercolg.obj &
$(OBJS)\coredll_headerctrlg.obj &
$(OBJS)\coredll_listbkg.obj &
$(OBJS)\coredll_logg.obj &
@@ -2081,7 +2072,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = &
$(OBJS)\corelib_filedlg.obj &
$(OBJS)\corelib_frame.obj &
$(OBJS)\corelib_gauge.obj &
- $(OBJS)\corelib_headercol.obj &
$(OBJS)\corelib_headerctrl.obj &
$(OBJS)\corelib_iniconf.obj &
$(OBJS)\corelib_listbox.obj &
@@ -2225,7 +2215,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = &
$(OBJS)\corelib_dirctrlg.obj &
$(OBJS)\corelib_dragimgg.obj &
$(OBJS)\corelib_filectrlg.obj &
- $(OBJS)\corelib_headercolg.obj &
$(OBJS)\corelib_headerctrlg.obj &
$(OBJS)\corelib_listbkg.obj &
$(OBJS)\corelib_logg.obj &
@@ -2465,7 +2454,6 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = &
$(OBJS)\corelib_dirctrlg.obj &
$(OBJS)\corelib_dragimgg.obj &
$(OBJS)\corelib_filectrlg.obj &
- $(OBJS)\corelib_headercolg.obj &
$(OBJS)\corelib_headerctrlg.obj &
$(OBJS)\corelib_listbkg.obj &
$(OBJS)\corelib_logg.obj &
@@ -6148,9 +6136,6 @@ $(OBJS)\monodll_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp
$(OBJS)\monodll_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
-$(OBJS)\monodll_headercol.obj : .AUTODEPEND ..\..\src\msw\headercol.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
-
$(OBJS)\monodll_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
@@ -7830,11 +7815,6 @@ $(OBJS)\monodll_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\monodll_headercolg.obj : .AUTODEPEND ..\..\src\generic\headercolg.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\monodll_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
@@ -8479,9 +8459,6 @@ $(OBJS)\monolib_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp
$(OBJS)\monolib_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
-$(OBJS)\monolib_headercol.obj : .AUTODEPEND ..\..\src\msw\headercol.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
-
$(OBJS)\monolib_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
@@ -10161,11 +10138,6 @@ $(OBJS)\monolib_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\monolib_headercolg.obj : .AUTODEPEND ..\..\src\generic\headercolg.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\monolib_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
@@ -11197,9 +11169,6 @@ $(OBJS)\coredll_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp
$(OBJS)\coredll_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
-$(OBJS)\coredll_headercol.obj : .AUTODEPEND ..\..\src\msw\headercol.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
-
$(OBJS)\coredll_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
@@ -12516,11 +12485,6 @@ $(OBJS)\coredll_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\coredll_headercolg.obj : .AUTODEPEND ..\..\src\generic\headercolg.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\coredll_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
@@ -12679,9 +12643,6 @@ $(OBJS)\corelib_filedlg.obj : .AUTODEPEND ..\..\src\msw\filedlg.cpp
$(OBJS)\corelib_frame.obj : .AUTODEPEND ..\..\src\msw\frame.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
-$(OBJS)\corelib_headercol.obj : .AUTODEPEND ..\..\src\msw\headercol.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
-
$(OBJS)\corelib_headerctrl.obj : .AUTODEPEND ..\..\src\msw\headerctrl.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
@@ -13998,11 +13959,6 @@ $(OBJS)\corelib_filectrlg.obj : .AUTODEPEND ..\..\src\generic\filectrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\corelib_headercolg.obj : .AUTODEPEND ..\..\src\generic\headercolg.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\corelib_headerctrlg.obj : .AUTODEPEND ..\..\src\generic\headerctrlg.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
diff --git a/build/msw/wx_core.dsp b/build/msw/wx_core.dsp
index 5e990c54e7..9d4f15a735 100644
--- a/build/msw/wx_core.dsp
+++ b/build/msw/wx_core.dsp
@@ -1486,41 +1486,6 @@ SOURCE=..\..\src\msw\graphics.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\src\msw\headercol.cpp
-
-!IF "$(CFG)" == "core - Win32 DLL Universal Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "core - Win32 DLL Universal Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "core - Win32 DLL Release"
-
-
-!ELSEIF "$(CFG)" == "core - Win32 DLL Debug"
-
-
-!ELSEIF "$(CFG)" == "core - Win32 Universal Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "core - Win32 Universal Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "core - Win32 Release"
-
-
-!ELSEIF "$(CFG)" == "core - Win32 Debug"
-
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
SOURCE=..\..\src\msw\headerctrl.cpp
!IF "$(CFG)" == "core - Win32 DLL Universal Release"
@@ -2964,10 +2929,6 @@ SOURCE=..\..\src\generic\fontpickerg.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\src\generic\headercolg.cpp
-# End Source File
-# Begin Source File
-
SOURCE=..\..\src\generic\headerctrlg.cpp
# End Source File
# Begin Source File
@@ -5072,10 +5033,6 @@ SOURCE=..\..\include\wx\msw\glcanvas.h
# End Source File
# Begin Source File
-SOURCE=..\..\include\wx\msw\headercol.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\include\wx\msw\headerctrl.h
# End Source File
# Begin Source File
@@ -5412,10 +5369,6 @@ SOURCE=..\..\include\wx\generic\gridsel.h
# End Source File
# Begin Source File
-SOURCE=..\..\include\wx\generic\headercol.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\include\wx\generic\headerctrl.h
# End Source File
# Begin Source File
diff --git a/build/msw/wx_vc7_core.vcproj b/build/msw/wx_vc7_core.vcproj
index 3f5f810179..edbb0d93bf 100644
--- a/build/msw/wx_vc7_core.vcproj
+++ b/build/msw/wx_vc7_core.vcproj
@@ -1270,21 +1270,6 @@
-
-
-
-
-
-
-
-
@@ -3027,9 +3009,6 @@
-
-
@@ -3283,9 +3262,6 @@
-
-
diff --git a/build/msw/wx_vc8_core.vcproj b/build/msw/wx_vc8_core.vcproj
index e03ee2e607..19374c34ea 100644
--- a/build/msw/wx_vc8_core.vcproj
+++ b/build/msw/wx_vc8_core.vcproj
@@ -1731,26 +1731,6 @@
RelativePath="..\..\src\msw\graphics.cpp"
>
-
-
-
-
-
-
@@ -2640,10 +2620,6 @@
RelativePath="..\..\src\generic\fontpickerg.cpp"
>
-
-
@@ -4059,10 +4035,6 @@
RelativePath="..\..\include\wx\msw\glcanvas.h"
>
-
-
@@ -4400,10 +4372,6 @@
RelativePath="..\..\include\wx\generic\gridsel.h"
>
-
-
diff --git a/build/msw/wx_vc9_core.vcproj b/build/msw/wx_vc9_core.vcproj
index e4ac959963..4d70767642 100644
--- a/build/msw/wx_vc9_core.vcproj
+++ b/build/msw/wx_vc9_core.vcproj
@@ -1727,26 +1727,6 @@
RelativePath="..\..\src\msw\graphics.cpp"
>
-
-
-
-
-
-
@@ -2636,10 +2616,6 @@
RelativePath="..\..\src\generic\fontpickerg.cpp"
>
-
-
@@ -4055,10 +4031,6 @@
RelativePath="..\..\include\wx\msw\glcanvas.h"
>
-
-
@@ -4396,10 +4368,6 @@
RelativePath="..\..\include\wx\generic\gridsel.h"
>
-
-
diff --git a/include/wx/dataview.h b/include/wx/dataview.h
index b98220ac3e..37b153843f 100644
--- a/include/wx/dataview.h
+++ b/include/wx/dataview.h
@@ -508,26 +508,25 @@ enum wxDataViewColumnFlags
wxDATAVIEW_COL_HIDDEN = wxCOL_HIDDEN
};
-class WXDLLIMPEXP_ADV wxDataViewColumnBase : public
-// native implementations of wxDataViewCtrl have their own implementations of
-// wxDataViewColumnBase and so they need to only inherit from
-// wxHeaderColumnBase to provide the same interface as the generic port which
-// uses the platform native (if any) wxHeaderColumn
-#ifdef wxHAS_GENERIC_DATAVIEWCTRL
- wxHeaderColumn
-#else
- wxHeaderColumnBase
-#endif
+class WXDLLIMPEXP_ADV wxDataViewColumnBase : public wxHeaderColumnBase
{
public:
- wxDataViewColumnBase( const wxString &title, wxDataViewRenderer *renderer,
- unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumnBase( const wxBitmap &bitmap, wxDataViewRenderer *renderer,
- unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
+ // ctor for the text columns: takes ownership of renderer
+ wxDataViewColumnBase(wxDataViewRenderer *renderer,
+ unsigned int model_column)
+ {
+ Init(renderer, model_column);
+ }
+
+ // ctor for the bitmap columns
+ wxDataViewColumnBase(const wxBitmap& bitmap,
+ wxDataViewRenderer *renderer,
+ unsigned int model_column)
+ : m_bitmap(bitmap)
+ {
+ Init(renderer, model_column);
+ }
+
virtual ~wxDataViewColumnBase();
// setters:
@@ -539,23 +538,20 @@ public:
wxDataViewCtrl *GetOwner() const { return m_owner; }
wxDataViewRenderer* GetRenderer() const { return m_renderer; }
-#ifndef wxHAS_GENERIC_DATAVIEWCTRL
// implement some of base class pure virtuals (the rest is port-dependent
// and done differently in generic and native versions)
virtual void SetBitmap( const wxBitmap& bitmap ) { m_bitmap = bitmap; }
virtual wxBitmap GetBitmap() const { return m_bitmap; }
-#endif // !wxHAS_GENERIC_DATAVIEWCTRL
protected:
wxDataViewRenderer *m_renderer;
int m_model_column;
-#ifndef wxHAS_GENERIC_DATAVIEWCTRL
wxBitmap m_bitmap;
-#endif // !wxHAS_GENERIC_DATAVIEWCTRL
wxDataViewCtrl *m_owner;
-protected:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase)
+private:
+ // common part of all ctors
+ void Init(wxDataViewRenderer *renderer, unsigned int model_column);
};
// ---------------------------------------------------------
diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h
index adabdd7e40..05ce149b3d 100644
--- a/include/wx/generic/dataview.h
+++ b/include/wx/generic/dataview.h
@@ -33,7 +33,7 @@ class WXDLLIMPEXP_FWD_ADV wxDataViewHeaderWindow;
class WXDLLIMPEXP_ADV wxDataViewRenderer: public wxDataViewRendererBase
{
public:
- wxDataViewRenderer( const wxString &varianttype,
+ wxDataViewRenderer( const wxString &varianttype,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int align = wxDVR_DEFAULT_ALIGNMENT );
virtual ~wxDataViewRenderer();
@@ -51,32 +51,32 @@ public:
virtual bool Activate( wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
- const wxDataViewItem & WXUNUSED(item),
+ const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) )
{ return false; }
virtual bool LeftClick( wxPoint WXUNUSED(cursor),
wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
- const wxDataViewItem & WXUNUSED(item),
+ const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) )
{ return false; }
virtual bool RightClick( wxPoint WXUNUSED(cursor),
wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
- const wxDataViewItem & WXUNUSED(item),
+ const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) )
{ return false; }
virtual bool StartDrag( wxPoint WXUNUSED(cursor),
wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model),
- const wxDataViewItem & WXUNUSED(item),
+ const wxDataViewItem & WXUNUSED(item),
unsigned int WXUNUSED(col) )
{ return false; }
// Create DC on request
virtual wxDC *GetDC();
-
+
void SetHasAttr( bool set ) { m_hasAttr = set; }
void SetAttr( const wxDataViewItemAttr &attr ) { m_attr = attr; }
bool GetWantsAttr() { return m_wantsAttr; }
@@ -88,7 +88,7 @@ private:
wxDC *m_dc;
int m_align;
wxDataViewCellMode m_mode;
-
+
protected:
bool m_wantsAttr;
bool m_hasAttr;
@@ -137,7 +137,7 @@ public:
virtual bool HasEditorCtrl();
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
-
+
protected:
wxString m_text;
@@ -157,7 +157,7 @@ public:
int align = wxDVR_DEFAULT_ALIGNMENT );
bool Render( wxRect cell, wxDC *dc, int state );
-
+
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRendererAttr)
};
@@ -202,7 +202,7 @@ public:
bool GetValue( wxVariant &value ) const;
bool Render( wxRect cell, wxDC *dc, int state );
- bool Activate( wxRect cell, wxDataViewModel *model, const wxDataViewItem & item,
+ bool Activate( wxRect cell, wxDataViewModel *model, const wxDataViewItem & item,
unsigned int col );
wxSize GetSize() const;
@@ -239,32 +239,32 @@ private:
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
};
-
-// ---------------------------------------------------------
+
+// ---------------------------------------------------------
// wxDataViewIconTextRenderer
-// ---------------------------------------------------------
+// ---------------------------------------------------------
class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewCustomRenderer
{
public:
- wxDataViewIconTextRenderer( const wxString &varianttype = wxT("wxDataViewIconText"),
+ wxDataViewIconTextRenderer( const wxString &varianttype = wxT("wxDataViewIconText"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int align = wxDVR_DEFAULT_ALIGNMENT );
virtual ~wxDataViewIconTextRenderer();
-
+
bool SetValue( const wxVariant &value );
bool GetValue( wxVariant &value ) const;
-
+
virtual bool Render( wxRect cell, wxDC *dc, int state );
virtual wxSize GetSize() const;
-
+
virtual bool HasEditorCtrl() { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
-
+
private:
wxDataViewIconText m_value;
-
+
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer)
};
@@ -302,34 +302,79 @@ protected:
class WXDLLIMPEXP_ADV wxDataViewColumn : public wxDataViewColumnBase
{
public:
- wxDataViewColumn( const wxString &title, wxDataViewRenderer *renderer,
- unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *renderer,
- unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
+ wxDataViewColumn(const wxString& title,
+ wxDataViewRenderer *renderer,
+ unsigned int model_column,
+ int width = wxDVC_DEFAULT_WIDTH,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE)
+ : wxDataViewColumnBase(renderer, model_column),
+ m_title(title)
+ {
+ Init(width, align, flags);
+ }
- // override some methods to notify the owner about changes
- virtual void SetFlags(int flags);
- virtual void SetWidth(int width);
- virtual void SetSortOrder(bool ascending);
+ wxDataViewColumn(const wxBitmap& bitmap,
+ wxDataViewRenderer *renderer,
+ unsigned int model_column,
+ int width = wxDVC_DEFAULT_WIDTH,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE)
+ : wxDataViewColumnBase(bitmap, renderer, model_column)
+ {
+ Init(width, align, flags);
+ }
- // override this one to return our default width for columns whose width
- // was not explicitly set
- virtual int GetWidth() const;
+ // implement wxHeaderColumnBase methods
+ virtual void SetTitle(const wxString& title) { m_title = title; }
+ virtual wxString GetTitle() const { return m_title; }
+
+ virtual void SetWidth(int width) { m_width = width; }
+ virtual int GetWidth() const { return m_width; }
+
+ virtual void SetMinWidth(int minWidth) { m_minWidth = minWidth; }
+ virtual int GetMinWidth() const { return m_minWidth; }
+
+ virtual void SetAlignment(wxAlignment align) { m_align = align; }
+ virtual wxAlignment GetAlignment() const { return m_align; }
+
+ virtual void SetFlags(int flags) { m_flags = flags; }
+ virtual int GetFlags() const { return m_flags; }
+
+ virtual void SetAsSortKey(bool sort = true) { m_sort = sort; }
+ virtual bool IsSortKey() const { return m_sort; }
+
+ virtual void SetSortOrder(bool ascending) { m_sortAscending = ascending; }
+ virtual bool IsSortOrderAscending() const { return m_sortAscending; }
private:
+ // common part of all ctors
+ void Init(int width, wxAlignment align, int flags)
+ {
+ m_width = width == wxCOL_WIDTH_DEFAULT ? wxDVC_DEFAULT_WIDTH : width;
+ m_minWidth = 0;
+ m_align = align;
+ m_flags = flags;
+ m_sort = false;
+ m_sortAscending = true;
+ }
+
// like SetWidth() but does not ask the header window of the
// wxDataViewCtrl to reflect the width-change.
void SetInternalWidth(int width);
+
+ wxString m_title;
+ int m_width,
+ m_minWidth;
+ wxAlignment m_align;
+ int m_flags;
+ bool m_sort,
+ m_sortAscending;
+
friend class wxDataViewHeaderWindowBase;
friend class wxDataViewHeaderWindow;
friend class wxDataViewHeaderWindowMSW;
-
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn)
};
// ---------------------------------------------------------
@@ -373,7 +418,7 @@ public:
const wxValidator& validator = wxDefaultValidator );
virtual bool AssociateModel( wxDataViewModel *model );
-
+
virtual bool AppendColumn( wxDataViewColumn *col );
virtual bool PrependColumn( wxDataViewColumn *col );
virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
@@ -388,7 +433,7 @@ public:
virtual int GetColumnPosition( const wxDataViewColumn *column ) const;
virtual wxDataViewColumn *GetSortingColumn() const;
-
+
virtual wxDataViewItem GetSelection() const;
virtual int GetSelections( wxDataViewItemArray & sel ) const;
virtual void SetSelections( const wxDataViewItemArray & sel );
@@ -406,11 +451,11 @@ public:
virtual void Expand( const wxDataViewItem & item );
virtual void Collapse( const wxDataViewItem & item );
-
+
virtual void SetFocus();
protected:
- virtual int GetSelections( wxArrayInt & sel ) const;
+ virtual int GetSelections( wxArrayInt & sel ) const;
virtual void SetSelections( const wxArrayInt & sel );
virtual void Select( int row );
virtual void Unselect( int row );
diff --git a/include/wx/generic/headercolg.h b/include/wx/generic/headercolg.h
deleted file mode 100644
index d0abd6936a..0000000000
--- a/include/wx/generic/headercolg.h
+++ /dev/null
@@ -1,85 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/generic/headercolg.h
-// Purpose: Generic wxHeaderColumn implementation
-// Author: Vadim Zeitlin
-// Created: 2008-12-04
-// RCS-ID: $Id$
-// Copyright: (c) 2008 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_GENERIC_HEADERCOLG_H_
-#define _WX_GENERIC_HEADERCOLG_H_
-
-// ----------------------------------------------------------------------------
-// wxHeaderColumn: trivial generic implementation of wxHeaderColumnBase
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxHeaderColumn : public wxHeaderColumnBase
-{
-public:
- // ctors and dtor
- wxHeaderColumn(const wxString& title,
- int width = wxCOL_WIDTH_DEFAULT,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxCOL_DEFAULT_FLAGS)
- : m_title(title),
- m_width(width),
- m_align(align),
- m_flags(flags)
- {
- Init();
- }
-
- wxHeaderColumn(const wxBitmap& bitmap,
- int width = wxCOL_WIDTH_DEFAULT,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxCOL_DEFAULT_FLAGS)
- : m_bitmap(bitmap),
- m_width(width),
- m_align(align),
- m_flags(flags)
- {
- Init();
- }
-
- // implement base class pure virtuals
- virtual void SetTitle(const wxString& title) { m_title = title; }
- virtual wxString GetTitle() const { return m_title; }
-
- virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
- wxBitmap GetBitmap() const { return m_bitmap; }
-
- virtual void SetWidth(int width) { m_width = width; }
- virtual int GetWidth() const { return m_width; }
-
- virtual void SetMinWidth(int minWidth) { m_minWidth = minWidth; }
- virtual int GetMinWidth() const { return m_minWidth; }
-
- virtual void SetAlignment(wxAlignment align) { m_align = align; }
- virtual wxAlignment GetAlignment() const { return m_align; }
-
- virtual void SetFlags(int flags) { m_flags = flags; }
- virtual int GetFlags() const { return m_flags; }
-
- virtual void SetSortOrder(bool ascending) { m_sortAscending = ascending; }
- virtual bool IsSortOrderAscending() const { return m_sortAscending; }
-
-private:
- // common part of all ctors
- void Init()
- {
- m_minWidth = 0;
- m_sortAscending = true;
- }
-
- wxString m_title;
- wxBitmap m_bitmap;
- int m_width,
- m_minWidth;
- wxAlignment m_align;
- int m_flags;
- bool m_sortAscending;
-};
-#endif // _WX_GENERIC_HEADERCOLG_H_
-
diff --git a/include/wx/generic/headerctrlg.h b/include/wx/generic/headerctrlg.h
index 78f8c42a0d..6ffd301625 100644
--- a/include/wx/generic/headerctrlg.h
+++ b/include/wx/generic/headerctrlg.h
@@ -75,19 +75,6 @@ private:
// refresh all the controls starting from (and including) the given one
void RefreshColsAfter(unsigned int idx);
- // all our current columns
- typedef wxVector Columns;
- Columns m_cols;
-
- // sorting indicators for the columns: our API is such that it allows using
- // multiple columns for sorting, and even if this is not used anywhere in
- // practice right now, still support this
- //
- // the values are interpreted in the same way as ShowSortIndicator()
- // sortOrder parameter: true/false for ascending/descending sort if the
- // corresponding column is used for sorting or -1 otherwise
- wxVector m_sortOrders;
-
// index of the column under mouse or -1 if none
unsigned int m_hover;
diff --git a/include/wx/gtk/dataview.h b/include/wx/gtk/dataview.h
index 862dfb2ec3..bf647cc0d3 100644
--- a/include/wx/gtk/dataview.h
+++ b/include/wx/gtk/dataview.h
@@ -300,8 +300,6 @@ public:
wxAlignment align = wxALIGN_CENTER,
int flags = wxDATAVIEW_COL_RESIZABLE );
- virtual ~wxDataViewColumn();
-
// setters:
@@ -314,6 +312,7 @@ public:
virtual void SetSortable( bool sortable );
virtual void SetSortOrder( bool ascending );
+ virtual void SetAsSortKey(bool sort = true);
virtual void SetResizeable( bool resizeable );
virtual void SetHidden( bool hidden );
@@ -332,6 +331,8 @@ public:
virtual bool IsSortable() const;
virtual bool IsSortOrderAscending() const;
+ virtual bool IsSortKey() const = 0;
+
virtual bool IsResizeable() const;
virtual bool IsHidden() const;
diff --git a/include/wx/headercol.h b/include/wx/headercol.h
index de5d1b0481..87c2e15082 100644
--- a/include/wx/headercol.h
+++ b/include/wx/headercol.h
@@ -47,7 +47,7 @@ enum
// wxListCtrl, wxDataViewCtrl or wxGrid
// ----------------------------------------------------------------------------
-class WXDLLIMPEXP_CORE wxHeaderColumnBase : public wxObject
+class WXDLLIMPEXP_CORE wxHeaderColumnBase
{
public:
// ctors and dtor
@@ -93,14 +93,6 @@ public:
virtual void SetAlignment(wxAlignment align) = 0;
virtual wxAlignment GetAlignment() const = 0;
- // arbitrary client data associated with the column (currently only
- // implemented in MSW because it is used in MSW wxDataViewCtrl
- // implementation)
- virtual void SetClientData(wxUIntPtr WXUNUSED(data))
- { wxFAIL_MSG("not implemented"); }
- virtual wxUIntPtr GetClientData() const
- { return 0; }
-
// flags manipulations:
// --------------------
@@ -151,8 +143,19 @@ public:
bool IsShown() const
{ return !IsHidden(); }
+
+ // sorting
+ // -------
+
+ // set this column as the one used to sort the control
+ virtual void SetAsSortKey(bool sort = true) = 0;
+ void UnsetAsSortKey() { SetAsSortKey(false); }
+
+ // return true if the column is used for sorting
+ virtual bool IsSortKey() const = 0;
+
// for sortable columns indicate whether we should sort in ascending or
- // descending order
+ // descending order (this should only be taken into account if IsSortKey())
virtual void SetSortOrder(bool ascending) = 0;
void ToggleSortOrder() { SetSortOrder(!IsSortOrderAscending()); }
virtual bool IsSortOrderAscending() const = 0;
@@ -163,12 +166,80 @@ protected:
int GetFromIndividualFlags() const;
};
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #include "wx/msw/headercol.h"
-#else
- #define wxHAS_GENERIC_HEADERCOL
- #include "wx/generic/headercolg.h"
-#endif
+// ----------------------------------------------------------------------------
+// wxHeaderColumnSimple: trivial generic implementation of wxHeaderColumnBase
+// ----------------------------------------------------------------------------
+class wxHeaderColumnSimple : public wxHeaderColumnBase
+{
+public:
+ // ctors and dtor
+ wxHeaderColumnSimple(const wxString& title,
+ int width = wxCOL_WIDTH_DEFAULT,
+ wxAlignment align = wxALIGN_NOT,
+ int flags = wxCOL_DEFAULT_FLAGS)
+ : m_title(title),
+ m_width(width),
+ m_align(align),
+ m_flags(flags)
+ {
+ Init();
+ }
+
+ wxHeaderColumnSimple(const wxBitmap& bitmap,
+ int width = wxCOL_WIDTH_DEFAULT,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxCOL_DEFAULT_FLAGS)
+ : m_bitmap(bitmap),
+ m_width(width),
+ m_align(align),
+ m_flags(flags)
+ {
+ Init();
+ }
+
+ // implement base class pure virtuals
+ virtual void SetTitle(const wxString& title) { m_title = title; }
+ virtual wxString GetTitle() const { return m_title; }
+
+ virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
+ wxBitmap GetBitmap() const { return m_bitmap; }
+
+ virtual void SetWidth(int width) { m_width = width; }
+ virtual int GetWidth() const { return m_width; }
+
+ virtual void SetMinWidth(int minWidth) { m_minWidth = minWidth; }
+ virtual int GetMinWidth() const { return m_minWidth; }
+
+ virtual void SetAlignment(wxAlignment align) { m_align = align; }
+ virtual wxAlignment GetAlignment() const { return m_align; }
+
+ virtual void SetFlags(int flags) { m_flags = flags; }
+ virtual int GetFlags() const { return m_flags; }
+
+ virtual void SetAsSortKey(bool sort = true) { m_sort = sort; }
+ virtual bool IsSortKey() const { return m_sort; }
+
+ virtual void SetSortOrder(bool ascending) { m_sortAscending = ascending; }
+ virtual bool IsSortOrderAscending() const { return m_sortAscending; }
+
+private:
+ // common part of all ctors
+ void Init()
+ {
+ m_minWidth = 0;
+ m_sort = false;
+ m_sortAscending = true;
+ }
+
+ wxString m_title;
+ wxBitmap m_bitmap;
+ int m_width,
+ m_minWidth;
+ wxAlignment m_align;
+ int m_flags;
+ bool m_sort,
+ m_sortAscending;
+};
#endif // _WX_HEADERCOL_H_
diff --git a/include/wx/headerctrl.h b/include/wx/headerctrl.h
index 026cca9c1d..50c897137a 100644
--- a/include/wx/headerctrl.h
+++ b/include/wx/headerctrl.h
@@ -13,6 +13,8 @@
#include "wx/control.h"
+#include "wx/vector.h"
+
#include "wx/headercol.h"
// notice that the classes in this header are defined in the core library even
@@ -34,8 +36,6 @@ enum
extern WXDLLIMPEXP_DATA_CORE(const char) wxHeaderCtrlNameStr[];
-class WXDLLIMPEXP_FWD_CORE wxHeaderColumn;
-
// ----------------------------------------------------------------------------
// wxHeaderCtrlBase defines the interface of a header control
// ----------------------------------------------------------------------------
@@ -51,29 +51,111 @@ public:
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = wxHD_DEFAULT_STYLE,
const wxString& name = wxHeaderCtrlNameStr);
bool Create(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = wxHD_DEFAULT_STYLE,
const wxString& name = wxHeaderCtrlNameStr);
*/
+ // column-related methods
+ // ----------------------
+
+ // set the number of columns in the control
+ //
+ // this also calls UpdateColumn() for all columns
+ void SetColumnCount(unsigned int count) { DoSetCount(count); }
+
+ // return the number of columns in the control as set by SetColumnCount()
+ unsigned int GetColumnCount() const { return DoGetCount(); }
+
+ // return whether the control has any columns
+ bool IsEmpty() const { return DoGetCount() == 0; }
+
+ // update the column with the given index
+ void UpdateColumn(unsigned int idx)
+ {
+ wxCHECK_RET( idx < GetColumnCount(), "invalid column index" );
+
+ DoUpdate(idx);
+ }
+
+
+ // implementation only from now on
+ // -------------------------------
+
+ // the user doesn't need to TAB to this control
+ virtual bool AcceptsFocusFromKeyboard() const { return false; }
+
+ // this method is only overridden in order to synchronize the control with
+ // the main window when it is scrolled, the derived class must implement
+ // DoScrollHorz()
+ virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL);
+
+protected:
+ // this method must be implemented by the derived classes to return the
+ // information for the given column
+ virtual wxHeaderColumnBase& GetColumn(unsigned int idx) = 0;
+
+private:
+ // methods implementing our public API and defined in platform-specific
+ // implementations
+ virtual void DoSetCount(unsigned int count) = 0;
+ virtual unsigned int DoGetCount() const = 0;
+ virtual void DoUpdate(unsigned int idx) = 0;
+
+ virtual void DoScrollHorz(int dx) = 0;
+
+ // this window doesn't look nice with the border so don't use it by default
+ virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
+};
+
+// ----------------------------------------------------------------------------
+// wxHeaderCtrl: port-specific header control implementation, notice that this
+// is still an ABC which is meant to be used as part of another
+// control, see wxHeaderCtrlSimple for a standalone version
+// ----------------------------------------------------------------------------
+
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+ #include "wx/msw/headerctrl.h"
+#else
+ #define wxHAS_GENERIC_HEADERCTRL
+ #include "wx/generic/headerctrlg.h"
+#endif // platform
+
+// ----------------------------------------------------------------------------
+// wxHeaderCtrlSimple: concrete header control which can be used standalone
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxHeaderCtrlSimple : public wxHeaderCtrl
+{
+public:
+ // control creation
+ // ----------------
+
+ wxHeaderCtrlSimple() { Init(); }
+ wxHeaderCtrlSimple(wxWindow *parent,
+ wxWindowID winid = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxHD_DEFAULT_STYLE,
+ const wxString& name = wxHeaderCtrlNameStr)
+ {
+ Init();
+
+ Create(parent, winid, pos, size, style, name);
+ }
+
// managing the columns
// --------------------
- // return the number of columns in the control
- unsigned int GetColumnCount() const { return DoGetCount(); }
-
- // return whether the control has any columns
- bool IsEmpty() const { return GetColumnCount() == 0; }
-
// insert the column at the given position, using GetColumnCount() as
// position appends it at the end
- void InsertColumn(const wxHeaderColumn& col, unsigned int idx)
+ void InsertColumn(const wxHeaderColumnSimple& col, unsigned int idx)
{
wxCHECK_RET( idx <= GetColumnCount(), "invalid column index" );
@@ -81,7 +163,7 @@ public:
}
// append the column to the end of the control
- void AppendColumn(const wxHeaderColumn& col)
+ void AppendColumn(const wxHeaderColumnSimple& col)
{
DoInsert(col, GetColumnCount());
}
@@ -115,54 +197,43 @@ public:
ShowColumn(idx, false);
}
- // indicate that the column is used for sorting in ascending order if
- // sortOrder is true, for sorting in descending order if it is false or not
- // used for sorting at all if it is -1
- void ShowSortIndicator(unsigned int idx, int sortOrder)
+ // indicate that the column is used for sorting
+ void ShowSortIndicator(unsigned int idx, bool ascending = true)
{
- wxCHECK_RET( sortOrder == 0 || sortOrder == 1 || sortOrder == -1,
- "invalid sort order value" );
-
wxCHECK_RET( idx < GetColumnCount(), "invalid column index" );
- DoShowSortIndicator(idx, sortOrder);
+ DoShowSortIndicator(idx, ascending);
}
- // remove the sort indicator from the given column
- void RemoveSortIndicator(unsigned int idx)
- {
- DoShowSortIndicator(idx, -1);
- }
+ // remove the sort indicator completely
+ void RemoveSortIndicator();
-
- // implementation only from now on
- // -------------------------------
-
- // the user doesn't need to TAB to this control
- virtual bool AcceptsFocusFromKeyboard() const { return false; }
-
- // this method is only overridden in order to synchronize the control with
- // the main window when it is scrolled, the derived class must implement
- // DoScrollHorz()
- virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL);
+protected:
+ virtual wxHeaderColumnBase& GetColumn(unsigned int idx);
private:
- virtual unsigned int DoGetCount() const = 0;
- virtual void DoInsert(const wxHeaderColumn& col, unsigned int idx) = 0;
- virtual void DoDelete(unsigned int idx) = 0;
- virtual void DoShowColumn(unsigned int idx, bool show) = 0;
- virtual void DoShowSortIndicator(unsigned int idx, int sortOrder) = 0;
- virtual void DoScrollHorz(int dx) = 0;
+ // functions implementing our public API
+ void DoInsert(const wxHeaderColumnSimple& col, unsigned int idx);
+ void DoDelete(unsigned int idx);
+ void DoShowColumn(unsigned int idx, bool show);
+ void DoShowSortIndicator(unsigned int idx, bool ascending);
- // this window doesn't look nice with the border so don't use it by default
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
+ // common part of all ctors
+ void Init();
+
+ // bring the column count in sync with the number of columns we store
+ void UpdateColumnCount() { SetColumnCount(m_cols.size()); }
+
+
+ // all our current columns
+ typedef wxVector Columns;
+ Columns m_cols;
+
+ // the column currently used for sorting or -1 if none
+ unsigned int m_sortKey;
+
+
+ DECLARE_NO_COPY_CLASS(wxHeaderCtrlSimple)
};
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #include "wx/msw/headerctrl.h"
-#else
- #define wxHAS_GENERIC_HEADERCTRL
- #include "wx/generic/headerctrlg.h"
-#endif // platform
-
#endif // _WX_HEADERCTRL_H_
diff --git a/include/wx/msw/headercol.h b/include/wx/msw/headercol.h
deleted file mode 100644
index f30e1dd746..0000000000
--- a/include/wx/msw/headercol.h
+++ /dev/null
@@ -1,77 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/msw/headercol.h
-// Purpose: wxHeaderColumn implementation for MSW
-// Author: Vadim Zeitlin
-// Created: 2008-12-02
-// RCS-ID: $Id$
-// Copyright: (c) 2008 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_MSW_HEADERCOL_H_
-#define _WX_MSW_HEADERCOL_H_
-
-struct wxHDITEM;
-
-// ----------------------------------------------------------------------------
-// wxHeaderColumn
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxHeaderColumn : public wxHeaderColumnBase
-{
-public:
- // ctors and dtor
- wxHeaderColumn(const wxString& title,
- int width = wxCOL_WIDTH_DEFAULT,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxCOL_DEFAULT_FLAGS);
- wxHeaderColumn(const wxBitmap &bitmap,
- int width = wxCOL_WIDTH_DEFAULT,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxCOL_DEFAULT_FLAGS);
-
- virtual ~wxHeaderColumn();
-
- // implement base class pure virtuals
- virtual void SetTitle(const wxString& title);
- virtual wxString GetTitle() const;
-
- virtual void SetBitmap(const wxBitmap& bitmap);
- wxBitmap GetBitmap() const;
-
- virtual void SetWidth(int width);
- virtual int GetWidth() const;
-
- virtual void SetMinWidth(int minWidth);
- virtual int GetMinWidth() const;
-
- virtual void SetAlignment(wxAlignment align);
- virtual wxAlignment GetAlignment() const;
-
- virtual void SetClientData(wxUIntPtr data);
- virtual wxUIntPtr GetClientData() const;
-
- virtual void SetFlags(int flags);
- virtual int GetFlags() const;
-
-
- virtual void SetSortOrder(bool ascending);
- virtual bool IsSortOrderAscending() const;
-
-
- // MSW-specific implementation helpers
- wxHDITEM& GetHDI();
- const wxHDITEM& GetHDI() const
- {
- return const_cast(this)->GetHDI();
- }
-
-private:
- // initialize m_impl
- void Init();
-
- struct wxMSWHeaderColumnImpl *m_impl;
-};
-
-#endif // _WX_MSW_HEADERCOL_H_
-
diff --git a/include/wx/msw/headerctrl.h b/include/wx/msw/headerctrl.h
index 1f3ee6d4e0..74919ef111 100644
--- a/include/wx/msw/headerctrl.h
+++ b/include/wx/msw/headerctrl.h
@@ -49,11 +49,10 @@ public:
private:
// implement base class pure virtuals
+ virtual void DoSetCount(unsigned int count);
virtual unsigned int DoGetCount() const;
- virtual void DoInsert(const wxHeaderColumn& col, unsigned int idx);
- virtual void DoDelete(unsigned int idx);
- virtual void DoShowColumn(unsigned int idx, bool show);
- virtual void DoShowSortIndicator(unsigned int idx, int sortOrder);
+ virtual void DoUpdate(unsigned int idx);
+
virtual void DoScrollHorz(int dx);
// override wxWindow methods which must be implemented by a new control
@@ -65,6 +64,13 @@ private:
// common part of all ctors
void Init();
+ // wrapper around Header_{Set,Insert}Item(): either appends the item to the
+ // end or modifies the existing item by copying information from
+ // GetColumn(idx) to it
+ enum Operation { Set, Insert };
+ void DoSetOrInsertItem(Operation oper, unsigned int idx);
+
+
// the image list: initially NULL, created on demand
wxImageList *m_imageList;
diff --git a/interface/wx/headercol.h b/interface/wx/headercol.h
index 1b029be54f..906f32409d 100644
--- a/interface/wx/headercol.h
+++ b/interface/wx/headercol.h
@@ -38,42 +38,29 @@ enum
@class wxHeaderColumn
Represents a column header in controls displaying tabular data such as
- wxHeaderCtrl, wxDataViewCtrl or wxGrid.
+ wxDataViewCtrl or wxGrid.
+
+ Notice that this is an abstract base class which is implemented (usually
+ using the information stored in the associated control) by the different
+ controls using wxHeaderCtrl. You may use wxHeaderCtrlSimple which uses
+ concrete wxHeaderColumnSimple if you don't already store the column
+ information somewhere.
@library{wxcore}
@category{ctrl}
-
- @see wxHeaderCtrl
*/
class wxHeaderColumn
{
public:
- //@{
- /**
- Constructor for a column header.
-
- The first constructor creates a header showing the given text @a title
- while the second one creates one showing the specified @a bitmap image.
- */
- wxHeaderColumn(const wxString& title,
- int width = wxCOL_WIDTH_DEFAULT,
- wxAlignment align = wxALIGN_NOT,
- int flags = wxCOL_DEFAULT_FLAGS);
- wxHeaderColumn(const wxBitmap &bitmap,
- int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxCOL_DEFAULT_FLAGS);
- //@}
-
/**
Set the text to display in the column header.
*/
- virtual void SetTitle(const wxString& title);
+ virtual void SetTitle(const wxString& title) = 0;
/**
Get the text shown in the column header.
*/
- virtual wxString GetTitle() const;
+ virtual wxString GetTitle() const = 0;
/**
Set the bitmap to be displayed in the column header.
@@ -81,14 +68,14 @@ public:
Notice that the bitmaps displayed in different columns of the same
control must all be of the same size.
*/
- virtual void SetBitmap(const wxBitmap& bitmap);
+ virtual void SetBitmap(const wxBitmap& bitmap) = 0;
/**
Returns the bitmap in the header of the column, if any.
If the column has no associated bitmap, wxNullBitmap is returned.
*/
- virtual wxBitmap GetBitmap() const; \
+ virtual wxBitmap GetBitmap() const = 0;
/**
Set the column width.
@@ -97,7 +84,7 @@ public:
The column width in pixels or the special wxCOL_WIDTH_DEFAULT value
meaning to use default width.
*/
- virtual void SetWidth(int width);
+ virtual void SetWidth(int width) = 0;
/**
Returns the current width of the column.
@@ -105,7 +92,7 @@ public:
@return
Width of the column in pixels, never wxCOL_WIDTH_DEFAULT.
*/
- virtual int GetWidth() const;
+ virtual int GetWidth() const = 0;
/**
Set the minimal column width.
@@ -119,7 +106,7 @@ public:
The minimal column width in pixels, may be 0 to remove any
previously set restrictions.
*/
- virtual void SetMinWidth(int minWidth);
+ virtual void SetMinWidth(int minWidth) = 0;
/**
Return the minimal column width.
@@ -127,7 +114,7 @@ public:
@return
The value previously set by SetMinWidth() or 0 by default.
*/
- virtual int GetMinWidth() const;
+ virtual int GetMinWidth() const = 0;
/**
Set the alignment of the column header.
@@ -140,7 +127,7 @@ public:
wxALIGN_CENTRE for consistency (but notice that GetAlignment()
never returns it).
*/
- virtual void SetAlignment(wxAlignment align);
+ virtual void SetAlignment(wxAlignment align) = 0;
/**
Returns the current column alignment.
@@ -148,18 +135,7 @@ public:
@return
One of wxALIGN_CENTRE, wxALIGN_LEFT or wxALIGN_RIGHT.
*/
- virtual wxAlignment GetAlignment() const;
-
-
- // not documented because I'm not sure if it should be in the public API at
- // all
-#if 0
- // arbitrary client data associated with the column (currently only
- // implemented in MSW because it is used in MSW wxDataViewCtrl
- // implementation)
- virtual void SetClientData(wxUIntPtr data);
- virtual wxUIntPtr GetClientData() const;
-#endif
+ virtual wxAlignment GetAlignment() const = 0;
/**
@@ -174,7 +150,7 @@ public:
Combination of wxCOL_RESIZABLE, wxCOL_SORTABLE, wxCOL_REORDERABLE
and wxCOL_HIDDEN bit flags.
*/
- virtual void SetFlags(int flags);
+ virtual void SetFlags(int flags) = 0;
/**
Set or clear the given flag.
@@ -222,7 +198,7 @@ public:
@see SetFlags()
*/
- virtual int GetFlags() const;
+ virtual int GetFlags() const = 0;
/**
Return @true if the specified flag is currently set for this column.
@@ -309,17 +285,55 @@ public:
*/
bool IsShown() const;
+
+
+ /**
+ Sets this column as the sort key for the associated control.
+
+ Calling this function with @true argument means that this column is
+ currently used for sorting the control contents and so should typically
+ display an arrow indicating it (the direction of the arrow depends on
+ IsSortOrderAscending() return value).
+
+ Don't confuse this function with SetSortable() which should be used to
+ indicate that the column @em may be used for sorting while this one is
+ used to indicate that it currently @em is used for sorting. Of course,
+ SetAsSortKey() can be only called for sortable columns.
+
+ @param sort
+ Sort (default) or don't sort the control contents by this column.
+ */
+ virtual void SetAsSortKey(bool sort = true) = 0;
+
+ /**
+ Don't use this column for sorting.
+
+ This is equivalent to calling SetAsSortKey() with @false argument.
+ */
+ void UnsetAsSortKey();
+
+ /**
+ Returns @true if the column is currently used for sorting.
+
+ Notice that this function simply returns the value last passed to
+ SetAsSortKey() (or @false if SetAsSortKey() had never been called), it
+ is up to the associated control to use this information to actually
+ sort its contents.
+ */
+ virtual bool IsSortKey() const = 0;
+
/**
Sets the sort order for this column.
- This only makes sense for sortable columns and is only taken into
- account by the control in which this column is inserted, this function
- just stores the sort order in the wxHeaderColumn object.
+ This only makes sense for sortable columns which are currently used as
+ sort key, i.e. for which IsSortKey() returns @true and is only taken
+ into account by the control in which this column is inserted, this
+ function just stores the sort order in the wxHeaderColumn object.
@param ascending
If @true, sort in ascending order, otherwise in descending order.
*/
- virtual void SetSortOrder(bool ascending);
+ virtual void SetSortOrder(bool ascending) = 0;
/**
Inverses the sort order.
@@ -335,9 +349,74 @@ public:
/**
Returns @true, if the sort order is ascending.
+ Notice that it only makes sense to call this function if the column is
+ used for sorting at all, i.e. if IsSortKey() returns @true.
+
@see SetSortOrder()
*/
- virtual bool IsSortOrderAscending() const;
+ virtual bool IsSortOrderAscending() const = 0;
};
+/**
+ @class wxHeaderColumnSimple
+ Simple container for the information about the column.
+
+ This is a concrete class implementing all base wxHeaderColumn class methods
+ in a trivial way, i.e. by just storing the information in the object
+ itself. It is used by and with wxHeaderCtrlSimple, e.g.
+ @code
+ wxHeaderCtrlSimple * header = new wxHeaderCtrlSimple(...);
+ wxHeaderColumnSimple col("Title");
+ col.SetWidth(100);
+ col.SetSortable(100);
+ header->AppendColumn(col);
+ @endcode
+
+ @library{wxcore}
+ @category{ctrl}
+ */
+class wxHeaderColumnSimple : public wxHeaderColumn
+{
+public:
+ //@{
+ /**
+ Constructor for a column header.
+
+ The first constructor creates a header showing the given text @a title
+ while the second one creates one showing the specified @a bitmap image.
+ */
+ wxHeaderColumnSimple(const wxString& title,
+ int width = wxCOL_WIDTH_DEFAULT,
+ wxAlignment align = wxALIGN_NOT,
+ int flags = wxCOL_DEFAULT_FLAGS);
+
+ wxHeaderColumnSimple(const wxBitmap &bitmap,
+ int width = wxDVC_DEFAULT_WIDTH,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxCOL_DEFAULT_FLAGS);
+ //@}
+
+ //@{
+
+ /// Trivial implementations of the base class pure virtual functions.
+
+ virtual void SetTitle(const wxString& title);
+ virtual wxString GetTitle() const;
+ virtual void SetBitmap(const wxBitmap& bitmap);
+ virtual wxBitmap GetBitmap() const;
+ virtual void SetWidth(int width);
+ virtual int GetWidth() const;
+ virtual void SetMinWidth(int minWidth);
+ virtual int GetMinWidth() const;
+ virtual void SetAlignment(wxAlignment align);
+ virtual wxAlignment GetAlignment() const;
+ virtual void SetFlags(int flags);
+ virtual int GetFlags() const;
+ virtual void SetAsSortKey(bool sort = true);
+ virtual bool IsSortKey() const;
+ virtual void SetSortOrder(bool ascending);
+ virtual bool IsSortOrderAscending() const;
+
+ //@}
+};
diff --git a/interface/wx/headerctrl.h b/interface/wx/headerctrl.h
index 4d311c62d5..76b76e746f 100644
--- a/interface/wx/headerctrl.h
+++ b/interface/wx/headerctrl.h
@@ -16,7 +16,11 @@
It is used as part of wxGrid and (will be used in the near future) in
in wxDataViewCtrl and report view of wxListCtrl but can be also used
- independently.
+ independently. In general this class is meant to be used as part of another
+ control which already stores the column information somewhere as it can't
+ be used directly: instead you need to inherit from it and implement the
+ GetColumn() method to provide column information. See wxHeaderCtrlSimple
+ for a concrete control class which can be used directly.
In addition to labeling the columns, the control has the following
features:
@@ -85,7 +89,7 @@ public:
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = wxHD_DEFAULT_STYLE,
const wxString& name = wxHeaderCtrlNameStr);
/**
@@ -115,12 +119,25 @@ public:
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = wxHD_DEFAULT_STYLE,
const wxString& name = wxHeaderCtrlNameStr);
+ /**
+ Set the number of columns in the control.
+
+ The control will use GetColumn() to get information about all the
+ new columns and refresh itself, i.e. this method also has the same
+ effect as calling UpdateColumn() for all columns but it should only be
+ used if the number of columns really changed.
+ */
+ void SetColumnCount(unsigned int count);
+
/**
Return the number of columns in the control.
+ @return
+ Number of columns as previously set by SetColumnCount().
+
@see IsEmpty()
*/
unsigned int GetColumnCount() const;
@@ -132,6 +149,59 @@ public:
*/
bool IsEmpty() const;
+protected:
+ /**
+ Method to be implemented by the derived classes to return the
+ information for the given column.
+
+ @param idx
+ The column index, between 0 and the value last passed to
+ SetColumnCount().
+ */
+ virtual wxHeaderColumnBase& GetColumn(unsigned int idx) = 0;
+};
+
+
+/**
+ @class wxHeaderCtrlSimple
+
+ wxHeaderCtrlSimple is a concrete header control which can be used directly,
+ without inheriting from it as you need to do when using wxHeaderCtrl
+ itself.
+
+ When using it, you need to use simple AppendColumn(), InsertColumn() and
+ DeleteColumn() methods instead of setting the number of columns with
+ SetColumnCount() and returning the information about them from the
+ overridden GetColumn().
+
+ @library{wxcore}
+ @category{ctrl}
+
+ @see wxHeaderCtrl
+*/
+class wxHeaderCtrlSimple : public wxHeaderCtrl
+{
+public:
+ /**
+ Default constructor not creating the underlying window.
+
+ You must use Create() after creating the object using this constructor.
+ */
+ wxHeaderCtrlSimple();
+
+ /**
+ Constructor creating the window.
+
+ Please see the base class wxHeaderCtrl::Create() method for the
+ parameters description.
+ */
+ wxHeaderCtrlSimple(wxWindow *parent,
+ wxWindowID winid = wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxHD_DEFAULT_STYLE,
+ const wxString& name = wxHeaderCtrlNameStr);
+
/**
Insert the column at the given position.
diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp
index 5b7205f3d7..26d568cd34 100644
--- a/src/common/datavcmn.cpp
+++ b/src/common/datavcmn.cpp
@@ -832,55 +832,13 @@ void wxDataViewEditorCtrlEvtHandler::OnKillFocus( wxFocusEvent &event )
// wxDataViewColumnBase
// ---------------------------------------------------------
-IMPLEMENT_ABSTRACT_CLASS(wxDataViewColumnBase, wxObject)
-
-wxDataViewColumnBase::wxDataViewColumnBase(const wxString& title,
- wxDataViewRenderer *renderer,
- unsigned int model_column,
- int width,
- wxAlignment align,
- int flags)
-#ifdef wxHAS_GENERIC_DATAVIEWCTRL
- : wxHeaderColumn(title, width, align, flags)
-#endif
+void wxDataViewColumnBase::Init(wxDataViewRenderer *renderer,
+ unsigned int model_column)
{
m_renderer = renderer;
m_model_column = model_column;
m_owner = NULL;
m_renderer->SetOwner( (wxDataViewColumn*) this );
-
- // NOTE: the wxDataViewColumn's ctor must store the width, align, flags
- // parameters inside the native control!
-#ifndef wxHAS_GENERIC_DATAVIEWCTRL
- wxUnusedVar(title);
- wxUnusedVar(width);
- wxUnusedVar(align);
- wxUnusedVar(flags);
-#endif // !wxHAS_GENERIC_DATAVIEWCTRL
-}
-
-wxDataViewColumnBase::wxDataViewColumnBase(const wxBitmap& bitmap,
- wxDataViewRenderer *renderer,
- unsigned int model_column,
- int width,
- wxAlignment align,
- int flags)
-#ifdef wxHAS_GENERIC_DATAVIEWCTRL
- : wxHeaderColumn(bitmap, width, align, flags)
-#else
- : m_bitmap(bitmap)
-#endif
-{
- m_renderer = renderer;
- m_model_column = model_column;
- m_owner = NULL;
- m_renderer->SetOwner( (wxDataViewColumn*) this );
-
-#ifndef wxHAS_GENERIC_DATAVIEWCTRL
- wxUnusedVar(width);
- wxUnusedVar(align);
- wxUnusedVar(flags);
-#endif // !wxHAS_GENERIC_DATAVIEWCTRL
}
wxDataViewColumnBase::~wxDataViewColumnBase()
diff --git a/src/common/headerctrlcmn.cpp b/src/common/headerctrlcmn.cpp
index 80ada16bc8..b91f3fc7d8 100644
--- a/src/common/headerctrlcmn.cpp
+++ b/src/common/headerctrlcmn.cpp
@@ -28,20 +28,23 @@
#include "wx/headerctrl.h"
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+namespace
+{
+
+const unsigned int wxNO_COLUMN = static_cast(-1);
+
+} // anonymous namespace
+
// ============================================================================
// wxHeaderCtrlBase implementation
// ============================================================================
extern WXDLLIMPEXP_DATA_CORE(const char) wxHeaderCtrlNameStr[] = "wxHeaderCtrl";
-void wxHeaderCtrlBase::DeleteAllColumns()
-{
- const unsigned count = GetColumnCount();
- for ( unsigned n = 0; n < count; n++ )
- DeleteColumn(0);
-}
-
-
void wxHeaderCtrlBase::ScrollWindow(int dx,
int WXUNUSED_UNLESS_DEBUG(dy),
const wxRect * WXUNUSED_UNLESS_DEBUG(rect))
@@ -57,3 +60,75 @@ void wxHeaderCtrlBase::ScrollWindow(int dx,
DoScrollHorz(dx);
}
+// ============================================================================
+// wxHeaderCtrlSimple implementation
+// ============================================================================
+
+void wxHeaderCtrlSimple::Init()
+{
+ m_sortKey = wxNO_COLUMN;
+}
+
+wxHeaderColumnBase& wxHeaderCtrlSimple::GetColumn(unsigned int idx)
+{
+ return m_cols[idx];
+}
+
+void wxHeaderCtrlSimple::DoInsert(const wxHeaderColumnSimple& col, unsigned int idx)
+{
+ m_cols.insert(m_cols.begin() + idx, col);
+
+ UpdateColumnCount();
+}
+
+void wxHeaderCtrlSimple::DoDelete(unsigned int idx)
+{
+ m_cols.erase(m_cols.begin() + idx);
+ if ( idx == m_sortKey )
+ m_sortKey = wxNO_COLUMN;
+
+ UpdateColumnCount();
+}
+
+void wxHeaderCtrlSimple::DeleteAllColumns()
+{
+ m_cols.clear();
+ m_sortKey = wxNO_COLUMN;
+
+ UpdateColumnCount();
+}
+
+
+void wxHeaderCtrlSimple::DoShowColumn(unsigned int idx, bool show)
+{
+ if ( show != m_cols[idx].IsShown() )
+ {
+ m_cols[idx].SetHidden(!show);
+
+ UpdateColumn(idx);
+ }
+}
+
+void wxHeaderCtrlSimple::DoShowSortIndicator(unsigned int idx, bool ascending)
+{
+ RemoveSortIndicator();
+
+ m_cols[idx].SetAsSortKey(ascending);
+ m_sortKey = idx;
+
+ UpdateColumn(idx);
+}
+
+void wxHeaderCtrlSimple::RemoveSortIndicator()
+{
+ if ( m_sortKey != wxNO_COLUMN )
+ {
+ const unsigned sortOld = m_sortKey;
+ m_sortKey = wxNO_COLUMN;
+
+ m_cols[sortOld].UnsetAsSortKey();
+
+ UpdateColumn(sortOld);
+ }
+}
+
diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp
index 062f101a1e..339d490174 100644
--- a/src/generic/datavgen.cpp
+++ b/src/generic/datavgen.cpp
@@ -45,6 +45,7 @@
#include "wx/list.h"
#include "wx/listimpl.cpp"
#include "wx/imaglist.h"
+#include "wx/headerctrl.h"
//-----------------------------------------------------------------------------
// classes
@@ -70,195 +71,33 @@ static const int EXPANDER_OFFSET = 1;
// wxDataViewHeaderWindow
//-----------------------------------------------------------------------------
-// on wxMSW the header window (only that part however) can be made native!
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #define USE_NATIVE_HEADER_WINDOW
-
- #include "wx/headerctrl.h"
-#endif
-
//Below is the compare stuff
//For the generic implements, both the leaf nodes and the nodes are sorted for fast search when needed
static wxDataViewModel * g_model;
static int g_column = -2;
static bool g_asending = true;
-// NB: for some reason, this class must be dllexport'ed or we get warnings from
-// MSVC in DLL build
-class WXDLLIMPEXP_ADV wxDataViewHeaderWindowBase : public
-#ifdef USE_NATIVE_HEADER_WINDOW
- wxHeaderCtrl
-#else
- wxControl
-#endif
+class wxDataViewHeaderWindow : public wxHeaderCtrl
{
public:
- wxDataViewHeaderWindowBase()
- { m_owner = NULL; }
-
- bool Create(wxDataViewCtrl *parent, wxWindowID id,
- const wxPoint &pos, const wxSize &size,
- const wxString &name)
+ wxDataViewHeaderWindow(wxDataViewCtrl *parent)
+ : wxHeaderCtrl(parent)
{
- return wxWindow::Create(parent, id, pos, size, wxNO_BORDER, name);
}
- void SetOwner( wxDataViewCtrl* owner ) { m_owner = owner; }
- wxDataViewCtrl *GetOwner() { return m_owner; }
-
- // called on column addition/removal
- virtual void UpdateDisplay() { /* by default, do nothing */ }
-
- // returns the n-th column
- virtual wxDataViewColumn *GetColumn(unsigned int n)
- {
- wxASSERT(m_owner);
- wxDataViewColumn *ret = m_owner->GetColumn(n);
- wxASSERT(ret);
-
- return ret;
- }
+ wxDataViewCtrl *GetOwner() const
+ { return static_cast(GetParent()); }
protected:
- wxDataViewCtrl *m_owner;
-
- // sends an event generated from the n-th wxDataViewColumn
- void SendEvent(wxEventType type, unsigned int n);
-};
-
-#ifdef USE_NATIVE_HEADER_WINDOW
-
-#define COLUMN_WIDTH_OFFSET 2
-#define wxDataViewHeaderWindowMSW wxDataViewHeaderWindow
-
-class wxDataViewHeaderWindowMSW : public wxDataViewHeaderWindowBase
-{
-public:
- wxDataViewHeaderWindowMSW(wxDataViewCtrl *parent)
+ virtual wxHeaderColumnBase& GetColumn(unsigned int idx)
{
- Create(parent);
+ return *(GetOwner()->GetColumn(idx));
}
- bool Create(wxDataViewCtrl *parent);
-
- // called when any column setting is changed and/or changed
- // the column count
- virtual void UpdateDisplay();
-
- virtual void OnInternalIdle();
-
- // called Refresh afterwards
- virtual void ScrollWindow(int dx, int dy, const wxRect *rect = NULL);
-
- virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
-
-protected:
- virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
-
- virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags);
-
- wxSize DoGetBestSize() const;
-
- unsigned int GetColumnIdxFromHeader(NMHEADER *nmHDR);
-
- wxDataViewColumn *GetColumnFromHeader(NMHEADER *nmHDR)
- { return GetColumn(GetColumnIdxFromHeader(nmHDR)); }
-
- int m_scrollOffsetX;
- int m_buttonHeight;
- bool m_vetoColumnDrag;
- bool m_delayedUpdate;
-
private:
- DECLARE_DYNAMIC_CLASS(wxDataViewHeaderWindowMSW)
+ DECLARE_NO_COPY_CLASS(wxDataViewHeaderWindow)
};
-#else // !defined(__WXMSW__)
-
-#define HEADER_WINDOW_HEIGHT 25
-#define HEADER_HORIZ_BORDER 5
-#define HEADER_VERT_BORDER 3
-#define wxGenericDataViewHeaderWindow wxDataViewHeaderWindow
-
-class wxGenericDataViewHeaderWindow : public wxDataViewHeaderWindowBase
-{
-public:
- wxGenericDataViewHeaderWindow( wxDataViewCtrl *parent,
- wxWindowID id = wxID_ANY,
- const wxPoint &pos = wxDefaultPosition,
- const wxSize &size = wxDefaultSize,
- const wxString &name = wxT("wxdataviewctrlheaderwindow") )
- {
- Init();
- Create(parent, id, pos, size, name);
- }
-
- bool Create(wxDataViewCtrl *parent, wxWindowID id,
- const wxPoint &pos, const wxSize &size,
- const wxString &name);
-
- ~wxGenericDataViewHeaderWindow()
- {
- delete m_resizeCursor;
- }
-
- virtual void UpdateDisplay() { Refresh(); }
-
- // event handlers:
-
- void OnPaint( wxPaintEvent &event );
- void OnMouse( wxMouseEvent &event );
- void OnSetFocus( wxFocusEvent &event );
-
-
-protected:
-
- // vars used for column resizing:
-
- wxCursor *m_resizeCursor;
- const wxCursor *m_currentCursor;
- bool m_isDragging;
-
- bool m_dirty; // needs refresh?
- int m_hover; // index of the column under the mouse
- int m_column; // index of the column being resized
- int m_currentX; // divider line position in logical (unscrolled) coords
- int m_minX; // minimal position beyond which the divider line
- // can't be dragged in logical coords
-
- // the pen used to draw the current column width drag line
- // when resizing the columsn
- wxPen m_penCurrent;
-
-
- // internal utilities:
-
- void Init()
- {
- m_currentCursor = (wxCursor *) NULL;
- m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE );
-
- m_isDragging = false;
- m_dirty = false;
-
- m_hover = wxNOT_FOUND;
- m_column = wxNOT_FOUND;
- m_currentX = 0;
- m_minX = 0;
-
- wxColour col = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT);
- m_penCurrent = wxPen(col, 1, wxSOLID);
- }
-
- void AdjustDC(wxDC& dc);
-
-private:
- DECLARE_DYNAMIC_CLASS(wxGenericDataViewHeaderWindow)
- DECLARE_EVENT_TABLE()
-};
-
-#endif // defined(__WXMSW__)
-
//-----------------------------------------------------------------------------
// wxDataViewRenameTimer
//-----------------------------------------------------------------------------
@@ -1170,682 +1009,6 @@ wxDataViewIconTextRenderer::GetValueFromEditorCtrl(wxControl* WXUNUSED(editor),
return false;
}
-// ---------------------------------------------------------
-// wxDataViewColumn
-// ---------------------------------------------------------
-
-IMPLEMENT_ABSTRACT_CLASS(wxDataViewColumn, wxDataViewColumnBase)
-
-wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *cell,
- unsigned int model_column,
- int width, wxAlignment align, int flags ) :
- wxDataViewColumnBase( title, cell, model_column, width, align, flags )
-{
- wxDataViewColumnBase::SetWidth(width == wxCOL_WIDTH_DEFAULT
- ? wxDVC_DEFAULT_WIDTH
- : width);
- SetTitle(title);
- SetAlignment(align);
- SetFlags(flags);
-}
-
-wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell,
- unsigned int model_column,
- int width, wxAlignment align, int flags ) :
- wxDataViewColumnBase( bitmap, cell, model_column, width, align, flags )
-{
- wxDataViewColumnBase::SetWidth(width == wxCOL_WIDTH_DEFAULT
- ? wxDVC_DEFAULT_WIDTH
- : width);
- SetBitmap(bitmap);
- SetAlignment(align);
- SetFlags(flags);
-}
-
-void wxDataViewColumn::SetFlags(int flags)
-{
- if ( flags != GetFlags() )
- {
- wxDataViewColumnBase::SetFlags(flags);
-
- // tell our owner to e.g. update its scrollbars:
- if ( GetOwner() )
- GetOwner()->OnColumnChange();
- }
-}
-
-void wxDataViewColumn::SetSortOrder( bool ascending )
-{
- if ( ascending == IsSortOrderAscending() )
- return;
-
- wxDataViewColumnBase::SetSortOrder(ascending);
-
- // Update header button
- if (GetOwner())
- GetOwner()->OnColumnChange();
-}
-
-void wxDataViewColumn::SetInternalWidth( int width )
-{
- if ( width == GetWidth() )
- return;
-
- wxDataViewColumnBase::SetWidth(width);
-
- // the scrollbars of the wxDataViewCtrl needs to be recalculated!
- if (m_owner && m_owner->m_clientArea)
- m_owner->m_clientArea->RecalculateDisplay();
-}
-
-void wxDataViewColumn::SetWidth( int width )
-{
- if ( width == wxCOL_WIDTH_DEFAULT )
- width = wxDVC_DEFAULT_WIDTH;
-
- if ( width == GetWidth() )
- return;
-
- if (m_owner->m_headerArea)
- m_owner->m_headerArea->UpdateDisplay();
-
- SetInternalWidth(width);
-}
-
-int wxDataViewColumn::GetWidth() const
-{
- int width = wxDataViewColumnBase::GetWidth();
- return width == wxCOL_WIDTH_DEFAULT ? wxDVC_DEFAULT_WIDTH : width;
-}
-
-//-----------------------------------------------------------------------------
-// wxDataViewHeaderWindowBase
-//-----------------------------------------------------------------------------
-
-void wxDataViewHeaderWindowBase::SendEvent(wxEventType type, unsigned int n)
-{
- wxWindow *parent = GetParent();
- wxDataViewEvent le(type, parent->GetId());
-
- le.SetEventObject(parent);
- le.SetColumn(n);
- le.SetDataViewColumn(GetColumn(n));
- le.SetModel(GetOwner()->GetModel());
-
- // for events created by wxDataViewHeaderWindow the
- // row / value fields are not valid
-
- parent->GetEventHandler()->ProcessEvent(le);
-}
-
-#ifdef USE_NATIVE_HEADER_WINDOW
-
-// implemented in msw/listctrl.cpp:
-int WXDLLIMPEXP_CORE wxMSWGetColumnClicked(NMHDR *nmhdr, POINT *ptClick);
-
-IMPLEMENT_ABSTRACT_CLASS(wxDataViewHeaderWindowMSW, wxWindow)
-
-bool wxDataViewHeaderWindowMSW::Create(wxDataViewCtrl *parent)
-{
- m_owner = parent;
-
- m_scrollOffsetX = 0;
- m_delayedUpdate = false;
- m_vetoColumnDrag = false;
- m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this );
-
- return wxHeaderCtrl::Create(parent, wxID_ANY);
-}
-
-wxSize wxDataViewHeaderWindowMSW::DoGetBestSize() const
-{
- return wxSize( 80, m_buttonHeight+2 );
-}
-
-void wxDataViewHeaderWindowMSW::OnInternalIdle()
-{
- if (m_delayedUpdate)
- {
- m_delayedUpdate = false;
- UpdateDisplay();
- }
-}
-
-void wxDataViewHeaderWindowMSW::UpdateDisplay()
-{
- // remove old columns
- DeleteAllColumns();
-
- // add the updated array of columns to the header control
- const unsigned int cols = GetOwner()->GetColumnCount();
- for (unsigned int i = 0; i < cols; i++)
- {
- wxDataViewColumn * const col = GetColumn( i );
- if (col->IsHidden())
- continue; // don't add it!
-
- // we store the column index to use later as client data (we need to do
- // it since column indices in the control and the model may not be the
- // same if any columns have been hidden)
- col->SetClientData(i);
-
- AppendColumn(*col);
-
- if ( col->IsSortable() && GetOwner()->GetSortingColumn() == col )
- {
- ShowSortIndicator(GetColumnCount() - 1, col->IsSortOrderAscending());
- }
-
-#if 0
- // the native wxMSW implementation of the header window
- // draws the column separator COLUMN_WIDTH_OFFSET pixels
- // on the right: to correct this effect we make the column
- // exactly COLUMN_WIDTH_OFFSET wider (for the first column):
- if (i == 0)
- hdi.cxy += COLUMN_WIDTH_OFFSET;
-#endif
- }
-}
-
-unsigned int wxDataViewHeaderWindowMSW::GetColumnIdxFromHeader(NMHEADER *nmHDR)
-{
- unsigned int idx;
-
- // NOTE: we don't just return nmHDR->iItem because when there are
- // hidden columns, nmHDR->iItem may be different from
- // nmHDR->pitem->lParam
-
- if (nmHDR->pitem && nmHDR->pitem->mask & HDI_LPARAM)
- {
- idx = (unsigned int)nmHDR->pitem->lParam;
- return idx;
- }
-
- HDITEM item;
- item.mask = HDI_LPARAM;
- Header_GetItem((HWND)m_hWnd, nmHDR->iItem, &item);
-
- return (unsigned int)item.lParam;
-}
-
-bool wxDataViewHeaderWindowMSW::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
-{
- NMHDR *nmhdr = (NMHDR *)lParam;
-
- // is it a message from the header?
- if ( nmhdr->hwndFrom != (HWND)m_hWnd )
- return wxWindow::MSWOnNotify(idCtrl, lParam, result);
-
- NMHEADER *nmHDR = (NMHEADER *)nmhdr;
- switch ( nmhdr->code )
- {
- case NM_RELEASEDCAPTURE:
- {
- // user has released the mouse
- m_vetoColumnDrag = false;
- }
- break;
-
- case HDN_BEGINTRACK:
- // user has started to resize a column:
- // do we need to veto it?
- if (!GetColumn(nmHDR->iItem)->IsResizeable())
- {
- // veto it!
- *result = TRUE;
- }
- break;
-
- case HDN_BEGINDRAG:
- // valid column
- if (nmHDR->iItem != -1)
- {
- // user has started to reorder a valid column
- if ((m_vetoColumnDrag == true) || (!GetColumn(nmHDR->iItem)->IsReorderable()))
- {
- // veto it!
- *result = TRUE;
- m_vetoColumnDrag = true;
- }
- }
- else
- {
- // veto it!
- m_vetoColumnDrag = true;
- }
- break;
-
- case HDN_ENDDRAG: // user has finished reordering a column
- {
- wxDataViewColumn *col = GetColumn(nmHDR->iItem);
- unsigned int new_pos = nmHDR->pitem->iOrder;
- m_owner->ColumnMoved( col, new_pos );
- m_delayedUpdate = true;
- }
- break;
-
- case HDN_ITEMCHANGING:
- if (nmHDR->pitem != NULL &&
- (nmHDR->pitem->mask & HDI_WIDTH) != 0)
- {
- int minWidth = GetColumnFromHeader(nmHDR)->GetMinWidth();
- if (nmHDR->pitem->cxy < minWidth)
- {
- // do not allow the user to resize this column under
- // its minimal width:
- *result = TRUE;
- }
- }
- break;
-
- case HDN_ITEMCHANGED: // user is resizing a column
- case HDN_ENDTRACK: // user has finished resizing a column
-
- // update the width of the modified column:
- if (nmHDR->pitem != NULL &&
- (nmHDR->pitem->mask & HDI_WIDTH) != 0)
- {
- unsigned int idx = GetColumnIdxFromHeader(nmHDR);
- unsigned int w = nmHDR->pitem->cxy;
- wxDataViewColumn *col = GetColumn(idx);
-
- // see UpdateDisplay() for more info about COLUMN_WIDTH_OFFSET
- if (idx == 0 && w > COLUMN_WIDTH_OFFSET)
- w -= COLUMN_WIDTH_OFFSET;
-
- if (w >= (unsigned)col->GetMinWidth())
- col->SetInternalWidth(w);
- }
- break;
-
- case HDN_ITEMCLICK:
- {
- unsigned int idx = GetColumnIdxFromHeader(nmHDR);
- wxDataViewModel * model = GetOwner()->GetModel();
-
- if(nmHDR->iButton == 0)
- {
- wxDataViewColumn *col = GetColumn(idx);
- if(col->IsSortable())
- {
- if(model && m_owner->GetSortingColumn() == col)
- {
- bool order = col->IsSortOrderAscending();
- col->SetSortOrder(!order);
- }
- else if(model)
- {
- m_owner->SetSortingColumn(col);
- }
- }
- UpdateDisplay();
- if(model)
- model->Resort();
- }
-
- wxEventType evt = nmHDR->iButton == 0 ?
- wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK :
- wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK;
- SendEvent(evt, idx);
- }
- break;
-
- case NM_RCLICK:
- {
- // NOTE: for some reason (i.e. for a bug in Windows)
- // the HDN_ITEMCLICK notification is not sent on
- // right clicks, so we need to handle NM_RCLICK
-
- POINT ptClick;
- int column = wxMSWGetColumnClicked(nmhdr, &ptClick);
- if (column != wxNOT_FOUND)
- {
- HDITEM item;
- item.mask = HDI_LPARAM;
- Header_GetItem((HWND)m_hWnd, column, &item);
-
- // 'idx' may be different from 'column' if there are
- // hidden columns...
- unsigned int idx = (unsigned int)item.lParam;
- SendEvent(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK,
- idx);
- }
- }
- break;
-
- case HDN_GETDISPINFOW:
- // see wxListCtrl::MSWOnNotify for more info!
- break;
-
- case HDN_ITEMDBLCLICK:
- {
- unsigned int idx = GetColumnIdxFromHeader(nmHDR);
- int w = GetOwner()->GetBestColumnWidth(idx);
-
- // update the native control:
- HDITEM hd;
- ZeroMemory(&hd, sizeof(hd));
- hd.mask = HDI_WIDTH;
- hd.cxy = w;
- Header_SetItem(GetHwnd(),
- nmHDR->iItem, // NOTE: we don't want 'idx' here!
- &hd);
-
- // update the wxDataViewColumn class:
- GetColumn(idx)->SetInternalWidth(w);
- }
- break;
-
- default:
- return wxWindow::MSWOnNotify(idCtrl, lParam, result);
- }
-
- return true;
-}
-
-void wxDataViewHeaderWindowMSW::ScrollWindow(int dx, int WXUNUSED(dy),
- const wxRect * WXUNUSED(rect))
-{
- m_scrollOffsetX += dx;
-
- GetParent()->Layout();
-}
-
-void wxDataViewHeaderWindowMSW::DoSetSize(int x, int y,
- int w, int h,
- int f)
-{
- // TODO: why is there a border + 2px around it?
- wxControl::DoSetSize( x+m_scrollOffsetX+1, y+1, w-m_scrollOffsetX-2, h-2, f );
-}
-
-#else // !defined(__WXMSW__)
-
-IMPLEMENT_ABSTRACT_CLASS(wxGenericDataViewHeaderWindow, wxWindow)
-BEGIN_EVENT_TABLE(wxGenericDataViewHeaderWindow, wxWindow)
- EVT_PAINT (wxGenericDataViewHeaderWindow::OnPaint)
- EVT_MOUSE_EVENTS (wxGenericDataViewHeaderWindow::OnMouse)
- EVT_SET_FOCUS (wxGenericDataViewHeaderWindow::OnSetFocus)
-END_EVENT_TABLE()
-
-bool wxGenericDataViewHeaderWindow::Create(wxDataViewCtrl *parent, wxWindowID id,
- const wxPoint &pos, const wxSize &size,
- const wxString &name )
-{
- m_owner = parent;
-
- if (!wxDataViewHeaderWindowBase::Create(parent, id, pos, size, name))
- return false;
-
- wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
- SetBackgroundStyle( wxBG_STYLE_CUSTOM );
- SetOwnForegroundColour( attr.colFg );
- SetOwnBackgroundColour( attr.colBg );
- if (!m_hasFont)
- SetOwnFont( attr.font );
-
- // set our size hints: wxDataViewCtrl will put this wxWindow inside
- // a wxBoxSizer and in order to avoid super-big header windows,
- // we need to set our height as fixed
- SetMinSize(wxSize(-1, HEADER_WINDOW_HEIGHT));
- SetMaxSize(wxSize(-1, HEADER_WINDOW_HEIGHT));
-
- return true;
-}
-
-void wxGenericDataViewHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
-{
- int w, h;
- GetClientSize( &w, &h );
-
- wxAutoBufferedPaintDC dc( this );
-
- dc.SetBackground(GetBackgroundColour());
- dc.Clear();
-
- int xpix;
- m_owner->GetScrollPixelsPerUnit( &xpix, NULL );
-
- int x;
- m_owner->GetViewStart( &x, NULL );
-
- // account for the horz scrollbar offset
- dc.SetDeviceOrigin( -x * xpix, 0 );
-
- dc.SetFont( GetFont() );
-
- unsigned int cols = GetOwner()->GetColumnCount();
- unsigned int i;
- int xpos = 0;
- for (i = 0; i < cols; i++)
- {
- wxDataViewColumn *col = GetColumn( i );
- if (col->IsHidden())
- continue; // skip it!
-
- int cw = col->GetWidth();
- int ch = h;
-
- wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE;
- if (col->IsSortable() && GetOwner()->GetSortingColumn() == col)
- {
- if (col->IsSortOrderAscending())
- sortArrow = wxHDR_SORT_ICON_UP;
- else
- sortArrow = wxHDR_SORT_ICON_DOWN;
- }
-
- int state = 0;
- if (m_parent->IsEnabled())
- {
- if ((int) i == m_hover)
- state = wxCONTROL_CURRENT;
- }
- else
- {
- state = (int) wxCONTROL_DISABLED;
- }
-
- wxRendererNative::Get().DrawHeaderButton
- (
- this,
- dc,
- wxRect(xpos, 0, cw, ch-1),
- state,
- sortArrow
- );
-
- // align as required the column title:
- int x = xpos;
- wxSize titleSz = dc.GetTextExtent(col->GetTitle());
- switch (col->GetAlignment())
- {
- case wxALIGN_LEFT:
- x += HEADER_HORIZ_BORDER;
- break;
- case wxALIGN_RIGHT:
- x += cw - titleSz.GetWidth() - HEADER_HORIZ_BORDER;
- break;
- default:
- case wxALIGN_CENTER:
- case wxALIGN_CENTER_HORIZONTAL:
- x += (cw - titleSz.GetWidth() - 2 * HEADER_HORIZ_BORDER)/2;
- break;
- }
-
- // always center the title vertically:
- int y = wxMax((ch - titleSz.GetHeight()) / 2, HEADER_VERT_BORDER);
-
- dc.SetClippingRegion( xpos+HEADER_HORIZ_BORDER,
- HEADER_VERT_BORDER,
- wxMax(cw - 2 * HEADER_HORIZ_BORDER, 1), // width
- wxMax(ch - 2 * HEADER_VERT_BORDER, 1)); // height
- dc.DrawText( col->GetTitle(), x, y );
- dc.DestroyClippingRegion();
-
- xpos += cw;
- }
-}
-
-void wxGenericDataViewHeaderWindow::OnSetFocus( wxFocusEvent &event )
-{
- GetParent()->SetFocus();
- event.Skip();
-}
-
-void wxGenericDataViewHeaderWindow::OnMouse( wxMouseEvent &event )
-{
- // we want to work with logical coords
- int x;
- m_owner->CalcUnscrolledPosition(event.GetX(), 0, &x, NULL);
- int y = event.GetY();
-
- if (m_isDragging)
- {
- // we don't draw the line beyond our window,
- // but we allow dragging it there
- int w = 0;
- GetClientSize( &w, NULL );
- m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
- w -= 6;
-
- if (event.ButtonUp())
- {
- m_isDragging = false;
- if (HasCapture())
- ReleaseMouse();
-
- m_dirty = true;
- }
- m_currentX = wxMax(m_minX + 7, x);
-
- if (m_currentX < w)
- {
- GetColumn(m_column)->SetWidth(m_currentX - m_minX);
- Refresh();
- GetOwner()->Refresh();
- }
-
- }
- else // not dragging
- {
- m_minX = 0;
- m_column = wxNOT_FOUND;
-
- bool hit_border = false;
-
- // end of the current column
- int xpos = 0;
-
- // find the column where this event occured
- int countCol = m_owner->GetColumnCount();
- for (int column = 0; column < countCol; column++)
- {
- wxDataViewColumn *p = GetColumn(column);
-
- if (p->IsHidden())
- continue; // skip if not shown
-
- xpos += p->GetWidth();
- m_column = column;
- if ((abs(x-xpos) < 3) && (y < 22))
- {
- hit_border = true;
- break;
- }
-
- if (x < xpos)
- {
- // inside the column
- break;
- }
-
- m_minX = xpos;
- }
-
- int old_hover = m_hover;
- m_hover = m_column;
- if (event.Leaving())
- m_hover = wxNOT_FOUND;
- if (old_hover != m_hover)
- Refresh();
-
- if (m_column == wxNOT_FOUND)
- return;
-
- bool resizeable = GetColumn(m_column)->IsResizeable();
- if (event.LeftDClick() && resizeable)
- {
- GetColumn(m_column)->SetWidth(GetOwner()->GetBestColumnWidth(m_column));
- Refresh();
- }
- else if (event.LeftDown() || event.RightUp())
- {
- if (hit_border && event.LeftDown() && resizeable)
- {
- m_isDragging = true;
- CaptureMouse();
- m_currentX = x;
- }
- else // click on a column
- {
- wxDataViewModel * model = GetOwner()->GetModel();
- wxEventType evt = event.LeftDown() ?
- wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK :
- wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK;
- SendEvent(evt, m_column);
-
- //Left click the header
- if(event.LeftDown())
- {
- wxDataViewColumn *col = GetColumn(m_column);
- if(col->IsSortable())
- {
- wxDataViewColumn* sortCol = m_owner->GetSortingColumn();
- if(model && sortCol == col)
- {
- bool order = col->IsSortOrderAscending();
- col->SetSortOrder(!order);
- }
- else if(model)
- {
- m_owner->SetSortingColumn(col);
- }
- }
- UpdateDisplay();
- if(model)
- model->Resort();
- //Send the column sorted event
- SendEvent(wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, m_column);
- }
- }
- }
- else if (event.Moving())
- {
- if (hit_border && resizeable)
- m_currentCursor = m_resizeCursor;
- else
- m_currentCursor = wxSTANDARD_CURSOR;
-
- SetCursor(*m_currentCursor);
- }
- }
-}
-
-void wxGenericDataViewHeaderWindow::AdjustDC(wxDC& dc)
-{
- int xpix, x;
-
- m_owner->GetScrollPixelsPerUnit( &xpix, NULL );
- m_owner->GetViewStart( &x, NULL );
-
- // shift the DC origin to match the position of the main window horizontal
- // scrollbar: this allows us to always use logical coords
- dc.SetDeviceOrigin( -x * xpix, 0 );
-}
-
-#endif // defined(__WXMSW__)
-
//-----------------------------------------------------------------------------
// wxDataViewRenameTimer
//-----------------------------------------------------------------------------
@@ -4105,7 +3268,7 @@ bool wxDataViewCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *col )
void wxDataViewCtrl::OnColumnChange()
{
if (m_headerArea)
- m_headerArea->UpdateDisplay();
+ m_headerArea->SetColumnCount(GetColumnCount());
m_clientArea->UpdateDisplay();
}
diff --git a/src/generic/headercolg.cpp b/src/generic/headercolg.cpp
deleted file mode 100644
index 12e78c0bd0..0000000000
--- a/src/generic/headercolg.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: src/generic/headercolg.cpp
-// Purpose: generic wxHeaderColumn implementation
-// Author: Vadim Zeitlin
-// Created: 2008-12-03
-// RCS-ID: $Id$
-// Copyright: (c) 2008 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-// for compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif // WX_PRECOMP
-
-#include "wx/headercol.h"
-
-#ifdef wxHAS_GENERIC_HEADERCOL
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-#endif // wxHAS_GENERIC_HEADERCOL
diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp
index d42a3f8ac8..bc0880a990 100644
--- a/src/generic/headerctrlg.cpp
+++ b/src/generic/headerctrlg.cpp
@@ -91,43 +91,6 @@ unsigned int wxHeaderCtrl::DoGetCount() const
return m_cols.size();
}
-void wxHeaderCtrl::DoInsert(const wxHeaderColumn& col, unsigned int idx)
-{
- m_cols.insert(m_cols.begin() + idx, col);
- m_sortOrders.insert(m_sortOrders.begin() + idx, -1);
-
- if ( m_cols[idx].IsShown() )
- RefreshColsAfter(idx);
-}
-
-void wxHeaderCtrl::DoDelete(unsigned int idx)
-{
- m_cols.erase(m_cols.begin() + idx);
- m_sortOrders.erase(m_sortOrders.begin() + idx);
-
- RefreshColsAfter(idx);
-}
-
-void wxHeaderCtrl::DoShowColumn(unsigned int idx, bool show)
-{
- if ( show != m_cols[idx].IsShown() )
- {
- m_cols[idx].SetHidden(!show);
-
- RefreshColsAfter(idx);
- }
-}
-
-void wxHeaderCtrl::DoShowSortIndicator(unsigned int idx, int sortOrder)
-{
- if ( sortOrder != m_sortOrders[idx] )
- {
- m_sortOrders[idx] = sortOrder;
-
- RefreshCol(idx);
- }
-}
-
// ----------------------------------------------------------------------------
// wxHeaderCtrl scrolling
// ----------------------------------------------------------------------------
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
index 282c0637e9..ab13937530 100644
--- a/src/gtk/dataview.cpp
+++ b/src/gtk/dataview.cpp
@@ -2527,7 +2527,6 @@ wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *c
{
Init( align, flags, width );
- gtk_tree_view_column_set_clickable( GTK_TREE_VIEW_COLUMN(m_column), TRUE );
SetTitle( title );
}
@@ -2570,10 +2569,6 @@ void wxDataViewColumn::Init(wxAlignment align, int flags, int width)
wxGtkTreeCellDataFunc, (gpointer) GetRenderer(), NULL );
}
-wxDataViewColumn::~wxDataViewColumn()
-{
-}
-
void wxDataViewColumn::OnInternalIdle()
{
if (m_isConnected)
@@ -2693,7 +2688,21 @@ void wxDataViewColumn::SetSortable( bool sortable )
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
- if (sortable)
+ gtk_tree_view_column_set_clickable( GTK_TREE_VIEW_COLUMN(m_column),
+ sortable );
+}
+
+bool wxDataViewColumn::IsSortable() const
+{
+ GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
+ return gtk_tree_view_column_get_clickable( column );
+}
+
+void wxDataViewColumn::SetAsSortKey( bool sort )
+{
+ GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
+
+ if (sort)
{
gtk_tree_view_column_set_sort_column_id( column, GetModelColumn() );
}
@@ -2704,7 +2713,7 @@ void wxDataViewColumn::SetSortable( bool sortable )
}
}
-bool wxDataViewColumn::IsSortable() const
+bool wxDataViewColumn::IsSortKey() const
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
return (gtk_tree_view_column_get_sort_column_id( column ) != -1);
diff --git a/src/msw/headercol.cpp b/src/msw/headercol.cpp
deleted file mode 100644
index 0c96cc35a4..0000000000
--- a/src/msw/headercol.cpp
+++ /dev/null
@@ -1,255 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: src/msw/headercol.cpp
-// Purpose: wxHeaderColumn implementation for wxMSW
-// Author: Vadim Zeitlin
-// Created: 2008-12-03
-// RCS-ID: $Id$
-// Copyright: (c) 2008 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-// for compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif // WX_PRECOMP
-
-#include "wx/headercol.h"
-
-#include "wx/msw/wrapcctl.h"
-
-// ----------------------------------------------------------------------------
-// wxMSWHeaderColumnImpl
-// ----------------------------------------------------------------------------
-
-struct wxMSWHeaderColumnImpl
-{
- wxMSWHeaderColumnImpl()
- {
- flags = wxCOL_DEFAULT_FLAGS;
- minWidth = 0;
- ascending = true;
- }
-
- wxHDITEM hdi;
- wxWxCharBuffer bufTitle;
- wxBitmap bmp;
- int flags; // combination of wxCOL_XXX constants
- int minWidth; // 0 if not set
- bool ascending; // sort order
-
- DECLARE_NO_COPY_CLASS(wxMSWHeaderColumnImpl)
-};
-
-// ============================================================================
-// wxHeaderColumn implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxHeaderColumn construction/destruction
-// ----------------------------------------------------------------------------
-
-void wxHeaderColumn::Init()
-{
- m_impl = new wxMSWHeaderColumnImpl;
-}
-
-wxHeaderColumn::wxHeaderColumn(const wxString& title,
- int width,
- wxAlignment align,
- int flags)
-{
- Init();
-
- SetTitle(title);
- SetWidth(width);
- SetAlignment(align);
- SetFlags(flags);
-}
-
-wxHeaderColumn::wxHeaderColumn(const wxBitmap& bitmap,
- int width,
- wxAlignment align,
- int flags)
-{
- Init();
-
- SetBitmap(bitmap);
- SetWidth(width);
- SetAlignment(align);
- SetFlags(flags);
-}
-
-wxHeaderColumn::~wxHeaderColumn()
-{
- delete m_impl;
-}
-
-// ----------------------------------------------------------------------------
-// wxHeaderColumn accessors corresponding to HDITEM fields
-// ----------------------------------------------------------------------------
-
-wxHDITEM& wxHeaderColumn::GetHDI()
-{
- return m_impl->hdi;
-}
-
-void wxHeaderColumn::SetTitle(const wxString& title)
-{
- HDITEM& hdi = m_impl->hdi;
-
- hdi.mask |= HDI_TEXT;
-
- // notice that we need to store the string we use the pointer to
- wxWxCharBuffer& buf = m_impl->bufTitle;
- buf = title.wc_str();
- hdi.pszText = buf.data();
- hdi.cchTextMax = wxStrlen(buf);
-}
-
-wxString wxHeaderColumn::GetTitle() const
-{
- HDITEM& hdi = m_impl->hdi;
-
- wxASSERT_MSG( hdi.mask & HDI_TEXT, "title not set" );
-
- return hdi.pszText;
-}
-
-void wxHeaderColumn::SetWidth(int width)
-{
- HDITEM& hdi = m_impl->hdi;
-
- if ( width != wxCOL_WIDTH_DEFAULT )
- {
- hdi.mask |= HDI_WIDTH;
- hdi.cxy = width;
- }
-}
-
-int wxHeaderColumn::GetWidth() const
-{
- HDITEM& hdi = m_impl->hdi;
-
- return hdi.mask & HDI_WIDTH ? hdi.cxy : wxCOL_WIDTH_DEFAULT;
-}
-
-void wxHeaderColumn::SetAlignment(wxAlignment align)
-{
- HDITEM& hdi = m_impl->hdi;
-
- if ( align != wxALIGN_NOT )
- {
- hdi.mask |= HDI_FORMAT;
- switch ( align )
- {
- case wxALIGN_LEFT:
- hdi.fmt |= HDF_LEFT;
- break;
-
- case wxALIGN_CENTER:
- case wxALIGN_CENTER_HORIZONTAL:
- hdi.fmt |= HDF_CENTER;
- break;
-
- case wxALIGN_RIGHT:
- hdi.fmt |= HDF_RIGHT;
- break;
-
- default:
- wxFAIL_MSG( "invalid column header alignment" );
- }
- }
-}
-
-wxAlignment wxHeaderColumn::GetAlignment() const
-{
- HDITEM& hdi = m_impl->hdi;
-
- if ( !(hdi.mask & HDI_FORMAT) )
- return wxALIGN_NOT;
-
- if ( hdi.fmt & HDF_CENTER )
- return wxALIGN_CENTER;
-
- if ( hdi.fmt & HDF_RIGHT )
- return wxALIGN_RIGHT;
-
- // HDF_LEFT == 0 so it doesn't make sense to test for it with bit and
- return wxALIGN_LEFT;
-}
-
-void wxHeaderColumn::SetClientData(wxUIntPtr data)
-{
- HDITEM& hdi = m_impl->hdi;
-
- hdi.mask |= HDI_LPARAM;
- hdi.lParam = data;
-}
-
-wxUIntPtr wxHeaderColumn::GetClientData() const
-{
- HDITEM& hdi = m_impl->hdi;
-
- wxASSERT_MSG( hdi.mask & HDI_LPARAM, "client data not set" );
-
- return hdi.lParam;
-}
-
-// ----------------------------------------------------------------------------
-// wxHeaderColumn trivial accessors for fields stored internally
-// ----------------------------------------------------------------------------
-
-void wxHeaderColumn::SetBitmap(const wxBitmap& bitmap)
-{
- m_impl->bmp = bitmap;
-}
-
-wxBitmap wxHeaderColumn::GetBitmap() const
-{
- return m_impl->bmp;
-}
-
-void wxHeaderColumn::SetMinWidth(int minWidth)
-{
- m_impl->minWidth = minWidth;
-}
-
-int wxHeaderColumn::GetMinWidth() const
-{
- return m_impl->minWidth;
-}
-
-void wxHeaderColumn::SetFlags(int flags)
-{
- m_impl->flags = flags;
-}
-
-int wxHeaderColumn::GetFlags() const
-{
- return m_impl->flags;
-}
-
-void wxHeaderColumn::SetSortOrder(bool ascending)
-{
- m_impl->ascending = ascending;
-}
-
-bool wxHeaderColumn::IsSortOrderAscending() const
-{
- return m_impl->ascending;
-}
-
-
diff --git a/src/msw/headerctrl.cpp b/src/msw/headerctrl.cpp
index 5d141a49cb..f12c8c1f71 100644
--- a/src/msw/headerctrl.cpp
+++ b/src/msw/headerctrl.cpp
@@ -128,10 +128,49 @@ unsigned int wxHeaderCtrl::DoGetCount() const
return Header_GetItemCount(GetHwnd());
}
-void wxHeaderCtrl::DoInsert(const wxHeaderColumn& col, unsigned int idx)
+void wxHeaderCtrl::DoSetCount(unsigned int count)
{
- // copy the HDITEM because we may modify it below
- HDITEM hdi = col.GetHDI();
+ unsigned n;
+
+ // first delete all old columns
+ const unsigned countOld = DoGetCount();
+ for ( n = 0; n < countOld; n++ )
+ {
+ if ( !Header_DeleteItem(GetHwnd(), 0) )
+ {
+ wxLogLastError(_T("Header_DeleteItem"));
+ }
+ }
+
+ // and add the new ones
+ for ( n = 0; n < count; n++ )
+ {
+ DoSetOrInsertItem(Insert, n);
+ }
+}
+
+void wxHeaderCtrl::DoUpdate(unsigned int idx)
+{
+ DoSetOrInsertItem(Set, idx);
+}
+
+void wxHeaderCtrl::DoSetOrInsertItem(Operation oper, unsigned int idx)
+{
+ const wxHeaderColumnBase& col = GetColumn(idx);
+
+ wxHDITEM hdi;
+
+ // notice that we need to store the string we use the pointer to until we
+ // pass it to the control
+ wxWxCharBuffer buf;
+ if ( !col.GetTitle().empty() )
+ {
+ hdi.mask |= HDI_TEXT;
+
+ buf = col.GetTitle().wx_str();
+ hdi.pszText = buf.data();
+ hdi.cchTextMax = wxStrlen(buf);
+ }
const wxBitmap bmp = col.GetBitmap();
if ( bmp.IsOk() )
@@ -160,72 +199,54 @@ void wxHeaderCtrl::DoInsert(const wxHeaderColumn& col, unsigned int idx)
hdi.iImage = m_imageList->GetImageCount() - 1;
}
- if ( col.IsHidden() )
+ if ( col.GetAlignment() != wxALIGN_NOT )
+ {
+ hdi.mask |= HDI_FORMAT;
+ switch ( col.GetAlignment() )
+ {
+ case wxALIGN_LEFT:
+ hdi.fmt |= HDF_LEFT;
+ break;
+
+ case wxALIGN_CENTER:
+ case wxALIGN_CENTER_HORIZONTAL:
+ hdi.fmt |= HDF_CENTER;
+ break;
+
+ case wxALIGN_RIGHT:
+ hdi.fmt |= HDF_RIGHT;
+ break;
+
+ default:
+ wxFAIL_MSG( "invalid column header alignment" );
+ }
+ }
+
+ if ( col.IsSortKey() )
+ {
+ hdi.mask |= HDI_FORMAT;
+ hdi.fmt |= col.IsSortOrderAscending() ? HDF_SORTUP : HDF_SORTDOWN;
+ }
+
+ if ( col.GetWidth() != wxCOL_WIDTH_DEFAULT || col.IsHidden() )
{
hdi.mask |= HDI_WIDTH;
- hdi.cxy = 0;
+ hdi.cxy = col.IsHidden() ? 0 : col.GetWidth();
}
- if ( Header_InsertItem(GetHwnd(), idx, &hdi) == -1 )
+ const LRESULT rc = ::SendMessage(GetHwnd(),
+ oper == Set ? HDM_SETITEM : HDM_INSERTITEM,
+ idx,
+ (LPARAM)&hdi);
+ if ( oper == Set )
{
- wxLogLastError(_T("Header_InsertItem"));
- }
-}
-
-void wxHeaderCtrl::DoDelete(unsigned int idx)
-{
- if ( !Header_DeleteItem(GetHwnd(), idx) )
- {
- wxLogLastError(_T("Header_DeleteItem"));
- }
-}
-
-// ----------------------------------------------------------------------------
-// wxHeaderCtrl columns attributes
-// ----------------------------------------------------------------------------
-
-void wxHeaderCtrl::DoShowColumn(unsigned int idx, bool show)
-{
- wxHDITEM hdi;
- hdi.mask = HDI_WIDTH;
-
- if ( !Header_GetItem(GetHwnd(), idx, &hdi) )
- {
- wxLogLastError(_T("Header_GetItem(HDI_WIDTH)"));
- return;
- }
-
- if ( show )
- hdi.cxy = 80; // FIXME: we don't have the column width here any more
- else
- hdi.cxy = 0;
-
- if ( !Header_SetItem(GetHwnd(), idx, &hdi) )
- {
- wxLogLastError(_T("Header_SetItem(HDI_WIDTH)"));
- return;
- }
-}
-
-void wxHeaderCtrl::DoShowSortIndicator(unsigned int idx, int sortOrder)
-{
- wxHDITEM hdi;
- hdi.mask = HDI_FORMAT;
-
- if ( !Header_GetItem(GetHwnd(), idx, &hdi) )
- {
- wxLogLastError(_T("Header_GetItem(HDI_FORMAT)"));
- return;
- }
-
- if ( sortOrder == -1 )
- hdi.fmt &= ~(HDF_SORTDOWN | HDF_SORTUP);
- else
- hdi.fmt |= sortOrder ? HDF_SORTUP : HDF_SORTDOWN;
-
- if ( !Header_SetItem(GetHwnd(), idx, &hdi) )
- {
- wxLogLastError(_T("Header_SetItem(HDI_FORMAT)"));
+ if ( !rc )
+ wxLogLastError(_T("Header_SetItem()"));
+ }
+ else // Insert
+ {
+ if ( rc == -1 )
+ wxLogLastError(_T("Header_InsertItem()"));
}
}
diff --git a/tests/controls/headerctrltest.cpp b/tests/controls/headerctrltest.cpp
index 449d8152f6..9ecd89bfcb 100644
--- a/tests/controls/headerctrltest.cpp
+++ b/tests/controls/headerctrltest.cpp
@@ -45,7 +45,7 @@ private:
void AddDelete();
void BestSize();
- wxHeaderCtrl *m_header;
+ wxHeaderCtrlSimple *m_header;
DECLARE_NO_COPY_CLASS(HeaderCtrlTestCase)
};
@@ -62,7 +62,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( HeaderCtrlTestCase, "HeaderCtrlTestCase"
void HeaderCtrlTestCase::setUp()
{
- m_header = new wxHeaderCtrl(wxTheApp->GetTopWindow());
+ m_header = new wxHeaderCtrlSimple(wxTheApp->GetTopWindow());
}
void HeaderCtrlTestCase::tearDown()