Revision: 26128 http://sourceforge.net/p/bibdesk/svn/26128 Author: hofman Date: 2021-06-03 21:24:18 +0000 (Thu, 03 Jun 2021) Log Message: ----------- table cell view containing a control
Modified Paths: -------------- trunk/bibdesk/Base.lproj/TemplateDocument.xib trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj Added Paths: ----------- trunk/bibdesk/BDSKControlTableCellView.h trunk/bibdesk/BDSKControlTableCellView.m Added: trunk/bibdesk/BDSKControlTableCellView.h =================================================================== --- trunk/bibdesk/BDSKControlTableCellView.h (rev 0) +++ trunk/bibdesk/BDSKControlTableCellView.h 2021-06-03 21:24:18 UTC (rev 26128) @@ -0,0 +1,48 @@ +// +// BDSKControlTableCellView.h +// BibDesk +// +// Created by Christiaan hofman on 03/06/2021. +/* + This software is Copyright (c) 2021 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Cocoa/Cocoa.h> + + +@interface BDSKControlTableCellView : NSTableCellView { + NSControl *control; +} + +@property (nonatomic, assign) IBOutlet NSControl *control; + +@end Added: trunk/bibdesk/BDSKControlTableCellView.m =================================================================== --- trunk/bibdesk/BDSKControlTableCellView.m (rev 0) +++ trunk/bibdesk/BDSKControlTableCellView.m 2021-06-03 21:24:18 UTC (rev 26128) @@ -0,0 +1,55 @@ +// +// BDSKControlTableCellView.m +// BibDesk +// +// Created by Christiaan hofman on 03/06/2021. +/* + This software is Copyright (c) 2021 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "BDSKControlTableCellView.h" + +@implementation BDSKControlTableCellView + +@synthesize control; + +- (void)dealloc { + control = nil; + [super dealloc]; +} + +- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle { + [super setBackgroundStyle:backgroundStyle]; + [[[self control] cell] setBackgroundStyle:backgroundStyle]; +} + +@end Modified: trunk/bibdesk/Base.lproj/TemplateDocument.xib =================================================================== --- trunk/bibdesk/Base.lproj/TemplateDocument.xib 2021-06-03 16:11:47 UTC (rev 26127) +++ trunk/bibdesk/Base.lproj/TemplateDocument.xib 2021-06-03 21:24:18 UTC (rev 26128) @@ -51,17 +51,17 @@ <autoresizingMask key="autoresizingMask"/> <subviews> <scrollView focusRingType="none" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="934"> - <rect key="frame" x="-1" y="-1" width="836" height="198"/> + <rect key="frame" x="-1" y="-1" width="836" height="204"/> <clipView key="contentView" id="Nj5-U4-FLc"> - <rect key="frame" x="1" y="1" width="834" height="196"/> + <rect key="frame" x="1" y="1" width="834" height="202"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <textView editable="NO" importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" continuousSpellChecking="YES" usesRuler="YES" spellingCorrection="YES" smartInsertDelete="YES" id="935" customClass="BDSKTextView"> - <rect key="frame" x="0.0" y="0.0" width="834" height="196"/> + <rect key="frame" x="0.0" y="0.0" width="834" height="202"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> - <size key="minSize" width="834" height="196"/> + <size key="minSize" width="834" height="202"/> <size key="maxSize" width="1655" height="10000000"/> <color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/> <connections> @@ -81,7 +81,7 @@ <autoresizingMask key="autoresizingMask"/> </scroller> <scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="1948"> - <rect key="frame" x="819" y="1" width="16" height="196"/> + <rect key="frame" x="819" y="1" width="16" height="202"/> <autoresizingMask key="autoresizingMask"/> </scroller> </scrollView> @@ -419,7 +419,7 @@ </view> </box> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1542"> - <rect key="frame" x="18" y="510" width="52" height="14"/> + <rect key="frame" x="18" y="320" width="52" height="204"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Default type:" id="1901"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -426,8 +426,8 @@ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> - <popUpButton horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1537"> - <rect key="frame" x="32" y="482" width="40" height="22"/> + <popUpButton horizontalHuggingPriority="750" verticalHuggingPriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="1537"> + <rect key="frame" x="32" y="292" width="40" height="22"/> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="1541" id="1900"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <font key="font" metaFont="smallSystem"/> @@ -444,13 +444,13 @@ </connections> </popUpButton> <scrollView autohidesScrollers="YES" horizontalLineScroll="26" horizontalPageScroll="10" verticalLineScroll="26" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZVm-ex-Jeo"> - <rect key="frame" x="20" y="205" width="48" height="273"/> + <rect key="frame" x="20" y="211" width="48" height="77"/> <clipView key="contentView" id="D7r-8N-QXM"> - <rect key="frame" x="1" y="1" width="46" height="271"/> + <rect key="frame" x="1" y="1" width="46" height="75"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="24" rowSizeStyle="small" headerView="W7l-ga-thB" viewBased="YES" id="6Be-c7-qbI" customClass="BDSKTableView"> - <rect key="frame" x="0.0" y="0.0" width="71" height="243"/> + <rect key="frame" x="0.0" y="0.0" width="71" height="47"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <size key="intercellSpacing" width="3" height="2"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> @@ -467,7 +467,7 @@ </buttonCell> <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> <prototypeCellViews> - <tableCellView id="o7L-lR-P3B"> + <tableCellView id="o7L-lR-P3B" customClass="BDSKControlTableCellView"> <rect key="frame" x="1" y="1" width="21" height="24"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> @@ -487,6 +487,9 @@ <constraint firstAttribute="trailing" secondItem="RS4-i7-mBX" secondAttribute="trailing" id="nO6-dB-4V3"/> <constraint firstItem="RS4-i7-mBX" firstAttribute="centerY" secondItem="o7L-lR-P3B" secondAttribute="centerY" id="uqH-ec-fjZ"/> </constraints> + <connections> + <outlet property="control" destination="RS4-i7-mBX" id="S8B-Kq-k2h"/> + </connections> </tableCellView> </prototypeCellViews> </tableColumn> @@ -515,8 +518,8 @@ </textFieldCell> <connections> <binding destination="v6j-yd-fiN" name="fontBold" keyPath="objectValue.defaultTemplate" id="LaG-JY-R59"/> + <binding destination="v6j-yd-fiN" name="value" keyPath="objectValue.pubType" id="MMb-NR-LB9"/> <binding destination="v6j-yd-fiN" name="textColor" keyPath="objectValue.textColor" id="Jqf-r9-Qs3"/> - <binding destination="v6j-yd-fiN" name="value" keyPath="objectValue.pubType" id="MMb-NR-LB9"/> </connections> </textField> </subviews> @@ -540,8 +543,8 @@ </tableView> </subviews> </clipView> - <scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.20000000000000001" horizontal="YES" id="qw6-WF-LwA"> - <rect key="frame" x="1" y="256" width="46" height="16"/> + <scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.12" horizontal="YES" id="qw6-WF-LwA"> + <rect key="frame" x="1" y="60" width="46" height="16"/> <autoresizingMask key="autoresizingMask"/> </scroller> <scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="vni-Rr-d7f"> @@ -554,13 +557,13 @@ </tableHeaderView> </scrollView> <box verticalCompressionResistancePriority="250" title="Item Template" translatesAutoresizingMaskIntoConstraints="NO" id="1556"> - <rect key="frame" x="53" y="331" width="764" height="66"/> + <rect key="frame" x="53" y="337" width="764" height="60"/> <view key="contentView" id="vaM-Fl-fT2"> - <rect key="frame" x="3" y="3" width="758" height="48"/> + <rect key="frame" x="3" y="3" width="758" height="42"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tokenField horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="1558" customClass="BDSKTokenField"> - <rect key="frame" x="12" y="10" width="734" height="28"/> + <rect key="frame" x="12" y="10" width="734" height="22"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="22" id="bkY-kv-FEE"/> <constraint firstAttribute="height" priority="499" constant="56" id="bn0-3P-xsm"/> @@ -589,7 +592,7 @@ </view> </box> <box title="Options for field" translatesAutoresizingMaskIntoConstraints="NO" id="1559"> - <rect key="frame" x="53" y="201" width="764" height="126"/> + <rect key="frame" x="53" y="207" width="764" height="126"/> <view key="contentView" id="TSn-hs-oy2"> <rect key="frame" x="3" y="3" width="758" height="108"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> @@ -771,7 +774,7 @@ </connections> </customView> <customView placeholderIntrinsicWidth="9" placeholderIntrinsicHeight="9" translatesAutoresizingMaskIntoConstraints="NO" id="hQX-jZ-Y2Y" customClass="BDSKResizeView"> - <rect key="frame" x="56" y="326" width="758" height="9"/> + <rect key="frame" x="56" y="332" width="758" height="9"/> <connections> <outlet property="constraint" destination="bn0-3P-xsm" id="BGv-oq-fab"/> </connections> Modified: trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj =================================================================== --- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2021-06-03 16:11:47 UTC (rev 26127) +++ trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2021-06-03 21:24:18 UTC (rev 26128) @@ -715,6 +715,8 @@ CEE23BE50BFBA78F002B746B /* template.txt in Copy Files: Shared Support */ = {isa = PBXBuildFile; fileRef = F91B5CE407657A200011ED22 /* template.txt */; }; CEE50487104D662500636237 /* BDSKNotesSearchIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = CEE50486104D662500636237 /* BDSKNotesSearchIndex.m */; }; CEE7ACE9109E2F360072D63C /* NSSplitView_BDSKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CEE7ACE7109E2F360072D63C /* NSSplitView_BDSKExtensions.m */; }; + CEE882B926697C0500574E12 /* BDSKControlTableCellView.h in Headers */ = {isa = PBXBuildFile; fileRef = CEE882B726697C0500574E12 /* BDSKControlTableCellView.h */; }; + CEE882BA26697C0500574E12 /* BDSKControlTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEE882B826697C0500574E12 /* BDSKControlTableCellView.m */; }; CEE8DD470E5C3F5B00EFA97F /* yaz.framework in Copy Files: Frameworks */ = {isa = PBXBuildFile; fileRef = F9C7E5950BEA3C9400D65C7F /* yaz.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEE8DD480E5C3F5B00EFA97F /* AGRegex.framework in Copy Files: Frameworks */ = {isa = PBXBuildFile; fileRef = F9C7E5470BEA3C0500D65C7F /* AGRegex.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEE8DD490E5C3F5B00EFA97F /* FileView.framework in Copy Files: Frameworks */ = {isa = PBXBuildFile; fileRef = F911D6B40CFE8E420009C77B /* FileView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; @@ -1885,6 +1887,8 @@ CEE50488104D664200636237 /* BDSKNotesSearchIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BDSKNotesSearchIndex.h; sourceTree = "<group>"; }; CEE7ACE6109E2F360072D63C /* NSSplitView_BDSKExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSplitView_BDSKExtensions.h; sourceTree = "<group>"; }; CEE7ACE7109E2F360072D63C /* NSSplitView_BDSKExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSSplitView_BDSKExtensions.m; sourceTree = "<group>"; }; + CEE882B726697C0500574E12 /* BDSKControlTableCellView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BDSKControlTableCellView.h; sourceTree = "<group>"; }; + CEE882B826697C0500574E12 /* BDSKControlTableCellView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BDSKControlTableCellView.m; sourceTree = "<group>"; }; CEEA4C680B57B0D400434059 /* BDSKBooleanValueTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BDSKBooleanValueTransformer.m; sourceTree = "<group>"; }; CEEA4C690B57B0D400434059 /* BDSKBooleanValueTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BDSKBooleanValueTransformer.h; sourceTree = "<group>"; }; CEEBA6850D746DD7000204B8 /* BibDesk-Common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "BibDesk-Common.xcconfig"; sourceTree = "<group>"; }; @@ -2575,6 +2579,7 @@ CE23B2CB233E0B96006390D9 /* BDSKColorLabelWell.m */, CEAC848B261236F3009C4E15 /* BDSKComboBoxCell.h */, CEAC848C261236F3009C4E15 /* BDSKComboBoxCell.m */, + CEE882B826697C0500574E12 /* BDSKControlTableCellView.m */, CEEC70E0093B6EC200A64F54 /* BDSKDragImageView.m */, CE26481B0B5AB4B700D4B5B8 /* BDSKDragTextField.m */, F9022C410758027800C3F701 /* BDSKMainTableView.m */, @@ -3182,6 +3187,7 @@ CE38FB82091D946900BCB69D /* BDSKCondition.h */, CE6DCA200D6A0237003A072F /* BDSKCondition+Scripting.h */, CE38FB84091D946A00BCB69D /* BDSKConditionController.h */, + CEE882B726697C0500574E12 /* BDSKControlTableCellView.h */, F9022C3A0758027800C3F701 /* BDSKConverter.h */, CE7A4A8C0B0B475B00D1B333 /* BDSKCustomCiteDrawerController.h */, F97198BF0DADD32F00CA57AA /* BDSKDBLPGroupServer.h */, @@ -3838,6 +3844,7 @@ CE2A0A7A22459A3100A8F31C /* BDSKStaticGroup.h in Headers */, CE2A0A9E22459A3B00A8F31C /* BDSKWebGroupViewController.h in Headers */, CE2A0A8722459A3100A8F31C /* BDSKTemplateObjectProxy.h in Headers */, + CEE882B926697C0500574E12 /* BDSKControlTableCellView.h in Headers */, CE2A09B52245997A00A8F31C /* BDSKAddressTextFieldCell.h in Headers */, CE2A0A41224599F600A8F31C /* BDSKPreferenceController.h in Headers */, CE2A09EC224599DB00A8F31C /* BDSKEditorTextView.h in Headers */, @@ -4601,6 +4608,7 @@ CE38FB89091D946A00BCB69D /* BDSKConditionController.m in Sources */, CE38FB8F091D94A100BCB69D /* BDSKFilter.m in Sources */, CE38FB91091D94A100BCB69D /* BDSKFilterController.m in Sources */, + CEE882BA26697C0500574E12 /* BDSKControlTableCellView.m in Sources */, F9E07C8509202309007BCDD4 /* BibDocument_Groups.m in Sources */, CEE09F1C216147E1009CE63D /* BDSKFieldInfo.m in Sources */, F9E07C9009202345007BCDD4 /* BibDocument_Search.m in Sources */, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit