diff --git a/Makefile.in b/Makefile.in index 347fbe8970..66c6f547f7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -5832,7 +5832,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS = \ monodll_prntdlgg.o \ monodll_msw_accel.o \ monodll_msw_anybutton.o \ - monodll_appprogress.o \ + monodll_msw_appprogress.o \ monodll_artmsw.o \ monodll_msw_bmpbuttn.o \ monodll_msw_button.o \ @@ -5927,6 +5927,7 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS = \ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS = \ $(__OSX_CARBON_COCOA_SRC_OBJECTS) \ monodll_cocoa_anybutton.o \ + monodll_cocoa_appprogress.o \ monodll_osx_cocoa_button.o \ monodll_osx_cocoa_checkbox.o \ monodll_osx_cocoa_choice.o \ @@ -5990,7 +5991,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS = \ monodll_prntdlgg.o \ monodll_msw_accel.o \ monodll_msw_anybutton.o \ - monodll_appprogress.o \ + monodll_msw_appprogress.o \ monodll_artmsw.o \ monodll_msw_bmpbuttn.o \ monodll_msw_button.o \ @@ -8191,7 +8192,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_1 = \ monolib_prntdlgg.o \ monolib_msw_accel.o \ monolib_msw_anybutton.o \ - monolib_appprogress.o \ + monolib_msw_appprogress.o \ monolib_artmsw.o \ monolib_msw_bmpbuttn.o \ monolib_msw_button.o \ @@ -8286,6 +8287,7 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS_1 = \ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_1 = \ $(__OSX_CARBON_COCOA_SRC_OBJECTS_12) \ monolib_cocoa_anybutton.o \ + monolib_cocoa_appprogress.o \ monolib_osx_cocoa_button.o \ monolib_osx_cocoa_checkbox.o \ monolib_osx_cocoa_choice.o \ @@ -8349,7 +8351,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_1 = \ monolib_prntdlgg.o \ monolib_msw_accel.o \ monolib_msw_anybutton.o \ - monolib_appprogress.o \ + monolib_msw_appprogress.o \ monolib_artmsw.o \ monolib_msw_bmpbuttn.o \ monolib_msw_button.o \ @@ -10707,7 +10709,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_2 = \ coredll_prntdlgg.o \ coredll_msw_accel.o \ coredll_msw_anybutton.o \ - coredll_appprogress.o \ + coredll_msw_appprogress.o \ coredll_artmsw.o \ coredll_msw_bmpbuttn.o \ coredll_msw_button.o \ @@ -10802,6 +10804,7 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS_2 = \ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_2 = \ $(__OSX_CARBON_COCOA_SRC_OBJECTS_14) \ coredll_cocoa_anybutton.o \ + coredll_cocoa_appprogress.o \ coredll_osx_cocoa_button.o \ coredll_osx_cocoa_checkbox.o \ coredll_osx_cocoa_choice.o \ @@ -10865,7 +10868,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_2 = \ coredll_prntdlgg.o \ coredll_msw_accel.o \ coredll_msw_anybutton.o \ - coredll_appprogress.o \ + coredll_msw_appprogress.o \ coredll_artmsw.o \ coredll_msw_bmpbuttn.o \ coredll_msw_button.o \ @@ -12485,7 +12488,7 @@ COND_TOOLKIT_MSW___GUI_SRC_OBJECTS_3 = \ corelib_prntdlgg.o \ corelib_msw_accel.o \ corelib_msw_anybutton.o \ - corelib_appprogress.o \ + corelib_msw_appprogress.o \ corelib_artmsw.o \ corelib_msw_bmpbuttn.o \ corelib_msw_button.o \ @@ -12580,6 +12583,7 @@ COND_TOOLKIT_OSX_CARBON___GUI_SRC_OBJECTS_3 = \ COND_TOOLKIT_OSX_COCOA___GUI_SRC_OBJECTS_3 = \ $(__OSX_CARBON_COCOA_SRC_OBJECTS_1_0) \ corelib_cocoa_anybutton.o \ + corelib_cocoa_appprogress.o \ corelib_osx_cocoa_button.o \ corelib_osx_cocoa_checkbox.o \ corelib_osx_cocoa_choice.o \ @@ -12643,7 +12647,7 @@ COND_TOOLKIT_WINCE___GUI_SRC_OBJECTS_3 = \ corelib_prntdlgg.o \ corelib_msw_accel.o \ corelib_msw_anybutton.o \ - corelib_appprogress.o \ + corelib_msw_appprogress.o \ corelib_artmsw.o \ corelib_msw_bmpbuttn.o \ corelib_msw_button.o \ @@ -18140,6 +18144,9 @@ monodll_carbon_window.o: $(srcdir)/src/osx/carbon/window.cpp $(MONODLL_ODEP) monodll_cocoa_anybutton.o: $(srcdir)/src/osx/cocoa/anybutton.mm $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/anybutton.mm +monodll_cocoa_appprogress.o: $(srcdir)/src/osx/cocoa/appprogress.mm $(MONODLL_ODEP) + $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/appprogress.mm + monodll_osx_cocoa_button.o: $(srcdir)/src/osx/cocoa/button.mm $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/button.mm @@ -21374,10 +21381,10 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_msw_anybutton.o: $(srcdir)/src/msw/anybutton.cpp $(MONODLL_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/anybutton.cpp -@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONODLL_ODEP) +@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONODLL_ODEP) @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp -@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONODLL_ODEP) +@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONODLL_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_artmsw.o: $(srcdir)/src/msw/artmsw.cpp $(MONODLL_ODEP) @@ -24029,6 +24036,9 @@ monolib_carbon_window.o: $(srcdir)/src/osx/carbon/window.cpp $(MONOLIB_ODEP) monolib_cocoa_anybutton.o: $(srcdir)/src/osx/cocoa/anybutton.mm $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/anybutton.mm +monolib_cocoa_appprogress.o: $(srcdir)/src/osx/cocoa/appprogress.mm $(MONOLIB_ODEP) + $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/appprogress.mm + monolib_osx_cocoa_button.o: $(srcdir)/src/osx/cocoa/button.mm $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/button.mm @@ -27263,10 +27273,10 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_msw_anybutton.o: $(srcdir)/src/msw/anybutton.cpp $(MONOLIB_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/anybutton.cpp -@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONOLIB_ODEP) +@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONOLIB_ODEP) @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp -@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONOLIB_ODEP) +@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(MONOLIB_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_artmsw.o: $(srcdir)/src/msw/artmsw.cpp $(MONOLIB_ODEP) @@ -30596,6 +30606,9 @@ coredll_carbon_window.o: $(srcdir)/src/osx/carbon/window.cpp $(COREDLL_ODEP) coredll_cocoa_anybutton.o: $(srcdir)/src/osx/cocoa/anybutton.mm $(COREDLL_ODEP) $(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/anybutton.mm +coredll_cocoa_appprogress.o: $(srcdir)/src/osx/cocoa/appprogress.mm $(COREDLL_ODEP) + $(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/appprogress.mm + coredll_osx_cocoa_button.o: $(srcdir)/src/osx/cocoa/button.mm $(COREDLL_ODEP) $(CXXC) -c -o $@ $(COREDLL_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/button.mm @@ -33266,10 +33279,10 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_msw_anybutton.o: $(srcdir)/src/msw/anybutton.cpp $(COREDLL_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/anybutton.cpp -@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(COREDLL_ODEP) +@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(COREDLL_ODEP) @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp -@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(COREDLL_ODEP) +@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(COREDLL_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_artmsw.o: $(srcdir)/src/msw/artmsw.cpp $(COREDLL_ODEP) @@ -34994,6 +35007,9 @@ corelib_carbon_window.o: $(srcdir)/src/osx/carbon/window.cpp $(CORELIB_ODEP) corelib_cocoa_anybutton.o: $(srcdir)/src/osx/cocoa/anybutton.mm $(CORELIB_ODEP) $(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/anybutton.mm +corelib_cocoa_appprogress.o: $(srcdir)/src/osx/cocoa/appprogress.mm $(CORELIB_ODEP) + $(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/appprogress.mm + corelib_osx_cocoa_button.o: $(srcdir)/src/osx/cocoa/button.mm $(CORELIB_ODEP) $(CXXC) -c -o $@ $(CORELIB_OBJCXXFLAGS) $(srcdir)/src/osx/cocoa/button.mm @@ -37664,10 +37680,10 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_msw_anybutton.o: $(srcdir)/src/msw/anybutton.cpp $(CORELIB_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/anybutton.cpp -@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(CORELIB_ODEP) +@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(CORELIB_ODEP) @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp -@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(CORELIB_ODEP) +@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_msw_appprogress.o: $(srcdir)/src/msw/appprogress.cpp $(CORELIB_ODEP) @COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/appprogress.cpp @COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_artmsw.o: $(srcdir)/src/msw/artmsw.cpp $(CORELIB_ODEP) diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 0e75dd9cd4..b31c0b868b 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -2527,6 +2527,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! $(OSX_CARBON_COCOA_SRC) src/osx/cocoa/anybutton.mm + src/osx/cocoa/appprogress.mm src/osx/cocoa/button.mm src/osx/cocoa/checkbox.mm src/osx/cocoa/choice.mm diff --git a/build/files b/build/files index c3606424b8..82767a175e 100644 --- a/build/files +++ b/build/files @@ -2131,6 +2131,7 @@ OSX_CARBON_HDR = OSX_COCOA_SRC = $(OSX_CARBON_COCOA_SRC) src/osx/cocoa/anybutton.mm + src/osx/cocoa/appprogress.mm src/osx/cocoa/button.mm src/osx/cocoa/checkbox.mm src/osx/cocoa/choice.mm diff --git a/build/osx/wxcocoa.xcodeproj/project.pbxproj b/build/osx/wxcocoa.xcodeproj/project.pbxproj index a45715ab69..7e50563b4d 100644 --- a/build/osx/wxcocoa.xcodeproj/project.pbxproj +++ b/build/osx/wxcocoa.xcodeproj/project.pbxproj @@ -2220,6 +2220,9 @@ CE2C937117FE3AB599DD30B9 /* sound_osx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9B2316B32653DA0939A372D /* sound_osx.cpp */; }; CE2C937117FE3AB599DD30BA /* sound_osx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9B2316B32653DA0939A372D /* sound_osx.cpp */; }; CE2C937117FE3AB599DD30BB /* sound_osx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9B2316B32653DA0939A372D /* sound_osx.cpp */; }; + CE32C5250F2834D4B81BE898 /* appprogress.mm in Sources */ = {isa = PBXBuildFile; fileRef = BD91A34971FB3D0299B894A5 /* appprogress.mm */; }; + CE32C5250F2834D4B81BE899 /* appprogress.mm in Sources */ = {isa = PBXBuildFile; fileRef = BD91A34971FB3D0299B894A5 /* appprogress.mm */; }; + CE32C5250F2834D4B81BE89A /* appprogress.mm in Sources */ = {isa = PBXBuildFile; fileRef = BD91A34971FB3D0299B894A5 /* appprogress.mm */; }; CEBAAB0C77983358A601BFFE /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = ED19EF377E653F71B1876259 /* jdmaster.c */; }; CEBAAB0C77983358A601BFFF /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = ED19EF377E653F71B1876259 /* jdmaster.c */; }; CEBAAB0C77983358A601C000 /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = ED19EF377E653F71B1876259 /* jdmaster.c */; }; @@ -4468,6 +4471,7 @@ BD169D8019A13A11BDB26214 /* xh_dirpicker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = xh_dirpicker.cpp; path = ../../src/xrc/xh_dirpicker.cpp; sourceTree = ""; }; BD709DEB71623974B9836D69 /* dockart.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dockart.cpp; path = ../../src/aui/dockart.cpp; sourceTree = ""; }; BD88495AF72531A28D2201D0 /* tif_tile.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tif_tile.c; path = ../../src/tiff/libtiff/tif_tile.c; sourceTree = ""; }; + BD91A34971FB3D0299B894A5 /* appprogress.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = appprogress.mm; path = ../../src/osx/cocoa/appprogress.mm; sourceTree = ""; }; BDE76674C0F5391BAD2AFA2F /* dialog_osx.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dialog_osx.cpp; path = ../../src/osx/dialog_osx.cpp; sourceTree = ""; }; BE22393DB53C3D259DFCEE64 /* libwxjpeg.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libwxjpeg.a; sourceTree = BUILT_PRODUCTS_DIR; }; BE4B0CE56BA23002A5C8AEFF /* toolbar.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = toolbar.cpp; path = ../../src/ribbon/toolbar.cpp; sourceTree = ""; }; @@ -5292,6 +5296,7 @@ 071FEABEA61E3B559A47A7DB /* statusbr.cpp */, E9B31409EC6532FC83B0B957 /* textmeasure.cpp */, F4020D790AE7363CB29F1C2F /* anybutton.mm */, + BD91A34971FB3D0299B894A5 /* appprogress.mm */, C06FED83BF933DF98C2466AE /* button.mm */, 81708CFA21A03013ACB8DDD7 /* checkbox.mm */, 9F838F853CB03CF7932C08C3 /* choice.mm */, @@ -7482,6 +7487,7 @@ A1AF8FF873D6383996995ED1 /* statusbr.cpp in Sources */, 2E059BFE8E3B3D9299D5596B /* textmeasure.cpp in Sources */, 65AD3B31319C35F1AC9EC627 /* anybutton.mm in Sources */, + CE32C5250F2834D4B81BE89A /* appprogress.mm in Sources */, 14D6D5F8F5ED3C71936DD2B1 /* button.mm in Sources */, 67A0583ADD8C35B8B9BA3D14 /* checkbox.mm in Sources */, 603DF49D176737D383CE4F03 /* choice.mm in Sources */, @@ -8148,6 +8154,7 @@ A1AF8FF873D6383996995ED0 /* statusbr.cpp in Sources */, 2E059BFE8E3B3D9299D5596A /* textmeasure.cpp in Sources */, 65AD3B31319C35F1AC9EC626 /* anybutton.mm in Sources */, + CE32C5250F2834D4B81BE899 /* appprogress.mm in Sources */, 14D6D5F8F5ED3C71936DD2B0 /* button.mm in Sources */, 67A0583ADD8C35B8B9BA3D13 /* checkbox.mm in Sources */, 603DF49D176737D383CE4F02 /* choice.mm in Sources */, @@ -9335,6 +9342,7 @@ A1AF8FF873D6383996995ECF /* statusbr.cpp in Sources */, 2E059BFE8E3B3D9299D55969 /* textmeasure.cpp in Sources */, 65AD3B31319C35F1AC9EC625 /* anybutton.mm in Sources */, + CE32C5250F2834D4B81BE898 /* appprogress.mm in Sources */, 14D6D5F8F5ED3C71936DD2AF /* button.mm in Sources */, 67A0583ADD8C35B8B9BA3D12 /* checkbox.mm in Sources */, 603DF49D176737D383CE4F01 /* choice.mm in Sources */, diff --git a/docs/changes.txt b/docs/changes.txt index cef0b49bd5..c364f90d38 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -67,6 +67,7 @@ All (GUI): - Allow requesting modern (3.x+) OpenGL version in wxGLCanvas (Fabio Arnold). - Allow customizing window shown by wxBusyInfo. - Add wxAddRemoveCtrl. +- Add wxAppProgressIndicator for MSW (Chaobin Zhang) and OS X (Tobias Taschner). - Add wxEVT_MAGNIFY mouse event (Joost Nieuwenhuijse). - Make results of wxDC::DrawEllipticArc() consistent across all platforms. - XRC handler for wxAuiToolBar added (Kinaou Hervé, David Hart). diff --git a/include/wx/appprogress.h b/include/wx/appprogress.h index 816da3d548..9da10c6952 100644 --- a/include/wx/appprogress.h +++ b/include/wx/appprogress.h @@ -31,6 +31,8 @@ private: #if defined(__WXMSW__) && wxUSE_TASKBARBUTTON #include "wx/msw/appprogress.h" +#elif defined(__WXOSX__) + #include "wx/osx/appprogress.h" #else class wxAppProgressIndicator : public wxAppProgressIndicatorBase { diff --git a/include/wx/gauge.h b/include/wx/gauge.h index 6339715580..a7057273d8 100644 --- a/include/wx/gauge.h +++ b/include/wx/gauge.h @@ -42,6 +42,8 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxGaugeNameStr[]; +class WXDLLIMPEXP_FWD_CORE wxAppProgressIndicator; + // ---------------------------------------------------------------------------- // wxGauge: a progress bar // ---------------------------------------------------------------------------- @@ -99,6 +101,8 @@ protected: int m_nDirection; // can be wxRIGHT or wxLEFT #endif + wxAppProgressIndicator *m_appProgressIndicator; + wxDECLARE_NO_COPY_CLASS(wxGaugeBase); }; diff --git a/include/wx/msw/gauge.h b/include/wx/msw/gauge.h index d073ad182c..3cf4fcf44e 100644 --- a/include/wx/msw/gauge.h +++ b/include/wx/msw/gauge.h @@ -15,8 +15,6 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxGaugeNameStr[]; -class WXDLLIMPEXP_FWD_CORE wxAppProgressIndicator; - // Group box class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase { @@ -73,8 +71,6 @@ private: void SetIndeterminateMode(); void SetDeterminateMode(); - wxAppProgressIndicator* m_appProgressIndicator; - DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge) }; diff --git a/include/wx/osx/appprogress.h b/include/wx/osx/appprogress.h new file mode 100644 index 0000000000..a64b2cc62f --- /dev/null +++ b/include/wx/osx/appprogress.h @@ -0,0 +1,36 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/appprogress.h +// Purpose: wxAppProgressIndicator OS X implementation +// Author: Tobias Taschner +// Created: 2014-10-22 +// Copyright: (c) 2014 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_APPPROG_H_ +#define _WX_OSX_APPPROG_H_ + +#include "wx/window.h" + +class WXDLLIMPEXP_CORE wxAppProgressIndicator + : public wxAppProgressIndicatorBase +{ +public: + wxAppProgressIndicator(wxWindow* parent = NULL, int maxValue = 100); + virtual ~wxAppProgressIndicator(); + + virtual bool IsAvailable() const wxOVERRIDE; + + virtual void SetValue(int value) wxOVERRIDE; + virtual void SetRange(int range) wxOVERRIDE; + virtual void Pulse() wxOVERRIDE; + virtual void Reset() wxOVERRIDE; + +private: + int m_maxValue; + void *m_dockIcon; + + wxDECLARE_NO_COPY_CLASS(wxAppProgressIndicator); +}; + +#endif // _WX_OSX_APPPROG_H_ diff --git a/interface/wx/appprogress.h b/interface/wx/appprogress.h index 6cc52d69e3..55c5e0ffaf 100644 --- a/interface/wx/appprogress.h +++ b/interface/wx/appprogress.h @@ -1,72 +1,74 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: interface/wx/appprogress.h -// Purpose: interface of wxAppProgressIndicator -// Author: wxWidgets team -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -/** - @class wxAppProgressIndicator - - A helper class that can be used to update the progress bar in the taskbar button. - - @library{wxcore} - @category{misc} - - @onlyfor{wxmsw} - - @see wxTaskBarButton - @since 3.1.0 -*/ -class WXDLLIMPEXP_CORE wxAppProgressIndicator -{ -public: - /** - Constructs the wxAppProgressIndicator. - - @param parent - The parent window of wxAppProgressIndicator. Note that the - window should has taskbar button showing. If parent is NULL, - the progress will reflect on the taskbar buttons of all the - top level windows. - @param maxValue - Integer range (maximum value) of the progress indicator. - */ - wxAppProgressIndicator(wxWindow* parent = NULL, int maxValue = 100); - - /** - Destructor, stops displaying progress and returns the indicator to its - normal state. - */ - virtual ~wxAppProgressIndicator(); - - /** - Check if the application progress display is available. - - Currently this only returns @true when using wxMSW and running under - Vista or later system, which provide task bar button API. - - If this method returns @false, no other methods of this class do - anything, but they may still be called without any ill effects. - */ - bool IsAvailable() const; - - /** - Set the progress value in taskbar button of parent window. - - @param value - The new value of the progress meter. It should be less than or equal - to the range. - */ - void SetValue(int value); - - /** - Set the progress range in taskbar button of parent window. - */ - void SetRange(int range); - - /** - Makes the progress bar run in indeterminate mode. - */ - bool Pulse(); -}; +///////////////////////////////////////////////////////////////////////////// +// Name: interface/wx/appprogress.h +// Purpose: interface of wxAppProgressIndicator +// Author: wxWidgets team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/** + @class wxAppProgressIndicator + + A helper class that can be used to update the progress bar in the taskbar + button on Windows and the dock icon on OS X. + + @library{wxcore} + @category{misc} + + @onlyfor{wxmsw,wxosx} + + @see wxTaskBarButton + @since 3.1.0 +*/ +class WXDLLIMPEXP_CORE wxAppProgressIndicator +{ +public: + /** + Constructs the wxAppProgressIndicator. + + @param parent + The parent window of wxAppProgressIndicator. Note that the + window should has taskbar button showing. If parent is NULL, + the progress will reflect on the taskbar buttons of all the + top level windows. + @param maxValue + Integer range (maximum value) of the progress indicator. + */ + wxAppProgressIndicator(wxWindow* parent = NULL, int maxValue = 100); + + /** + Destructor, stops displaying progress and returns the indicator to its + normal state. + */ + virtual ~wxAppProgressIndicator(); + + /** + Check if the application progress display is available. + + Currently this only returns @true when using wxMSW and running + under Windows 7 or later systems (which provide task bar button + API) or when using wxOSX. + + If this method returns @false, no other methods of this class do + anything, but they may still be called without any ill effects. + */ + bool IsAvailable() const; + + /** + Set the progress value in taskbar button of parent window. + + @param value + The new value of the progress meter. It should be less than or equal + to the range. + */ + void SetValue(int value); + + /** + Set the progress range in taskbar button of parent window. + */ + void SetRange(int range); + + /** + Makes the progress bar run in indeterminate mode. + */ + bool Pulse(); +}; diff --git a/interface/wx/gauge.h b/interface/wx/gauge.h index 3cd5e49c76..bb51a86773 100644 --- a/interface/wx/gauge.h +++ b/interface/wx/gauge.h @@ -56,7 +56,8 @@ @style{wxGA_PROGRESS} Reflect the value of gauge in the application taskbar button under - Windows 7 and later, ignored under the other platforms. + Windows 7 and later and the dock icon under OS X, ignored under + the other platforms. @since 3.1.0 @endStyleTable diff --git a/src/common/gaugecmn.cpp b/src/common/gaugecmn.cpp index 57e3f56c19..bac520114d 100644 --- a/src/common/gaugecmn.cpp +++ b/src/common/gaugecmn.cpp @@ -29,6 +29,7 @@ #if wxUSE_GAUGE #include "wx/gauge.h" +#include "wx/appprogress.h" const char wxGaugeNameStr[] = "gauge"; @@ -39,6 +40,7 @@ const char wxGaugeNameStr[] = "gauge"; wxGaugeBase::~wxGaugeBase() { // this destructor is required for Darwin + delete m_appProgressIndicator; } // ---------------------------------------------------------------------------- @@ -124,6 +126,17 @@ bool wxGaugeBase::Create(wxWindow *parent, SetValidator(validator); #endif // wxUSE_VALIDATORS + m_appProgressIndicator = NULL; + if ( (style & wxGA_PROGRESS) != 0 ) + { + wxWindow* topParent = wxGetTopLevelParent(this); + if ( topParent != NULL ) + { + m_appProgressIndicator = + new wxAppProgressIndicator(topParent, range); + } + } + SetRange(range); SetValue(0); #if wxGAUGE_EMULATE_INDETERMINATE_MODE diff --git a/src/msw/gauge.cpp b/src/msw/gauge.cpp index bc2d106326..d07096f086 100644 --- a/src/msw/gauge.cpp +++ b/src/msw/gauge.cpp @@ -95,17 +95,6 @@ bool wxGauge::Create(wxWindow *parent, // in case we need to emulate indeterminate mode... m_nDirection = wxRIGHT; - m_appProgressIndicator = NULL; - if ( (style & wxGA_PROGRESS) != 0 ) - { - wxWindow* topParent = wxGetTopLevelParent(this); - if ( topParent != NULL ) - { - m_appProgressIndicator = - new wxAppProgressIndicator(topParent, range); - } - } - SetRange(range); return true; @@ -113,7 +102,6 @@ bool wxGauge::Create(wxWindow *parent, wxGauge::~wxGauge() { - delete m_appProgressIndicator; } WXDWORD wxGauge::MSWGetStyle(long style, WXDWORD *exstyle) const diff --git a/src/osx/cocoa/appprogress.mm b/src/osx/cocoa/appprogress.mm new file mode 100644 index 0000000000..c95613e63f --- /dev/null +++ b/src/osx/cocoa/appprogress.mm @@ -0,0 +1,114 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: src/osx/cocoa/appprogress.mm +// Purpose: wxAppProgressIndicator OSX implemenation +// Author: Tobias Taschner +// Created: 2014-10-22 +// Copyright: (c) 2014 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "wx/appprogress.h" +#include "wx/osx/private.h" + +@interface wxAppProgressDockIcon : NSObject +{ + NSProgressIndicator* m_progIndicator; + NSDockTile* m_dockTile; +} + +- (id)init; + +- (void)setProgress: (double)value; + +@end + +@implementation wxAppProgressDockIcon + +- (id)init +{ + self = [super init]; + if (self) { + m_dockTile = [NSApplication sharedApplication].dockTile; + NSImageView* iv = [[NSImageView alloc] init]; + [iv setImage:[NSApplication sharedApplication].applicationIconImage]; + [m_dockTile setContentView:iv]; + + m_progIndicator = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0.0f, 16.0f, m_dockTile.size.width, 24.)]; + m_progIndicator.style = NSProgressIndicatorBarStyle; + [m_progIndicator setIndeterminate:NO]; + [iv addSubview:m_progIndicator]; + + [m_progIndicator setBezeled:YES]; + [m_progIndicator setMinValue:0]; + [m_progIndicator setMaxValue:1]; + [m_progIndicator release]; + [self setProgress:0.0]; + } + return self; +} + +- (void)setProgress: (double)value +{ + [m_progIndicator setHidden:NO]; + [m_progIndicator setDoubleValue:value]; + + [m_dockTile display]; +} + +- (void)setIndeterminate: (bool)indeterminate +{ + [m_progIndicator setIndeterminate:indeterminate]; + + [m_dockTile display]; +} + +- (void)reset +{ + [m_dockTile setContentView:nil]; +} + +@end + +wxAppProgressIndicator::wxAppProgressIndicator(wxWindow* WXUNUSED(parent), int maxValue ): + m_maxValue(maxValue) +{ + wxAppProgressDockIcon* dockIcon = [[[wxAppProgressDockIcon alloc] init] retain]; + + m_dockIcon = dockIcon; +} + +wxAppProgressIndicator::~wxAppProgressIndicator() +{ + Reset(); + + NSObject* obj = (NSObject*) m_dockIcon; + [obj release]; +} + +bool wxAppProgressIndicator::IsAvailable() const +{ + return true; +} + +void wxAppProgressIndicator::SetValue(int value) +{ + wxAppProgressDockIcon* dockIcon = (wxAppProgressDockIcon*) m_dockIcon; + [dockIcon setProgress:(double)value / (double)m_maxValue]; +} + +void wxAppProgressIndicator::SetRange(int range) +{ + m_maxValue = range; +} + +void wxAppProgressIndicator::Pulse() +{ + wxAppProgressDockIcon* dockIcon = (wxAppProgressDockIcon*) m_dockIcon; + [dockIcon setIndeterminate:true]; +} + +void wxAppProgressIndicator::Reset() +{ + wxAppProgressDockIcon* dockIcon = (wxAppProgressDockIcon*) m_dockIcon; + [dockIcon reset]; +}