• R/O
  • HTTP
  • SSH
  • HTTPS

Molby: コミット

Molecular Modeling Software


コミットメタ情報

リビジョンeab1f691bcb51626b0aad330e587801d9e6d2f67 (tree)
日時2022-09-15 22:40:24
作者Toshi Nagata <alchemist.2005@nift...>
コミッターToshi Nagata

ログメッセージ

Display of new listctrl is mostly working; editing is not working yet

変更サマリ

差分

--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ ifeq ($(TARGET_PLATFORM),MSW)
22 ifeq ($(TARGET_ARCH),x86_64)
33 TOOL_PREFIX = x86_64-w64-mingw32-
44 MSW_BUILD = build-win
5- LIB_SUFFIX = -3.0-x86_64-w64-mingw32
5+ LIB_SUFFIX = -3.2-x86_64-w64-mingw32
66 WINE_PATH=/Applications/EasyWine.app/Contents/Resources/wine/bin
77 PRODUCT_SUFFIX = 64
88 TARGET_ARCH_DEFINE = -DTARGET_ARCH=64
@@ -11,18 +11,18 @@ ifeq ($(TARGET_PLATFORM),MSW)
1111 TOOL_PREFIX = i686-w64-mingw32-
1212 # CPP_EXTRA_FLAGS += -isystem /usr/local/mingw-w32/mingw/include
1313 MSW_BUILD = build-win32
14- LIB_SUFFIX = -3.0-i686-w64-mingw32
14+ LIB_SUFFIX = -3.2-i686-w64-mingw32
1515 WINE_PATH=/Applications/EasyWine.app/Contents/Resources/wine/bin
1616 PRODUCT_SUFFIX = 32
1717 # FINAL_EXECUTABLE_SUFFIX = _32bit
1818 TARGET_ARCH_DEFINE = -DTARGET_ARCH=32
1919 SETUP_NAME = SetupMolbyWin32
2020 endif
21- WX_DIR = $(PWD)/../../wxWidgets-3.0.3
21+ WX_DIR = $(PWD)/../../wxWidgets-3.2.0
2222 WX_LIB_DIR = $(WX_DIR)/$(MSW_BUILD)/lib
23- WX_ARCH_DIR = $(WX_LIB_DIR)/wx/include/$(TOOL_PREFIX)msw-unicode-static-3.0
23+ WX_ARCH_DIR = $(WX_LIB_DIR)/wx/include/$(TOOL_PREFIX)msw-unicode-static-3.2
2424 WX_CPPFLAGS = -isystem $(WX_ARCH_DIR) -isystem $(WX_DIR)/include -D_LARGEFIILE_SOURCE=unknown -D__WXMSW__ $(TARGET_ARCH_DEFINE)
25- WX_LDFLAGS = -L$(WX_LIB_DIR) -Wl,--subsystem,windows -mwindows -lwx_mswu_gl$(LIB_SUFFIX) -lopengl32 -lglu32 -lwx_mswu$(LIB_SUFFIX) -lwxregexu$(LIB_SUFFIX) -lwxexpat$(LIB_SUFFIX) -lwxtiff$(LIB_SUFFIX) -lwxjpeg$(LIB_SUFFIX) -lwxpng$(LIB_SUFFIX) -lwxzlib$(LIB_SUFFIX) -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32
25+ WX_LDFLAGS = -L$(WX_LIB_DIR) -Wl,--subsystem,windows -mwindows $(WX_LIB_DIR)/libwx_mswu_gl$(LIB_SUFFIX).a -lopengl32 -lglu32 $(WX_LIB_DIR)/libwx_mswu$(LIB_SUFFIX).a -limm32 -lwxtiff$(LIB_SUFFIX) -lwxjpeg$(LIB_SUFFIX) -lwxpng$(LIB_SUFFIX) -lwxregexu$(LIB_SUFFIX) -lwxscintilla$(LIB_SUFFIX) -lwxexpat$(LIB_SUFFIX) -lwxzlib$(LIB_SUFFIX) -lrpcrt4 -loleaut32 -lole32 -luuid -luxtheme -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lcomdlg32 -ladvapi32 -lversion -lws2_32 -lgdi32 -loleacc -lwinhttp
2626 CPP_EXTRA_FLAGS = -isystem $(PWD)/../../CLAPACK-3.1.1.1-mingw/INCLUDE -isystem $(PWD)/../../fftw-3.3.2/$(MSW_BUILD)/include -I$(PWD)/../MolLib
2727 LD_EXTRA_FLAGS = -L$(PWD)/../../CLAPACK-3.1.1.1-mingw/$(MSW_BUILD)/lib -L$(PWD)/../../fftw-3.3.2/$(MSW_BUILD)/lib -llapackMinGW -lblasMinGW -lf2c_nomain -lfftw3 -static-libgcc -static-libstdc++ -Wl,-Bstatic,-lpthread
2828 RUBY_DIR = $(PWD)/../../ruby-2.0.0-p353
@@ -97,7 +97,8 @@ ortep3/ortep3$(EXE_SUFFIX) :
9797 make -f ../Makefile_ortep3
9898
9999 ifeq ($(TARGET_PLATFORM),MSW)
100-EXTRA_OBJECTS = listctrl.o window_msw.o textctrl_msw.o OpenGL_extensions.o
100+#EXTRA_OBJECTS = window_msw.o textctrl_msw.o OpenGL_extensions.o
101+EXTRA_OBJECTS = OpenGL_extensions.o
101102 RESOURCE = molby_rc.o
102103 # The following HOMETEMP kludges are to work around a bug where '#include "..."'
103104 # does not work when the include path is on the C: drive whereas the source is
--- a/MolLib/Ruby_bind/ruby_dialog.c
+++ b/MolLib/Ruby_bind/ruby_dialog.c
@@ -1924,7 +1924,7 @@ RubyDialog_IsTableItemEditable(RubyValue self, RDItem *ip, int row, int column)
19241924 }
19251925
19261926 int
1927-RubyDialog_IsTableDragAndDropEnabled(RubyValue self, RDItem *ip)
1927+RubyDialog_IsTableDragAndDropEnabled(RubyValue self, RDItem *ip, int row)
19281928 {
19291929 int status;
19301930 void *vp[4] = { (void *)(uintptr_t)self, (void *)ip, (void *)(uintptr_t)sIsDragAndDropEnabledSymbol, NULL };
--- a/MolLib/Ruby_bind/ruby_dialog.h
+++ b/MolLib/Ruby_bind/ruby_dialog.h
@@ -84,7 +84,7 @@ extern void RubyDialog_GetTableItemText(RubyValue self, RDItem *ip, int row, int
8484 extern int RubyDialog_SetTableItemText(RubyValue self, RDItem *ip, int row, int column, const char *str);
8585 extern void RubyDialog_DragTableSelectionToRow(RubyValue self, RDItem *ip, int row);
8686 extern int RubyDialog_IsTableItemEditable(RubyValue self, RDItem *ip, int row, int column);
87-extern int RubyDialog_IsTableDragAndDropEnabled(RubyValue self, RDItem *ip);
87+extern int RubyDialog_IsTableDragAndDropEnabled(RubyValue self, RDItem *ip, int row);
8888 extern void RubyDialog_OnTableSelectionChanged(RubyValue self, RDItem *ip);
8989 extern int RubyDialog_SetTableItemColor(RubyValue self, RDItem *ip, int row, int column, float *fg, float *bg);
9090 extern int RubyDialog_HasPopUpMenu(RubyValue self, RDItem *ip, int row, int column, char ***menu_titles);
--- a/build-xcode/Molby-Info.plist
+++ b/build-xcode/Molby-Info.plist
@@ -2,8 +2,6 @@
22 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33 <plist version="1.0">
44 <dict>
5- <key>NSPrincipalClass</key>
6- <string>NSApplication</string>
75 <key>CFBundleDevelopmentRegion</key>
86 <string>English</string>
97 <key>CFBundleDocumentTypes</key>
@@ -28,20 +26,22 @@
2826 <key>CFBundleIconFile</key>
2927 <string>molby_icon.icns</string>
3028 <key>CFBundleIdentifier</key>
31- <string>com.yourcompany.Molby</string>
29+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
3230 <key>CFBundleInfoDictionaryVersion</key>
3331 <string>6.0</string>
3432 <key>CFBundleName</key>
3533 <string>${PRODUCT_NAME}</string>
3634 <key>CFBundlePackageType</key>
3735 <string>APPL</string>
36+ <key>CFBundleShortVersionString</key>
37+ <string>Version 1.0.2</string>
3838 <key>CFBundleSignature</key>
3939 <string>????</string>
4040 <key>CFBundleVersion</key>
4141 <string>v1.0.2</string>
42- <key>CFBundleShortVersionString</key>
43- <string>Version 1.0.2</string>
4442 <key>NSHumanReadableCopyright</key>
4543 <string>Copyright 2008-2022 Toshi Nagata</string>
44+ <key>NSPrincipalClass</key>
45+ <string>NSApplication</string>
4646 </dict>
4747 </plist>
--- a/build-xcode/Molby.xcodeproj/project.pbxproj
+++ b/build-xcode/Molby.xcodeproj/project.pbxproj
@@ -26,6 +26,7 @@
2626 /* Begin PBXBuildFile section */
2727 E403568428CF6A3D008E2C46 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E403568328CF6A3D008E2C46 /* QuartzCore.framework */; };
2828 E403568528D0AD7E008E2C46 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4FC7845183E51180064FB2E /* Carbon.framework */; };
29+ E403568628D0B7B0008E2C46 /* MyListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E41251B728CD92A100E12983 /* MyListCtrl.cpp */; };
2930 E4059F9B28C46A6E0052B36B /* molby_icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = E4FC77D4183E4FF20064FB2E /* molby_icon.icns */; };
3031 E4059F9C28C46A6E0052B36B /* Scripts in Resources */ = {isa = PBXBuildFile; fileRef = E4FC77D6183E4FFE0064FB2E /* Scripts */; };
3132 E4059F9D28C46A6E0052B36B /* amber11 in Resources */ = {isa = PBXBuildFile; fileRef = E4FC77D8183E503E0064FB2E /* amber11 */; };
@@ -57,7 +58,6 @@
5758 E4059FB828C46A6E0052B36B /* filedlg.mm in Sources */ = {isa = PBXBuildFile; fileRef = E420BDEA1885746700A2B983 /* filedlg.mm */; };
5859 E4059FB928C46A6E0052B36B /* GlobalParameterFilesFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDEB1885746700A2B983 /* GlobalParameterFilesFrame.cpp */; };
5960 E4059FBA28C46A6E0052B36B /* GlobalParameterFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDED1885746700A2B983 /* GlobalParameterFrame.cpp */; };
60- E4059FBB28C46A6E0052B36B /* listctrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDF41885749000A2B983 /* listctrl.cpp */; };
6161 E4059FBC28C46A6E0052B36B /* MoleculeView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDF51885749000A2B983 /* MoleculeView.cpp */; };
6262 E4059FBD28C46A6E0052B36B /* MyApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDF71885749000A2B983 /* MyApp.cpp */; };
6363 E4059FBE28C46A6E0052B36B /* MyClipboardData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDF91885749000A2B983 /* MyClipboardData.cpp */; };
@@ -66,7 +66,6 @@
6666 E4059FC128C46A6E0052B36B /* MyDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BE04188574AD00A2B983 /* MyDocument.cpp */; };
6767 E4059FC228C46A6E0052B36B /* MyGLCanvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BE06188574AD00A2B983 /* MyGLCanvas.cpp */; };
6868 E4059FC328C46A6E0052B36B /* MyIPCSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BE08188574AD00A2B983 /* MyIPCSupport.cpp */; };
69- E4059FC428C46A6E0052B36B /* MyListCtrl_orig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BE0A188574AD00A2B983 /* MyListCtrl_orig.cpp */; };
7069 E4059FC528C46A6E0052B36B /* MyProgressIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BE12188574D700A2B983 /* MyProgressIndicator.cpp */; };
7170 E4059FC628C46A6E0052B36B /* MySlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BE14188574D700A2B983 /* MySlider.cpp */; };
7271 E4059FC728C46A6E0052B36B /* MyThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BE16188574D700A2B983 /* MyThread.cpp */; };
@@ -93,9 +92,7 @@
9392 E4059FDD28C46A6E0052B36B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4FC7A16183E51570064FB2E /* Foundation.framework */; };
9493 E4059FDE28C46A6E0052B36B /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4FC7B58183E53710064FB2E /* WebKit.framework */; };
9594 E4059FDF28C46A6E0052B36B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4FC7CAC183F953E0064FB2E /* AudioToolbox.framework */; };
96- E4059FE728C46B330052B36B /* Molby_MacLegacy-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = E4059FE628C46B320052B36B /* Molby_MacLegacy-Info.plist */; };
9795 E41251B828CD92A100E12983 /* MyListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E41251B728CD92A100E12983 /* MyListCtrl.cpp */; };
98- E41251B928CD92A100E12983 /* MyListCtrl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E41251B728CD92A100E12983 /* MyListCtrl.cpp */; };
9996 E41A7F962307D61200C65830 /* bitmaps in Resources */ = {isa = PBXBuildFile; fileRef = E41A7F952307D61200C65830 /* bitmaps */; };
10097 E420BDEF1885746700A2B983 /* ConsoleFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDE81885746700A2B983 /* ConsoleFrame.cpp */; };
10198 E420BDF11885746700A2B983 /* GlobalParameterFilesFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E420BDEB1885746700A2B983 /* GlobalParameterFilesFrame.cpp */; };
@@ -185,6 +182,8 @@
185182 /* Begin PBXFileReference section */
186183 8D1107320486CEB800E47090 /* Molby.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Molby.app; sourceTree = BUILT_PRODUCTS_DIR; };
187184 E403568328CF6A3D008E2C46 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
185+ E403568728D0C859008E2C46 /* window_msw.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = window_msw.cpp; sourceTree = "<group>"; };
186+ E403568828D0C8C4008E2C46 /* textctrl_msw.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = textctrl_msw.cpp; sourceTree = "<group>"; };
188187 E4059FE428C46A6E0052B36B /* Molby_MacLegacy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Molby_MacLegacy.app; sourceTree = BUILT_PRODUCTS_DIR; };
189188 E4059FE628C46B320052B36B /* Molby_MacLegacy-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Molby_MacLegacy-Info.plist"; sourceTree = "<group>"; };
190189 E41251B728CD92A100E12983 /* MyListCtrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MyListCtrl.cpp; sourceTree = "<group>"; };
@@ -526,6 +525,7 @@
526525 E420BDF31885749000A2B983 /* listctrl_private.h */,
527526 E420BDF41885749000A2B983 /* listctrl.cpp */,
528527 E4653CB018A0CC7D0022377B /* textctrl_addition.mm */,
528+ E403568828D0C8C4008E2C46 /* textctrl_msw.cpp */,
529529 E4196C65190B2FA500183E62 /* menu.mm */,
530530 E420BDF51885749000A2B983 /* MoleculeView.cpp */,
531531 E420BDF61885749000A2B983 /* MoleculeView.h */,
@@ -565,6 +565,7 @@
565565 E4D379A019C87C1200636D28 /* modalwindow.h */,
566566 E4D379A119C87C2200636D28 /* modalwindow.cpp */,
567567 E4D37E0D19CC831500636D28 /* modalwindow_osx.mm */,
568+ E403568728D0C859008E2C46 /* window_msw.cpp */,
568569 E4CB37081FDD4654001BB75E /* OpenGL_extensions.c */,
569570 E4CB37091FDD4654001BB75E /* OpenGL_extensions.h */,
570571 );
@@ -656,6 +657,7 @@
656657 29B97313FDCFA39411CA2CEA /* Project object */ = {
657658 isa = PBXProject;
658659 attributes = {
660+ LastUpgradeCheck = 1030;
659661 TargetAttributes = {
660662 E4CB370B1FE2C1F7001BB75E = {
661663 CreatedOnToolsVersion = 8.2.1;
@@ -712,7 +714,6 @@
712714 E4059F9D28C46A6E0052B36B /* amber11 in Resources */,
713715 E4059F9E28C46A6E0052B36B /* bitmaps in Resources */,
714716 E4059F9F28C46A6E0052B36B /* ortep3 in Resources */,
715- E4059FE728C46B330052B36B /* Molby_MacLegacy-Info.plist in Resources */,
716717 );
717718 runOnlyForDeploymentPostprocessing = 0;
718719 };
@@ -934,11 +935,10 @@
934935 E4059FB528C46A6E0052B36B /* Types.c in Sources */,
935936 E4059FB628C46A6E0052B36B /* buildInfo.c in Sources */,
936937 E4059FB728C46A6E0052B36B /* ConsoleFrame.cpp in Sources */,
938+ E403568628D0B7B0008E2C46 /* MyListCtrl.cpp in Sources */,
937939 E4059FB828C46A6E0052B36B /* filedlg.mm in Sources */,
938940 E4059FB928C46A6E0052B36B /* GlobalParameterFilesFrame.cpp in Sources */,
939941 E4059FBA28C46A6E0052B36B /* GlobalParameterFrame.cpp in Sources */,
940- E41251B928CD92A100E12983 /* MyListCtrl.cpp in Sources */,
941- E4059FBB28C46A6E0052B36B /* listctrl.cpp in Sources */,
942942 E4059FBC28C46A6E0052B36B /* MoleculeView.cpp in Sources */,
943943 E4059FBD28C46A6E0052B36B /* MyApp.cpp in Sources */,
944944 E4059FBE28C46A6E0052B36B /* MyClipboardData.cpp in Sources */,
@@ -947,7 +947,6 @@
947947 E4059FC128C46A6E0052B36B /* MyDocument.cpp in Sources */,
948948 E4059FC228C46A6E0052B36B /* MyGLCanvas.cpp in Sources */,
949949 E4059FC328C46A6E0052B36B /* MyIPCSupport.cpp in Sources */,
950- E4059FC428C46A6E0052B36B /* MyListCtrl_orig.cpp in Sources */,
951950 E4059FC528C46A6E0052B36B /* MyProgressIndicator.cpp in Sources */,
952951 E4059FC628C46A6E0052B36B /* MySlider.cpp in Sources */,
953952 E4059FC728C46A6E0052B36B /* MyThread.cpp in Sources */,
@@ -989,9 +988,9 @@
989988 isa = XCBuildConfiguration;
990989 buildSettings = {
991990 ALWAYS_SEARCH_USER_PATHS = NO;
992- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
993991 CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
994992 CLANG_CXX_LIBRARY = "libc++";
993+ CLANG_ENABLE_OBJC_WEAK = YES;
995994 CLANG_LINK_OBJC_RUNTIME = NO;
996995 COPY_PHASE_STRIP = NO;
997996 DEBUG_INFORMATION_FORMAT = dwarf;
@@ -1044,6 +1043,7 @@
10441043 "-lenc",
10451044 "-ltrans",
10461045 );
1046+ PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Molby;
10471047 PRODUCT_NAME = Molby;
10481048 SDKROOT = macosx10.12;
10491049 };
@@ -1053,9 +1053,9 @@
10531053 isa = XCBuildConfiguration;
10541054 buildSettings = {
10551055 ALWAYS_SEARCH_USER_PATHS = NO;
1056- ARCHS = "$(ARCHS_STANDARD_64_BIT)";
10571056 CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
10581057 CLANG_CXX_LIBRARY = "libc++";
1058+ CLANG_ENABLE_OBJC_WEAK = YES;
10591059 CLANG_LINK_OBJC_RUNTIME = NO;
10601060 DEBUG_INFORMATION_FORMAT = dwarf;
10611061 GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
@@ -1104,6 +1104,7 @@
11041104 "-lenc",
11051105 "-ltrans",
11061106 );
1107+ PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Molby;
11071108 PRODUCT_NAME = Molby;
11081109 SDKROOT = macosx10.12;
11091110 };
@@ -1120,8 +1121,7 @@
11201121 GCC_WARN_UNUSED_VARIABLE = YES;
11211122 MACOSX_DEPLOYMENT_TARGET = 10.12;
11221123 ONLY_ACTIVE_ARCH = YES;
1123- PREBINDING = NO;
1124- SDKROOT = macosx10.12;
1124+ SDKROOT = macosx;
11251125 };
11261126 name = Debug;
11271127 };
@@ -1135,8 +1135,7 @@
11351135 GCC_WARN_ABOUT_RETURN_TYPE = YES;
11361136 GCC_WARN_UNUSED_VARIABLE = YES;
11371137 MACOSX_DEPLOYMENT_TARGET = 10.12;
1138- PREBINDING = NO;
1139- SDKROOT = macosx10.12;
1138+ SDKROOT = macosx;
11401139 };
11411140 name = Release;
11421141 };
@@ -1149,7 +1148,6 @@
11491148 COPY_PHASE_STRIP = NO;
11501149 DEBUG_INFORMATION_FORMAT = dwarf;
11511150 GCC_DYNAMIC_NO_PIC = NO;
1152- GCC_ENABLE_FIX_AND_CONTINUE = YES;
11531151 GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
11541152 GCC_MODEL_TUNING = G5;
11551153 GCC_OPTIMIZATION_LEVEL = 0;
@@ -1165,6 +1163,7 @@
11651163 "$(PROJECT_DIR)/../../ruby-2.0.0-p353",
11661164 "$(PROJECT_DIR)/../../ruby-2.0.0-p353/build-osx/include/ruby-2.0.0",
11671165 "$(PROJECT_DIR)/../../ruby-2.0.0-p353/build-osx/include/ruby-2.0.0/x86_64-darwin18.7.0",
1166+ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers,
11681167 );
11691168 INFOPLIST_FILE = "$(SRCROOT)/Molby_MacLegacy-Info.plist";
11701169 INSTALL_PATH = "$(HOME)/Applications";
@@ -1196,6 +1195,7 @@
11961195 "-lenc",
11971196 "-ltrans",
11981197 );
1198+ PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Molby;
11991199 PRODUCT_NAME = "$(TARGET_NAME)";
12001200 SDKROOT = macosx10.6;
12011201 };
@@ -1222,6 +1222,7 @@
12221222 "$(PROJECT_DIR)/../../ruby-2.0.0-p353",
12231223 "$(PROJECT_DIR)/../../ruby-2.0.0-p353/build-osx/include/ruby-2.0.0",
12241224 "$(PROJECT_DIR)/../../ruby-2.0.0-p353/build-osx/include/ruby-2.0.0/x86_64-darwin18.7.0",
1225+ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers,
12251226 );
12261227 INFOPLIST_FILE = "$(SRCROOT)/Molby_MacLegacy-Info.plist";
12271228 INSTALL_PATH = "$(HOME)/Applications";
@@ -1253,6 +1254,7 @@
12531254 "-lenc",
12541255 "-ltrans",
12551256 );
1257+ PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Molby;
12561258 PRODUCT_NAME = "$(TARGET_NAME)";
12571259 SDKROOT = macosx10.6;
12581260 };
@@ -1267,6 +1269,7 @@
12671269 CLANG_CXX_LIBRARY = "libc++";
12681270 CLANG_ENABLE_MODULES = YES;
12691271 CLANG_ENABLE_OBJC_ARC = NO;
1272+ CLANG_ENABLE_OBJC_WEAK = YES;
12701273 CLANG_WARN_BOOL_CONVERSION = YES;
12711274 CLANG_WARN_CONSTANT_CONVERSION = YES;
12721275 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1313,6 +1316,7 @@
13131316 CLANG_CXX_LIBRARY = "libc++";
13141317 CLANG_ENABLE_MODULES = YES;
13151318 CLANG_ENABLE_OBJC_ARC = NO;
1319+ CLANG_ENABLE_OBJC_WEAK = YES;
13161320 CLANG_WARN_BOOL_CONVERSION = YES;
13171321 CLANG_WARN_CONSTANT_CONVERSION = YES;
13181322 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1351,6 +1355,7 @@
13511355 CLANG_CXX_LIBRARY = "libc++";
13521356 CLANG_ENABLE_MODULES = YES;
13531357 CLANG_ENABLE_OBJC_ARC = NO;
1358+ CLANG_ENABLE_OBJC_WEAK = YES;
13541359 CLANG_WARN_BOOL_CONVERSION = YES;
13551360 CLANG_WARN_CONSTANT_CONVERSION = YES;
13561361 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1397,6 +1402,7 @@
13971402 CLANG_CXX_LIBRARY = "libc++";
13981403 CLANG_ENABLE_MODULES = YES;
13991404 CLANG_ENABLE_OBJC_ARC = NO;
1405+ CLANG_ENABLE_OBJC_WEAK = YES;
14001406 CLANG_WARN_BOOL_CONVERSION = YES;
14011407 CLANG_WARN_CONSTANT_CONVERSION = YES;
14021408 CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1429,6 +1435,7 @@
14291435 E4CB37111FE4FF0E001BB75E /* Debug */ = {
14301436 isa = XCBuildConfiguration;
14311437 buildSettings = {
1438+ CLANG_ENABLE_OBJC_WEAK = YES;
14321439 PRODUCT_NAME = "$(TARGET_NAME)";
14331440 };
14341441 name = Debug;
@@ -1436,6 +1443,7 @@
14361443 E4CB37121FE4FF0E001BB75E /* Release */ = {
14371444 isa = XCBuildConfiguration;
14381445 buildSettings = {
1446+ CLANG_ENABLE_OBJC_WEAK = YES;
14391447 PRODUCT_NAME = "$(TARGET_NAME)";
14401448 };
14411449 name = Release;
--- a/build-xcode/Molby.xcodeproj/xcshareddata/xcschemes/Molby.xcscheme
+++ b/build-xcode/Molby.xcodeproj/xcshareddata/xcschemes/Molby.xcscheme
@@ -1,6 +1,6 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <Scheme
3- LastUpgradeVersion = "0820"
3+ LastUpgradeVersion = "1030"
44 version = "1.7">
55 <BuildAction
66 parallelizeBuildables = "YES"
--- a/build-xcode/Molby.xcodeproj/xcshareddata/xcschemes/Molby_Archive.xcscheme
+++ b/build-xcode/Molby.xcodeproj/xcshareddata/xcschemes/Molby_Archive.xcscheme
@@ -1,6 +1,6 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <Scheme
3- LastUpgradeVersion = "0820"
3+ LastUpgradeVersion = "1030"
44 version = "1.3">
55 <BuildAction
66 parallelizeBuildables = "YES"
--- a/build-xcode/Molby_MacLegacy-Info.plist
+++ b/build-xcode/Molby_MacLegacy-Info.plist
@@ -2,8 +2,6 @@
22 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33 <plist version="1.0">
44 <dict>
5- <key>NSPrincipalClass</key>
6- <string>NSApplication</string>
75 <key>CFBundleDevelopmentRegion</key>
86 <string>English</string>
97 <key>CFBundleDocumentTypes</key>
@@ -28,20 +26,22 @@
2826 <key>CFBundleIconFile</key>
2927 <string>molby_icon.icns</string>
3028 <key>CFBundleIdentifier</key>
31- <string>com.yourcompany.Molby</string>
29+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
3230 <key>CFBundleInfoDictionaryVersion</key>
3331 <string>6.0</string>
3432 <key>CFBundleName</key>
3533 <string>${PRODUCT_NAME}</string>
3634 <key>CFBundlePackageType</key>
3735 <string>APPL</string>
36+ <key>CFBundleShortVersionString</key>
37+ <string>Version 1.0.2</string>
3838 <key>CFBundleSignature</key>
3939 <string>????</string>
4040 <key>CFBundleVersion</key>
4141 <string>v1.0.2</string>
42- <key>CFBundleShortVersionString</key>
43- <string>Version 1.0.2</string>
4442 <key>NSHumanReadableCopyright</key>
4543 <string>Copyright 2008-2022 Toshi Nagata</string>
44+ <key>NSPrincipalClass</key>
45+ <string>NSApplication</string>
4646 </dict>
4747 </plist>
--- a/wxSources/GlobalParameterFilesFrame.cpp
+++ b/wxSources/GlobalParameterFilesFrame.cpp
@@ -273,7 +273,7 @@ GlobalParameterFilesFrame::IsItemEditable(MyListCtrl *ctrl, long row, long colum
273273 }
274274
275275 bool
276-GlobalParameterFilesFrame::IsDragAndDropEnabled(MyListCtrl *ctrl)
276+GlobalParameterFilesFrame::IsDragAndDropEnabled(MyListCtrl *ctrl, long row)
277277 {
278278 return 0;
279279 }
--- a/wxSources/GlobalParameterFilesFrame.h
+++ b/wxSources/GlobalParameterFilesFrame.h
@@ -52,7 +52,7 @@ public:
5252 virtual int SetItemText(MyListCtrl *ctrl, long row, long column, const wxString &value);
5353 virtual void DragSelectionToRow(MyListCtrl *ctrl, long row);
5454 virtual bool IsItemEditable(MyListCtrl *ctrl, long row, long column);
55- virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl);
55+ virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl, long row);
5656 virtual void OnSelectionChanged(MyListCtrl *ctrl);
5757 virtual int SetItemColor(MyListCtrl *ctrl, long row, long col, float *fg, float *bg);
5858
--- a/wxSources/GlobalParameterFrame.cpp
+++ b/wxSources/GlobalParameterFrame.cpp
@@ -135,7 +135,7 @@ GlobalParameterFrame::IsItemEditable(MyListCtrl *ctrl, long row, long column)
135135 }
136136
137137 bool
138-GlobalParameterFrame::IsDragAndDropEnabled(MyListCtrl *ctrl)
138+GlobalParameterFrame::IsDragAndDropEnabled(MyListCtrl *ctrl, long row)
139139 {
140140 return 0;
141141 }
--- a/wxSources/GlobalParameterFrame.h
+++ b/wxSources/GlobalParameterFrame.h
@@ -50,7 +50,7 @@ public:
5050 virtual int SetItemText(MyListCtrl *ctrl, long row, long column, const wxString &value);
5151 virtual void DragSelectionToRow(MyListCtrl *ctrl, long row);
5252 virtual bool IsItemEditable(MyListCtrl *ctrl, long row, long column);
53- virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl);
53+ virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl, long row);
5454 virtual void OnSelectionChanged(MyListCtrl *ctrl);
5555 virtual int SetItemColor(MyListCtrl *ctrl, long row, long col, float *fg, float *bg);
5656
--- a/wxSources/MoleculeView.cpp
+++ b/wxSources/MoleculeView.cpp
@@ -996,7 +996,7 @@ MoleculeView::IsItemEditable(MyListCtrl *ctrl, long row, long column)
996996 }
997997
998998 bool
999-MoleculeView::IsDragAndDropEnabled(MyListCtrl *ctrl)
999+MoleculeView::IsDragAndDropEnabled(MyListCtrl *ctrl, long row)
10001000 {
10011001 /* Only enabled for the atom table */
10021002 return (MainView_tableType(mview) == 0);
--- a/wxSources/MoleculeView.h
+++ b/wxSources/MoleculeView.h
@@ -102,8 +102,8 @@ public:
102102 virtual int SetItemText(MyListCtrl *ctrl, long row, long column, const wxString &value);
103103 virtual void DragSelectionToRow(MyListCtrl *ctrl, long row);
104104 virtual bool IsItemEditable(MyListCtrl *ctrl, long row, long column);
105- virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl);
106- virtual void OnSelectionChanged(MyListCtrl *ctrl);
105+ virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl, long row);
106+ virtual void OnSelectionChanged(MyListCtrl *ctrl);
107107 virtual int SetItemColor(MyListCtrl *ctrl, long row, long col, float *fg, float *bg);
108108
109109 private:
--- a/wxSources/MyListCtrl.cpp
+++ b/wxSources/MyListCtrl.cpp
@@ -73,8 +73,8 @@ MyListCtrl::Create(wxWindow* parent, wxWindowID wid, const wxPoint& pos, const w
7373 {
7474 this->wxWindow::Create(parent, wid, pos, size);
7575
76- header = new wxWindow(this, 1001, wxPoint(0, 0), wxSize(size.x, 12));
77- scroll = new wxScrolledWindow(this, 1002, wxPoint(0, 12), wxSize(size.x, (size.y <= 12 ? -1 : size.y - 12)));
76+ header = new wxWindow(this, 1001, wxPoint(0, 0), wxSize(size.x, 16));
77+ scroll = new wxScrolledWindow(this, 1002, wxPoint(0, 16), wxSize(size.x, (size.y <= 16 ? -1 : size.y - 16)));
7878
7979 // Set sizer
8080 wxBoxSizer *vsizer = new wxBoxSizer(wxVERTICAL);
@@ -88,6 +88,7 @@ MyListCtrl::Create(wxWindow* parent, wxWindowID wid, const wxPoint& pos, const w
8888 scroll->Bind(wxEVT_LEFT_DOWN, &MyListCtrl::OnLeftDown, this);
8989 scroll->Bind(wxEVT_LEFT_UP, &MyListCtrl::OnLeftUp, this);
9090 scroll->Bind(wxEVT_LEFT_DCLICK, &MyListCtrl::OnLeftDClick, this);
91+ scroll->Bind(wxEVT_MOTION, &MyListCtrl::OnMotion, this);
9192 scroll->Bind(wxEVT_SCROLLWIN_BOTTOM, &MyListCtrl::OnScrollWin, this);
9293 scroll->Bind(wxEVT_SCROLLWIN_TOP, &MyListCtrl::OnScrollWin, this);
9394 scroll->Bind(wxEVT_SCROLLWIN_LINEDOWN, &MyListCtrl::OnScrollWin, this);
@@ -97,8 +98,19 @@ MyListCtrl::Create(wxWindow* parent, wxWindowID wid, const wxPoint& pos, const w
9798 scroll->Bind(wxEVT_SCROLLWIN_THUMBRELEASE, &MyListCtrl::OnScrollWin, this);
9899 scroll->Bind(wxEVT_SCROLLWIN_THUMBTRACK, &MyListCtrl::OnScrollWin, this);
99100
100- headerHeight = 12;
101- rowHeight = 12;
101+ // Set Fonts
102+ cellFont = GetFont();
103+ headerFont = cellFont.Smaller();
104+ header->SetFont(headerFont);
105+ {
106+ // Measure line height
107+ wxClientDC dc(this);
108+ int w, h, descent, leading;
109+ dc.GetTextExtent(_T("M"), &w, &h, &descent, &leading, &cellFont);
110+ rowHeight = h;
111+ dc.GetTextExtent(_T("M"), &w, &h, &descent, &leading, &headerFont);
112+ headerHeight = h;
113+ }
102114
103115 selectionChangeNotificationRequired = false;
104116 selectionChangeNotificationEnabled = true;
@@ -165,7 +177,7 @@ MyListCtrl::RefreshTable(bool refreshWindow)
165177 for (i = 0; i < ncols; i++) {
166178 pageWidth += colWidths[i];
167179 }
168- rowHeight = dataSource->GetRowHeight(this);
180+ // rowHeight = dataSource->GetRowHeight(this);
169181 // "+4" is for drawing marker during cell dragging
170182 pageHeight = rowHeight * nrows + 4;
171183 // Set the subwindow infos
@@ -199,13 +211,14 @@ MyListCtrl::OnPaint(wxPaintEvent &event)
199211 if (needsReload)
200212 RefreshTable(false);
201213
214+ wxColour colour;
202215 wxPaintDC dc(scroll);
203216 scroll->DoPrepareDC(dc);
204217 int ox, oy;
205218 scroll->CalcUnscrolledPosition(0, 0, &ox, &oy);
206219 int col = -1, row, basex;
207220 wxSize sz = scroll->GetClientSize();
208- bool showDragTarget = (draggingRows && (dragTargetRow != mouseRow && dragTargetRow != mouseRow));
221+ bool showDragTarget = (draggingRows && (dragTargetRow != mouseRow && dragTargetRow != mouseRow + 1));
209222 // Draw background
210223 int i, j;
211224 basex = 0;
@@ -221,50 +234,98 @@ MyListCtrl::OnPaint(wxPaintEvent &event)
221234 wxTextAttr attr;
222235 wxString str;
223236 int x, y;
224- x = basex;
225237 row = floor(oy / rowHeight);
226- for (i = col; i < ncols; i++) {
227- for (j = row; j < nrows; j++) {
228- y = j * rowHeight;
229- if (showDragTarget && j >= dragTargetRow) {
230- y += 5;
231- }
232- if (y > sz.y + oy)
233- break;
234- str = dataSource->GetItemText(this, j, i);
238+ // TODO: exchange the order of i and j, and get the "all-column" attribute
239+ // from SetItemColor() with col = -1
240+ for (j = row; j < nrows; j++) {
241+ float fg0[4], bg0[4];
242+ int n0 = dataSource->SetItemColor(this, j, -1, fg0, bg0);
243+ y = j * rowHeight;
244+ if (showDragTarget && j >= dragTargetRow) {
245+ y += 5;
246+ }
247+ if (y > sz.y + oy)
248+ break;
249+ x = basex;
250+ for (i = col; i < ncols; i++) {
235251 float fg[4], bg[4];
236- int n = dataSource->SetItemColor(this, j, i, fg, bg);
237- if (n & 1) {
238- // TODO: Set foreground color
239- }
240- if (n & 2) {
241- // TODO: Set background color
242- }
252+ int n;
253+ str = dataSource->GetItemText(this, j, i);
254+ n = dataSource->SetItemColor(this, j, i, fg, bg);
243255 if (IsRowSelected(j)) {
244256 if (showDragTarget) {
245- dc.SetBrush(lightBlueBrush);
257+ if (n & 2) {
258+ bg[0] = bg[0] * 0.5 + 0.25;
259+ bg[1] = bg[1] * 0.5 + 0.25;
260+ bg[2] = bg[2] * 0.5 + 0.5;
261+ } else if (n0 & 2) {
262+ bg[0] = bg0[0] * 0.5 + 0.25;
263+ bg[1] = bg0[1] * 0.5 + 0.25;
264+ bg[2] = bg0[2] * 0.5 + 0.5;
265+ } else {
266+ bg[0] = bg[1] = 0.5;
267+ bg[2] = 1.0;
268+ }
246269 } else {
247- dc.SetBrush(*wxBLUE_BRUSH);
270+ if (n & 2) {
271+ bg[0] = bg[0] * 0.5;
272+ bg[1] = bg[1] * 0.5;
273+ bg[2] = bg[2] * 0.5 + 0.5;
274+ } else if (n0 & 2) {
275+ bg[0] = bg0[0] * 0.5;
276+ bg[1] = bg0[1] * 0.5;
277+ bg[2] = bg0[2] * 0.5 + 0.5;
278+ } else {
279+ bg[0] = bg[1] = 0;
280+ bg[2] = 1.0;
281+ }
282+ }
283+ if (n & 1) {
284+ // Leave fg[] as they are
285+ } else if (n0 & 1) {
286+ fg[0] = fg0[0];
287+ fg[1] = fg0[1];
288+ fg[2] = fg0[2];
289+ } else {
290+ fg[0] = fg[1] = fg[2] = 1.0;
248291 }
249- dc.SetPen(wxNullPen);
250- dc.SetTextForeground(*wxWHITE);
251292 } else {
252- dc.SetBrush(*wxWHITE_BRUSH);
253- dc.SetPen(wxNullPen);
254- dc.SetTextForeground(*wxBLACK);
293+ if (n & 2) {
294+ // Leave bg[] as they are
295+ } else if (n0 & 2) {
296+ bg[0] = bg0[0];
297+ bg[1] = bg0[1];
298+ bg[2] = bg0[2];
299+ } else {
300+ bg[0] = bg[1] = bg[2] = 1.0;
301+ }
302+ if (n & 1) {
303+ // Leave fg[] as they are
304+ } else if (n & 1) {
305+ fg[0] = fg0[0];
306+ fg[1] = fg0[1];
307+ fg[2] = fg0[2];
308+ } else {
309+ fg[0] = fg[1] = fg[2] = 0.0;
310+ }
255311 }
312+ colour.Set(bg[0] * 255, bg[1] * 255, bg[2] * 255);
313+ dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(colour));
314+ dc.SetPen(*wxTRANSPARENT_PEN);
315+ colour.Set(fg[0] * 255, fg[1] * 255, fg[2] * 255);
316+ dc.SetTextForeground(colour);
256317 dc.DrawRectangle(x, y, colWidths[i], rowHeight - 1);
257318 dc.DrawText(str, x, y);
319+ x += colWidths[i];
320+ if (x > sz.y + ox)
321+ break;
258322 }
259323 if (showDragTarget) {
260324 y = dragTargetRow * rowHeight + 1;
261325 dc.SetBrush(*wxRED_BRUSH);
262326 dc.SetPen(wxNullPen);
263- dc.DrawRectangle(x, y, colWidths[i], 3);
327+ dc.DrawRectangle(basex, y, x - basex, 3);
264328 }
265- x += colWidths[i];
266- if (x > sz.y + ox)
267- break;
268329 }
269330 }
270331 }
@@ -508,7 +569,7 @@ MyListCtrl::OnLeftDClick(wxMouseEvent &event)
508569 }
509570 if (!dataSource->IsItemEditable(this, row, col))
510571 return;
511- StartEditText(col, row);
572+ StartEditText(row, col);
512573 }
513574
514575 void
@@ -565,7 +626,7 @@ MyListCtrl::OnScrollWin(wxScrollWinEvent &event)
565626 if (scroll->IsAutoScrolling()) {
566627 // Autoscrolling
567628 if (mouseMode == 3) {
568- return; // Mouse is captured by do not autoscroll
629+ return; // Mouse is captured but do not autoscroll
569630 }
570631 if (etype == wxEVT_SCROLLWIN_LINEUP || etype == wxEVT_SCROLLWIN_LINEDOWN) {
571632 if (orient == wxHORIZONTAL) {
--- a/wxSources/MyListCtrl.h
+++ b/wxSources/MyListCtrl.h
@@ -25,6 +25,7 @@
2525 #include "wx/textctrl.h"
2626 #include "wx/dc.h"
2727
28+#undef max
2829 #include <vector>
2930
3031 class MyListCtrl;
@@ -59,27 +60,6 @@ public:
5960 // Return 1 if foreground color should be modified, 2 if background color should be modified, 3 if both
6061 virtual int SetItemColor(MyListCtrl *ctrl, long row, long col, float *fg, float *bg) { return 0; }
6162
62- virtual int GetRowHeight(MyListCtrl *ctrl, long row = -1) { return 12; }
63-
64-/* virtual int GetNumberOfRows(MyListCtrl *ctrl) { return 0; }
65-// virtual int GetNumberOfColumns(MyListCtrl *ctrl) { return 0; }
66- virtual int GetColumnWidth(MyListCtrl *ctrl, int index) { return 0; }
67- virtual int GetRowHeight(MyListCtrl *ctrl) { return 0; }
68- virtual int GetHeaderHeight(MyListCtrl *ctrl) { return 0; }
69- virtual wxString GetCellText(MyListCtrl *ctrl, int row, int col) { return _T(""); }
70- virtual bool GetCellAttr(MyListCtrl *ctrl, int row, int col, wxTextAttr &attr) { return false; }
71- virtual bool IsDragEnabled(MyListCtrl *ctrl, int row = -1) { return true; }
72- virtual bool OnSelectionChanged(MyListCtrl *ctrl, std::vector<int> &oldsel, std::vector<int> &newsel) { return true; }
73- virtual bool IsEditable(MyListCtrl *ctrl, int row = -1, int col = -1) { return true; }
74- virtual bool SetCellText(MyListCtrl *ctrl, int row, int col, const wxString &str) { return true; }
75- virtual bool DragSelectionToRow(MyListCtrl *ctrl, std::vector<int> &sel, int row) { return true; }
76-
77- // If a popup menu is attached to the cell, then returns a positive integer, and *menu_titles should
78- // contain a malloc()'ed array of char* pointers (that are also malloc()'ed or strdup()'ed)
79- virtual int HasPopUpMenu(MyListCtrl *ctrl, int row, int col, char ***menu_titles) { return 0; }
80- virtual void OnPopUpMenuSelected(MyListCtrl *ctrl, int row, int col, int selected_index) {}
81-*/
82-
8363 };
8464
8565 class MyListCtrl: public wxWindow {
@@ -132,31 +112,16 @@ public:
132112
133113 void DragRows(int x, int y);
134114
135-// virtual wxString OnGetItemText(long item, long column) const;
136-
137-// void StartEditing(long item, long column);
138-// void EndEditing(long item, long column);
139-
140-// void GetScrollPixelsPerUnit(int *xunit, int *yunit);
141-// bool GetItemRectForRowAndColumn(wxRect &rect, int row, int column);
142115 bool FindItemAtPosition(const wxPoint &pos, int *col, int *row);
143116
144117 bool GetItemRectForRowAndColumn(wxRect &rect, int row, int column);
145118 bool EnsureVisible(int row, int col = -1);
146119
147-// void SetItemTextForColumn(long item, long column, const wxString &text);
148-
149120 void StartEditText(int col, int row);
150121 void EndEditTextAndRestart(bool setValueFlag, int newCol, int newRow);
151122 void EndEditText(bool setValueFlag = true);
152123 void FinalizeEdit();
153124
154-// void OnKeyDownOnEditText(wxKeyEvent &event);
155-// void OnKillFocusOnEditText(wxFocusEvent &event);
156-// void OnIdle(wxIdleEvent &event);
157-
158-// void OnPaintCallback(wxDC *dc);
159-
160125 int GetColumnCount();
161126 bool DeleteColumn(int col);
162127 bool InsertColumn(int col, const wxString &heading, int format = MyLIST_FORMAT_LEFT, int width = -1);
@@ -173,18 +138,7 @@ public:
173138 void OnScrollWin(wxScrollWinEvent &event);
174139 void OnCharInText(wxKeyEvent &event);
175140
176-// void OnItemSelectionChanged(wxListEvent &event);
177-// void OnTableSelectionChanged(wxCommandEvent &event);
178141 void EnableSelectionChangeNotification(bool flag) { selectionChangeNotificationEnabled = flag; }
179-// void OnEnableTableSelectionNotification(wxCommandEvent &event);
180-
181-// void OnBeginLabelEdit(wxListEvent &event);
182-// void OnEndLabelEdit(wxListEvent &event);
183-// void OnItemActivated(wxListEvent &event);
184-// void OnBeginDrag(wxListEvent &event);
185-
186-// void OnChar(wxKeyEvent &event);
187-// void OnMouseDown(wxMouseEvent &event);
188142
189143 void OnPopUpMenuSelected(wxCommandEvent &event);
190144
@@ -194,6 +148,8 @@ public:
194148 bool selectionChangeNotificationEnabled;
195149 bool needsReload;
196150 int lastPopUpColumn, lastPopUpRow;
151+ wxFont cellFont;
152+ wxFont headerFont;
197153
198154 private:
199155 DECLARE_DYNAMIC_CLASS(MyListCtrl)
--- a/wxSources/RubyDialogFrame.cpp
+++ b/wxSources/RubyDialogFrame.cpp
@@ -641,9 +641,9 @@ RubyDialogFrame::IsItemEditable(MyListCtrl *ctrl, long row, long column)
641641 }
642642
643643 bool
644-RubyDialogFrame::IsDragAndDropEnabled(MyListCtrl *ctrl)
644+RubyDialogFrame::IsDragAndDropEnabled(MyListCtrl *ctrl, long row)
645645 {
646- return RubyDialog_IsTableDragAndDropEnabled((RubyValue)dval, (RDItem *)ctrl);
646+ return RubyDialog_IsTableDragAndDropEnabled((RubyValue)dval, (RDItem *)ctrl, row);
647647 }
648648
649649 void
--- a/wxSources/RubyDialogFrame.h
+++ b/wxSources/RubyDialogFrame.h
@@ -125,7 +125,7 @@ public:
125125 virtual int SetItemText(MyListCtrl *ctrl, long row, long column, const wxString &value);
126126 virtual void DragSelectionToRow(MyListCtrl *ctrl, long row);
127127 virtual bool IsItemEditable(MyListCtrl *ctrl, long row, long column);
128- virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl);
128+ virtual bool IsDragAndDropEnabled(MyListCtrl *ctrl, long row = -1);
129129 virtual void OnSelectionChanged(MyListCtrl *ctrl);
130130 virtual int SetItemColor(MyListCtrl *ctrl, long row, long col, float *fg, float *bg);
131131 virtual int HasPopUpMenu(MyListCtrl *ctrl, long row, long column, char ***menu_titles);
旧リポジトリブラウザで表示