Merge branch 'system-theme'
Improvements for list/tree control appearance under MSW, see #16414.
This commit is contained in:
commit
e5fe3977f4
33
Makefile.in
33
Makefile.in
@ -4278,6 +4278,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \
|
||||
wx/xpmdecod.h \
|
||||
wx/xpmhand.h \
|
||||
wx/xrc/xmlreshandler.h \
|
||||
wx/systhemectrl.h \
|
||||
$(LOWLEVEL_HDR) \
|
||||
$(GUI_CORE_HEADERS) \
|
||||
$(ADVANCED_HDR) \
|
||||
@ -5905,6 +5906,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS = \
|
||||
monodll_msw_textentry.o \
|
||||
monodll_msw_tglbtn.o \
|
||||
monodll_treectrl.o \
|
||||
monodll_systhemectrl.o \
|
||||
monodll_msw_checklst.o \
|
||||
monodll_msw_fdrepdlg.o \
|
||||
monodll_msw_fontdlg.o
|
||||
@ -6065,6 +6067,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS = \
|
||||
monodll_msw_textentry.o \
|
||||
monodll_msw_tglbtn.o \
|
||||
monodll_treectrl.o \
|
||||
monodll_systhemectrl.o \
|
||||
monodll_dirdlgg.o \
|
||||
monodll_generic_fdrepdlg.o \
|
||||
monodll_filedlgg.o \
|
||||
@ -8277,6 +8280,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_1 = \
|
||||
monolib_msw_textentry.o \
|
||||
monolib_msw_tglbtn.o \
|
||||
monolib_treectrl.o \
|
||||
monolib_systhemectrl.o \
|
||||
monolib_msw_checklst.o \
|
||||
monolib_msw_fdrepdlg.o \
|
||||
monolib_msw_fontdlg.o
|
||||
@ -8437,6 +8441,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_1 = \
|
||||
monolib_msw_textentry.o \
|
||||
monolib_msw_tglbtn.o \
|
||||
monolib_treectrl.o \
|
||||
monolib_systhemectrl.o \
|
||||
monolib_dirdlgg.o \
|
||||
monolib_generic_fdrepdlg.o \
|
||||
monolib_filedlgg.o \
|
||||
@ -10801,6 +10806,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_2 = \
|
||||
coredll_msw_textentry.o \
|
||||
coredll_msw_tglbtn.o \
|
||||
coredll_treectrl.o \
|
||||
coredll_systhemectrl.o \
|
||||
coredll_msw_checklst.o \
|
||||
coredll_msw_fdrepdlg.o \
|
||||
coredll_msw_fontdlg.o
|
||||
@ -10961,6 +10967,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_2 = \
|
||||
coredll_msw_textentry.o \
|
||||
coredll_msw_tglbtn.o \
|
||||
coredll_treectrl.o \
|
||||
coredll_systhemectrl.o \
|
||||
coredll_dirdlgg.o \
|
||||
coredll_generic_fdrepdlg.o \
|
||||
coredll_filedlgg.o \
|
||||
@ -12580,6 +12587,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_3 = \
|
||||
corelib_msw_textentry.o \
|
||||
corelib_msw_tglbtn.o \
|
||||
corelib_treectrl.o \
|
||||
corelib_systhemectrl.o \
|
||||
corelib_msw_checklst.o \
|
||||
corelib_msw_fdrepdlg.o \
|
||||
corelib_msw_fontdlg.o
|
||||
@ -12740,6 +12748,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_3 = \
|
||||
corelib_msw_textentry.o \
|
||||
corelib_msw_tglbtn.o \
|
||||
corelib_treectrl.o \
|
||||
corelib_systhemectrl.o \
|
||||
corelib_dirdlgg.o \
|
||||
corelib_generic_fdrepdlg.o \
|
||||
corelib_filedlgg.o \
|
||||
@ -21776,6 +21785,12 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_treectrl.o: $(srcdir)/src/msw/treectrl.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/treectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(MONODLL_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monodll_anybutton_osx.o: $(srcdir)/src/osx/anybutton_osx.cpp $(MONODLL_ODEP)
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/osx/anybutton_osx.cpp
|
||||
|
||||
@ -27695,6 +27710,12 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_treectrl.o: $(srcdir)/src/msw/treectrl.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/treectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(MONOLIB_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@monolib_anybutton_osx.o: $(srcdir)/src/osx/anybutton_osx.cpp $(MONOLIB_ODEP)
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/osx/anybutton_osx.cpp
|
||||
|
||||
@ -33719,6 +33740,12 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_treectrl.o: $(srcdir)/src/msw/treectrl.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/treectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(COREDLL_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@coredll_anybutton_osx.o: $(srcdir)/src/osx/anybutton_osx.cpp $(COREDLL_ODEP)
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/osx/anybutton_osx.cpp
|
||||
|
||||
@ -38123,6 +38150,12 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_treectrl.o: $(srcdir)/src/msw/treectrl.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/treectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_systhemectrl.o: $(srcdir)/src/msw/systhemectrl.cpp $(CORELIB_ODEP)
|
||||
@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/systhemectrl.cpp
|
||||
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@corelib_anybutton_osx.o: $(srcdir)/src/osx/anybutton_osx.cpp $(CORELIB_ODEP)
|
||||
@COND_PLATFORM_MACOSX_1_TOOLKIT_OSX_CARBON_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/osx/anybutton_osx.cpp
|
||||
|
||||
|
@ -1193,6 +1193,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
wx/xpmdecod.h
|
||||
wx/xpmhand.h
|
||||
wx/xrc/xmlreshandler.h
|
||||
wx/systhemectrl.h
|
||||
</set>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
@ -1992,6 +1993,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
||||
src/msw/textentry.cpp
|
||||
src/msw/tglbtn.cpp
|
||||
src/msw/treectrl.cpp
|
||||
src/msw/systhemectrl.cpp
|
||||
</set>
|
||||
<set var="MSW_HDR" hints="files">
|
||||
wx/generic/clrpickerg.h
|
||||
|
@ -759,6 +759,7 @@ GUI_CMN_HDR =
|
||||
wx/statbox.h
|
||||
wx/stattext.h
|
||||
wx/statusbr.h
|
||||
wx/systhemectrl.h
|
||||
wx/taskbarbutton.h
|
||||
wx/testing.h
|
||||
wx/textcompleter.h
|
||||
@ -1630,6 +1631,7 @@ MSW_SRC =
|
||||
src/msw/statusbar.cpp
|
||||
src/msw/statline.cpp
|
||||
src/msw/stattext.cpp
|
||||
src/msw/systhemectrl.cpp
|
||||
src/msw/taskbarbutton.cpp
|
||||
src/msw/toolbar.cpp
|
||||
src/msw/textctrl.cpp
|
||||
|
@ -1884,6 +1884,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_textentry.obj \
|
||||
$(OBJS)\monodll_msw_tglbtn.obj \
|
||||
$(OBJS)\monodll_treectrl.obj \
|
||||
$(OBJS)\monodll_systhemectrl.obj \
|
||||
$(OBJS)\monodll_msw_checklst.obj \
|
||||
$(OBJS)\monodll_msw_fdrepdlg.obj \
|
||||
$(OBJS)\monodll_fontdlg.obj \
|
||||
@ -2702,6 +2703,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_textentry.obj \
|
||||
$(OBJS)\monolib_msw_tglbtn.obj \
|
||||
$(OBJS)\monolib_treectrl.obj \
|
||||
$(OBJS)\monolib_systhemectrl.obj \
|
||||
$(OBJS)\monolib_msw_checklst.obj \
|
||||
$(OBJS)\monolib_msw_fdrepdlg.obj \
|
||||
$(OBJS)\monolib_fontdlg.obj \
|
||||
@ -3394,6 +3396,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_textentry.obj \
|
||||
$(OBJS)\coredll_msw_tglbtn.obj \
|
||||
$(OBJS)\coredll_treectrl.obj \
|
||||
$(OBJS)\coredll_systhemectrl.obj \
|
||||
$(OBJS)\coredll_msw_checklst.obj \
|
||||
$(OBJS)\coredll_msw_fdrepdlg.obj \
|
||||
$(OBJS)\coredll_fontdlg.obj \
|
||||
@ -3959,6 +3962,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_textentry.obj \
|
||||
$(OBJS)\corelib_msw_tglbtn.obj \
|
||||
$(OBJS)\corelib_treectrl.obj \
|
||||
$(OBJS)\corelib_systhemectrl.obj \
|
||||
$(OBJS)\corelib_msw_checklst.obj \
|
||||
$(OBJS)\corelib_msw_fdrepdlg.obj \
|
||||
$(OBJS)\corelib_fontdlg.obj \
|
||||
@ -6852,6 +6856,9 @@ $(OBJS)\monodll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\monodll_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\monodll_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\monodll_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
@ -9351,6 +9358,9 @@ $(OBJS)\monolib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\monolib_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\monolib_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\monolib_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
@ -12258,6 +12268,9 @@ $(OBJS)\coredll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\coredll_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\coredll_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\coredll_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
@ -13719,6 +13732,9 @@ $(OBJS)\corelib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\corelib_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\corelib_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\corelib_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
|
@ -1903,6 +1903,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_textentry.o \
|
||||
$(OBJS)\monodll_msw_tglbtn.o \
|
||||
$(OBJS)\monodll_treectrl.o \
|
||||
$(OBJS)\monodll_systhemectrl.o \
|
||||
$(OBJS)\monodll_msw_checklst.o \
|
||||
$(OBJS)\monodll_msw_fdrepdlg.o \
|
||||
$(OBJS)\monodll_fontdlg.o \
|
||||
@ -2727,6 +2728,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_textentry.o \
|
||||
$(OBJS)\monolib_msw_tglbtn.o \
|
||||
$(OBJS)\monolib_treectrl.o \
|
||||
$(OBJS)\monolib_systhemectrl.o \
|
||||
$(OBJS)\monolib_msw_checklst.o \
|
||||
$(OBJS)\monolib_msw_fdrepdlg.o \
|
||||
$(OBJS)\monolib_fontdlg.o \
|
||||
@ -3435,6 +3437,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_textentry.o \
|
||||
$(OBJS)\coredll_msw_tglbtn.o \
|
||||
$(OBJS)\coredll_treectrl.o \
|
||||
$(OBJS)\coredll_systhemectrl.o \
|
||||
$(OBJS)\coredll_msw_checklst.o \
|
||||
$(OBJS)\coredll_msw_fdrepdlg.o \
|
||||
$(OBJS)\coredll_fontdlg.o \
|
||||
@ -4008,6 +4011,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_textentry.o \
|
||||
$(OBJS)\corelib_msw_tglbtn.o \
|
||||
$(OBJS)\corelib_treectrl.o \
|
||||
$(OBJS)\corelib_systhemectrl.o \
|
||||
$(OBJS)\corelib_msw_checklst.o \
|
||||
$(OBJS)\corelib_msw_fdrepdlg.o \
|
||||
$(OBJS)\corelib_fontdlg.o \
|
||||
@ -7027,6 +7031,9 @@ $(OBJS)\monodll_msw_tglbtn.o: ../../src/msw/tglbtn.cpp
|
||||
$(OBJS)\monodll_treectrl.o: ../../src/msw/treectrl.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monodll_systhemectrl.o: ../../src/msw/systhemectrl.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monodll_msw_checklst.o: ../../src/msw/checklst.cpp
|
||||
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
@ -9526,6 +9533,9 @@ $(OBJS)\monolib_msw_tglbtn.o: ../../src/msw/tglbtn.cpp
|
||||
$(OBJS)\monolib_treectrl.o: ../../src/msw/treectrl.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monolib_systhemectrl.o: ../../src/msw/systhemectrl.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\monolib_msw_checklst.o: ../../src/msw/checklst.cpp
|
||||
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
@ -12433,6 +12443,9 @@ $(OBJS)\coredll_msw_tglbtn.o: ../../src/msw/tglbtn.cpp
|
||||
$(OBJS)\coredll_treectrl.o: ../../src/msw/treectrl.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\coredll_systhemectrl.o: ../../src/msw/systhemectrl.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\coredll_msw_checklst.o: ../../src/msw/checklst.cpp
|
||||
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
@ -13894,6 +13907,9 @@ $(OBJS)\corelib_msw_tglbtn.o: ../../src/msw/tglbtn.cpp
|
||||
$(OBJS)\corelib_treectrl.o: ../../src/msw/treectrl.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\corelib_systhemectrl.o: ../../src/msw/systhemectrl.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
$(OBJS)\corelib_msw_checklst.o: ../../src/msw/checklst.cpp
|
||||
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
||||
|
@ -2184,6 +2184,7 @@ ____CORE_SRC_FILENAMES_OBJECTS = \
|
||||
$(OBJS)\monodll_textentry.obj \
|
||||
$(OBJS)\monodll_msw_tglbtn.obj \
|
||||
$(OBJS)\monodll_treectrl.obj \
|
||||
$(OBJS)\monodll_systhemectrl.obj \
|
||||
$(OBJS)\monodll_msw_checklst.obj \
|
||||
$(OBJS)\monodll_msw_fdrepdlg.obj \
|
||||
$(OBJS)\monodll_fontdlg.obj \
|
||||
@ -3008,6 +3009,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS = \
|
||||
$(OBJS)\monolib_textentry.obj \
|
||||
$(OBJS)\monolib_msw_tglbtn.obj \
|
||||
$(OBJS)\monolib_treectrl.obj \
|
||||
$(OBJS)\monolib_systhemectrl.obj \
|
||||
$(OBJS)\monolib_msw_checklst.obj \
|
||||
$(OBJS)\monolib_msw_fdrepdlg.obj \
|
||||
$(OBJS)\monolib_fontdlg.obj \
|
||||
@ -3766,6 +3768,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS = \
|
||||
$(OBJS)\coredll_textentry.obj \
|
||||
$(OBJS)\coredll_msw_tglbtn.obj \
|
||||
$(OBJS)\coredll_treectrl.obj \
|
||||
$(OBJS)\coredll_systhemectrl.obj \
|
||||
$(OBJS)\coredll_msw_checklst.obj \
|
||||
$(OBJS)\coredll_msw_fdrepdlg.obj \
|
||||
$(OBJS)\coredll_fontdlg.obj \
|
||||
@ -4337,6 +4340,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS = \
|
||||
$(OBJS)\corelib_textentry.obj \
|
||||
$(OBJS)\corelib_msw_tglbtn.obj \
|
||||
$(OBJS)\corelib_treectrl.obj \
|
||||
$(OBJS)\corelib_systhemectrl.obj \
|
||||
$(OBJS)\corelib_msw_checklst.obj \
|
||||
$(OBJS)\corelib_msw_fdrepdlg.obj \
|
||||
$(OBJS)\corelib_fontdlg.obj \
|
||||
@ -7544,6 +7548,9 @@ $(OBJS)\monodll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\monodll_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\monodll_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\monodll_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
@ -10043,6 +10050,9 @@ $(OBJS)\monolib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\monolib_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\monolib_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\monolib_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
@ -12950,6 +12960,9 @@ $(OBJS)\coredll_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\coredll_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\coredll_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\coredll_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
@ -14411,6 +14424,9 @@ $(OBJS)\corelib_msw_tglbtn.obj: ..\..\src\msw\tglbtn.cpp
|
||||
$(OBJS)\corelib_treectrl.obj: ..\..\src\msw\treectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\treectrl.cpp
|
||||
|
||||
$(OBJS)\corelib_systhemectrl.obj: ..\..\src\msw\systhemectrl.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\systhemectrl.cpp
|
||||
|
||||
$(OBJS)\corelib_msw_checklst.obj: ..\..\src\msw\checklst.cpp
|
||||
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\msw\checklst.cpp
|
||||
|
||||
|
@ -1004,6 +1004,7 @@
|
||||
<ClCompile Include="..\..\src\generic\vlbox.cpp" />
|
||||
<ClCompile Include="..\..\src\generic\vscroll.cpp" />
|
||||
<ClCompile Include="..\..\src\xrc\xmlreshandler.cpp" />
|
||||
<ClCompile Include="..\..\src\msw\systhemectrl.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\src\msw\version.rc">
|
||||
@ -1012,6 +1013,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
<ClInclude Include="..\..\src\msw\systhemectrl.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\include\wx\msw\setup.h">
|
||||
@ -1372,6 +1374,7 @@
|
||||
<ClInclude Include="..\..\include\wx\preferences.h" />
|
||||
<ClInclude Include="..\..\include\wx\testing.h" />
|
||||
<ClInclude Include="..\..\include\wx\msw\ole\safearray.h" />
|
||||
<ClInclude Include="..\..\include\wx\systhemectrl.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -840,6 +840,9 @@
|
||||
<ClCompile Include="..\..\src\msw\statusbar.cpp">
|
||||
<Filter>MSW Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\msw\systhemectrl.cpp">
|
||||
<Filter>MSW Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\msw\taskbarbutton.cpp">
|
||||
<Filter>MSW Sources</Filter>
|
||||
</ClCompile>
|
||||
@ -1807,6 +1810,9 @@
|
||||
<ClInclude Include="..\..\include\wx\statusbr.h">
|
||||
<Filter>Common Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\wx\systhemectrl.h">
|
||||
<Filter>Common Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\wx\taskbarbutton.h">
|
||||
<Filter>Common Headers</Filter>
|
||||
</ClInclude>
|
||||
|
@ -991,6 +991,9 @@
|
||||
<File
|
||||
RelativePath="..\..\src\msw\statusbar.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\systhemectrl.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\taskbarbutton.cpp">
|
||||
</File>
|
||||
@ -2576,6 +2579,9 @@
|
||||
<File
|
||||
RelativePath="..\..\include\wx\stc\stc.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\systhemectrl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\aui\tabart.h">
|
||||
</File>
|
||||
|
@ -1726,6 +1726,10 @@
|
||||
RelativePath="..\..\src\msw\statusbar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\systhemectrl.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\taskbarbutton.cpp"
|
||||
>
|
||||
@ -3936,6 +3940,10 @@
|
||||
RelativePath="..\..\include\wx\stc\stc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\systhemectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\aui\tabart.h"
|
||||
>
|
||||
|
@ -1722,6 +1722,10 @@
|
||||
RelativePath="..\..\src\msw\statusbar.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\systhemectrl.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\msw\taskbarbutton.cpp"
|
||||
>
|
||||
@ -3932,6 +3936,10 @@
|
||||
RelativePath="..\..\include\wx\stc\stc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\systhemectrl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\wx\aui\tabart.h"
|
||||
>
|
||||
|
@ -97,6 +97,7 @@ All (GUI):
|
||||
- Add support for sorting wxDataViewCtrl by multiple columns (Trigve).
|
||||
- Allow dropping data on wxDataViewCtrl background (Laurent Poujoulat).
|
||||
- Add wxRendererNative::DrawGauge() (Tobias Taschner).
|
||||
- Add wxRendererNative::DrawItemText() (Tobias Taschner).
|
||||
- Add wxHtmlWindow::SetDefaultHTMLCursor() (Jeff A. Marr).
|
||||
- Add default ctor and Create() to wxContextHelpButton (Hanmac).
|
||||
- Send events when toggling wxPropertyGrid nodes from keyboard (Armel Asselin).
|
||||
@ -170,6 +171,7 @@ wxMSW:
|
||||
- Avoid bogus assert after calling wxDatePickerCtrl::SetRange().
|
||||
- Add solution file for building with MSVS 2014 (Peter Tissen).
|
||||
- Correct wxGetOsDescription() for Windows 10 (Tobias Taschner).
|
||||
- Make wxListCtrl &c appearance more native on modern systems (Tobias Taschner).
|
||||
- Don't send wxActivateEvent for minimized windows (bzcdr).
|
||||
|
||||
wxOSX/Cocoa:
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "wx/vector.h"
|
||||
#include "wx/dataobj.h"
|
||||
#include "wx/withimages.h"
|
||||
#include "wx/systhemectrl.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
|
||||
@ -513,7 +514,7 @@ private:
|
||||
#define wxDV_ROW_LINES 0x0010 // alternating colour in rows
|
||||
#define wxDV_VARIABLE_LINE_HEIGHT 0x0020 // variable line height
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
|
||||
class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxSystemThemedControl<wxControl>
|
||||
{
|
||||
public:
|
||||
wxDataViewCtrlBase();
|
||||
|
@ -220,6 +220,8 @@ protected:
|
||||
// Reset all columns currently used for sorting.
|
||||
void ResetAllSortColumns();
|
||||
|
||||
virtual void DoEnableSystemTheme(bool enable, wxWindow* window) wxOVERRIDE;
|
||||
|
||||
public: // utility functions not part of the API
|
||||
|
||||
// returns the "best" width for the idx-th column
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/systhemectrl.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
|
||||
@ -377,7 +378,7 @@ private:
|
||||
// the real control class but is just used for implementation convenience. We
|
||||
// should define the public class functions as pure virtual here in the future
|
||||
// however.
|
||||
class WXDLLIMPEXP_CORE wxListCtrlBase : public wxControl
|
||||
class WXDLLIMPEXP_CORE wxListCtrlBase : public wxSystemThemedControl<wxControl>
|
||||
{
|
||||
public:
|
||||
wxListCtrlBase() { }
|
||||
|
@ -84,10 +84,32 @@ private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxUxThemeFont);
|
||||
};
|
||||
|
||||
typedef int(__stdcall *DTT_CALLBACK_PROC)(HDC hdc, const wchar_t * pszText, int cchText, RECT * prc, unsigned int dwFlags, WXLPARAM lParam);
|
||||
|
||||
typedef struct _DTTOPTS
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
COLORREF crText;
|
||||
COLORREF crBorder;
|
||||
COLORREF crShadow;
|
||||
int iTextShadowType;
|
||||
POINT ptShadowOffset;
|
||||
int iBorderSize;
|
||||
int iFontPropId;
|
||||
int iColorPropId;
|
||||
int iStateId;
|
||||
BOOL fApplyOverlay;
|
||||
int iGlowSize;
|
||||
DTT_CALLBACK_PROC pfnDrawTextCallback;
|
||||
WXLPARAM lParam;
|
||||
} DTTOPTS, *PDTTOPTS;
|
||||
|
||||
typedef HTHEME (__stdcall *PFNWXUOPENTHEMEDATA)(HWND, const wchar_t *);
|
||||
typedef HRESULT (__stdcall *PFNWXUCLOSETHEMEDATA)(HTHEME);
|
||||
typedef HRESULT (__stdcall *PFNWXUDRAWTHEMEBACKGROUND)(HTHEME, HDC, int, int, const RECT *, const RECT *);
|
||||
typedef HRESULT (__stdcall *PFNWXUDRAWTHEMETEXT)(HTHEME, HDC, int, int, const wchar_t *, int, DWORD, DWORD, const RECT *);
|
||||
typedef HRESULT (__stdcall *PFNWXUDRAWTHEMETEXTEX)(HTHEME, HDC, int, int, const wchar_t *, int, DWORD, RECT *, const DTTOPTS *);
|
||||
typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDCONTENTRECT)(HTHEME, HDC, int, int, const RECT *, RECT *);
|
||||
typedef HRESULT (__stdcall *PFNWXUGETTHEMEBACKGROUNDEXTENT)(HTHEME, HDC, int, int, const RECT *, RECT *);
|
||||
typedef HRESULT (__stdcall *PFNWXUGETTHEMEPARTSIZE)(HTHEME, HDC, int, int, const RECT *, /* enum */ THEMESIZE, SIZE *);
|
||||
@ -161,6 +183,7 @@ public:
|
||||
wxUX_THEME_DECLARE(PFNWXUCLOSETHEMEDATA, CloseThemeData)
|
||||
wxUX_THEME_DECLARE(PFNWXUDRAWTHEMEBACKGROUND, DrawThemeBackground)
|
||||
wxUX_THEME_DECLARE(PFNWXUDRAWTHEMETEXT, DrawThemeText)
|
||||
wxUX_THEME_DECLARE(PFNWXUDRAWTHEMETEXTEX, DrawThemeTextEx)
|
||||
wxUX_THEME_DECLARE(PFNWXUGETTHEMEBACKGROUNDCONTENTRECT, GetThemeBackgroundContentRect)
|
||||
wxUX_THEME_DECLARE(PFNWXUGETTHEMEBACKGROUNDEXTENT, GetThemeBackgroundExtent)
|
||||
wxUX_THEME_DECLARE(PFNWXUGETTHEMEPARTSIZE, GetThemePartSize)
|
||||
|
@ -329,6 +329,14 @@ public:
|
||||
int max,
|
||||
int flags = 0) = 0;
|
||||
|
||||
// Draw text using the appropriate color for normal and selected states.
|
||||
virtual void DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int flags = 0) = 0;
|
||||
|
||||
// geometry functions
|
||||
// ------------------
|
||||
|
||||
@ -515,6 +523,14 @@ public:
|
||||
int flags = 0)
|
||||
{ m_rendererNative.DrawGauge(win, dc, rect, value, max, flags); }
|
||||
|
||||
virtual void DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int flags = 0)
|
||||
{ m_rendererNative.DrawItemText(win, dc, text, rect, align, flags); }
|
||||
|
||||
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win)
|
||||
{ return m_rendererNative.GetSplitterParams(win); }
|
||||
|
||||
|
66
include/wx/systhemectrl.h
Normal file
66
include/wx/systhemectrl.h
Normal file
@ -0,0 +1,66 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/systhemectrl.h
|
||||
// Purpose: Class to make controls appear in the systems theme
|
||||
// Author: Tobias Taschner
|
||||
// Created: 2014-08-14
|
||||
// Copyright: (c) 2014 wxWidgets development team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SYSTHEMECTRL_H
|
||||
#define _WX_SYSTHEMECTRL_H
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSystemThemedControlBase
|
||||
{
|
||||
public:
|
||||
wxSystemThemedControlBase() { }
|
||||
|
||||
virtual ~wxSystemThemedControlBase() { }
|
||||
|
||||
protected:
|
||||
// This method is virtual and can be overridden, e.g. composite controls do
|
||||
// it to enable the system theme for all of their parts.
|
||||
virtual void DoEnableSystemTheme(bool enable, wxWindow* window);
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxSystemThemedControlBase);
|
||||
};
|
||||
|
||||
// This class used CRTP, i.e. it should be instantiated for the real base class
|
||||
// and inherited from.
|
||||
template <class C>
|
||||
class wxSystemThemedControl : public C,
|
||||
public wxSystemThemedControlBase
|
||||
{
|
||||
public:
|
||||
wxSystemThemedControl() { }
|
||||
|
||||
void EnableSystemTheme(bool enable = true)
|
||||
{
|
||||
DoEnableSystemTheme(enable, this);
|
||||
}
|
||||
|
||||
protected:
|
||||
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxSystemThemedControl, C);
|
||||
};
|
||||
|
||||
// Only __WXMSW__ has a non-trivial implementation currently.
|
||||
#ifdef __WXMSW__
|
||||
#define wxHAS_SYSTEM_THEMED_CONTROL
|
||||
#endif
|
||||
|
||||
#ifndef wxHAS_SYSTEM_THEMED_CONTROL
|
||||
|
||||
inline void
|
||||
wxSystemThemedControlBase::DoEnableSystemTheme(bool WXUNUSED(enable),
|
||||
wxWindow* WXUNUSED(window))
|
||||
{
|
||||
// Nothing to do.
|
||||
}
|
||||
|
||||
#endif // !wxHAS_SYSTEM_THEMED_CONTROL
|
||||
|
||||
#endif // _WX_SYSTHEMECTRL_H
|
@ -22,6 +22,7 @@
|
||||
#include "wx/control.h"
|
||||
#include "wx/treebase.h"
|
||||
#include "wx/textctrl.h" // wxTextCtrl::ms_classinfo used through wxCLASSINFO macro
|
||||
#include "wx/systhemectrl.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
|
||||
@ -33,7 +34,7 @@ class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
// wxTreeCtrlBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTreeCtrlBase : public wxControl
|
||||
class WXDLLIMPEXP_CORE wxTreeCtrlBase : public wxSystemThemedControl<wxControl>
|
||||
{
|
||||
public:
|
||||
wxTreeCtrlBase();
|
||||
|
@ -907,6 +907,11 @@ wxEventType wxEVT_DATAVIEW_ITEM_DROP;
|
||||
you need to handle any mouse events not covered by the ones above, consider
|
||||
using a custom renderer for the cells that must handle them.
|
||||
|
||||
@note Under wxMSW this control uses wxSystemThemedControl for an explorer
|
||||
style appearance by default since wxWidgets 3.1.0. If this is not desired,
|
||||
you can call wxSystemThemedControl::EnableSystemTheme with @c false
|
||||
argument to disable this.
|
||||
|
||||
@library{wxadv}
|
||||
@category{ctrl,dvc}
|
||||
@appearance{dataviewctrl}
|
||||
|
@ -258,6 +258,10 @@ enum
|
||||
Processes a @c wxEVT_LIST_CACHE_HINT event type.
|
||||
@endEventTable
|
||||
|
||||
@note Under wxMSW this control uses wxSystemThemedControl for an explorer
|
||||
style appearance by default since wxWidgets 3.1.0. If this is not desired,
|
||||
you can call wxSystemThemedControl::EnableSystemTheme with @c false
|
||||
argument to disable this.
|
||||
|
||||
@library{wxcore}
|
||||
@category{ctrl}
|
||||
|
@ -405,10 +405,33 @@ public:
|
||||
(otherwise the selection rectangle is e.g. often grey and not blue).
|
||||
This may be ignored by the renderer or deduced by the code directly from
|
||||
the @a win.
|
||||
|
||||
@see DrawItemText()
|
||||
*/
|
||||
virtual void DrawItemSelectionRect(wxWindow* win, wxDC& dc,
|
||||
const wxRect& rect, int flags = 0) = 0;
|
||||
|
||||
|
||||
/**
|
||||
Draw item text in the correct color based on selection status.
|
||||
|
||||
Background of the text should be painted with DrawItemSelectionRect().
|
||||
|
||||
The supported @a flags are @c wxCONTROL_SELECTED for items
|
||||
which are selected.
|
||||
@c wxCONTROL_FOCUSED may be used to indicate if the control has the focus.
|
||||
@c wxCONTROL_DISABLED may be used to indicate if the control is disabled.
|
||||
|
||||
@since 3.1.0
|
||||
@see DrawItemSelectionRect()
|
||||
*/
|
||||
virtual void DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int flags = 0) = 0;
|
||||
|
||||
/**
|
||||
Draw a blank push button that looks very similar to wxButton.
|
||||
|
||||
|
70
interface/wx/systhemectrl.h
Normal file
70
interface/wx/systhemectrl.h
Normal file
@ -0,0 +1,70 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/systhemectrl.h
|
||||
// Purpose: Documentation for wxSystemThemedControl
|
||||
// Author: Tobias Taschner
|
||||
// Created: 2014-08-15
|
||||
// Copyright: (c) 2014 wxWidgets development team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
A helper class making it possible to use system theme for any control.
|
||||
|
||||
Under MSW, there an alternative theme available for the list and list-like
|
||||
controls since Windows Vista. This theme us used by Windows Explorer list
|
||||
and tree view and so is arguably more familiar to the users than the standard
|
||||
appearance of these controls.
|
||||
|
||||
This class is used in wxWidgets to enable this system theme in wxTreeCtrl,
|
||||
wxListCtrl and wxDataViewCtrl and thus give them the same, familiar look.
|
||||
It can also be used as a helper for implementing custom controls with the same
|
||||
appearance. Notice that when using this class it is especially important
|
||||
to use wxRendererNative::DrawItemSelectionRect() and
|
||||
wxRendererNative::DrawItemText() to draw the control items to ensure that
|
||||
they appear correctly under all platforms and Windows versions.
|
||||
|
||||
The following example shows implementation of a system theme enabled wxVListBox:
|
||||
@code
|
||||
#include <wx/systhemectrl.h>
|
||||
|
||||
class MyListCtrl : public wxSystemThemedControl<wxVListBox>
|
||||
{
|
||||
public:
|
||||
MyListCtrl(wxWindow* parent)
|
||||
{
|
||||
|
||||
...
|
||||
|
||||
EnableSystemTheme();
|
||||
}
|
||||
|
||||
void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const wxOVERRIDE
|
||||
{
|
||||
wxRendererNative::GetDefault().DrawItemText(this, dc, "Item #x", rect);
|
||||
}
|
||||
};
|
||||
@endcode
|
||||
|
||||
On non-MSW platforms this class currently does nothing but is still
|
||||
available, so that it can be used in portable code without any conditional
|
||||
compilation directives.
|
||||
|
||||
@category{miscwnd}
|
||||
|
||||
@see wxTreeCtrl, wxListCtrl, wxDataViewCtrl, wxRendererNative
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
template <class C>
|
||||
class wxSystemThemedControl : public C
|
||||
{
|
||||
public:
|
||||
/// Trival default constructor.
|
||||
wxSystemThemedControl();
|
||||
|
||||
/**
|
||||
This method may be called to disable the system theme of controls
|
||||
using it by default.
|
||||
*/
|
||||
void EnableSystemTheme(bool enable = true);
|
||||
};
|
@ -32,10 +32,8 @@
|
||||
Selects alternative style of @c +/@c - buttons and shows rotating
|
||||
("twisting") arrows instead. Currently this style is only implemented
|
||||
under Microsoft Windows Vista and later Windows versions and is ignored
|
||||
under the other platforms. Notice that under Vista this style results
|
||||
in the same appearance as used by the tree control in Explorer and
|
||||
other built-in programs and so using it may be preferable to the
|
||||
default style.
|
||||
under the other platforms as enabling it is equivalent to using
|
||||
wxSystemThemedControl::EnableSystemTheme().
|
||||
@style{wxTR_NO_LINES}
|
||||
Use this style to hide vertical level connectors.
|
||||
@style{wxTR_FULL_ROW_HIGHLIGHT}
|
||||
|
@ -276,6 +276,18 @@ private:
|
||||
wxRect(x2, y, widthGauge, heightGauge), 25, 100, m_flags);
|
||||
|
||||
y += lineHeight + heightGauge;
|
||||
|
||||
const wxCoord heightListItem = 48;
|
||||
const wxCoord widthListItem = 260;
|
||||
|
||||
dc.DrawText("DrawItemSelectionRect()", x1, y);
|
||||
wxRendererNative::GetDefault().DrawItemSelectionRect(this, dc,
|
||||
wxRect(x2, y, widthListItem, heightListItem), m_flags | wxCONTROL_SELECTED);
|
||||
|
||||
wxRendererNative::GetDefault().DrawItemText(this, dc, "DrawItemText()",
|
||||
wxRect(x2, y, widthListItem, heightListItem).Inflate(-2, -2), m_align, m_flags | wxCONTROL_SELECTED);
|
||||
|
||||
y += lineHeight + heightListItem;
|
||||
}
|
||||
|
||||
int m_flags;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "wx/spinctrl.h"
|
||||
#include "wx/choice.h"
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/renderer.h"
|
||||
|
||||
const char wxDataViewCtrlNameStr[] = "dataviewCtrl";
|
||||
|
||||
@ -974,7 +975,7 @@ wxDataViewCustomRendererBase::RenderText(const wxString& text,
|
||||
int xoffset,
|
||||
wxRect rect,
|
||||
wxDC *dc,
|
||||
int WXUNUSED(state))
|
||||
int state)
|
||||
{
|
||||
wxRect rectText = rect;
|
||||
rectText.x += xoffset;
|
||||
@ -994,9 +995,20 @@ wxDataViewCustomRendererBase::RenderText(const wxString& text,
|
||||
);
|
||||
}
|
||||
|
||||
int flags = 0;
|
||||
if ( state & wxDATAVIEW_CELL_SELECTED )
|
||||
flags |= wxCONTROL_SELECTED | wxCONTROL_FOCUSED;
|
||||
if ( !GetOwner()->GetOwner()->IsEnabled() )
|
||||
flags |= wxCONTROL_DISABLED;
|
||||
|
||||
// get the alignment to use
|
||||
dc->DrawLabel(ellipsizedText.empty() ? text : ellipsizedText,
|
||||
rectText, GetEffectiveAlignment());
|
||||
wxRendererNative::Get().DrawItemText(
|
||||
GetOwner()->GetOwner(),
|
||||
*dc,
|
||||
ellipsizedText.empty() ? text : ellipsizedText,
|
||||
rectText,
|
||||
GetEffectiveAlignment(),
|
||||
flags);
|
||||
}
|
||||
|
||||
void wxDataViewCustomRendererBase::SetEnabled(bool enabled)
|
||||
|
@ -4659,6 +4659,8 @@ bool wxDataViewCtrl::Create(wxWindow *parent,
|
||||
sizer->Add( m_clientArea, 1, wxGROW );
|
||||
SetSizer( sizer );
|
||||
|
||||
EnableSystemTheme();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -5419,6 +5421,14 @@ void wxDataViewCtrl::ToggleSortByColumn(int column)
|
||||
m_headerArea->ToggleSortByColumn(column);
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::DoEnableSystemTheme(bool enable, wxWindow* window)
|
||||
{
|
||||
wxSystemThemedControl::DoEnableSystemTheme(enable, window);
|
||||
wxSystemThemedControl::DoEnableSystemTheme(enable, m_clientArea);
|
||||
if ( m_headerArea )
|
||||
wxSystemThemedControl::DoEnableSystemTheme(enable, m_headerArea);
|
||||
}
|
||||
|
||||
#endif // !wxUSE_GENERICDATAVIEWCTRL
|
||||
|
||||
#endif // wxUSE_DATAVIEWCTRL
|
||||
|
@ -138,6 +138,13 @@ public:
|
||||
|
||||
virtual void DrawGauge(wxWindow* win, wxDC& dc, const wxRect& rect, int value, int max, int flags = 0) wxOVERRIDE;
|
||||
|
||||
virtual void DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int flags = 0) wxOVERRIDE;
|
||||
|
||||
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win) wxOVERRIDE;
|
||||
|
||||
virtual wxRendererVersion GetVersion() const wxOVERRIDE
|
||||
@ -832,6 +839,46 @@ void wxRendererGeneric::DrawGauge(wxWindow* win,
|
||||
dc.DrawRectangle(progRect);
|
||||
}
|
||||
|
||||
void
|
||||
wxRendererGeneric::DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align,
|
||||
int flags)
|
||||
{
|
||||
// Determine text color
|
||||
wxColour textColour;
|
||||
if ( flags & wxCONTROL_SELECTED )
|
||||
{
|
||||
if ( flags & wxCONTROL_FOCUSED )
|
||||
{
|
||||
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||
}
|
||||
else // !focused
|
||||
{
|
||||
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
|
||||
}
|
||||
}
|
||||
else if ( flags & wxCONTROL_DISABLED )
|
||||
{
|
||||
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
|
||||
}
|
||||
else // enabled but not selected
|
||||
{
|
||||
textColour = win->GetForegroundColour();
|
||||
}
|
||||
|
||||
const wxString paintText = wxControl::Ellipsize(text, dc,
|
||||
wxELLIPSIZE_END,
|
||||
rect.GetWidth());
|
||||
|
||||
// Draw text
|
||||
dc.SetTextForeground(textColour);
|
||||
dc.SetTextBackground(wxTransparentColour);
|
||||
dc.DrawLabel(paintText, rect, align);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// A module to allow cleanup of generic renderer.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -267,6 +267,8 @@ bool wxListCtrl::Create(wxWindow *parent,
|
||||
if ( !MSWCreateControl(WC_LISTVIEW, wxEmptyString, pos, size) )
|
||||
return false;
|
||||
|
||||
EnableSystemTheme();
|
||||
|
||||
// explicitly say that we want to use Unicode because otherwise we get ANSI
|
||||
// versions of _some_ messages (notably LVN_GETDISPINFOA)
|
||||
wxSetCCUnicodeFormat(GetHwnd());
|
||||
|
@ -103,6 +103,17 @@
|
||||
#define PP_BAR 1
|
||||
#define PP_CHUNK 3
|
||||
|
||||
#define LISS_NORMAL 1
|
||||
#define LISS_HOT 2
|
||||
#define LISS_SELECTED 3
|
||||
#define LISS_DISABLED 4
|
||||
#define LISS_SELECTEDNOTFOCUS 5
|
||||
#define LISS_HOTSELECTED 6
|
||||
|
||||
#define LVP_LISTITEM 1
|
||||
|
||||
#define DTT_TEXTCOLOR (1UL << 0) // crText has been specified
|
||||
#define DTT_STATEID (1UL << 8) // IStateId has been specified
|
||||
#endif
|
||||
|
||||
#if defined(__WXWINCE__)
|
||||
@ -283,6 +294,11 @@ public:
|
||||
m_rendererNative.DrawPushButton(win, dc, rect, flags);
|
||||
}
|
||||
|
||||
virtual void DrawItemSelectionRect(wxWindow *win,
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
int flags = 0);
|
||||
|
||||
virtual void DrawTextCtrl(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
@ -310,6 +326,12 @@ public:
|
||||
int max,
|
||||
int flags = 0);
|
||||
|
||||
virtual void DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int flags = 0);
|
||||
|
||||
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
|
||||
|
||||
@ -836,6 +858,95 @@ wxRendererXP::DrawTitleBarBitmap(wxWindow *win,
|
||||
DoDrawButtonLike(hTheme, part, dc, rect, flags);
|
||||
}
|
||||
|
||||
void
|
||||
wxRendererXP::DrawItemSelectionRect(wxWindow *win,
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
int flags)
|
||||
{
|
||||
wxUxThemeHandle hTheme(win, L"LISTVIEW");
|
||||
|
||||
int itemState = LISS_NORMAL;
|
||||
if ( flags & wxCONTROL_SELECTED )
|
||||
itemState = LISS_SELECTED;
|
||||
if ( !(flags & wxCONTROL_FOCUSED) )
|
||||
itemState = LISS_SELECTEDNOTFOCUS;
|
||||
if ( flags & wxCONTROL_DISABLED )
|
||||
itemState |= LISS_DISABLED;
|
||||
|
||||
wxUxThemeEngine* const te = wxUxThemeEngine::Get();
|
||||
if ( te->IsThemePartDefined(hTheme, LVP_LISTITEM, itemState) )
|
||||
{
|
||||
RECT rc;
|
||||
wxCopyRectToRECT(rect, rc);
|
||||
if ( te->IsThemeBackgroundPartiallyTransparent(hTheme, LVP_LISTITEM, itemState) )
|
||||
te->DrawThemeParentBackground(GetHwndOf(win), GetHdcOf(dc.GetTempHDC()), &rc);
|
||||
|
||||
te->DrawThemeBackground(hTheme, GetHdcOf(dc.GetTempHDC()), LVP_LISTITEM, itemState, &rc, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rendererNative.DrawItemSelectionRect(win, dc, rect, flags);
|
||||
}
|
||||
}
|
||||
|
||||
void wxRendererXP::DrawItemText(wxWindow* win,
|
||||
wxDC& dc,
|
||||
const wxString& text,
|
||||
const wxRect& rect,
|
||||
int align,
|
||||
int flags)
|
||||
{
|
||||
wxUxThemeHandle hTheme(win, L"LISTVIEW");
|
||||
|
||||
int itemState = LISS_NORMAL;
|
||||
if ( flags & wxCONTROL_SELECTED )
|
||||
itemState = LISS_SELECTED;
|
||||
if ( !(flags & wxCONTROL_FOCUSED) )
|
||||
itemState = LISS_SELECTEDNOTFOCUS;
|
||||
if ( flags & wxCONTROL_DISABLED )
|
||||
itemState |= LISS_DISABLED;
|
||||
|
||||
wxUxThemeEngine* te = wxUxThemeEngine::Get();
|
||||
if ( te->IsThemePartDefined(hTheme, LVP_LISTITEM, itemState) )
|
||||
{
|
||||
RECT rc;
|
||||
wxCopyRectToRECT(rect, rc);
|
||||
|
||||
DTTOPTS textOpts;
|
||||
textOpts.dwSize = sizeof(textOpts);
|
||||
textOpts.dwFlags = DTT_STATEID;
|
||||
textOpts.iStateId = itemState;
|
||||
if (flags & wxCONTROL_DISABLED)
|
||||
{
|
||||
textOpts.dwFlags |= DTT_TEXTCOLOR;
|
||||
textOpts.crText = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT).GetPixel();
|
||||
}
|
||||
|
||||
DWORD textFlags = DT_NOPREFIX | DT_END_ELLIPSIS;
|
||||
if ( align & wxALIGN_CENTER )
|
||||
textFlags |= DT_CENTER;
|
||||
else if ( align & wxALIGN_RIGHT )
|
||||
textFlags |= DT_RIGHT;
|
||||
else
|
||||
textFlags |= DT_LEFT;
|
||||
|
||||
if ( align & wxALIGN_BOTTOM )
|
||||
textFlags |= DT_BOTTOM;
|
||||
else if ( align & wxALIGN_CENTER_VERTICAL )
|
||||
textFlags |= DT_VCENTER;
|
||||
else
|
||||
textFlags |= DT_TOP;
|
||||
|
||||
te->DrawThemeTextEx(hTheme, dc.GetHDC(), LVP_LISTITEM, itemState,
|
||||
text.wchar_str(), -1, textFlags, &rc, &textOpts);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rendererNative.DrawItemText(win, dc, text, rect, align, flags);
|
||||
}
|
||||
}
|
||||
|
||||
// Uses the theme to draw the border and fill for something like a wxTextCtrl
|
||||
void wxRendererXP::DrawTextCtrl(wxWindow* win,
|
||||
wxDC& dc,
|
||||
|
35
src/msw/systhemectrl.cpp
Normal file
35
src/msw/systhemectrl.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/msw/systhemectrl.cpp
|
||||
// Purpose: wxMSW implementation of wxSystemThemedControl
|
||||
// Author: Tobias Taschner
|
||||
// Created: 2015-09-15
|
||||
// Copyright: (c) 2015 wxWidgets development team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/systhemectrl.h"
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/uxtheme.h"
|
||||
|
||||
#ifdef wxHAS_SYSTEM_THEMED_CONTROL
|
||||
|
||||
void wxSystemThemedControlBase::DoEnableSystemTheme(bool enable, wxWindow* window)
|
||||
{
|
||||
if ( wxGetWinVersion() >= wxWinVersion_Vista )
|
||||
{
|
||||
if ( wxUxThemeEngine *te = wxUxThemeEngine::GetIfActive() )
|
||||
{
|
||||
const wchar_t* const sysThemeId = enable ? L"EXPLORER" : NULL;
|
||||
te->SetWindowTheme(GetHwndOf(window), sysThemeId, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxHAS_SYSTEM_THEMED_CONTROL
|
@ -783,16 +783,9 @@ bool wxTreeCtrl::Create(wxWindow *parent,
|
||||
|
||||
if ( m_windowStyle & wxTR_TWIST_BUTTONS )
|
||||
{
|
||||
// Under Vista and later Explorer uses rotating ("twist") buttons
|
||||
// instead of the default "+/-" ones so apply its theme to the tree
|
||||
// control to implement this style.
|
||||
if ( wxGetWinVersion() >= wxWinVersion_Vista )
|
||||
{
|
||||
if ( wxUxThemeEngine *theme = wxUxThemeEngine::GetIfActive() )
|
||||
{
|
||||
theme->SetWindowTheme(GetHwnd(), L"EXPLORER", NULL);
|
||||
}
|
||||
}
|
||||
// The Vista+ system theme uses rotating ("twist") buttons, so we map
|
||||
// this style to it.
|
||||
EnableSystemTheme();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -124,6 +124,7 @@ bool wxUxThemeEngine::Initialize()
|
||||
RESOLVE_UXTHEME_FUNCTION(PFNWXUCLOSETHEMEDATA, CloseThemeData);
|
||||
RESOLVE_UXTHEME_FUNCTION(PFNWXUDRAWTHEMEBACKGROUND, DrawThemeBackground);
|
||||
RESOLVE_UXTHEME_FUNCTION(PFNWXUDRAWTHEMETEXT, DrawThemeText);
|
||||
RESOLVE_UXTHEME_FUNCTION(PFNWXUDRAWTHEMETEXTEX, DrawThemeTextEx);
|
||||
RESOLVE_UXTHEME_FUNCTION(PFNWXUGETTHEMEBACKGROUNDCONTENTRECT, GetThemeBackgroundContentRect);
|
||||
RESOLVE_UXTHEME_FUNCTION(PFNWXUGETTHEMEBACKGROUNDEXTENT, GetThemeBackgroundExtent);
|
||||
RESOLVE_UXTHEME_FUNCTION(PFNWXUGETTHEMEPARTSIZE, GetThemePartSize);
|
||||
|
Loading…
Reference in New Issue
Block a user