From 2d6b88d5d016237acbc8cb63f2cf2477ccfe9e69 Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Sun, 23 Mar 2014 02:45:56 +0000 Subject: osx gui: initial creation of custom node shapes preference panel --- tikzit/customshape.png | Bin 0 -> 1281 bytes tikzit/src/osx/CustomNodeCellView.h | 23 +++++++++ tikzit/src/osx/CustomNodeCellView.m | 79 ++++++++++++++++++++++++++++++ tikzit/src/osx/CustomNodeController.h | 33 +++++++++++++ tikzit/src/osx/CustomNodeController.m | 89 ++++++++++++++++++++++++++++++++++ tikzit/src/osx/CustomNodes.xib | 15 ++++++ 6 files changed, 239 insertions(+) create mode 100755 tikzit/customshape.png create mode 100644 tikzit/src/osx/CustomNodeCellView.h create mode 100644 tikzit/src/osx/CustomNodeCellView.m create mode 100644 tikzit/src/osx/CustomNodeController.h create mode 100644 tikzit/src/osx/CustomNodeController.m create mode 100644 tikzit/src/osx/CustomNodes.xib (limited to 'tikzit') diff --git a/tikzit/customshape.png b/tikzit/customshape.png new file mode 100755 index 0000000..cff8275 Binary files /dev/null and b/tikzit/customshape.png differ diff --git a/tikzit/src/osx/CustomNodeCellView.h b/tikzit/src/osx/CustomNodeCellView.h new file mode 100644 index 0000000..5b3b1ee --- /dev/null +++ b/tikzit/src/osx/CustomNodeCellView.h @@ -0,0 +1,23 @@ +// +// CustomNodeCellView.h +// TikZiT +// +// Created by Johan Paulsson on 12/12/13. +// Copyright (c) 2013 Aleks Kissinger. All rights reserved. +// + +#import + +#import "NodeLayer.h" +#import "NodeStyle.h" +#import "NodeStyle+Coder.h" + +@interface CustomNodeCellView : NSTableCellView{ + NodeLayer *nodeLayer; + NodeStyle *nodeStyle; + BOOL selected; +} + +@property (retain) id objectValue; + +@end diff --git a/tikzit/src/osx/CustomNodeCellView.m b/tikzit/src/osx/CustomNodeCellView.m new file mode 100644 index 0000000..57ef24a --- /dev/null +++ b/tikzit/src/osx/CustomNodeCellView.m @@ -0,0 +1,79 @@ +// +// CustomNodeCellView.m +// TikZiT +// +// Created by Johan Paulsson on 12/12/13. +// Copyright (c) 2013 Aleks Kissinger. All rights reserved. +// + +#import "CustomNodeCellView.h" + +@implementation CustomNodeCellView + +- (id)initWithFrame:(NSRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code here. + } + return self; +} + +- (void)drawRect:(NSRect)dirtyRect +{ + [super drawRect:dirtyRect]; + + // Drawing code here. +} + +- (id) objectValue{ + return [super objectValue]; +} + +-(void)drawLayer:(CALayer *)layer inContext:(CGContextRef)context { + NSLog(@"drawing layer ^^"); + + if (nodeLayer!=nil) { + if (![[[self layer] sublayers] containsObject:nodeLayer]) { + [[self layer] addSublayer:nodeLayer]; + NSPoint c = NSMakePoint((CGRectGetMinX([[self layer] frame])+CGRectGetWidth([nodeLayer bounds])/2), + CGRectGetMidY([[self layer] frame])); + //c = NSMakePoint(-16.5,-16.5); + [nodeLayer setCenter:c andAnimateWhen:NO]; + [[self textField] setFrame:NSMakeRect(CGRectGetWidth([nodeLayer bounds]), CGRectGetMidY([[self layer] frame]), CGRectGetWidth([[self textField] frame]), CGRectGetHeight([[self textField] frame]))]; + } + + if (selected){ + [nodeStyle setStrokeColor:[NSColor whiteColor]]; + [[nodeLayer node] setStyle:nodeStyle]; + }else{ + [nodeStyle setStrokeColor:[NSColor blackColor]]; + [[nodeLayer node] setStyle:nodeStyle]; + } + + [nodeLayer updateFrame]; + } +} + +- (void) setObjectValue:(id)objectValue{ + [[self textField] setStringValue:[(NodeStyle *)objectValue shapeName]]; + nodeStyle = (NodeStyle *)objectValue; + + if (nodeLayer == nil) { + nodeLayer = [[NodeLayer alloc] initWithNode:[Node node] + transformer:[Transformer defaultTransformer]]; + [nodeLayer setRescale:NO]; + } + + [[nodeLayer node] setStyle:nodeStyle]; + [nodeLayer updateFrame]; +} + +- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle { + [super setBackgroundStyle:backgroundStyle]; + + selected = (backgroundStyle == NSBackgroundStyleDark); + [self setNeedsDisplay:YES]; +} + +@end diff --git a/tikzit/src/osx/CustomNodeController.h b/tikzit/src/osx/CustomNodeController.h new file mode 100644 index 0000000..55f0e0b --- /dev/null +++ b/tikzit/src/osx/CustomNodeController.h @@ -0,0 +1,33 @@ +// +// CustomNodeController.h +// TikZiT +// +// Created by Johan Paulsson on 12/4/13. +// Copyright (c) 2013 Aleks Kissinger. All rights reserved. +// + +#import +#import "Shape.h" +#import "TikzShape.h" + +#import "GraphicsView.h" +#import "TikzSourceController.h" + +#import "SupportDir.h" + +@interface CustomNodeController : NSViewController { + NSDictionary* nodeStyles; + NSMutableArray* customNodeStyles; + NSMutableArray* onodeStyles; + + GraphicsView *graphicsView; + TikzSourceController *tikzSourceController; +} + +@property (readonly) NSDictionary *nodeStyles; +@property (readonly) NSMutableArray* onodeStyles; + +@property IBOutlet GraphicsView *graphicsView; +@property IBOutlet TikzSourceController *tikzSourceController; + +@end diff --git a/tikzit/src/osx/CustomNodeController.m b/tikzit/src/osx/CustomNodeController.m new file mode 100644 index 0000000..ef6b5bd --- /dev/null +++ b/tikzit/src/osx/CustomNodeController.m @@ -0,0 +1,89 @@ +// +// CustomNodeController.m +// TikZiT +// +// Created by Johan Paulsson on 12/4/13. +// Copyright (c) 2013 Aleks Kissinger. All rights reserved. +// + +#import "CustomNodeController.h" +#import "NodeStyle.h" + +@interface CustomNodeController () + +@end + +@implementation CustomNodeController + +@synthesize nodeStyles, onodeStyles; +@synthesize graphicsView, tikzSourceController; + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { +// [SupportDir createUserSupportDir]; +// NSString *supportDir = [SupportDir userSupportDir]; + +// NSString *ns = [supportDir stringByAppendingPathComponent:@"nodeStyles.plist"]; +// NSString *es = [supportDir stringByAppendingPathComponent:@"edgeStyles.plist"]; +// onodeStyles = (NSMutableArray*)[NSKeyedUnarchiver +// unarchiveObjectWithFile:ns]; + // edgeStyles = (NSMutableArray*)[NSKeyedUnarchiver +// unarchiveObjectWithFile:es]; + + if (onodeStyles == nil) onodeStyles = [NSMutableArray array]; +// if (edgeStyles == nil) edgeStyles = [NSMutableArray array]; + +// [[self window] setLevel:NSNormalWindowLevel]; +// [self showWindow:self]; + + // Initialization code here. + + NSLog(@"Custom Node controller up and running!"); + + nodeStyles= [Shape shapeDictionary]; + + customNodeStyles = [NSMutableArray array]; + + NSLog(@"Got a shape dictionary?"); + + NSString *meh; + + for(id key in nodeStyles) { + Shape *value = [nodeStyles objectForKey:key]; + + if([value isKindOfClass:[TikzShape class]]){ + NSLog(@"Got a custom node shape!"); + NodeStyle *newNodeStyle = [[NodeStyle alloc] init]; + [newNodeStyle setShapeName:key]; + + [customNodeStyles addObject:newNodeStyle]; + [onodeStyles addObject:newNodeStyle]; + +// meh = [(TikzShape *) value tikz]; + } + } + + NSLog(@"Trying to display tikz."); + +// [tikzSourceController setTikz:meh]; +// [tikzSourceController parseTikz:self]; + } + + return self; +} + +-(NSArray *)onodeStyles{ + return onodeStyles; + //return [nodeStyles allValues]; +} + +- (void)tableViewSelectionDidChange:(NSNotification *)aNotification{ + NSLog(@"Changed selection!"); +} + +- (id)valueForUndefinedKey:(NSString *)key{ + return nil; +} + +@end diff --git a/tikzit/src/osx/CustomNodes.xib b/tikzit/src/osx/CustomNodes.xib new file mode 100644 index 0000000..8b2587a --- /dev/null +++ b/tikzit/src/osx/CustomNodes.xib @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3 From 5532f8878b7219720de6145eabbe57efb894957c Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Sun, 23 Mar 2014 02:48:06 +0000 Subject: Converting from GC to ARC This should only be for the osx specific code as all common files are left out. Hopefully this shouldn't introduce any problems on the other systems. --- tikzit/English.lproj/StylePalette.xib | 4114 ++++---------------------- tikzit/English.lproj/TikzDocument.xib | 1025 +------ tikzit/TikZiT.xcodeproj/project.pbxproj | 166 +- tikzit/src/osx/AppDelegate.h | 4 +- tikzit/src/osx/CustomNodeCellView.h | 2 +- tikzit/src/osx/CustomNodeController.h | 16 +- tikzit/src/osx/CustomNodes.xib | 242 +- tikzit/src/osx/EdgeControlLayer.m | 2 +- tikzit/src/osx/EdgeStyle+Coder.m | 2 +- tikzit/src/osx/GraphicsView.h | 6 +- tikzit/src/osx/Grid.m | 2 +- tikzit/src/osx/NilToEmptyStringTransformer.m | 2 +- tikzit/src/osx/NodeLayer.h | 6 +- tikzit/src/osx/NodeLayer.m | 3 +- tikzit/src/osx/NodeSelectionLayer.h | 4 +- tikzit/src/osx/NodeSelectionLayer.m | 2 +- tikzit/src/osx/NodeStyle+Coder.m | 2 +- tikzit/src/osx/PreambleController.h | 4 +- tikzit/src/osx/PreambleController.m | 2 +- tikzit/src/osx/Preambles+Coder.m | 2 +- tikzit/src/osx/PreferenceController.h | 5 + tikzit/src/osx/PreferenceController.m | 12 +- tikzit/src/osx/Preferences.xib | 74 +- tikzit/src/osx/PreviewController.m | 2 +- tikzit/src/osx/PropertyInspectorController.h | 10 +- tikzit/src/osx/PropertyInspectorController.m | 2 +- tikzit/src/osx/SelectBoxLayer.m | 4 +- tikzit/src/osx/SelectableNodeView.h | 2 +- tikzit/src/osx/SelectableNodeView.m | 2 +- tikzit/src/osx/StylePaletteController.h | 16 +- tikzit/src/osx/TikzDocument.h | 2 +- tikzit/src/osx/TikzFormatter.m | 4 - tikzit/src/osx/TikzSourceController.h | 24 +- tikzit/src/osx/TikzSourceController.m | 9 +- tikzit/src/osx/TikzWindowController.h | 8 +- tikzit/src/osx/TikzWindowController.m | 2 +- tikzit/src/osx/ToolPaletteController.h | 8 +- 37 files changed, 1301 insertions(+), 4493 deletions(-) (limited to 'tikzit') diff --git a/tikzit/English.lproj/StylePalette.xib b/tikzit/English.lproj/StylePalette.xib index 2d3472c..6385ba8 100644 --- a/tikzit/English.lproj/StylePalette.xib +++ b/tikzit/English.lproj/StylePalette.xib @@ -1,3483 +1,631 @@ - - - - 1070 - 12C60 - 2843 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2843 - - - YES - NSArrayController - NSButton - NSButtonCell - NSCollectionView - NSCollectionViewItem - NSColorWell - NSComboBox - NSComboBoxCell - NSCustomObject - NSCustomView - NSMenu - NSMenuItem - NSPopUpButton - NSPopUpButtonCell - NSScrollView - NSScroller - NSSlider - NSSliderCell - NSTableColumn - NSTableView - NSTextField - NSTextFieldCell - NSView - NSWindowTemplate - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - YES - - StylePaletteController - - - FirstResponder - - - NSApplication - - - 151 - 2 - {{1005, 473}, {193, 313}} - -1538259968 - Style Inspector - NSPanel - - - {200, 230} - - - 256 - - YES - - - 274 - {193, 313} - - - SFBInspectorView - - - {193, 313} - - - - {{0, 0}, {1600, 1200}} - {200, 246} - {10000000000000, 10000000000000} - YES - - - - 268 - {33, 33} - - - YES - SelectableNodeView - - - - - 268 - - YES - - - 268 - {{67, 164}, {122, 23}} - - - YES - - 342884416 - 272630784 - - - LucidaGrande - 10 - 16 - - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - controlTextColor - - 3 - MAA - - - 5 - YES - - - - 274 - {13, 0} - - - YES - NO - YES - - YES - - 10 - 10 - 1000 - - 75497472 - 0 - - - LucidaGrande - 12 - 16 - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 338690112 - 1024 - - - YES - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - - 3 - YES - - - - 3 - 2 - - - 6 - System - gridColor - - 3 - MC41AA - - - 15 - tableViewAction: - -765427712 - - - - 1 - 15 - 0 - YES - 0 - 1 - - - NO - - - - 268 - {{67, 193}, {28, 18}} - - - YES - - -1804599231 - 272630784 - - - - YES - - - 6 - System - textColor - - - - NO - - - - 268 - {{101, 188}, {87, 26}} - - - YES - - 67108864 - 0 - - - 5 - 0.20000000000000001 - 1 - 0.0 - 25 - 1 - YES - NO - - NO - - - - 268 - {{64, 269}, {125, 26}} - - - YES - - -2076180416 - 2048 - - LucidaGrande - 11 - 16 - - - 109199360 - 129 - - - 400 - 75 - - YES - - OtherViews - - YES - - - LucidaGrande - 13 - 1044 - - - -1 - 1 - YES - YES - 2 - - NO - - - - 268 - {{97, 217}, {21, 22}} - - - YES - - 67108864 - 0 - - - - -2039201792 - 6 - - NSImage - emblem-important - - - - 400 - 75 - - NO - - - - 268 - {{97, 243}, {21, 22}} - - - YES - - 67108864 - 0 - - - - -2039201792 - 6 - - - - 400 - 75 - - NO - - - - 268 - {{4, 169}, {57, 14}} - - - YES - - 68157504 - 4195328 - Category - - LucidaGrande-Bold - 11 - 16 - - - - 6 - System - controlColor - - - - - NO - - - - 268 - {{5, 194}, {57, 14}} - - - YES - - 68157504 - 4195328 - Scale - - - - - - NO - - - - 266 - {{67, 301}, {119, 19}} - - - YES - - -1804599231 - 272630784 - - - - YES - - - - NO - - - - 268 - {{4, 303}, {57, 14}} - - - YES - - 68157504 - 4195328 - Name - - - - - - NO - - - - 268 - {{4, 275}, {57, 14}} - - - YES - - 68157504 - 4195328 - Shape - - - - - - NO - - - - 268 - {{4, 220}, {56, 14}} - - - YES - - 68157504 - 4195328 - Fill - - - - - - NO - - - - 268 - {{4, 247}, {57, 14}} - - - YES - - 68157504 - 4195328 - Stroke - - - - - - NO - - - - 268 - - YES - - YES - NSColor pasteboard type - - - {{67, 216}, {28, 23}} - - - YES - NO - YES - - 1 - MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA - - - - - 268 - - YES - - YES - NSColor pasteboard type - - - {{67, 243}, {28, 23}} - - - YES - NO - YES - - 1 - MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA - - - - - 268 - {{64, 137}, {125, 26}} - - - YES - - -2076180416 - 2048 - - - 109199360 - 129 - - - 400 - 75 - - YES - - OtherViews - - YES - - - - -1 - 1 - YES - YES - 2 - - NO - - - - 268 - {{4, 143}, {57, 14}} - - - YES - - 68157504 - 4195328 - Show - - - - - - NO - - - - 292 - {{110, 5}, {52, 26}} - - - YES - - -2080374784 - 134217728 - Clear - - - -2038022144 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{59, 5}, {52, 26}} - - - YES - - -2080374784 - 134217728 - Apply - - - -2038022144 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{30, 5}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2033434624 - 162 - - NSImage - NSRemoveTemplate - - - - 400 - 75 - - NO - - - - 292 - {{5, 5}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2033434624 - 162 - - NSImage - NSAddTemplate - - - - 400 - 75 - - NO - - - - 274 - - YES - - - 2304 - - YES - - - 274 - {181, 99} - - - {0, 0} - {0, 0} - 0 - 0 - - YES - - - YES - -1 - 0 - - - {{1, 1}, {181, 99}} - - - - - 4 - - - - -2147483392 - {{234, 1}, {15, 143}} - - - NO - - _doScroller: - 1 - 0.89655172824859619 - - - - -2147483392 - {{1, 144}, {233, 15}} - - - NO - 1 - - _doScroller: - 0.63157892227172852 - - - {{5, 34}, {183, 101}} - - - 133682 - - - - 0.25 - 4 - 1 - - - {193, 326} - - - NSView - - - - YES - name - strokeThickness - strokeColor - fillColor - strokeColorIsKnown - fillColorIsKnown - representedObject.name - shapeName - scale - @distinctUnionOfObjects.category - category - - NodeStyle - YES - - YES - YES - YES - YES - YES - - - - YES - @distinctUnionOfObjects.category - - YES - - YES - YES - YES - YES - YES - - - - 268 - - YES - - - 268 - {{66, 105}, {125, 26}} - - - YES - - -2076180416 - 2048 - - - 109199360 - 129 - - - 400 - 75 - - YES - - OtherViews - - YES - - - - -1 - 1 - YES - YES - 2 - - NO - - - - 268 - {{6, 111}, {57, 14}} - - - YES - - 68157504 - 4195328 - Show - - - - - - NO - - - - 268 - - YES - - - 2304 - - YES - - - 256 - {180, 68} - - - _NS:1197 - YES - NO - YES - - - -2147483392 - {{224, 0}, {16, 17}} - _NS:1202 - - - YES - - 177 - 40 - 1000 - - 75497536 - 2048 - - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3 - 2 - - - 17 - -700448768 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 1}, {180, 68}} - - - _NS:1195 - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - _NS:1214 - NO - - _doScroller: - 0.98863636363636365 - - - - -2147483392 - {{1, 73}, {143, 15}} - - - _NS:1216 - NO - 1 - - _doScroller: - 0.99447513812154698 - - - {{6, 33}, {182, 70}} - - - _NS:1193 - 133682 - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 268 - {{133, 155}, {60, 26}} - - - _NS:179 - YES - - -2076180416 - 67110912 - - _NS:179 - - 109199360 - 129 - - - 400 - 75 - - - - - 2147483647 - 1 - - NSImage - AH_none - - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - OtherViews - - YES - - - - - - 2147483647 - - NSImage - AH_plain_head - - - - _popUpItemAction: - 1 - - - - - - - 2147483647 - - NSImage - AH_latex_head - - - - _popUpItemAction: - 2 - - - - - - 1 - YES - YES - 2 - - NO - - - - 268 - {{2, 155}, {60, 26}} - - - _NS:179 - YES - - -2076180416 - 2048 - - _NS:179 - - 109199360 - 129 - - - 400 - 75 - - - - - 2147483647 - 1 - - - - _popUpItemAction: - - - YES - - OtherViews - - YES - - - - - - 2147483647 - - NSImage - AH_plain_tail - - - - _popUpItemAction: - 1 - - - - - - - 2147483647 - - NSImage - AH_latex_tail - - - - _popUpItemAction: - 2 - - - - - - 1 - YES - YES - 2 - - NO - - - - 268 - {{69, 132}, {122, 23}} - - - YES - - 342884416 - 272630784 - - - - YES - - - 5 - YES - - - - 274 - {13, 0} - - - YES - NO - YES - - YES - - 10 - 10 - 1000 - - 75497472 - 0 - - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 338690112 - 1024 - - - YES - - - - 3 - YES - - - - 3 - 2 - - - 15 - tableViewAction: - -765427712 - - - - 1 - 15 - 0 - YES - 0 - 1 - - - NO - - - - 268 - {{6, 137}, {57, 14}} - - - YES - - 68157504 - 4195328 - Category - - - - - - NO - - - - 268 - {{59, 155}, {77, 26}} - - - _NS:179 - YES - - -2076180416 - 2048 - - _NS:179 - - 109199360 - 129 - - - 400 - 75 - - - - - 2147483647 - 1 - - NSImage - ED_none - - - - _popUpItemAction: - - - YES - - Edge Decoration - - YES - - - - - - 2147483647 - - NSImage - ED_arrow - - - - _popUpItemAction: - 1 - - - - - - - 2147483647 - - NSImage - ED_tick - - - - _popUpItemAction: - 2 - - - - - - 1 - YES - YES - 2 - - NO - - - - 266 - {{69, 183}, {119, 19}} - - - YES - - -1804599231 - 272630784 - - - - YES - - - - NO - - - - 268 - {{6, 185}, {57, 14}} - - - YES - - 68157504 - 4195328 - Name - - - - - - NO - - - - 292 - {{111, 4}, {52, 26}} - - YES - - -2080374784 - 134217728 - Clear - - - -2038022144 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{60, 4}, {52, 26}} - - - YES - - -2080374784 - 134217728 - Apply - - - -2038022144 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{31, 4}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{6, 4}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - {193, 208} - - _NS:499 - NSView - - - - YES - name - headStyle - tailStyle - decorationStyle - category - - EdgeStyle - YES - - YES - YES - YES - YES - YES - - - - YES - name - headStyle - tailStyle - decorationStyle - category - - EdgeStyle - YES - - YES - YES - YES - YES - YES - - - - - YES - - - window - - - - 5 - - - - collectionView - - - - 73 - - - - refreshCollection: - - - - 74 - - - - refreshCollection: - - - - 75 - - - - setStrokeToClosestHashed: - - - - 176 - - - - setFillToClosestHashed: - - - - 177 - - - - shapeDropdown - - - - 497 - - - - nodeStyleView - - - - 650 - - - - edgeStyleView - - - - 651 - - - - nodeStyleArrayController - - - - 652 - - - - nodeStyleInspectorView - - - - 653 - - - - addNodeStyle: - - - - 727 - - - - applyActiveNodeStyle: - - - - 729 - - - - clearActiveNodeStyle: - - - - 731 - - - - filteredNodeStyleArrayController - - - - 733 - - - - edgeStyleArrayController - - - - 734 - - - - addEdgeStyle: - - - - 735 - - - - appleActiveEdgeStyle: - - - - 737 - - - - clearActiveEdgeStyle: - - - - 738 - - - - filteredEdgeStyleArrayController - - - - 818 - - - - value: selection.strokeColor - - - - - - value: selection.strokeColor - value - selection.strokeColor - 2 - - - 636 - - - - value: selection.fillColor - - - - - - value: selection.fillColor - value - selection.fillColor - 2 - - - 638 - - - - value: selection.name - - - - - - value: selection.name - value - selection.name - 2 - - - 634 - - - - itemPrototype - - - - 55 - - - - delegate - - - - 505 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 840 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 841 - - - - toolTip: representedObject.name - - - - - - toolTip: representedObject.name - toolTip - representedObject.name - 2 - - - 504 - - - - view - - - - 54 - - - - stylePaletteController - - - - 108 - - - - contentArray: nodeStyles - - - - - - contentArray: nodeStyles - contentArray - nodeStyles - 2 - - - 58 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 820 - - - - hidden: selection.strokeColorIsKnown - - - - - - hidden: selection.strokeColorIsKnown - hidden - selection.strokeColorIsKnown - 2 - - - 637 - - - - hidden: selection.fillColorIsKnown - - - - - - hidden: selection.fillColorIsKnown - hidden - selection.fillColorIsKnown - 2 - - - 639 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 823 - - - - selectedValue: selection.shapeName - - - - - - selectedValue: selection.shapeName - selectedValue - selection.shapeName - 2 - - - 635 - - - - value: selection.scale - - - - - - value: selection.scale - value - selection.scale - 2 - - - 641 - - - - value: selection.scale - - - - - - value: selection.scale - value - selection.scale - 2 - - - 640 - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - contentValues - arrangedObjects.@distinctUnionOfObjects.category - 2 - - - 858 - - - - value: selection.category - - - - - - value: selection.category - value - selection.category - - NSNullPlaceholder - uncategorized - - - 2 - - - 859 - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - contentValues - arrangedObjects.@distinctUnionOfObjects.category - - YES - - YES - NSInsertsNullPlaceholder - NSNullPlaceholder - - - YES - - uncategorized - - - 2 - - - 630 - - - - selectedValue: displayedNodeStyleCategory - - - - - - selectedValue: displayedNodeStyleCategory - selectedValue - displayedNodeStyleCategory - - 2 - - - 631 - - - - filterPredicate: displayedNodeStylePredicate - - - - - - filterPredicate: displayedNodeStylePredicate - filterPredicate - displayedNodeStylePredicate - 2 - - - 626 - - - - remove: - - - - 821 - - - - contentArray: nodeStyles - - - - - - contentArray: nodeStyles - contentArray - nodeStyles - 2 - - - 843 - - - - contentArray: edgeStyles - - - - - - contentArray: edgeStyles - contentArray - edgeStyles - 2 - - - 725 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 862 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 864 - - - - value: selection.name - - - - - - value: selection.name - value - selection.name - 2 - - - 762 - - - - selectedTag: selection.decorationStyle - - - - - - selectedTag: selection.decorationStyle - selectedTag - selection.decorationStyle - 2 - - - 814 - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - contentValues - arrangedObjects.@distinctUnionOfObjects.category - 2 - - - 787 - - - - value: selection.category - - - - - - value: selection.category - value - selection.category - - NSNullPlaceholder - uncategorized - - - 2 - - - 788 - - - - selectedTag: selection.tailStyle - - - - - - selectedTag: selection.tailStyle - selectedTag - selection.tailStyle - 2 - - - 811 - - - - selectedTag: selection.headStyle - - - - - - selectedTag: selection.headStyle - selectedTag - selection.headStyle - 2 - - - 817 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 759 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 800 - - - - value: arrangedObjects.name - - - - - - value: arrangedObjects.name - value - arrangedObjects.name - 2 - - - 780 - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - contentValues - arrangedObjects.@distinctUnionOfObjects.category - - YES - - YES - NSInsertsNullPlaceholder - NSNullPlaceholder - - - YES - - uncategorized - - - 2 - - - 797 - - - - selectedValue: displayedEdgeStyleCategory - - - - - - selectedValue: displayedEdgeStyleCategory - selectedValue - displayedEdgeStyleCategory - - 2 - - - 798 - - - - filterPredicate: displayedEdgeStylePredicate - - - - - - filterPredicate: displayedEdgeStylePredicate - filterPredicate - displayedEdgeStylePredicate - 2 - - - 807 - - - - remove: - - - - 860 - - - - contentArray: edgeStyles - - - - - - contentArray: edgeStyles - contentArray - edgeStyles - 2 - - - 866 - - - - - YES - - 0 - - YES - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 3 - - - YES - - - - - - 4 - - - YES - - - - - - 52 - - - YES - - - - - 53 - - - - - 181 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - Node Style View - - - 8 - - - YES - - - - - - - - 23 - - - - - 24 - - - - - 25 - - - - - 94 - - - YES - - - - - - 95 - - - - - 96 - - - YES - - - - - - 97 - - - - - 182 - - - - - 229 - - - YES - - - - - - 230 - - - - - 233 - - - YES - - - - - - 234 - - - - - 535 - - - YES - - - - - - 536 - - - YES - - - - - - 537 - - - YES - - - - - - 538 - - - - - 539 - - - - - 605 - - - Filtered Node Style Array Controller - - - 9 - - - - - 10 - - - - - 11 - - - YES - - - - - - 12 - - - YES - - - - - - 13 - - - YES - - - - - - 15 - - - YES - - - - - - 16 - - - YES - - - - - - 506 - - - YES - - - - - - 525 - - - YES - - - - - - 166 - - - YES - - - - - - 168 - - - YES - - - - - - 491 - - - YES - - - - - - 513 - - - YES - - - - - - 515 - - - YES - - - - - - 527 - - - YES - - - - - - 528 - - - - - 516 - - - - - 514 - - - - - 492 - - - YES - - - - - - 493 - - - - - 169 - - - - - 167 - - - - - 526 - - - - - 509 - - - - - 17 - - - - - 18 - - - - - 20 - - - - - 21 - - - - - 22 - - - - - 649 - - - YES - - - - - - - - - - - - - - - - - Edge Style View - - - 654 - - - Edge Style Array Controller - - - 655 - - - YES - - - - - - 656 - - - YES - - - - - - 657 - - - YES - - - - - - 658 - - - YES - - - - - - 659 - - - - - 660 - - - - - 661 - - - - - 662 - - - - - 669 - - - YES - - - - - - 670 - - - YES - - - - - - 671 - - - - - 672 - - - - - 682 - - - YES - - - - - - 683 - - - YES - - - - - - 684 - - - YES - - - - - - - - 685 - - - - - 686 - - - - - 688 - - - YES - - - - - - 689 - - - YES - - - - - - 690 - - - - - 691 - - - - - 694 - - - - - 695 - - - YES - - - - - - 696 - - - YES - - - - - - 697 - - - YES - - - - - - - - 698 - - - - - 699 - - - - - 700 - - - - - 701 - - - YES - - - - - - 702 - - - YES - - - - - - 703 - - - YES - - - - - - - - 704 - - - - - 705 - - - - - 706 - - - - - 707 - - - YES - - - - - - - - 708 - - - - - 710 - - - - - 711 - - - YES - - - - Table View - - - 712 - - - YES - - - - - - 715 - - - - - 716 - - - YES - - - - - - 717 - - - YES - - - - - - 718 - - - YES - - - - - - 719 - - - - - 720 - - - - - 756 - - - Filtered Edge Style Array Controller - - - 56 - - - Node Style Array Controller - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 10.IBPluginDependency - 11.IBPluginDependency - 12.IBPluginDependency - 13.IBPluginDependency - 15.IBPluginDependency - 16.IBPluginDependency - 166.IBAttributePlaceholdersKey - 166.IBPluginDependency - 167.IBPluginDependency - 168.IBAttributePlaceholdersKey - 168.IBPluginDependency - 169.IBPluginDependency - 17.IBPluginDependency - 18.IBPluginDependency - 181.IBPluginDependency - 182.IBPluginDependency - 20.IBPluginDependency - 21.IBPluginDependency - 22.IBPluginDependency - 229.IBPluginDependency - 23.IBPluginDependency - 230.IBPluginDependency - 233.IBPluginDependency - 234.IBPluginDependency - 24.IBPluginDependency - 25.IBPluginDependency - 3.IBNSWindowAutoPositionCentersHorizontal - 3.IBNSWindowAutoPositionCentersVertical - 3.IBPluginDependency - 3.IBWindowTemplateEditedContentRect - 3.NSWindowTemplate.visibleAtLaunch - 4.IBPluginDependency - 491.IBPluginDependency - 492.IBPluginDependency - 493.IBPluginDependency - 506.IBPluginDependency - 509.IBPluginDependency - 513.IBPluginDependency - 514.IBPluginDependency - 515.IBPluginDependency - 516.IBPluginDependency - 52.IBPluginDependency - 525.IBPluginDependency - 526.IBPluginDependency - 527.IBPluginDependency - 528.IBPluginDependency - 53.CustomClassName - 53.IBPluginDependency - 535.IBPluginDependency - 536.IBPluginDependency - 537.IBPluginDependency - 538.IBPluginDependency - 539.IBPluginDependency - 56.IBPluginDependency - 605.IBPluginDependency - 649.IBPluginDependency - 654.IBPluginDependency - 655.IBPluginDependency - 656.IBPluginDependency - 657.IBPluginDependency - 658.IBPluginDependency - 659.IBPluginDependency - 660.IBPluginDependency - 661.IBPluginDependency - 662.IBPluginDependency - 669.IBPluginDependency - 670.IBPluginDependency - 671.IBPluginDependency - 672.IBPluginDependency - 682.IBPluginDependency - 683.IBPluginDependency - 684.IBPluginDependency - 685.IBPluginDependency - 686.IBPluginDependency - 688.IBPluginDependency - 689.IBPluginDependency - 690.IBPluginDependency - 691.IBPluginDependency - 694.IBPluginDependency - 695.IBPluginDependency - 696.IBPluginDependency - 697.IBPluginDependency - 698.IBPluginDependency - 699.IBPluginDependency - 700.IBPluginDependency - 701.IBPluginDependency - 702.IBPluginDependency - 703.IBPluginDependency - 704.IBPluginDependency - 705.IBPluginDependency - 706.IBPluginDependency - 707.IBPluginDependency - 708.IBPluginDependency - 710.IBPluginDependency - 711.IBPluginDependency - 712.IBPluginDependency - 715.IBPluginDependency - 716.IBPluginDependency - 717.IBPluginDependency - 718.IBPluginDependency - 719.IBPluginDependency - 720.IBPluginDependency - 756.IBPluginDependency - 8.IBPluginDependency - 9.IBPluginDependency - 94.IBPluginDependency - 95.IBPluginDependency - 96.IBPluginDependency - 97.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Set stroke color to closest LaTeX color. - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Set fill color to closest LaTeX color. - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - {{815, 331}, {193, 400}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - SelectableCollectionViewItem - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - - - - YES - - - - - 869 - - - - YES - - FirstResponder - - YES - - YES - applyStyleToSelectedNodes: - clearStyleOfSelectedNodes: - - - YES - id - id - - - - YES - - YES - applyStyleToSelectedNodes: - clearStyleOfSelectedNodes: - - - YES - - applyStyleToSelectedNodes: - id - - - clearStyleOfSelectedNodes: - id - - - - - IBUserSource - - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - YES - - YES - AH_latex_head - AH_latex_tail - AH_none - AH_plain_head - AH_plain_tail - ED_arrow - ED_none - ED_tick - NSAddTemplate - NSMenuCheckmark - NSMenuMixedState - NSRemoveTemplate - emblem-important - - - YES - {26, 12} - {26, 12} - {26, 12} - {26, 14} - {26, 14} - {58, 14} - {58, 14} - {58, 14} - {8, 8} - {11, 11} - {10, 3} - {8, 8} - {12.801422684151452, 12.801422684151452} - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uncategorized + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uncategorized + + + + + + + + + name + strokeThickness + strokeColor + fillColor + strokeColorIsKnown + fillColorIsKnown + representedObject.name + shapeName + scale + @distinctUnionOfObjects.category + category + + + + + + + + @distinctUnionOfObjects.category + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uncategorized + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + uncategorized + + + + + + + + + + + name + headStyle + tailStyle + decorationStyle + category + + + + + + + + name + headStyle + tailStyle + decorationStyle + category + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tikzit/English.lproj/TikzDocument.xib b/tikzit/English.lproj/TikzDocument.xib index 53963d6..842b810 100644 --- a/tikzit/English.lproj/TikzDocument.xib +++ b/tikzit/English.lproj/TikzDocument.xib @@ -1,864 +1,161 @@ - - - - 1080 - 12C60 - 2843 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2843 - - - NSButton - NSButtonCell - NSCustomObject - NSCustomView - NSScrollView - NSScroller - NSSplitView - NSTextField - NSTextFieldCell - NSTextView - NSUserDefaultsController - NSView - NSWindowTemplate - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - TikzWindowController - - - FirstResponder - - - 15 - 2 - {{99, 420}, {447, 382}} - 1881669632 - Window - NSWindow - View - - {94, 86} - - - 256 - - - - 274 - - - - 256 - - - - 266 - - - - 265 - - {{425, 21}, {17, 19}} - - - - YES - _NS:1574 - YES - - -2080374784 - 134217728 - - - LucidaGrande - 13 - 1044 - - _NS:1574 - - 105119744 - 160 - - NSImage - NSStopProgressFreestandingTemplate - - - - 200 - 25 - - NO - - - - 270 - {{5, 10}, {438, 27}} - - - - _NS:1535 - YES - - 68157504 - 1077941248 - - - LucidaGrande - 11 - 16 - - parser information - _NS:1535 - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - NO - - - {{0, 330}, {446, 42}} - - - - YES - _NS:9 - ParseErrorView - - - - 274 - - {447, 372} - - - - YES - GraphicsView - - - {447, 373} - - - - NSView - - - - 256 - - - - 274 - - - - 2304 - - - - 2322 - - Apple HTML pasteboard type - Apple PDF pasteboard type - Apple PICT pasteboard type - Apple PNG pasteboard type - Apple URL pasteboard type - CorePasteboardFlavorType 0x6D6F6F76 - NSColor pasteboard type - NSFilenamesPboardType - NSStringPboardType - NeXT Encapsulated PostScript v1.2 pasteboard type - NeXT RTFD pasteboard type - NeXT Rich Text Format v1.0 pasteboard type - NeXT TIFF v4.0 pasteboard type - NeXT font pasteboard type - NeXT ruler pasteboard type - WebURLsWithTitlesPboardType - public.url - - {{0, -14}, {445, 14}} - - - - - - - - XGJlZ2lue3Rpa3pwaWN0dXJlfQoKXGVuZHt0aWt6cGljdHVyZX0 - - - - LucidaGrande - 11 - 3100 - - - 4 - - - - - - - - - 166 - - - - 445 - 1 - - - 67120963 - 0 - - - 3 - MQA - - - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - 1 - MCAwIDEAA - - - {8, -8} - 13 - - - - - - 1 - - 6 - {877, 10000000} - {445, 0} - - - - {{1, 1}, {445, 0}} - - - - - - - {4, 5} - - 12582912 - - - - - - TU0AKgAAAHCAFUqgBVKsAAAAwdVQUqwaEQeIRGJRGFlYqwWLQ+JxuOQpVRmEx2RROKwOQyOUQSPyaUym -SxqWyKXyeYxyZzWbSuJTScRCbz2Nz+gRKhUOfTqeUai0OSxiWTiBQSHSGFquGwekxyAgAAAOAQAAAwAA -AAEAEAAAAQEAAwAAAAEAEAAAAQIAAwAAAAIACAAIAQMAAwAAAAEABQAAAQYAAwAAAAEAAQAAAREABAAA -AAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEAAgAAARYAAwAAAAEAEAAAARcABAAAAAEAAABnARwAAwAA -AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA - - - - - - 3 - MCAwAA - - - - 4 - - - - 256 - {{430, 1}, {16, 0}} - - - - YES - NO - - _doScroller: - 1 - - - - -2147483392 - {{-100, -100}, {87, 18}} - - - - NO - 1 - - _doScroller: - 1 - 0.94565218687057495 - - - {447, 0} - - - - 133202 - - - - 0.25 - 4 - 1 - - - {{0, 382}, {447, 0}} - - - - NSView - - - {447, 382} - - - - - - - 289 - {{305, -184}, {128, 14}} - - - - YES - - 68157504 - 71304192 - - - - YES - - 6 - System - controlColor - - - - - NO - - - {447, 382} - - - - - {{0, 0}, {1600, 1200}} - {94, 108} - {10000000000000, 10000000000000} - YES - - - NSApplication - - - YES - - - TikzSourceController - - - - - - - window - - - - 18 - - - - graphicsView - - - - 100031 - - - - tikzSourceController - - - - 100044 - - - - delegate - - - - 17 - - - - application - - - - 100033 - - - - tikzSourceController - - - - 100049 - - - - attributedString: source - - - - - - attributedString: source - attributedString - source - - NSContinuouslyUpdatesValue - - - 2 - - - 100041 - - - - delegate - - - - 100042 - - - - graphicsView - - - - 100040 - - - - sourceView - - - - 100043 - - - - status - - - - 100048 - - - - errorNotification - - - - 100053 - - - - errorMessage - - - - 100054 - - - - closeParseError: - - - - 100060 - - - - closeErrorButton - - - - 100061 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - 5 - - - - - - Window - - - 6 - - - - - - - - - -3 - - - Application - - - 100021 - - - - - - - - - 100022 - - - - - - - - - 100023 - - - - - - - - 100025 - - - - - - - - - - 100026 - - - - - 100027 - - - - - 100028 - - - - - 100034 - - - - - 100037 - - - - - 100045 - - - - - - - - 100046 - - - - - 100050 - - - - - - - - - 100051 - - - - - - - - 100052 - - - - - 100024 - - - - - - 100058 - - - - - - - - 100059 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - {{329, 94}, {447, 569}} - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 100063 - - - - - GraphicsView - NSView - - NSApplication - TikzSourceController - - - - application - NSApplication - - - tikzSourceController - TikzSourceController - - - - IBProjectSource - ./Classes/GraphicsView.h - - - - ParseErrorView - NSView - - IBProjectSource - ./Classes/ParseErrorView.h - - - - TikzSourceController - NSObject - - closeParseError: - id - - - closeParseError: - - closeParseError: - id - - - - NSTextField - ParseErrorView - GraphicsView - NSTextView - NSTextField - - - - errorMessage - NSTextField - - - errorNotification - ParseErrorView - - - graphicsView - GraphicsView - - - sourceView - NSTextView - - - status - NSTextField - - - - IBProjectSource - ./Classes/TikzSourceController.h - - - - TikzWindowController - NSWindowController - - GraphicsView - TikzSourceController - - - - graphicsView - GraphicsView - - - tikzSourceController - TikzSourceController - - - - IBProjectSource - ./Classes/TikzWindowController.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - NSStopProgressFreestandingTemplate - {83, 83} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \begin{tikzpicture} + +\end{tikzpicture} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tikzit/TikZiT.xcodeproj/project.pbxproj b/tikzit/TikZiT.xcodeproj/project.pbxproj index 3f4b2a5..692181b 100644 --- a/tikzit/TikZiT.xcodeproj/project.pbxproj +++ b/tikzit/TikZiT.xcodeproj/project.pbxproj @@ -21,9 +21,9 @@ 55391AF813D3250F007DBE71 /* Preamble.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55391AF713D3250F007DBE71 /* Preamble.xib */; }; 55391B0213D32608007DBE71 /* PropertyInspector.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55391B0013D32608007DBE71 /* PropertyInspector.xib */; }; 55391B0A13D32765007DBE71 /* PropertyInspectorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55391B0913D32765007DBE71 /* PropertyInspectorController.m */; }; - 55397C7914498C22006942FB /* EdgeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7814498C22006942FB /* EdgeStyle.m */; }; + 55397C7914498C22006942FB /* EdgeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7814498C22006942FB /* EdgeStyle.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 55397C7C144990EA006942FB /* EdgeStyle+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7B144990EA006942FB /* EdgeStyle+Coder.m */; }; - 55397C7F144999C4006942FB /* PropertyHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7E144999C4006942FB /* PropertyHolder.m */; }; + 55397C7F144999C4006942FB /* PropertyHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7E144999C4006942FB /* PropertyHolder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 55397C811449A877006942FB /* ED_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C801449A877006942FB /* ED_arrow.png */; }; 55397C831449A8F1006942FB /* ED_tick.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C821449A8F1006942FB /* ED_tick.png */; }; 55397C851449A9BF006942FB /* ED_none.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C841449A9BF006942FB /* ED_none.png */; }; @@ -33,17 +33,17 @@ 55397C901449AC7C006942FB /* AH_latex_head.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C8E1449AC7C006942FB /* AH_latex_head.png */; }; 55397C911449AC7C006942FB /* AH_plain_head.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C8F1449AC7C006942FB /* AH_plain_head.png */; }; 553A4C5A144ED3D500AA6FAC /* NilToEmptyStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 553A4C59144ED3D500AA6FAC /* NilToEmptyStringTransformer.m */; }; - 55432E061444BF2D00401BB3 /* GraphElementProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 55432E051444BF2D00401BB3 /* GraphElementProperty.m */; }; - 55598E351635372E0023450A /* DiamondShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55598E341635372E0023450A /* DiamondShape.m */; }; + 55432E061444BF2D00401BB3 /* GraphElementProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 55432E051444BF2D00401BB3 /* GraphElementProperty.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55598E351635372E0023450A /* DiamondShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55598E341635372E0023450A /* DiamondShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 555B30F911D8BE3300CAECF5 /* emblem-important.png in Resources */ = {isa = PBXBuildFile; fileRef = 555B30F811D8BE3300CAECF5 /* emblem-important.png */; }; 555B313511D8C6DA00CAECF5 /* color.m in Sources */ = {isa = PBXBuildFile; fileRef = 555B313411D8C6DA00CAECF5 /* color.m */; }; 555ECE9B1378A3AA0052DB71 /* CALayer+DrawLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 555ECE9A1378A3AA0052DB71 /* CALayer+DrawLabel.m */; }; - 55652DF913E1F2030023F4C6 /* SupportDir.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652DF813E1F2030023F4C6 /* SupportDir.m */; }; - 55652E3B13E1FAEE0023F4C6 /* CircleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3413E1FAED0023F4C6 /* CircleShape.m */; }; - 55652E3C13E1FAEE0023F4C6 /* RectangleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3613E1FAED0023F4C6 /* RectangleShape.m */; }; - 55652E3D13E1FAEE0023F4C6 /* RegularPolyShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3813E1FAED0023F4C6 /* RegularPolyShape.m */; }; - 55652E3E13E1FAEE0023F4C6 /* TikzShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3A13E1FAEE0023F4C6 /* TikzShape.m */; }; - 55652E4113E1FB0A0023F4C6 /* Shape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E4013E1FB0A0023F4C6 /* Shape.m */; }; + 55652DF913E1F2030023F4C6 /* SupportDir.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652DF813E1F2030023F4C6 /* SupportDir.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55652E3B13E1FAEE0023F4C6 /* CircleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3413E1FAED0023F4C6 /* CircleShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55652E3C13E1FAEE0023F4C6 /* RectangleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3613E1FAED0023F4C6 /* RectangleShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55652E3D13E1FAEE0023F4C6 /* RegularPolyShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3813E1FAED0023F4C6 /* RegularPolyShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55652E3E13E1FAEE0023F4C6 /* TikzShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3A13E1FAEE0023F4C6 /* TikzShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55652E4113E1FB0A0023F4C6 /* Shape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E4013E1FB0A0023F4C6 /* Shape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 55652E5613E1FC660023F4C6 /* cap.tikz in Copy Shapes */ = {isa = PBXBuildFile; fileRef = 55652E5113E1FC660023F4C6 /* cap.tikz */; }; 55652E5713E1FC660023F4C6 /* copants.tikz in Copy Shapes */ = {isa = PBXBuildFile; fileRef = 55652E5213E1FC660023F4C6 /* copants.tikz */; }; 55652E5813E1FC660023F4C6 /* cup.tikz in Copy Shapes */ = {isa = PBXBuildFile; fileRef = 55652E5313E1FC660023F4C6 /* cup.tikz */; }; @@ -55,13 +55,11 @@ 5573B90F11DA231A00B5DC5D /* PreambleController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573B90E11DA231A00B5DC5D /* PreambleController.m */; }; 5573B92111DA259C00B5DC5D /* text-x-generic.png in Resources */ = {isa = PBXBuildFile; fileRef = 5573B92011DA259C00B5DC5D /* text-x-generic.png */; }; 5573B92511DA273400B5DC5D /* format-indent-less.png in Resources */ = {isa = PBXBuildFile; fileRef = 5573B92411DA273400B5DC5D /* format-indent-less.png */; }; - 5573B92911DA292F00B5DC5D /* Preambles.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573B92811DA292F00B5DC5D /* Preambles.m */; }; + 5573B92911DA292F00B5DC5D /* Preambles.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573B92811DA292F00B5DC5D /* Preambles.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 5573B98811DA377C00B5DC5D /* text-x-script.png in Resources */ = {isa = PBXBuildFile; fileRef = 5573B98711DA377C00B5DC5D /* text-x-script.png */; }; 5573BDCB11DB4D2600B5DC5D /* Preambles+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573BDCA11DB4D2600B5DC5D /* Preambles+Coder.m */; }; 5585E5C2117F681800124513 /* NodeStyle+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5585E5C1117F681800124513 /* NodeStyle+Coder.m */; }; - 5589A9AF11C500060064D310 /* tikzlexer.lm in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AA11C500060064D310 /* tikzlexer.lm */; }; - 5589A9B011C500060064D310 /* tikzparser.ym in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AB11C500060064D310 /* tikzparser.ym */; }; - 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; }; + 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 5589AA6C11C542D30064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; }; 5589AA6D11C542D30064D310 /* tikzlexer.lm in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AA11C500060064D310 /* tikzlexer.lm */; }; 5589AA6E11C542D30064D310 /* tikzparser.ym in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AB11C500060064D310 /* tikzparser.ym */; }; @@ -73,14 +71,14 @@ 5589AA8011C542E60064D310 /* NodeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C4117B031C009863B2 /* NodeStyle.m */; }; 5589AA8511C543500064D310 /* util.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CD117B03DD009863B2 /* util.m */; }; 5589AD4411C633EE0064D310 /* SelectBoxLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589AD4311C633EE0064D310 /* SelectBoxLayer.m */; }; - 558F18C5117B031C009863B2 /* Edge.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BA117B031C009863B2 /* Edge.m */; }; - 558F18C6117B031C009863B2 /* Graph.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BC117B031C009863B2 /* Graph.m */; }; - 558F18C7117B031C009863B2 /* GraphChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BE117B031C009863B2 /* GraphChange.m */; }; - 558F18C8117B031C009863B2 /* GraphElementData.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C0117B031C009863B2 /* GraphElementData.m */; }; - 558F18C9117B031C009863B2 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C2117B031C009863B2 /* Node.m */; }; - 558F18CA117B031C009863B2 /* NodeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C4117B031C009863B2 /* NodeStyle.m */; }; + 558F18C5117B031C009863B2 /* Edge.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BA117B031C009863B2 /* Edge.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 558F18C6117B031C009863B2 /* Graph.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BC117B031C009863B2 /* Graph.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 558F18C7117B031C009863B2 /* GraphChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BE117B031C009863B2 /* GraphChange.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 558F18C8117B031C009863B2 /* GraphElementData.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C0117B031C009863B2 /* GraphElementData.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 558F18C9117B031C009863B2 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C2117B031C009863B2 /* Node.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 558F18CA117B031C009863B2 /* NodeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C4117B031C009863B2 /* NodeStyle.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 558F18CE117B03DD009863B2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CB117B03DD009863B2 /* main.m */; }; - 558F18CF117B03DD009863B2 /* util.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CD117B03DD009863B2 /* util.m */; }; + 558F18CF117B03DD009863B2 /* util.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CD117B03DD009863B2 /* util.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 558F18F7117B043C009863B2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18DA117B043B009863B2 /* AppDelegate.m */; }; 558F18F9117B043C009863B2 /* EdgeControlLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18DE117B043B009863B2 /* EdgeControlLayer.m */; }; 558F18FA117B043C009863B2 /* GraphicsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18E0117B043B009863B2 /* GraphicsView.m */; }; @@ -99,12 +97,12 @@ 559EFA4811C7D49800D020F4 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559EFA4711C7D49800D020F4 /* Sparkle.framework */; }; 559EFA4E11C7D4BD00D020F4 /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 559EFA4711C7D49800D020F4 /* Sparkle.framework */; }; 559EFA5711C7D95F00D020F4 /* tikzit_dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 559EFA5611C7D95F00D020F4 /* tikzit_dsa_pub.pem */; }; - 559EFB6811CB88E300D020F4 /* ColorRGB.m in Sources */ = {isa = PBXBuildFile; fileRef = 559EFB6711CB88E300D020F4 /* ColorRGB.m */; }; + 559EFB6811CB88E300D020F4 /* ColorRGB.m in Sources */ = {isa = PBXBuildFile; fileRef = 559EFB6711CB88E300D020F4 /* ColorRGB.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 55CA98D512EF8FCE008F0368 /* SFBInspectors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 55CA98DA12EF9098008F0368 /* SFBInspectors.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 55CA98DD12EF910F008F0368 /* SFBInspectors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 55CA997212F08281008F0368 /* TikzWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA997112F08281008F0368 /* TikzWindowController.m */; }; - 55CA9AC912F831E5008F0368 /* RColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA9AC812F831E5008F0368 /* RColor.m */; }; + 55CA9AC912F831E5008F0368 /* RColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA9AC812F831E5008F0368 /* RColor.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 55CA9ACA12F831E5008F0368 /* RColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA9AC812F831E5008F0368 /* RColor.m */; }; 55D2E0B21186ED950060B4EC /* Graph+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55D2E0B11186ED950060B4EC /* Graph+Coder.m */; }; 55D945721165904F0044178C /* tikzitdoc.icns in Resources */ = {isa = PBXBuildFile; fileRef = 55D945701165904F0044178C /* tikzitdoc.icns */; }; @@ -113,9 +111,9 @@ 55D949151165D8870044178C /* draw-path.png in Resources */ = {isa = PBXBuildFile; fileRef = 55D949121165D8870044178C /* draw-path.png */; }; 55D949161165D8870044178C /* select-rectangular.png in Resources */ = {isa = PBXBuildFile; fileRef = 55D949131165D8870044178C /* select-rectangular.png */; }; 55E5E99E1215C8E300256F69 /* transform-crop-and-resize.png in Resources */ = {isa = PBXBuildFile; fileRef = 55E5E99D1215C8E300256F69 /* transform-crop-and-resize.png */; }; - 55F9585C1181B09600F99434 /* PickSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F958591181B09600F99434 /* PickSupport.m */; }; - 55F9585D1181B09600F99434 /* Transformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9585B1181B09600F99434 /* Transformer.m */; }; - 55F9E04511FF54F000F5659E /* NSString+LatexConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9E04411FF54F000F5659E /* NSString+LatexConstants.m */; }; + 55F9585C1181B09600F99434 /* PickSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F958591181B09600F99434 /* PickSupport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55F9585D1181B09600F99434 /* Transformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9585B1181B09600F99434 /* Transformer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55F9E04511FF54F000F5659E /* NSString+LatexConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9E04411FF54F000F5659E /* NSString+LatexConstants.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 7F18A321184C577000BC3081 /* UpdatePreferenceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F18A320184C577000BC3081 /* UpdatePreferenceController.m */; }; 7F18A323184C599100BC3081 /* UpdatePreferencePanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7F18A322184C599100BC3081 /* UpdatePreferencePanel.xib */; }; 7F6E2C7D16B007F000BFE20D /* EdgeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7814498C22006942FB /* EdgeStyle.m */; }; @@ -133,7 +131,11 @@ 7F6E2C8C16B00ABA00BFE20D /* SFBInspectors.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 7F73438A184AC559002897D0 /* DraggablePDFView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F734389184AC559002897D0 /* DraggablePDFView.m */; }; 7F781C1A16B5DE1400239826 /* ParseErrorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F781C1916B5DE1400239826 /* ParseErrorView.m */; }; - 7F90E88616DD29600069EBCD /* NSString+Tikz.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F90E88516DD29600069EBCD /* NSString+Tikz.m */; }; + 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEA18DE0C9E004F6CA8 /* tikzlexer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEC18DE0C9E004F6CA8 /* tikzparser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 7F7B6DF418DE0D7A004F6CA8 /* CustomNodeCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DF118DE0D7A004F6CA8 /* CustomNodeCellView.m */; }; + 7F7B6DF518DE0D7A004F6CA8 /* CustomNodeController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DF318DE0D7A004F6CA8 /* CustomNodeController.m */; }; + 7F90E88616DD29600069EBCD /* NSString+Tikz.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F90E88516DD29600069EBCD /* NSString+Tikz.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 7F90E88D16DD47540069EBCD /* PreferenceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F90E88B16DD47540069EBCD /* PreferenceController.m */; }; 7F90E88E16DD47540069EBCD /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7F90E88C16DD47540069EBCD /* Preferences.xib */; }; 7F90E89116DD54440069EBCD /* UserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7F90E88F16DD54440069EBCD /* UserDefaults.plist */; }; @@ -141,37 +143,12 @@ 7F938530184D178B00FAED38 /* engine.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F93852F184D178B00FAED38 /* engine.png */; }; 7F938532184D184700FAED38 /* preamble.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F938531184D184700FAED38 /* preamble.png */; }; 7FB9BFEE16B57C2E00773146 /* TikzFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FB9BFED16B57C2E00773146 /* TikzFormatter.m */; }; - 7FEED45716B1A7C500B056CB /* StyleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEED45616B1A7C500B056CB /* StyleManager.m */; }; + 7FEED45716B1A7C500B056CB /* StyleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEED45616B1A7C500B056CB /* StyleManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; }; 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; }; 8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXBuildRule section */ - 74112B2117CE36C500B9CF16 /* PBXBuildRule */ = { - isa = PBXBuildRule; - compilerSpec = com.apple.compilers.proxy.script; - fileType = sourcecode.lex; - isEditable = 1; - outputFiles = ( - tikzlexer.m, - tikzlexer.h, - ); - script = "cd src\nflex -o common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.lm\ncp common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.h ${DERIVED_SOURCES_DIR}"; - }; - 74E535F317CE329A0040610D /* PBXBuildRule */ = { - isa = PBXBuildRule; - compilerSpec = com.apple.compilers.proxy.script; - fileType = sourcecode.yacc; - isEditable = 1; - outputFiles = ( - tikzparser.h, - tikzparser.m, - ); - script = "cd src\nbison --defines=common/${INPUT_FILE_BASE}.h --output=common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.ym\ncp common/${INPUT_FILE_BASE}.h common/${INPUT_FILE_BASE}.m ${DERIVED_SOURCES_DIR}\n"; - }; -/* End PBXBuildRule section */ - /* Begin PBXContainerItemProxy section */ 5504C91A11D36CD5002A1478 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -383,6 +360,14 @@ 7F734389184AC559002897D0 /* DraggablePDFView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DraggablePDFView.m; path = src/osx/DraggablePDFView.m; sourceTree = ""; }; 7F781C1816B5DE1400239826 /* ParseErrorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParseErrorView.h; path = src/osx/ParseErrorView.h; sourceTree = ""; }; 7F781C1916B5DE1400239826 /* ParseErrorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ParseErrorView.m; path = src/osx/ParseErrorView.m; sourceTree = ""; }; + 7F7B6DE918DE0C9E004F6CA8 /* tikzlexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tikzlexer.h; path = xbuild/TikZiT.build/Debug/TikZiT.build/DerivedSources/tikzlexer.h; sourceTree = ""; }; + 7F7B6DEA18DE0C9E004F6CA8 /* tikzlexer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = tikzlexer.m; path = xbuild/TikZiT.build/Debug/TikZiT.build/DerivedSources/tikzlexer.m; sourceTree = ""; }; + 7F7B6DEB18DE0C9E004F6CA8 /* tikzparser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tikzparser.h; path = xbuild/TikZiT.build/Debug/TikZiT.build/DerivedSources/tikzparser.h; sourceTree = ""; }; + 7F7B6DEC18DE0C9E004F6CA8 /* tikzparser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = tikzparser.m; path = xbuild/TikZiT.build/Debug/TikZiT.build/DerivedSources/tikzparser.m; sourceTree = ""; }; + 7F7B6DF018DE0D7A004F6CA8 /* CustomNodeCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomNodeCellView.h; path = src/osx/CustomNodeCellView.h; sourceTree = ""; }; + 7F7B6DF118DE0D7A004F6CA8 /* CustomNodeCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CustomNodeCellView.m; path = src/osx/CustomNodeCellView.m; sourceTree = ""; }; + 7F7B6DF218DE0D7A004F6CA8 /* CustomNodeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomNodeController.h; path = src/osx/CustomNodeController.h; sourceTree = ""; }; + 7F7B6DF318DE0D7A004F6CA8 /* CustomNodeController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CustomNodeController.m; path = src/osx/CustomNodeController.m; sourceTree = ""; }; 7F90E88416DD29600069EBCD /* NSString+Tikz.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+Tikz.h"; path = "src/common/NSString+Tikz.h"; sourceTree = ""; }; 7F90E88516DD29600069EBCD /* NSString+Tikz.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+Tikz.m"; path = "src/common/NSString+Tikz.m"; sourceTree = ""; }; 7F90E88A16DD47540069EBCD /* PreferenceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreferenceController.h; path = src/osx/PreferenceController.h; sourceTree = ""; }; @@ -631,6 +616,7 @@ 55D946071165922F0044178C /* Parser */ = { isa = PBXGroup; children = ( + 7F7B6DE218DE0BE1004F6CA8 /* Generated sources */, 5589A9AA11C500060064D310 /* tikzlexer.lm */, 5589A9AB11C500060064D310 /* tikzparser.ym */, 5589A9FD11C51E780064D310 /* TikzGraphAssembler.h */, @@ -744,6 +730,7 @@ 7F18A31E184C563800BC3081 /* Preferences */ = { isa = PBXGroup; children = ( + 7F7B6DEF18DE0D70004F6CA8 /* CustomNode */, 5573B90D11DA231A00B5DC5D /* PreambleController.h */, 5573B90E11DA231A00B5DC5D /* PreambleController.m */, 7F90E88A16DD47540069EBCD /* PreferenceController.h */, @@ -754,6 +741,28 @@ name = Preferences; sourceTree = ""; }; + 7F7B6DE218DE0BE1004F6CA8 /* Generated sources */ = { + isa = PBXGroup; + children = ( + 7F7B6DE918DE0C9E004F6CA8 /* tikzlexer.h */, + 7F7B6DEA18DE0C9E004F6CA8 /* tikzlexer.m */, + 7F7B6DEB18DE0C9E004F6CA8 /* tikzparser.h */, + 7F7B6DEC18DE0C9E004F6CA8 /* tikzparser.m */, + ); + name = "Generated sources"; + sourceTree = ""; + }; + 7F7B6DEF18DE0D70004F6CA8 /* CustomNode */ = { + isa = PBXGroup; + children = ( + 7F7B6DF018DE0D7A004F6CA8 /* CustomNodeCellView.h */, + 7F7B6DF118DE0D7A004F6CA8 /* CustomNodeCellView.m */, + 7F7B6DF218DE0D7A004F6CA8 /* CustomNodeController.h */, + 7F7B6DF318DE0D7A004F6CA8 /* CustomNodeController.m */, + ); + name = CustomNode; + sourceTree = ""; + }; 7F93852C184D175400FAED38 /* Icons */ = { isa = PBXGroup; children = ( @@ -801,12 +810,12 @@ 559EFA5511C7D4DD00D020F4 /* Copy Frameworks */, 8D15AC2B0486D014006FF6A4 /* Resources */, 55652E6613E1FD080023F4C6 /* Copy Shapes */, + 7F7B6DE018DE02AC004F6CA8 /* Run Flex */, + 7F7B6DE118DE0A6E004F6CA8 /* Run Bison */, 8D15AC300486D014006FF6A4 /* Sources */, 8D15AC330486D014006FF6A4 /* Frameworks */, ); buildRules = ( - 74112B2117CE36C500B9CF16 /* PBXBuildRule */, - 74E535F317CE329A0040610D /* PBXBuildRule */, ); dependencies = ( ); @@ -889,6 +898,41 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 7F7B6DE018DE02AC004F6CA8 /* Run Flex */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/src/common/tikzlexer.lm", + ); + name = "Run Flex"; + outputPaths = ( + "$(SRCROOT)/src/common/tikzlexer.m", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cd ${SRCROOT}/src/\nINPUT_FILE_BASE=`basename \"${SCRIPT_INPUT_FILE_0}\" .lm`\nflex -o common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.lm\nmv common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.h ${DERIVED_SOURCES_DIR}\n"; + }; + 7F7B6DE118DE0A6E004F6CA8 /* Run Bison */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(SRCROOT)/src/common/tikzparser.ym", + ); + name = "Run Bison"; + outputPaths = ( + "$(SRCROOT)/src/common/tikzparser.m", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cd ${SRCROOT}/src/\nINPUT_FILE_BASE=`basename \"${SCRIPT_INPUT_FILE_0}\" .ym`\nflex -o common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.lm\nbison --defines=common/${INPUT_FILE_BASE}.h --output=common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.ym\nmv common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.h ${DERIVED_SOURCES_DIR}"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 5589AA6211C5429C0064D310 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -936,8 +980,10 @@ 558F18C5117B031C009863B2 /* Edge.m in Sources */, 558F18C6117B031C009863B2 /* Graph.m in Sources */, 558F18C7117B031C009863B2 /* GraphChange.m in Sources */, + 7F7B6DF418DE0D7A004F6CA8 /* CustomNodeCellView.m in Sources */, 558F18C8117B031C009863B2 /* GraphElementData.m in Sources */, 558F18C9117B031C009863B2 /* Node.m in Sources */, + 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */, 558F18CA117B031C009863B2 /* NodeStyle.m in Sources */, 558F18CE117B03DD009863B2 /* main.m in Sources */, 558F18CF117B03DD009863B2 /* util.m in Sources */, @@ -957,10 +1003,10 @@ 5585E5C2117F681800124513 /* NodeStyle+Coder.m in Sources */, 55F9585C1181B09600F99434 /* PickSupport.m in Sources */, 55F9585D1181B09600F99434 /* Transformer.m in Sources */, + 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */, 55D2E0B21186ED950060B4EC /* Graph+Coder.m in Sources */, - 5589A9AF11C500060064D310 /* tikzlexer.lm in Sources */, - 5589A9B011C500060064D310 /* tikzparser.ym in Sources */, 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */, + 7F7B6DF518DE0D7A004F6CA8 /* CustomNodeController.m in Sources */, 5589AD4411C633EE0064D310 /* SelectBoxLayer.m in Sources */, 559EFB6811CB88E300D020F4 /* ColorRGB.m in Sources */, 5573B8C211D9FD3200B5DC5D /* PreviewController.m in Sources */, @@ -1137,6 +1183,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -1162,6 +1210,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = ( @@ -1186,7 +1236,6 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = required; GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -1206,7 +1255,6 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_GC = required; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ""; diff --git a/tikzit/src/osx/AppDelegate.h b/tikzit/src/osx/AppDelegate.h index 64acc38..0f9d787 100644 --- a/tikzit/src/osx/AppDelegate.h +++ b/tikzit/src/osx/AppDelegate.h @@ -37,13 +37,13 @@ PreambleController *preambleController; PreviewController *previewController; PreferenceController *preferenceController; - ToolPaletteController *toolPaletteController; + ToolPaletteController *__weak toolPaletteController; IBOutlet GraphicsView *graphicsView; NSString *tempDir; } @property IBOutlet StylePaletteController *stylePaletteController; -@property IBOutlet ToolPaletteController *toolPaletteController; +@property (weak) IBOutlet ToolPaletteController *toolPaletteController; - (void)awakeFromNib; + (void)setDefaults; diff --git a/tikzit/src/osx/CustomNodeCellView.h b/tikzit/src/osx/CustomNodeCellView.h index 5b3b1ee..22606d7 100644 --- a/tikzit/src/osx/CustomNodeCellView.h +++ b/tikzit/src/osx/CustomNodeCellView.h @@ -18,6 +18,6 @@ BOOL selected; } -@property (retain) id objectValue; +@property (strong) id objectValue; @end diff --git a/tikzit/src/osx/CustomNodeController.h b/tikzit/src/osx/CustomNodeController.h index 55f0e0b..56cb74c 100644 --- a/tikzit/src/osx/CustomNodeController.h +++ b/tikzit/src/osx/CustomNodeController.h @@ -16,18 +16,18 @@ #import "SupportDir.h" @interface CustomNodeController : NSViewController { - NSDictionary* nodeStyles; + NSDictionary* __weak nodeStyles; NSMutableArray* customNodeStyles; - NSMutableArray* onodeStyles; + NSMutableArray* __weak onodeStyles; - GraphicsView *graphicsView; - TikzSourceController *tikzSourceController; + GraphicsView *__weak graphicsView; + TikzSourceController *__weak tikzSourceController; } -@property (readonly) NSDictionary *nodeStyles; -@property (readonly) NSMutableArray* onodeStyles; +@property (weak, readonly) NSDictionary *nodeStyles; +@property (weak, readonly) NSMutableArray* onodeStyles; -@property IBOutlet GraphicsView *graphicsView; -@property IBOutlet TikzSourceController *tikzSourceController; +@property (weak) IBOutlet GraphicsView *graphicsView; +@property (weak) IBOutlet TikzSourceController *tikzSourceController; @end diff --git a/tikzit/src/osx/CustomNodes.xib b/tikzit/src/osx/CustomNodes.xib index 8b2587a..1cc8db2 100644 --- a/tikzit/src/osx/CustomNodes.xib +++ b/tikzit/src/osx/CustomNodes.xib @@ -1,15 +1,249 @@ - + - + + - + + + + + + + + + + name + strokeThickness + strokeColor + fillColor + strokeColorIsKnown + fillColorIsKnown + representedObject.name + shapeName + scale + @distinctUnionOfObjects.category + category + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \begin{tikzpicture} + +\end{tikzpicture} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + + + + diff --git a/tikzit/src/osx/EdgeControlLayer.m b/tikzit/src/osx/EdgeControlLayer.m index 377cde4..facdd84 100644 --- a/tikzit/src/osx/EdgeControlLayer.m +++ b/tikzit/src/osx/EdgeControlLayer.m @@ -29,7 +29,7 @@ - (id)initWithEdge:(Edge*)e andTransformer:(Transformer*)t { - [super init]; + if (!(self = [super init])) return nil; transformer = t; edge = e; self.opacity = 0.0f; diff --git a/tikzit/src/osx/EdgeStyle+Coder.m b/tikzit/src/osx/EdgeStyle+Coder.m index 208fac0..039344d 100644 --- a/tikzit/src/osx/EdgeStyle+Coder.m +++ b/tikzit/src/osx/EdgeStyle+Coder.m @@ -26,7 +26,7 @@ @implementation EdgeStyle (Coder) - (id)initWithCoder:(NSCoder*)coder { - [super init]; + if (!(self = [super init])) return nil; name = [coder decodeObjectForKey:@"name"]; category = [coder decodeObjectForKey:@"category"]; diff --git a/tikzit/src/osx/GraphicsView.h b/tikzit/src/osx/GraphicsView.h index e963ac7..c3c2add 100644 --- a/tikzit/src/osx/GraphicsView.h +++ b/tikzit/src/osx/GraphicsView.h @@ -92,12 +92,12 @@ typedef enum { NSUndoManager *documentUndoManager; NSPoint startPoint; - TikzSourceController *tikzSourceController; + TikzSourceController *__weak tikzSourceController; } @property BOOL enabled; -@property Graph *graph; -@property IBOutlet TikzSourceController *tikzSourceController; +@property (weak) Graph *graph; +@property (weak) IBOutlet TikzSourceController *tikzSourceController; @property (readonly) Transformer *transformer; @property (readonly) PickSupport *pickSupport; diff --git a/tikzit/src/osx/Grid.m b/tikzit/src/osx/Grid.m index 3e412a3..aa35c1f 100644 --- a/tikzit/src/osx/Grid.m +++ b/tikzit/src/osx/Grid.m @@ -32,7 +32,7 @@ subdivisions:(int)subs transformer:(Transformer*)t { - [super init]; + if (!(self = [super init])) return nil; gridX = spacing; gridY = spacing; subdivisions = subs; diff --git a/tikzit/src/osx/NilToEmptyStringTransformer.m b/tikzit/src/osx/NilToEmptyStringTransformer.m index 97267e3..413f404 100644 --- a/tikzit/src/osx/NilToEmptyStringTransformer.m +++ b/tikzit/src/osx/NilToEmptyStringTransformer.m @@ -26,7 +26,7 @@ @implementation NilToEmptyStringTransformer - (id)init { - [super init]; + if (!(self = [super init])) return nil; return self; } diff --git a/tikzit/src/osx/NodeLayer.h b/tikzit/src/osx/NodeLayer.h index dfe05e8..d2a943b 100644 --- a/tikzit/src/osx/NodeLayer.h +++ b/tikzit/src/osx/NodeLayer.h @@ -30,7 +30,7 @@ #import "NodeSelectionLayer.h" @interface NodeLayer : CALayer { - Node *node; + Node *__weak node; Shape *shape; CGMutablePathRef path; float textwidth; @@ -42,10 +42,10 @@ BOOL dirty; // need to rebuild CGBezierPath of the shape } -@property Node *node; +@property (weak) Node *node; @property (assign) NSPoint center; @property (assign) BOOL rescale; -@property (retain) NodeSelectionLayer *selection; +@property (strong) NodeSelectionLayer *selection; @property (readonly) CGMutablePathRef path; - (id)initWithNode:(Node*)n transformer:(Transformer*)t; diff --git a/tikzit/src/osx/NodeLayer.m b/tikzit/src/osx/NodeLayer.m index 2c37c26..5d15585 100644 --- a/tikzit/src/osx/NodeLayer.m +++ b/tikzit/src/osx/NodeLayer.m @@ -34,7 +34,7 @@ @synthesize node, selection, rescale; - (id)initWithNode:(Node *)n transformer:(Transformer*)t { - [super init]; + if (!(self = [super init])) return nil; node = n; selection = [[NodeSelectionLayer alloc] init]; [selection setNodeLayer:self]; @@ -233,7 +233,6 @@ - (void)dealloc { if (path != NULL) CFRelease(path); - [super dealloc]; } @end diff --git a/tikzit/src/osx/NodeSelectionLayer.h b/tikzit/src/osx/NodeSelectionLayer.h index 99ee75f..68d5beb 100644 --- a/tikzit/src/osx/NodeSelectionLayer.h +++ b/tikzit/src/osx/NodeSelectionLayer.h @@ -31,10 +31,10 @@ BOOL selected; CGMutablePathRef path; NSLock *drawLock; - NodeLayer *nodeLayer; + NodeLayer *__weak nodeLayer; } -@property NodeLayer *nodeLayer; +@property (weak) NodeLayer *nodeLayer; - (id)init; - (void)select; diff --git a/tikzit/src/osx/NodeSelectionLayer.m b/tikzit/src/osx/NodeSelectionLayer.m index 5efcbf7..02b8ac2 100644 --- a/tikzit/src/osx/NodeSelectionLayer.m +++ b/tikzit/src/osx/NodeSelectionLayer.m @@ -30,7 +30,7 @@ @synthesize nodeLayer; - (id)init { - [super init]; + if (!(self = [super init])) return nil; selected = NO; drawLock = [[NSLock alloc] init]; nodeLayer = nil; diff --git a/tikzit/src/osx/NodeStyle+Coder.m b/tikzit/src/osx/NodeStyle+Coder.m index 8da91c1..d3623f5 100644 --- a/tikzit/src/osx/NodeStyle+Coder.m +++ b/tikzit/src/osx/NodeStyle+Coder.m @@ -59,7 +59,7 @@ } - (id)initWithCoder:(NSCoder *)coder { - [super init]; + if (!(self = [super init])) return nil; // decode keys name = [coder decodeObjectForKey:@"name"]; diff --git a/tikzit/src/osx/PreambleController.h b/tikzit/src/osx/PreambleController.h index 3c7a7c3..5b0931d 100644 --- a/tikzit/src/osx/PreambleController.h +++ b/tikzit/src/osx/PreambleController.h @@ -38,8 +38,8 @@ @property (readonly) BOOL useDefaultPreamble; @property (readonly) Preambles *preambles; -@property (retain) NSAttributedString *preambleText; -@property (retain) NSIndexSet *selectionIndexes; +@property (strong) NSAttributedString *preambleText; +@property (strong) NSIndexSet *selectionIndexes; - (id)initWithNibName:(NSString *)nibName plist:(NSString*)plist styles:(NSArray*)sty edges:(NSArray*)edg; - (void)savePreambles:(NSString*)plist; diff --git a/tikzit/src/osx/PreambleController.m b/tikzit/src/osx/PreambleController.m index 3e55eaf..206bb30 100644 --- a/tikzit/src/osx/PreambleController.m +++ b/tikzit/src/osx/PreambleController.m @@ -29,7 +29,7 @@ @synthesize preambleText, preambles; - (id)initWithNibName:(NSString *)nibName plist:(NSString*)plist styles:(NSArray*)sty edges:(NSArray*)edg { - [super initWithNibName:nibName bundle:Nil]; + if (!(self = [super initWithNibName:nibName bundle:Nil])) return nil; preambles = (Preambles*)[NSKeyedUnarchiver unarchiveObjectWithFile:plist]; [preambles setStyles:sty]; diff --git a/tikzit/src/osx/Preambles+Coder.m b/tikzit/src/osx/Preambles+Coder.m index 6b9768a..5e468b2 100644 --- a/tikzit/src/osx/Preambles+Coder.m +++ b/tikzit/src/osx/Preambles+Coder.m @@ -27,7 +27,7 @@ @implementation Preambles (Coder) - (id)initWithCoder:(NSCoder *)coder { - [super init]; + if (!(self = [super init])) return nil; selectedPreambleName = [coder decodeObjectForKey:@"selectedPreamble"]; preambleDict = [coder decodeObjectForKey:@"preambles"]; return self; diff --git a/tikzit/src/osx/PreferenceController.h b/tikzit/src/osx/PreferenceController.h index 5a14b72..b2b23f3 100644 --- a/tikzit/src/osx/PreferenceController.h +++ b/tikzit/src/osx/PreferenceController.h @@ -25,6 +25,7 @@ #import #import "UpdatePreferenceController.h" #import "PreambleController.h" +#import "CustomNodeController.h" @interface PreferenceController : NSWindowController{ @@ -32,13 +33,17 @@ IBOutlet NSView *generalView; IBOutlet NSView *updateView; IBOutlet NSView *preambleView; + IBOutlet NSView *customNodeView; UpdatePreferenceController *updateController; PreambleController *preambleController; + CustomNodeController *customNodeController; int currentViewTag; } +- (id)initWithWindowNibName:(NSString *)windowNibName preambleController:(PreambleController *)pc; + - (IBAction)switchView:(id)sender; @end diff --git a/tikzit/src/osx/PreferenceController.m b/tikzit/src/osx/PreferenceController.m index ab992ed..099bf48 100644 --- a/tikzit/src/osx/PreferenceController.m +++ b/tikzit/src/osx/PreferenceController.m @@ -30,8 +30,8 @@ @implementation PreferenceController -- (id)initWithWindowNibName:(NSString *)windowNibName preambleController:(PreambleController*)pc{ - [super initWithWindowNibName:windowNibName]; +- (id)initWithWindowNibName:(NSString *)windowNibName preambleController:(PreambleController *)pc{ + if (!(self = [super initWithWindowNibName:windowNibName])) return nil; preambleController = pc; @@ -69,6 +69,9 @@ case 3: view = preambleView; break; + case 4: + view = customNodeView; + break; } return view; @@ -96,6 +99,11 @@ [[[self window] contentView] replaceSubview:preambleView with:[preambleController view]]; preambleView = [preambleController view]; + customNodeController = [[CustomNodeController alloc] initWithNibName:@"CustomNodes" bundle:nil]; + [[customNodeController view] setFrame:[customNodeView frame]]; + [[[self window] contentView] replaceSubview:customNodeView with:[customNodeController view]]; + customNodeView = [customNodeController view]; + [[self window] setContentSize:[preambleView frame].size]; [[[self window] contentView] addSubview:preambleView]; currentViewTag = 3; diff --git a/tikzit/src/osx/Preferences.xib b/tikzit/src/osx/Preferences.xib index 8247c8d..155cf71 100644 --- a/tikzit/src/osx/Preferences.xib +++ b/tikzit/src/osx/Preferences.xib @@ -126,6 +126,28 @@ YES 0 + + + CBA2626C-DD4C-4ADD-BD5D-26D21216D9A8 + + Custom Nodes + Custom Nodes + + + + NSImage + customshape + + + + {0, 0} + {0, 0} + YES + YES + 4 + YES + 0 + F85FE7C2-9847-4E58-8BF6-BE334E918CA7 @@ -149,15 +171,17 @@ 0 - + + + @@ -329,6 +353,17 @@ _NS:9 NSView + + + 12 + + {557, 354} + + + + _NS:9 + NSView + YES @@ -407,6 +442,22 @@ 121 + + + customNodeView + + + + 123 + + + + switchView: + + + + 125 + delegate @@ -496,6 +547,7 @@ + @@ -744,6 +796,16 @@ + + 122 + + + + + 124 + + + @@ -758,6 +820,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -794,7 +858,7 @@ - 121 + 125 @@ -813,12 +877,17 @@ + NSView NSView NSView NSView NSView + + customNodeView + NSView + engineView NSView @@ -859,6 +928,7 @@ {32, 32} {15, 15} + {32, 32} {32, 32} {32, 32} {32, 32} diff --git a/tikzit/src/osx/PreviewController.m b/tikzit/src/osx/PreviewController.m index 310c2ab..cf069b1 100644 --- a/tikzit/src/osx/PreviewController.m +++ b/tikzit/src/osx/PreviewController.m @@ -33,7 +33,7 @@ static PreviewController *preview = nil; - (id)initWithWindowNibName:(NSString*)nib preambleController:(PreambleController*)pc tempDir:(NSString*)dir { - [super initWithWindowNibName:nib]; + if (!(self = [super initWithWindowNibName:nib])) return nil; tempDir = [dir copy]; typesetCount = 0; preambleController = pc; diff --git a/tikzit/src/osx/PropertyInspectorController.h b/tikzit/src/osx/PropertyInspectorController.h index 0625f9b..663ee4a 100644 --- a/tikzit/src/osx/PropertyInspectorController.h +++ b/tikzit/src/osx/PropertyInspectorController.h @@ -52,11 +52,11 @@ //@property (readonly) BOOL enableNodeDataControls; //@property (readonly) BOOL enableEdgeDataControls; -@property (retain) NSMutableArray *selectedNodes; -@property (retain) NSMutableArray *selectedEdges; -@property (retain) NSMutableArray *sourceAnchorNames; -@property (retain) NSMutableArray *targetAnchorNames; -@property (retain) StylePaletteController *stylePaletteController; +@property (strong) NSMutableArray *selectedNodes; +@property (strong) NSMutableArray *selectedEdges; +@property (strong) NSMutableArray *sourceAnchorNames; +@property (strong) NSMutableArray *targetAnchorNames; +@property (strong) StylePaletteController *stylePaletteController; - (id)initWithWindowNibName:(NSString *)windowNibName; - (void)graphSelectionChanged:(NSNotification*)notification; diff --git a/tikzit/src/osx/PropertyInspectorController.m b/tikzit/src/osx/PropertyInspectorController.m index 1411549..981f746 100644 --- a/tikzit/src/osx/PropertyInspectorController.m +++ b/tikzit/src/osx/PropertyInspectorController.m @@ -25,7 +25,7 @@ @synthesize sourceAnchorNames, targetAnchorNames; - (id)initWithWindowNibName:(NSString *)windowNibName { - [super initWithWindowNibName:windowNibName]; + if (!(self = [super initWithWindowNibName:windowNibName])) return nil; noSelection = [[GraphElementData alloc] init]; [noSelection setProperty:@"" forKey:@"No Selection"]; diff --git a/tikzit/src/osx/SelectBoxLayer.m b/tikzit/src/osx/SelectBoxLayer.m index c198ffa..a7abe33 100644 --- a/tikzit/src/osx/SelectBoxLayer.m +++ b/tikzit/src/osx/SelectBoxLayer.m @@ -14,7 +14,7 @@ @synthesize active; - (id)init { - [super init]; + if (!(self = [super init])) return nil; box = CGRectMake(0.0f, 0.0f, 0.0f, 0.0f); active = NO; return self; @@ -42,7 +42,7 @@ } + (SelectBoxLayer*)layer { - return [[[SelectBoxLayer alloc] init] autorelease]; + return [[SelectBoxLayer alloc] init]; } @end diff --git a/tikzit/src/osx/SelectableNodeView.h b/tikzit/src/osx/SelectableNodeView.h index be7d1a1..6b0841d 100644 --- a/tikzit/src/osx/SelectableNodeView.h +++ b/tikzit/src/osx/SelectableNodeView.h @@ -32,7 +32,7 @@ } @property (assign) BOOL selected; -@property (retain) NodeStyle *nodeStyle; +@property (strong) NodeStyle *nodeStyle; @end diff --git a/tikzit/src/osx/SelectableNodeView.m b/tikzit/src/osx/SelectableNodeView.m index 6fdd283..797a137 100644 --- a/tikzit/src/osx/SelectableNodeView.m +++ b/tikzit/src/osx/SelectableNodeView.m @@ -30,7 +30,7 @@ @synthesize selected; - (id)initWithFrame:(NSRect)frameRect { - [super initWithFrame:frameRect]; + if (!(self = [super initWithFrame:frameRect])) return nil; nodeLayer = nil; return self; } diff --git a/tikzit/src/osx/StylePaletteController.h b/tikzit/src/osx/StylePaletteController.h index ed30b58..51404bb 100644 --- a/tikzit/src/osx/StylePaletteController.h +++ b/tikzit/src/osx/StylePaletteController.h @@ -28,8 +28,8 @@ @class SFBInspectorView; @interface StylePaletteController : NSWindowController { - NSMutableArray *nodeStyles; - NSMutableArray *edgeStyles; + NSMutableArray *__weak nodeStyles; + NSMutableArray *__weak edgeStyles; IBOutlet NSArrayController *nodeStyleArrayController; IBOutlet NSArrayController *filteredNodeStyleArrayController; IBOutlet NSArrayController *edgeStyleArrayController; @@ -43,15 +43,15 @@ NSString *displayedEdgeStyleCategory; } -@property (readonly) NSMutableArray *nodeStyles; -@property (readonly) NSMutableArray *edgeStyles; +@property (weak, readonly) NSMutableArray *nodeStyles; +@property (weak, readonly) NSMutableArray *edgeStyles; @property (readonly) BOOL documentActive; -@property (assign) NodeStyle *activeNodeStyle; -@property (assign) EdgeStyle *activeEdgeStyle; +@property (weak) NodeStyle *activeNodeStyle; +@property (weak) EdgeStyle *activeEdgeStyle; @property (copy) NSString *displayedNodeStyleCategory; @property (copy) NSString *displayedEdgeStyleCategory; -@property (readonly) NSPredicate *displayedNodeStylePredicate; -@property (readonly) NSPredicate *displayedEdgeStylePredicate; +@property (weak, readonly) NSPredicate *displayedNodeStylePredicate; +@property (weak, readonly) NSPredicate *displayedEdgeStylePredicate; //@property NSString *nodeLabel; diff --git a/tikzit/src/osx/TikzDocument.h b/tikzit/src/osx/TikzDocument.h index d817b2e..1881994 100644 --- a/tikzit/src/osx/TikzDocument.h +++ b/tikzit/src/osx/TikzDocument.h @@ -32,6 +32,6 @@ } @property (readonly) NSString *tikz; -@property (readonly) GraphicsView *graphicsView; +@property (weak, readonly) GraphicsView *graphicsView; @end diff --git a/tikzit/src/osx/TikzFormatter.m b/tikzit/src/osx/TikzFormatter.m index 8972706..9e45cb6 100644 --- a/tikzit/src/osx/TikzFormatter.m +++ b/tikzit/src/osx/TikzFormatter.m @@ -76,10 +76,6 @@ } } - [cs autorelease]; - [scanner autorelease]; - [strippedString autorelease]; - if([strippedString length] % 2 == 1){ return NO; } diff --git a/tikzit/src/osx/TikzSourceController.h b/tikzit/src/osx/TikzSourceController.h index 3408d9f..84d36da 100644 --- a/tikzit/src/osx/TikzSourceController.h +++ b/tikzit/src/osx/TikzSourceController.h @@ -27,17 +27,17 @@ #import "ParseErrorView.h" @interface TikzSourceController : NSObject { - GraphicsView *graphicsView; - NSTextView *sourceView; + GraphicsView *__weak graphicsView; + NSTextView *__unsafe_unretained sourceView; NSAttributedString *source; - NSTextField *status; + NSTextField *__weak status; NSDictionary *textAttrs; NSColor *successColor; NSColor *failedColor; - NSTextField *errorMessage; - ParseErrorView *errorNotification; + NSTextField *__weak errorMessage; + ParseErrorView *__weak errorNotification; - NSUndoManager *documentUndoManager; + NSUndoManager *__weak documentUndoManager; BOOL tikzChanged; BOOL justUndid; @@ -46,14 +46,14 @@ } @property BOOL tikzChanged; -@property IBOutlet GraphicsView *graphicsView; -@property IBOutlet NSTextView *sourceView; -@property IBOutlet NSTextField *status; -@property NSUndoManager *documentUndoManager; +@property (weak) IBOutlet GraphicsView *graphicsView; +@property (unsafe_unretained) IBOutlet NSTextView *sourceView; +@property (weak) IBOutlet NSTextField *status; +@property (weak) NSUndoManager *documentUndoManager; @property (copy) NSAttributedString *source; @property (copy) NSString *tikz; -@property IBOutlet ParseErrorView *errorNotification; -@property IBOutlet NSTextField *errorMessage; +@property (weak) IBOutlet ParseErrorView *errorNotification; +@property (weak) IBOutlet NSTextField *errorMessage; - (void)updateTikzFromGraph; - (void)graphChanged:(NSNotification*)n; diff --git a/tikzit/src/osx/TikzSourceController.m b/tikzit/src/osx/TikzSourceController.m index 737d771..84eb3a5 100644 --- a/tikzit/src/osx/TikzSourceController.m +++ b/tikzit/src/osx/TikzSourceController.m @@ -142,8 +142,12 @@ } - (BOOL)tryParseTikz { + NSError *thisError; + Graph *g = [TikzGraphAssembler parseTikz:[self tikz] - error:&lastError]; + error:&thisError]; + + lastError = thisError; if (g) { [graphicsView deselectAll:self]; @@ -230,9 +234,8 @@ } } -- (void)finalize { +- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - [super finalize]; } @end diff --git a/tikzit/src/osx/TikzWindowController.h b/tikzit/src/osx/TikzWindowController.h index e35b7eb..eab427c 100644 --- a/tikzit/src/osx/TikzWindowController.h +++ b/tikzit/src/osx/TikzWindowController.h @@ -11,13 +11,13 @@ @class TikzDocument, GraphicsView, TikzSourceController; @interface TikzWindowController : NSWindowController { - GraphicsView *graphicsView; - TikzSourceController *tikzSourceController; + GraphicsView *__weak graphicsView; + TikzSourceController *__weak tikzSourceController; TikzDocument *document; } -@property IBOutlet GraphicsView *graphicsView; -@property IBOutlet TikzSourceController *tikzSourceController; +@property (weak) IBOutlet GraphicsView *graphicsView; +@property (weak) IBOutlet TikzSourceController *tikzSourceController; - (id)initWithDocument:(TikzDocument*)doc; diff --git a/tikzit/src/osx/TikzWindowController.m b/tikzit/src/osx/TikzWindowController.m index 2e672d2..bfacbfb 100644 --- a/tikzit/src/osx/TikzWindowController.m +++ b/tikzit/src/osx/TikzWindowController.m @@ -16,7 +16,7 @@ @synthesize graphicsView, tikzSourceController; - (id)initWithDocument:(TikzDocument*)doc { - [super initWithWindowNibName:@"TikzDocument"]; + if (!(self = [super initWithWindowNibName:@"TikzDocument"])) return nil; document = doc; return self; } diff --git a/tikzit/src/osx/ToolPaletteController.h b/tikzit/src/osx/ToolPaletteController.h index e45c08d..6301c6b 100644 --- a/tikzit/src/osx/ToolPaletteController.h +++ b/tikzit/src/osx/ToolPaletteController.h @@ -30,13 +30,13 @@ typedef enum { } TikzTool; @interface ToolPaletteController : NSObject { - NSPanel *toolPalette; - NSMatrix *toolMatrix; + NSPanel *__weak toolPalette; + NSMatrix *__weak toolMatrix; } @property TikzTool selectedTool; -@property IBOutlet NSPanel *toolPalette; -@property IBOutlet NSMatrix *toolMatrix; +@property (weak) IBOutlet NSPanel *toolPalette; +@property (weak) IBOutlet NSMatrix *toolMatrix; @end -- cgit v1.2.3 From 4c3a82c9146aa0e147b49b429b49fefb0e785a17 Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Tue, 25 Mar 2014 17:30:35 +0000 Subject: osx gui: custom nodes preference panel shows tikzit preview and tikz code for selected custom node. --- tikzit/English.lproj/CustomNodes.xib | 256 ++++++++++++++++++++++++++++++++ tikzit/TikZiT.xcodeproj/project.pbxproj | 26 +++- tikzit/src/common/TikzShape.h | 3 + tikzit/src/common/TikzShape.m | 4 + tikzit/src/osx/CustomNodeCellView.m | 10 +- tikzit/src/osx/CustomNodeController.h | 6 +- tikzit/src/osx/CustomNodeController.m | 53 ++----- 7 files changed, 307 insertions(+), 51 deletions(-) create mode 100644 tikzit/English.lproj/CustomNodes.xib (limited to 'tikzit') diff --git a/tikzit/English.lproj/CustomNodes.xib b/tikzit/English.lproj/CustomNodes.xib new file mode 100644 index 0000000..33f6e3a --- /dev/null +++ b/tikzit/English.lproj/CustomNodes.xib @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + name + strokeThickness + strokeColor + fillColor + strokeColorIsKnown + fillColorIsKnown + representedObject.name + shapeName + scale + @distinctUnionOfObjects.category + category + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \begin{tikzpicture} + +\end{tikzpicture} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tikzit/TikZiT.xcodeproj/project.pbxproj b/tikzit/TikZiT.xcodeproj/project.pbxproj index 692181b..8e3e7c9 100644 --- a/tikzit/TikZiT.xcodeproj/project.pbxproj +++ b/tikzit/TikZiT.xcodeproj/project.pbxproj @@ -143,6 +143,8 @@ 7F938530184D178B00FAED38 /* engine.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F93852F184D178B00FAED38 /* engine.png */; }; 7F938532184D184700FAED38 /* preamble.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F938531184D184700FAED38 /* preamble.png */; }; 7FB9BFEE16B57C2E00773146 /* TikzFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FB9BFED16B57C2E00773146 /* TikzFormatter.m */; }; + 7FD5D44B18E1CB5300E2A930 /* CustomNodes.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7FD5D44918E1CB5300E2A930 /* CustomNodes.xib */; }; + 7FD5D44D18E1CC0B00E2A930 /* customshape.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FD5D44C18E1CC0B00E2A930 /* customshape.png */; }; 7FEED45716B1A7C500B056CB /* StyleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEED45616B1A7C500B056CB /* StyleManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; }; 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; }; @@ -379,6 +381,8 @@ 7F938531184D184700FAED38 /* preamble.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = preamble.png; sourceTree = ""; }; 7FB9BFEC16B57C2E00773146 /* TikzFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TikzFormatter.h; path = src/osx/TikzFormatter.h; sourceTree = ""; }; 7FB9BFED16B57C2E00773146 /* TikzFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TikzFormatter.m; path = src/osx/TikzFormatter.m; sourceTree = ""; }; + 7FD5D44A18E1CB5300E2A930 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/CustomNodes.xib; sourceTree = ""; }; + 7FD5D44C18E1CC0B00E2A930 /* customshape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = customshape.png; sourceTree = ""; }; 7FEED45516B1A7C400B056CB /* StyleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleManager.h; path = src/common/StyleManager.h; sourceTree = ""; }; 7FEED45616B1A7C500B056CB /* StyleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = StyleManager.m; path = src/common/StyleManager.m; sourceTree = ""; }; 8D15AC360486D014006FF6A4 /* TikZiT-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TikZiT-Info.plist"; sourceTree = ""; }; @@ -511,6 +515,7 @@ 55D945701165904F0044178C /* tikzitdoc.icns */, 55D945711165904F0044178C /* tikzit.icns */, 7F90E88C16DD47540069EBCD /* Preferences.xib */, + 7FD5D44918E1CB5300E2A930 /* CustomNodes.xib */, 7F18A322184C599100BC3081 /* UpdatePreferencePanel.xib */, 55391AF713D3250F007DBE71 /* Preamble.xib */, 55391AF513D324FE007DBE71 /* Preview.xib */, @@ -768,6 +773,7 @@ children = ( 7F93852F184D178B00FAED38 /* engine.png */, 7F938531184D184700FAED38 /* preamble.png */, + 7FD5D44C18E1CC0B00E2A930 /* customshape.png */, 7F93852D184D176E00FAED38 /* updates.png */, ); name = Icons; @@ -865,6 +871,7 @@ 1DDD582C0DA1D0D100B32029 /* TikzDocument.xib in Resources */, 7F938530184D178B00FAED38 /* engine.png in Resources */, 1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */, + 7FD5D44D18E1CC0B00E2A930 /* customshape.png in Resources */, 55D945721165904F0044178C /* tikzitdoc.icns in Resources */, 55D945731165904F0044178C /* tikzit.icns in Resources */, 556979431168747B007E5703 /* StylePalette.xib in Resources */, @@ -888,6 +895,7 @@ 55397C8A1449AB91006942FB /* AH_none.png in Resources */, 55397C8B1449AB91006942FB /* AH_plain_tail.png in Resources */, 55397C8D1449ABFC006942FB /* AH_latex_tail.png in Resources */, + 7FD5D44B18E1CB5300E2A930 /* CustomNodes.xib in Resources */, 55397C901449AC7C006942FB /* AH_latex_head.png in Resources */, 55397C911449AC7C006942FB /* AH_plain_head.png in Resources */, 7F18A323184C599100BC3081 /* UpdatePreferencePanel.xib in Resources */, @@ -909,11 +917,12 @@ ); name = "Run Flex"; outputPaths = ( - "$(SRCROOT)/src/common/tikzlexer.m", + "$(DERIVED_SOURCES_DIR)/tikzlexer.m", + "$(DERIVED_SOURCES_DIR)/tikzlexer.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd ${SRCROOT}/src/\nINPUT_FILE_BASE=`basename \"${SCRIPT_INPUT_FILE_0}\" .lm`\nflex -o common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.lm\nmv common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.h ${DERIVED_SOURCES_DIR}\n"; + shellScript = "cd ${SRCROOT}/src/\nexport INPUT_FILE_BASE=`basename \"${SCRIPT_INPUT_FILE_0}\" .lm`\nflex -o common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.lm\nmv common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.h ${DERIVED_SOURCES_DIR}\n"; }; 7F7B6DE118DE0A6E004F6CA8 /* Run Bison */ = { isa = PBXShellScriptBuildPhase; @@ -925,11 +934,12 @@ ); name = "Run Bison"; outputPaths = ( - "$(SRCROOT)/src/common/tikzparser.m", + "$(DERIVED_SOURCES_DIR)/tikzparser.m", + "$(DERIVED_SOURCES_DIR)/tikzparser.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd ${SRCROOT}/src/\nINPUT_FILE_BASE=`basename \"${SCRIPT_INPUT_FILE_0}\" .ym`\nflex -o common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.lm\nbison --defines=common/${INPUT_FILE_BASE}.h --output=common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.ym\nmv common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.h ${DERIVED_SOURCES_DIR}"; + shellScript = "cd ${SRCROOT}/src/\nexport INPUT_FILE_BASE=`basename \"${SCRIPT_INPUT_FILE_0}\" .ym`\nbison --defines=common/${INPUT_FILE_BASE}.h --output=common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.ym\nmv common/${INPUT_FILE_BASE}.m common/${INPUT_FILE_BASE}.h ${DERIVED_SOURCES_DIR}"; }; /* End PBXShellScriptBuildPhase section */ @@ -1124,6 +1134,14 @@ name = UserDefaults.plist; sourceTree = ""; }; + 7FD5D44918E1CB5300E2A930 /* CustomNodes.xib */ = { + isa = PBXVariantGroup; + children = ( + 7FD5D44A18E1CB5300E2A930 /* English */, + ); + name = CustomNodes.xib; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ diff --git a/tikzit/src/common/TikzShape.h b/tikzit/src/common/TikzShape.h index 1ccf658..6a91f91 100644 --- a/tikzit/src/common/TikzShape.h +++ b/tikzit/src/common/TikzShape.h @@ -25,8 +25,11 @@ #import "Shape.h" @interface TikzShape : Shape { + NSString *tikzSrc; } +@property (copy) NSString *tikzSrc; + - (id)initWithTikzFile:(NSString*)file; @end diff --git a/tikzit/src/common/TikzShape.m b/tikzit/src/common/TikzShape.m index 9735371..c07c61e 100644 --- a/tikzit/src/common/TikzShape.m +++ b/tikzit/src/common/TikzShape.m @@ -26,6 +26,8 @@ @implementation TikzShape +@synthesize tikzSrc; + - (id)initWithTikzFile:(NSString*)file { self = [super init]; if (self) { @@ -33,6 +35,8 @@ encoding:NSUTF8StringEncoding error:NULL]; if (tikz == nil) return nil; + + tikzSrc = [tikz copy]; Graph *graph = [Graph graphFromTikz:tikz]; if (graph == nil) return nil; diff --git a/tikzit/src/osx/CustomNodeCellView.m b/tikzit/src/osx/CustomNodeCellView.m index 57ef24a..612394b 100644 --- a/tikzit/src/osx/CustomNodeCellView.m +++ b/tikzit/src/osx/CustomNodeCellView.m @@ -31,8 +31,6 @@ } -(void)drawLayer:(CALayer *)layer inContext:(CGContextRef)context { - NSLog(@"drawing layer ^^"); - if (nodeLayer!=nil) { if (![[[self layer] sublayers] containsObject:nodeLayer]) { [[self layer] addSublayer:nodeLayer]; @@ -56,17 +54,23 @@ } - (void) setObjectValue:(id)objectValue{ - [[self textField] setStringValue:[(NodeStyle *)objectValue shapeName]]; + if(objectValue == nil) + return; + nodeStyle = (NodeStyle *)objectValue; + [[self textField] setStringValue:[nodeStyle shapeName]]; if (nodeLayer == nil) { nodeLayer = [[NodeLayer alloc] initWithNode:[Node node] transformer:[Transformer defaultTransformer]]; [nodeLayer setRescale:NO]; } + [nodeStyle setName:[nodeStyle shapeName]]; [[nodeLayer node] setStyle:nodeStyle]; [nodeLayer updateFrame]; + + NSLog(@"asd"); } - (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle { diff --git a/tikzit/src/osx/CustomNodeController.h b/tikzit/src/osx/CustomNodeController.h index 56cb74c..5553fcd 100644 --- a/tikzit/src/osx/CustomNodeController.h +++ b/tikzit/src/osx/CustomNodeController.h @@ -18,14 +18,16 @@ @interface CustomNodeController : NSViewController { NSDictionary* __weak nodeStyles; NSMutableArray* customNodeStyles; - NSMutableArray* __weak onodeStyles; GraphicsView *__weak graphicsView; TikzSourceController *__weak tikzSourceController; + NSTableView *customNodeTable; } @property (weak, readonly) NSDictionary *nodeStyles; -@property (weak, readonly) NSMutableArray* onodeStyles; +@property NSMutableArray* customNodeStyles; + +@property IBOutlet NSTableView *customNodeTable; @property (weak) IBOutlet GraphicsView *graphicsView; @property (weak) IBOutlet TikzSourceController *tikzSourceController; diff --git a/tikzit/src/osx/CustomNodeController.m b/tikzit/src/osx/CustomNodeController.m index ef6b5bd..4f46acc 100644 --- a/tikzit/src/osx/CustomNodeController.m +++ b/tikzit/src/osx/CustomNodeController.m @@ -15,71 +15,40 @@ @implementation CustomNodeController -@synthesize nodeStyles, onodeStyles; +@synthesize nodeStyles, customNodeStyles; @synthesize graphicsView, tikzSourceController; +@synthesize customNodeTable; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { -// [SupportDir createUserSupportDir]; -// NSString *supportDir = [SupportDir userSupportDir]; - -// NSString *ns = [supportDir stringByAppendingPathComponent:@"nodeStyles.plist"]; -// NSString *es = [supportDir stringByAppendingPathComponent:@"edgeStyles.plist"]; -// onodeStyles = (NSMutableArray*)[NSKeyedUnarchiver -// unarchiveObjectWithFile:ns]; - // edgeStyles = (NSMutableArray*)[NSKeyedUnarchiver -// unarchiveObjectWithFile:es]; - - if (onodeStyles == nil) onodeStyles = [NSMutableArray array]; -// if (edgeStyles == nil) edgeStyles = [NSMutableArray array]; - -// [[self window] setLevel:NSNormalWindowLevel]; -// [self showWindow:self]; - - // Initialization code here. - - NSLog(@"Custom Node controller up and running!"); - - nodeStyles= [Shape shapeDictionary]; - + nodeStyles = [Shape shapeDictionary]; customNodeStyles = [NSMutableArray array]; - NSLog(@"Got a shape dictionary?"); - - NSString *meh; - for(id key in nodeStyles) { Shape *value = [nodeStyles objectForKey:key]; if([value isKindOfClass:[TikzShape class]]){ - NSLog(@"Got a custom node shape!"); NodeStyle *newNodeStyle = [[NodeStyle alloc] init]; [newNodeStyle setShapeName:key]; [customNodeStyles addObject:newNodeStyle]; - [onodeStyles addObject:newNodeStyle]; - -// meh = [(TikzShape *) value tikz]; } } - - NSLog(@"Trying to display tikz."); - -// [tikzSourceController setTikz:meh]; -// [tikzSourceController parseTikz:self]; } return self; } --(NSArray *)onodeStyles{ - return onodeStyles; - //return [nodeStyles allValues]; -} - - (void)tableViewSelectionDidChange:(NSNotification *)aNotification{ - NSLog(@"Changed selection!"); + NSInteger selectedRow = [customNodeTable selectedRow]; + + NodeStyle* selectedNodeStyle = [customNodeStyles objectAtIndex:selectedRow]; + TikzShape *tikzshape = (TikzShape *) [nodeStyles objectForKey:[selectedNodeStyle shapeName]]; + + [[tikzSourceController graphicsView] setEnabled:NO]; + [tikzSourceController setTikz:[tikzshape tikzSrc]]; + [tikzSourceController parseTikz:self]; } - (id)valueForUndefinedKey:(NSString *)key{ -- cgit v1.2.3 From 32cb63c5115d1eaa1422114861514293ddd74f6d Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Tue, 25 Mar 2014 17:37:29 +0000 Subject: trading a crash for a memory leak --- tikzit/src/common/GraphElementProperty.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tikzit') diff --git a/tikzit/src/common/GraphElementProperty.m b/tikzit/src/common/GraphElementProperty.m index 3cf6632..1acdc09 100644 --- a/tikzit/src/common/GraphElementProperty.m +++ b/tikzit/src/common/GraphElementProperty.m @@ -66,7 +66,8 @@ - (void) dealloc { [key release]; - [value release]; +// the below line causes a exc_bad_access. Uncommenting it gains a memory leak but at least no crashing. +// [value release]; [super dealloc]; } -- cgit v1.2.3 From 1e65c32b799b7ca262f266737a867240eeb451f8 Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Tue, 25 Mar 2014 20:41:44 +0000 Subject: fixing a couple of attributes that stopped selectable nodes from showing --- tikzit/src/osx/AppDelegate.h | 4 ++-- tikzit/src/osx/CustomNodeController.h | 4 ++-- tikzit/src/osx/GraphicsView.h | 4 ++-- tikzit/src/osx/NodeLayer.h | 4 ++-- tikzit/src/osx/NodeSelectionLayer.h | 4 ++-- tikzit/src/osx/StylePaletteController.h | 18 +++++++++--------- 6 files changed, 19 insertions(+), 19 deletions(-) (limited to 'tikzit') diff --git a/tikzit/src/osx/AppDelegate.h b/tikzit/src/osx/AppDelegate.h index 0f9d787..67389e4 100644 --- a/tikzit/src/osx/AppDelegate.h +++ b/tikzit/src/osx/AppDelegate.h @@ -37,13 +37,13 @@ PreambleController *preambleController; PreviewController *previewController; PreferenceController *preferenceController; - ToolPaletteController *__weak toolPaletteController; + ToolPaletteController *toolPaletteController; IBOutlet GraphicsView *graphicsView; NSString *tempDir; } @property IBOutlet StylePaletteController *stylePaletteController; -@property (weak) IBOutlet ToolPaletteController *toolPaletteController; +@property (strong) IBOutlet ToolPaletteController *toolPaletteController; - (void)awakeFromNib; + (void)setDefaults; diff --git a/tikzit/src/osx/CustomNodeController.h b/tikzit/src/osx/CustomNodeController.h index 5553fcd..67adf0b 100644 --- a/tikzit/src/osx/CustomNodeController.h +++ b/tikzit/src/osx/CustomNodeController.h @@ -16,7 +16,7 @@ #import "SupportDir.h" @interface CustomNodeController : NSViewController { - NSDictionary* __weak nodeStyles; + NSDictionary *nodeStyles; NSMutableArray* customNodeStyles; GraphicsView *__weak graphicsView; @@ -24,7 +24,7 @@ NSTableView *customNodeTable; } -@property (weak, readonly) NSDictionary *nodeStyles; +@property NSDictionary *nodeStyles; @property NSMutableArray* customNodeStyles; @property IBOutlet NSTableView *customNodeTable; diff --git a/tikzit/src/osx/GraphicsView.h b/tikzit/src/osx/GraphicsView.h index c3c2add..329b1e5 100644 --- a/tikzit/src/osx/GraphicsView.h +++ b/tikzit/src/osx/GraphicsView.h @@ -92,12 +92,12 @@ typedef enum { NSUndoManager *documentUndoManager; NSPoint startPoint; - TikzSourceController *__weak tikzSourceController; + TikzSourceController *tikzSourceController; } @property BOOL enabled; @property (weak) Graph *graph; -@property (weak) IBOutlet TikzSourceController *tikzSourceController; +@property IBOutlet TikzSourceController *tikzSourceController; @property (readonly) Transformer *transformer; @property (readonly) PickSupport *pickSupport; diff --git a/tikzit/src/osx/NodeLayer.h b/tikzit/src/osx/NodeLayer.h index d2a943b..dbcdac5 100644 --- a/tikzit/src/osx/NodeLayer.h +++ b/tikzit/src/osx/NodeLayer.h @@ -30,7 +30,7 @@ #import "NodeSelectionLayer.h" @interface NodeLayer : CALayer { - Node *__weak node; + Node *node; Shape *shape; CGMutablePathRef path; float textwidth; @@ -42,7 +42,7 @@ BOOL dirty; // need to rebuild CGBezierPath of the shape } -@property (weak) Node *node; +@property (strong) Node *node; @property (assign) NSPoint center; @property (assign) BOOL rescale; @property (strong) NodeSelectionLayer *selection; diff --git a/tikzit/src/osx/NodeSelectionLayer.h b/tikzit/src/osx/NodeSelectionLayer.h index 68d5beb..99ee75f 100644 --- a/tikzit/src/osx/NodeSelectionLayer.h +++ b/tikzit/src/osx/NodeSelectionLayer.h @@ -31,10 +31,10 @@ BOOL selected; CGMutablePathRef path; NSLock *drawLock; - NodeLayer *__weak nodeLayer; + NodeLayer *nodeLayer; } -@property (weak) NodeLayer *nodeLayer; +@property NodeLayer *nodeLayer; - (id)init; - (void)select; diff --git a/tikzit/src/osx/StylePaletteController.h b/tikzit/src/osx/StylePaletteController.h index 51404bb..0242b61 100644 --- a/tikzit/src/osx/StylePaletteController.h +++ b/tikzit/src/osx/StylePaletteController.h @@ -28,8 +28,8 @@ @class SFBInspectorView; @interface StylePaletteController : NSWindowController { - NSMutableArray *__weak nodeStyles; - NSMutableArray *__weak edgeStyles; + NSMutableArray *nodeStyles; + NSMutableArray *edgeStyles; IBOutlet NSArrayController *nodeStyleArrayController; IBOutlet NSArrayController *filteredNodeStyleArrayController; IBOutlet NSArrayController *edgeStyleArrayController; @@ -43,15 +43,15 @@ NSString *displayedEdgeStyleCategory; } -@property (weak, readonly) NSMutableArray *nodeStyles; -@property (weak, readonly) NSMutableArray *edgeStyles; -@property (readonly) BOOL documentActive; -@property (weak) NodeStyle *activeNodeStyle; -@property (weak) EdgeStyle *activeEdgeStyle; +@property (strong) NSMutableArray *nodeStyles; +@property (strong) NSMutableArray *edgeStyles; +@property BOOL documentActive; +@property (strong) NodeStyle *activeNodeStyle; +@property (strong) EdgeStyle *activeEdgeStyle; @property (copy) NSString *displayedNodeStyleCategory; @property (copy) NSString *displayedEdgeStyleCategory; -@property (weak, readonly) NSPredicate *displayedNodeStylePredicate; -@property (weak, readonly) NSPredicate *displayedEdgeStylePredicate; +@property (weak) NSPredicate *displayedNodeStylePredicate; +@property (weak) NSPredicate *displayedEdgeStylePredicate; //@property NSString *nodeLabel; -- cgit v1.2.3 From 53009ac3c49cab59f4e5384d0500a5729e847555 Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Tue, 25 Mar 2014 20:53:30 +0000 Subject: minor semantical errors --- tikzit/src/osx/AppDelegate.h | 2 +- tikzit/src/osx/AppDelegate.m | 2 +- tikzit/src/osx/StylePaletteController.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tikzit') diff --git a/tikzit/src/osx/AppDelegate.h b/tikzit/src/osx/AppDelegate.h index 67389e4..92d9add 100644 --- a/tikzit/src/osx/AppDelegate.h +++ b/tikzit/src/osx/AppDelegate.h @@ -28,7 +28,7 @@ #import "PreambleController.h" #import "PreviewController.h" #import "GraphicsView.h" -#import "PreferenceController.h"; +#import "PreferenceController.h" @interface AppDelegate : NSObject { NSMapTable *table; diff --git a/tikzit/src/osx/AppDelegate.m b/tikzit/src/osx/AppDelegate.m index 35484b7..94f5507 100644 --- a/tikzit/src/osx/AppDelegate.m +++ b/tikzit/src/osx/AppDelegate.m @@ -110,7 +110,7 @@ } - (IBAction)togglePreamble:(id)sender { - [self toggleController:preambleController]; + [self toggleController:(NSWindowController *) preambleController]; } - (IBAction)togglePreferences:(id)sender { diff --git a/tikzit/src/osx/StylePaletteController.h b/tikzit/src/osx/StylePaletteController.h index 0242b61..05f0684 100644 --- a/tikzit/src/osx/StylePaletteController.h +++ b/tikzit/src/osx/StylePaletteController.h @@ -45,13 +45,13 @@ @property (strong) NSMutableArray *nodeStyles; @property (strong) NSMutableArray *edgeStyles; -@property BOOL documentActive; +@property (readonly) BOOL documentActive; @property (strong) NodeStyle *activeNodeStyle; @property (strong) EdgeStyle *activeEdgeStyle; @property (copy) NSString *displayedNodeStyleCategory; @property (copy) NSString *displayedEdgeStyleCategory; -@property (weak) NSPredicate *displayedNodeStylePredicate; -@property (weak) NSPredicate *displayedEdgeStylePredicate; +@property (readonly) NSPredicate *displayedNodeStylePredicate; +@property (readonly) NSPredicate *displayedEdgeStylePredicate; //@property NSString *nodeLabel; -- cgit v1.2.3 From db9056504a45f3df48952b79995781a85514f8ba Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Tue, 25 Mar 2014 21:14:47 +0000 Subject: Changed deprecated method Changed directoryContentsAtPath: deprecated in 10.5 to contentsOfDirectoryAtPath:error: introduced in 10.5 --- tikzit/src/common/Shape.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tikzit') diff --git a/tikzit/src/common/Shape.m b/tikzit/src/common/Shape.m index eb466e2..5dc25e3 100644 --- a/tikzit/src/common/Shape.m +++ b/tikzit/src/common/Shape.m @@ -88,7 +88,8 @@ NSDictionary *shapeDictionary = nil; + (void)addShapesInDir:(NSString*)shapeDir to:(NSMutableDictionary*)shapeDict { NSFileManager *fileManager = [NSFileManager defaultManager]; - NSArray *files = [fileManager directoryContentsAtPath:shapeDir]; + NSError *err = nil; + NSArray *files = [fileManager contentsOfDirectoryAtPath:shapeDir error:&err]; if (files != nil) { NSString *nm; -- cgit v1.2.3 From 08be64f38faef12393854ee4da484b144752d77e Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Tue, 25 Mar 2014 21:34:12 +0000 Subject: gui: adding a couple of preference options Added preference options for autocompletion and inspectors on top. --- tikzit/English.lproj/PropertyInspector.xib | 4548 +++++--------------------- tikzit/src/osx/PreferenceController.m | 6 +- tikzit/src/osx/Preferences.xib | 301 +- tikzit/src/osx/PropertyInspectorController.m | 7 +- tikzit/src/osx/StylePaletteController.m | 7 +- tikzit/src/osx/TikzFormatter.m | 4 + 6 files changed, 1052 insertions(+), 3821 deletions(-) (limited to 'tikzit') diff --git a/tikzit/English.lproj/PropertyInspector.xib b/tikzit/English.lproj/PropertyInspector.xib index 91e30c3..9f19b5c 100644 --- a/tikzit/English.lproj/PropertyInspector.xib +++ b/tikzit/English.lproj/PropertyInspector.xib @@ -1,3779 +1,769 @@ - - - - 1070 - 12C60 - 2844 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 2844 - - - IBCustomFormatter - NSArrayController - NSBox - NSButton - NSButtonCell - NSComboBox - NSComboBoxCell - NSCustomObject - NSCustomView - NSScrollView - NSScroller - NSTableColumn - NSTableHeaderView - NSTableView - NSTextField - NSTextFieldCell - NSView - NSWindowTemplate - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - PropertyInspectorController - - - FirstResponder - - - NSApplication - - - 151 - 2 - {{1219, 531}, {193, 256}} - -1540357120 - Property Inspector - NSPanel - - - {200, 230} - - - 256 - - - - 274 - {193, 256} - - - SFBInspectorView - - - {193, 256} - - - - {{0, 0}, {1920, 1200}} - {200, 246} - {10000000000000, 10000000000000} - YES - - - - 268 - - - - 268 - - - - 2304 - - - - 256 - {183, 74} - - - YES - NO - YES - - - 256 - {183, 17} - - - - - - - -2147483392 - {{224, 0}, {16, 17}} - - - - - 85 - 40 - 1000 - - 75497536 - 2048 - Key/Atom - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337641536 - 2048 - Text Cell - - LucidaGrande - 11 - 16 - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - - 92 - 40 - 1000 - - 75497536 - 2048 - Value - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3 - 2 - - 3 - MQA - - - 6 - System - gridColor - - 3 - MC41AA - - - 17 - -700448768 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {183, 74}} - - - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - NO - - _doScroller: - 0.87903225806451613 - - - - -2147483392 - {{1, 75}, {183, 16}} - - - NO - 1 - - _doScroller: - 0.99450549450549453 - - - - 2304 - - - - {{1, 0}, {183, 17}} - - - - - 4 - - - {{4, 31}, {185, 92}} - - - 133682 - - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 268 - {{54, 127}, {134, 19}} - - - YES - - -1804599231 - 272630784 - - - - YES - - 6 - System - textBackgroundColor - - - - 6 - System - textColor - - - - NO - - - - 292 - {{53, 3}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - LucidaGrande - 13 - 1044 - - - -2033434624 - 162 - - NSImage - NSRemoveTemplate - - - - 400 - 75 - - NO - - - - 292 - {{28, 3}, {26, 26}} - - - YES - - -2080374784 - 134217728 - a - - LucidaGrande - 9 - 16 - - - -2033434624 - 162 - - NSImage - NSAddTemplate - - - - 400 - 75 - - NO - - - - 292 - {{4, 3}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2032386048 - 162 - - - - 400 - 75 - - NO - - - - 268 - {{7, 128}, {38, 14}} - - - YES - - 68157504 - 272630784 - Label - - LucidaGrande-Bold - 11 - 16 - - - - 6 - System - controlColor - - - - - NO - - - {193, 152} - - - NSView - - - - 268 - - - - 268 - - - - 2304 - - - - 256 - {183, 74} - - - YES - NO - YES - - - 256 - {183, 17} - - - - - - - -2147483392 - {{224, 0}, {16, 17}} - - - - - 85 - 40 - 1000 - - 75497536 - 2048 - Key/Atom - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 92 - 40 - 1000 - - 75497536 - 2048 - Value - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3 - 2 - - - 17 - -700448768 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {183, 74}} - - - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - NO - - _doScroller: - 0.87903225806451613 - - - - -2147483392 - {{1, 75}, {183, 16}} - - - NO - 1 - - _doScroller: - 0.99450549450549453 - - - - 2304 - - - - {{1, 0}, {183, 17}} - - - - - 4 - - - {{4, 33}, {185, 92}} - - - 133682 - - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 292 - {{53, 4}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{28, 4}, {26, 26}} - - - YES - - -2080374784 - 134217728 - a - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{4, 4}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2032386048 - 162 - - - - 400 - 75 - - NO - - - {193, 130} - - - NSView - - - - 268 - - - - 268 - {{59, 152}, {133, 26}} - - - _NS:9 - YES - - 342884416 - 272630784 - - - _NS:9 - - YES - - - 5 - YES - YES - - - - 274 - {13, 0} - - - _NS:24 - YES - NO - YES - - - 10 - 10 - 1000 - - 75497472 - 0 - - - LucidaGrande - 12 - 16 - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 338690112 - 1024 - - - YES - - - - 3 - YES - - - - 3 - 2 - - - 19 - tableViewAction: - -765427712 - - - - 1 - 15 - 0 - YES - 0 - 1 - - - NO - - - - 268 - {{59, 178}, {133, 26}} - - - _NS:9 - YES - - 342884416 - 272630784 - - - _NS:9 - - YES - - - 5 - YES - YES - - - - 274 - {13, 0} - - - _NS:24 - YES - NO - YES - - - 10 - 10 - 1000 - - 75497472 - 0 - - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 338690112 - 1024 - - - YES - - - - 3 - YES - - - - 3 - 2 - - - 19 - tableViewAction: - -765427712 - - - - 1 - 15 - 0 - YES - 0 - 1 - - - NO - - - - 12 - {{4, 146}, {185, 5}} - - - {0, 0} - - 67108864 - 0 - Box - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - 3 - 2 - 0 - NO - - - - 268 - {{55, 107}, {134, 19}} - - - YES - - -1804599231 - 272630784 - - - - YES - - - - NO - - - - 268 - {{12, 159}, {42, 14}} - - - YES - - 68157504 - 272630784 - Target - - - - - - NO - - - - 268 - {{12, 185}, {42, 14}} - - - YES - - 68157504 - 272630784 - Source - - - - - - NO - - - - 268 - {{4, 202}, {51, 14}} - - - YES - - 68157504 - 272630784 - Anchors - - - - - - NO - - - - 268 - {{8, 107}, {38, 14}} - - - YES - - 68157504 - 272630784 - Label - - - - - - NO - - - - 268 - {{3, 126}, {82, 18}} - - - YES - - 67108864 - 0 - Child Node - - - 1211912448 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - NO - - - - 268 - - - - 2304 - - - - 256 - {183, 44} - - - YES - NO - YES - - - 256 - {183, 17} - - - - - - - -2147483392 - {{224, 0}, {16, 17}} - - - - 85 - 40 - 1000 - - 75497536 - 2048 - Key/Atom - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 92 - 40 - 1000 - - 75497536 - 2048 - Value - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3 - 2 - - - 17 - -700448768 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {183, 44}} - - - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - NO - - _doScroller: - 0.87903225806451613 - - - - -2147483392 - {{1, 45}, {183, 16}} - - - NO - 1 - - _doScroller: - 0.99450549450549453 - - - - 2304 - - - - {{1, 0}, {183, 17}} - - - - - 4 - - - {{4, 37}, {185, 62}} - - - 133682 - - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 268 - - - - 2304 - - - - 256 - {183, 74} - - - YES - NO - YES - - - 256 - {183, 17} - - - - - - - -2147483392 - {{224, 0}, {16, 17}} - - - - - 85 - 40 - 1000 - - 75497536 - 2048 - Key/Atom - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 92 - 40 - 1000 - - 75497536 - 2048 - Value - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3 - 2 - - - 17 - -700448768 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {183, 74}} - - - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - NO - - _doScroller: - 0.87903225806451613 - - - - -2147483392 - {{1, 75}, {183, 16}} - - - NO - 1 - - _doScroller: - 0.99450549450549453 - - - - 2304 - - - - {{1, 0}, {183, 17}} - - - - - 4 - - - {{4, 247}, {185, 92}} - - - 133682 - - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 292 - {{53, 8}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{28, 8}, {26, 26}} - - - YES - - -2080374784 - 134217728 - a - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{4, 8}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2032386048 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{53, 218}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{28, 218}, {26, 26}} - - - YES - - -2080374784 - 134217728 - a - - - -2033434624 - 162 - - - - 400 - 75 - - NO - - - - 292 - {{4, 218}, {26, 26}} - - - YES - - -2080374784 - 134217728 - - - - -2032386048 - 162 - - - - 400 - 75 - - NO - - - {193, 344} - - - NSView - - - - key - value - isAtom - - Property - YES - - YES - YES - YES - YES - YES - - - - key - value - isAtom - - Property - YES - - YES - YES - YES - YES - YES - - - - key - value - isAtom - - Property - YES - - YES - YES - YES - YES - YES - - - - key - value - isAtom - - Property - YES - - YES - YES - YES - YES - YES - - - - label - - Node - YES - - YES - YES - YES - YES - YES - - - - edgeNode - - Edge - YES - - YES - YES - YES - YES - YES - - - - 268 - {51, 14} - - YES - - 68157504 - 272630784 - Anchors - - - - - - NO - - - - 268 - {134, 19} - YES - - -1804599231 - 272630784 - - - - YES - - - - NO - - - YES - - YES - YES - YES - YES - YES - - - YES - - YES - YES - YES - YES - YES - - - - - - - - nodePropertiesView - - - - 188 - - - - nodeDataArrayController - - - - 282 - - - - addNodeProperty: - - - - 348 - - - - addNodeAtom: - - - - 349 - - - - graphDataArrayController - - - - 350 - - - - addGraphProperty: - - - - 351 - - - - addGraphAtom: - - - - 352 - - - - graphPropertiesView - - - - 354 - - - - removeGraphProperty: - - - - 358 - - - - removeNodeProperty: - - - - 359 - - - - edgePropertiesView - - - - 389 - - - - edgeDataArrayController - - - - 390 - - - - addEdgeProperty: - - - - 391 - - - - addEdgeAtom: - - - - 392 - - - - removeEdgeProperty: - - - - 393 - - - - addEdgeNodeProperty: - - - - 449 - - - - addEdgeNodeAtom: - - - - 450 - - - - removeEdgeNodeProperty: - - - - 451 - - - - edgeNodeDataArrayController - - - - 452 - - - - edgeNodeLabelField - - - - 453 - - - - edgeNodeCheckbox - - - - 454 - - - - propertyInspectorView - - - - 464 - - - - window - - - - 567 - - - - selectedNodesArrayController - - - - 583 - - - - selectedEdgesArrayController - - - - 586 - - - - refreshDocument: - - - - 596 - - - - sourceAnchorNamesArrayController - - - - 678 - - - - targetAnchorNamesArrayController - - - - 682 - - - - sourceAnchorComboBox - - - - 716 - - - - targetAnchorComboBox - - - - 717 - - - - delegate - - - - 584 - - - - value: selection.label - - - - - - value: selection.label - value - selection.label - - Multiple Values - NilToEmptyStringTransformer - - 2 - - - 644 - - - - formatter - - - - 719 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 615 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 297 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 278 - - - - delegate - - - - 290 - - - - enabled: isEditable - - - - - - enabled: isEditable - enabled - isEditable - 2 - - - 622 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 650 - - - - value: arrangedObjects.key - - - - - - value: arrangedObjects.key - value - arrangedObjects.key - 2 - - - 274 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 277 - - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 281 - - - - formatter - - - - 733 - - - - formatter - - - - 734 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 618 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 347 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 643 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 640 - - - - delegate - - - - 331 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 346 - - - - enabled: isEditable - - - - - - enabled: isEditable - enabled - isEditable - 2 - - - 638 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 652 - - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 356 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 357 - - - - value: arrangedObjects.key - - - - - - value: arrangedObjects.key - value - arrangedObjects.key - - NSValueTransformerName - NilToEmptyStringTransformer - - 2 - - - 645 - - - - formatter - - - - 728 - - - - formatter - - - - 727 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 612 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 624 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 394 - - - - delegate - - - - 382 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 401 - - - - enabled: isEditable - - - - - - enabled: isEditable - enabled - isEditable - 2 - - - 630 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 654 - - - - value: arrangedObjects.key - - - - - - value: arrangedObjects.key - value - arrangedObjects.key - - NSValueTransformerName - NilToEmptyStringTransformer - - 2 - - - 646 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 405 - - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 467 - - - - formatter - - - - 730 - - - - formatter - - - - 729 - - - - delegate - - - - 421 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 443 - - - - enabled: isEditable - - - - - - enabled: isEditable - enabled - isEditable - 2 - - - 632 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 656 - - - - formatter - - - - 724 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 445 - - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 459 - - - - value: arrangedObjects.key - - - - - - value: arrangedObjects.key - value - arrangedObjects.key - - NSValueTransformerName - NilToEmptyStringTransformer - - 2 - - - 647 - - - - formatter - - - - 731 - - - - formatter - - - - 732 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 626 - - - - enabled: canAdd - - - - - - enabled: canAdd - enabled - canAdd - 2 - - - 628 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 460 - - - - value: selection.hasEdgeNode - - - - - - value: selection.hasEdgeNode - value - selection.hasEdgeNode - 2 - - - 595 - - - - delegate - - - - 440 - - - - enabled: selection.hasEdgeNode - - - - - - enabled: selection.hasEdgeNode - enabled - selection.hasEdgeNode - 2 - - - 636 - - - - value: selection.edgeNode.label - - - - - - value: selection.edgeNode.label - value - selection.edgeNode.label - - NSValueTransformerName - NilToEmptyStringTransformer - - 2 - - - 648 - - - - formatter - - - - 723 - - - - contentArray: selectedNodes - - - - - - contentArray: selectedNodes - contentArray - selectedNodes - 2 - - - 577 - - - - contentArray: selectedEdges - - - - - - contentArray: selectedEdges - contentArray - selectedEdges - 2 - - - 589 - - - - enabled: selection.hasEdgeNode - - - - - - enabled: selection.hasEdgeNode - enabled - selection.hasEdgeNode - 2 - - - 661 - - - - value: selection.edgeNode.label - - - - - - value: selection.edgeNode.label - value - selection.edgeNode.label - - NSValueTransformerName - NilToEmptyStringTransformer - - 2 - - - 662 - - - - delegate - - - - 663 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 707 - - - - contentValues: arrangedObjects - - - - - - contentValues: arrangedObjects - contentValues - arrangedObjects - - 2 - - - 708 - - - - value: selection.sourceAnchor - - - - - - value: selection.sourceAnchor - value - selection.sourceAnchor - - 2 - - - 709 - - - - delegate - - - - 714 - - - - formatter - - - - 726 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 710 - - - - contentValues: arrangedObjects - - - - - - contentValues: arrangedObjects - contentValues - arrangedObjects - - 2 - - - 711 - - - - value: selection.targetAnchor - - - - - - value: selection.targetAnchor - value - selection.targetAnchor - - 2 - - - 713 - - - - delegate - - - - 715 - - - - formatter - - - - 725 - - - - content - - - - 675 - - - - contentArray: sourceAnchorNames - - - - - - contentArray: sourceAnchorNames - contentArray - sourceAnchorNames - 2 - - - 680 - - - - contentArray: targetAnchorNames - - - - - - contentArray: targetAnchorNames - contentArray - targetAnchorNames - 2 - - - 684 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 185 - - - - - - - - - - - Node Properties View - - - 189 - - - - - - - - 190 - - - - - 191 - - - - - - - - 192 - - - - - 206 - - - - - - - - 207 - - - - - - - - 208 - - - - - 209 - - - - - 258 - - - - - - - - - - - 259 - - - - - 260 - - - - - 261 - - - - - - - - - 262 - - - - - 263 - - - - - - - - 264 - - - - - - - - 265 - - - - - 266 - - - - - 272 - - - Node Data Array Controller - - - 283 - - - - - - - - 284 - - - - - 301 - - - - - - - - - Graph Properties View - - - 302 - - - - - - - - 303 - - - - - - - - 304 - - - - - - - - - - - 307 - - - - - - - - 314 - - - - - 317 - - - - - 318 - - - - - - - - - 319 - - - - - 320 - - - - - 321 - - - - - - - - 322 - - - - - - - - 323 - - - - - 324 - - - - - 325 - - - - - 326 - - - - - 343 - - - Graph Data Array Controller - - - 360 - - - Edge Data Array Controller - - - 361 - - - - - - - - - - - - - - - - - - - - - - Edge Properties View - - - 362 - - - - - - - - 363 - - - - - - - - - - - 364 - - - - - - - - 365 - - - - - - - - 366 - - - - - 367 - - - - - 368 - - - - - 369 - - - - - 370 - - - - - - - - - 371 - - - - - 372 - - - - - - - - 373 - - - - - - - - 374 - - - - - 375 - - - - - 376 - - - - - 408 - - - - - - - - - - - 409 - - - - - 410 - - - - - - - - - 411 - - - - - 412 - - - - - 413 - - - - - - - - 414 - - - - - - - - 415 - - - - - 416 - - - - - 422 - - - - - - - - 423 - - - - - - - - 424 - - - - - - - - 425 - - - - - 426 - - - - - 427 - - - - - 434 - - - - - - - - 435 - - - - - 436 - - - - - - - - 437 - - - - - - - - 438 - - - - - 439 - - - - - 441 - - - - - 442 - - - Edge Node Data Array Controller - - - 461 - - - - - - - - 462 - - - - - - - - 463 - - - - - 575 - - - Selected Nodes Array Controller - - - 585 - - - Selected Edges Array Controller - - - 657 - - - - - - - - 658 - - - - - - - - 659 - - - - - 660 - - - - - 664 - - - - - - - - 665 - - - - - 666 - - - - - - - - 667 - - - - - 668 - - - - - - - - 669 - - - - - 670 - - - - - - - - 671 - - - - - 672 - - - - - - - - 673 - - - - - 674 - - - Source Anchor Names Array Controller - - - 681 - - - Target Anchor Names Array Controller - - - 718 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - {{624, 540}, {193, 256}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - TikzFormatter - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 734 - - - - - FirstResponder - - id - id - - - - applyStyleToSelectedNodes: - id - - - clearStyleOfSelectedNodes: - id - - - - IBUserSource - - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - {8, 8} - {8, 8} - {15, 15} - - - - - - NSFormatter - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Multiple Values + NilToEmptyStringTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NilToEmptyStringTransformer + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NilToEmptyStringTransformer + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NilToEmptyStringTransformer + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NilToEmptyStringTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + key + value + isAtom + + + + + key + value + isAtom + + + + + key + value + isAtom + + + + + key + value + isAtom + + + + + label + + + + + + + + edgeNode + + + + + + + + + + + + + + + + + + + + + + + + + + + NilToEmptyStringTransformer + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tikzit/src/osx/PreferenceController.m b/tikzit/src/osx/PreferenceController.m index 099bf48..e785358 100644 --- a/tikzit/src/osx/PreferenceController.m +++ b/tikzit/src/osx/PreferenceController.m @@ -104,9 +104,9 @@ [[[self window] contentView] replaceSubview:customNodeView with:[customNodeController view]]; customNodeView = [customNodeController view]; - [[self window] setContentSize:[preambleView frame].size]; - [[[self window] contentView] addSubview:preambleView]; - currentViewTag = 3; + [[self window] setContentSize:[engineView frame].size]; + [[[self window] contentView] addSubview:engineView]; + currentViewTag = 1; } - (IBAction)switchView:(id)sender { diff --git a/tikzit/src/osx/Preferences.xib b/tikzit/src/osx/Preferences.xib index 155cf71..1be3f9f 100644 --- a/tikzit/src/osx/Preferences.xib +++ b/tikzit/src/osx/Preferences.xib @@ -2,13 +2,13 @@ 1070 - 13A603 - 4514 - 1265 - 695.00 + 13C64 + 5053 + 1265.19 + 697.40 com.apple.InterfaceBuilder.CocoaPlugin - 4514 + 5053 IBNSLayoutConstraint @@ -100,7 +100,7 @@ {0, 0} YES YES - 0 + 1 YES 0 @@ -179,8 +179,8 @@ + - @@ -202,33 +202,33 @@ 268 - + 268 - {{18, 15}, {214, 18}} + {{18, 106}, {219, 18}} _NS:9 YES - + -2080374784 268435456 - Bring preview window to focus + Keep inspector windows on top .LucidaGrandeUI 13 1044 _NS:9 - + 1211912448 2 - + NSImage NSSwitch - + NSSwitch @@ -238,10 +238,64 @@ NO + + + 268 + {{18, 126}, {168, 18}} + + + + _NS:9 + YES + + -2080374784 + 268435456 + Autocomplete brackets + + _NS:9 + + 1211912448 + 2 + + + + + 200 + 25 + + NO + + + + 268 + {{18, 18}, {214, 18}} + + + + _NS:9 + YES + + -2080374784 + 268435456 + Bring preview window to focus + + _NS:9 + + 1211912448 + 2 + + + + + 200 + 25 + + NO + 268 - {{20, 39}, {440, 22}} + {{20, 42}, {440, 22}} @@ -280,7 +334,7 @@ 268 - {{18, 69}, {140, 17}} + {{18, 72}, {140, 17}} @@ -313,10 +367,10 @@ 1 - {480, 96} + {480, 162} - + _NS:9 NSView @@ -498,6 +552,38 @@ 62 + + + value: values.net.sourceforge.tikzit.autocomplete + + + + + + value: values.net.sourceforge.tikzit.autocomplete + value + values.net.sourceforge.tikzit.autocomplete + 2 + + + 149 + + + + value: values.net.sourceforge.tikzit.inspectorsontop + + + + + + value: values.net.sourceforge.tikzit.inspectorsontop + value + values.net.sourceforge.tikzit.inspectorsontop + 2 + + + 150 + @@ -565,6 +651,24 @@ 13 + + + 4 + 0 + + 4 + 1 + 1 + + 20 + + 1000 + + 8 + 23 + 3 + NO + 3 @@ -572,6 +676,7 @@ 4 1 + 1 8 @@ -589,6 +694,7 @@ 5 1 + 1 20 @@ -606,6 +712,7 @@ 6 1 + 1 20 @@ -623,6 +730,7 @@ 4 1 + 1 8 @@ -640,6 +748,7 @@ 5 1 + 1 20 @@ -650,43 +759,101 @@ 3 NO - + - 3 + 5 0 - 3 + 5 1 + 1 + + 20 + + 1000 + + 0 + 29 + 3 + NO + + + + 5 + 0 + + 5 + 1 + 1 - 10 + 0.0 + + 1000 + + 6 + 24 + 2 + NO + + + + 3 + 0 + + 4 + 1 + 1 + + 6 1000 - 3 - 9 + 6 + 24 3 NO - - + + 5 0 - + 5 1 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + NO + + + + 3 + 0 + + 3 + 1 + 1 20 1000 - 0 - 29 + 8 + 23 3 NO + + @@ -714,11 +881,6 @@ - - 31 - - - 32 @@ -806,6 +968,57 @@ + + 126 + + + + + 127 + + + + + + + + 128 + + + + + 130 + + + + + 131 + + + + + + + + 132 + + + + + 134 + + + + + 135 + + + + + 153 + + + @@ -822,23 +1035,37 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + - + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -858,7 +1085,7 @@ - 125 + 153 diff --git a/tikzit/src/osx/PropertyInspectorController.m b/tikzit/src/osx/PropertyInspectorController.m index 981f746..039a30f 100644 --- a/tikzit/src/osx/PropertyInspectorController.m +++ b/tikzit/src/osx/PropertyInspectorController.m @@ -56,7 +56,12 @@ [self setTargetAnchorNames: [[NSMutableArray alloc] initWithArray:[@"north south west east" componentsSeparatedByString:@" "]]]; - [[self window] setLevel:NSNormalWindowLevel]; + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"net.sourceforge.tikzit.inspectorsontop"] == YES) { + [[self window] setLevel:NSFloatingWindowLevel]; + } else { + [[self window] setLevel:NSNormalWindowLevel]; + } + [self showWindow:self]; return self; } diff --git a/tikzit/src/osx/StylePaletteController.m b/tikzit/src/osx/StylePaletteController.m index 8f87bd9..4fe46be 100644 --- a/tikzit/src/osx/StylePaletteController.m +++ b/tikzit/src/osx/StylePaletteController.m @@ -50,7 +50,12 @@ if (nodeStyles == nil) nodeStyles = [NSMutableArray array]; if (edgeStyles == nil) edgeStyles = [NSMutableArray array]; - [[self window] setLevel:NSNormalWindowLevel]; + if ([[NSUserDefaults standardUserDefaults] boolForKey:@"net.sourceforge.tikzit.inspectorsontop"] == YES) { + [[self window] setLevel:NSFloatingWindowLevel]; + } else { + [[self window] setLevel:NSNormalWindowLevel]; + } + [self showWindow:self]; } diff --git a/tikzit/src/osx/TikzFormatter.m b/tikzit/src/osx/TikzFormatter.m index 9e45cb6..cb0865d 100644 --- a/tikzit/src/osx/TikzFormatter.m +++ b/tikzit/src/osx/TikzFormatter.m @@ -50,6 +50,10 @@ NSRange addedRange; NSString *addedString; + if(![[NSUserDefaults standardUserDefaults] boolForKey:@"net.sourceforge.tikzit.autocomplete"]){ + return YES; + } + addedRange = NSMakeRange(origSelRange.location, proposedSelRangePtr->location - origSelRange.location); addedString = [*partialStringPtr substringWithRange: addedRange]; -- cgit v1.2.3 From ea5abf33c1291fb82614da763b330d938a07e80c Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Wed, 18 Feb 2015 08:04:07 -0800 Subject: Missed a general Xcode file --- .../xcshareddata/TikZiT.xccheckout | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout (limited to 'tikzit') diff --git a/tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout b/tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout new file mode 100644 index 0000000..2cc312b --- /dev/null +++ b/tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 26857C1F-E0FE-4FFB-BDAC-44158C649772 + IDESourceControlProjectName + TikZiT + IDESourceControlProjectOriginsDictionary + + F6FA2C351D428A0F1026539971510A626DEEFF59 + https://git.code.sf.net/p/tikzit/code + + IDESourceControlProjectPath + tikzit/TikZiT.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + F6FA2C351D428A0F1026539971510A626DEEFF59 + ../../.. + + IDESourceControlProjectURL + https://git.code.sf.net/p/tikzit/code + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + F6FA2C351D428A0F1026539971510A626DEEFF59 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + F6FA2C351D428A0F1026539971510A626DEEFF59 + IDESourceControlWCCName + tikzit-code + + + + -- cgit v1.2.3 From 4b68c2351d4ed7fc8ba02552b36b7d1f296a97ae Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Tue, 25 Mar 2014 17:47:20 +0000 Subject: dummy commit --- tikzit/README | 1 - 1 file changed, 1 deletion(-) (limited to 'tikzit') diff --git a/tikzit/README b/tikzit/README index e5d3c64..4d3eab1 100644 --- a/tikzit/README +++ b/tikzit/README @@ -5,4 +5,3 @@ For more info, see http://tikzit.sf.net On OS/X, the Cocoa framework is used. On other platforms, GTK+ and GNUstep are used. - -- cgit v1.2.3 From 8233df2ddd3133618be536c5423cdc6a40b4a20c Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Wed, 25 Feb 2015 10:19:18 -0800 Subject: Xcode friendly gitignore --- tikzit/.gitignore | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) (limited to 'tikzit') diff --git a/tikzit/.gitignore b/tikzit/.gitignore index 644b16b..fc1d580 100644 --- a/tikzit/.gitignore +++ b/tikzit/.gitignore @@ -1,3 +1,5 @@ +# Previous gitignore items + *~ *.swp *.o @@ -27,3 +29,207 @@ Makefile.in /tikzit-*.tar.gz /tikzit-*.tar.bz2 xbuild + +######################### +# .gitignore file for Xcode4 and Xcode5 Source projects +# +# Apple bugs, waiting for Apple to fix/respond: +# +# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? +# +# Version 2.3 +# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects +# +# 2014 updates: +# - appended non-standard items DISABLED by default (uncomment if you use those tools) +# - removed the edit that an SO.com moderator made without bothering to ask me +# - researched CocoaPods .lock more carefully, thanks to Gokhan Celiker +# 2013 updates: +# - fixed the broken "save personal Schemes" +# - added line-by-line explanations for EVERYTHING (some were missing) +# +# NB: if you are storing "built" products, this WILL NOT WORK, +# and you should use a different .gitignore (or none at all) +# This file is for SOURCE projects, where there are many extra +# files that we want to exclude +# +######################### + +##### +# OS X temporary files that should never be committed +# +# c.f. http://www.westwind.com/reference/os-x/invisibles.html + +.DS_Store +.Trashes +*.swp + +# +# *.lock - this is used and abused by many editors for many different things. +# For the main ones I use (e.g. Eclipse), it should be excluded +# from source-control, but YMMV. +# (lock files are usually local-only file-synchronization on the local FS that should NOT go in git) +# c.f. the "OPTIONAL" section at bottom though, for tool-specific variations! + +*.lock + + +# +# profile - REMOVED temporarily (on double-checking, I can't find it in OS X docs?) +#profile + + +#### +# Xcode temporary files that should never be committed +# +# NB: NIB/XIB files still exist even on Storyboard projects, so we want this... + +*~.nib + + +#### +# Xcode build files - +# +# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" + +DerivedData/ + +# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" + +build/ + + +##### +# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) +# +# This is complicated: +# +# SOMETIMES you need to put this file in version control. +# Apple designed it poorly - if you use "custom executables", they are +# saved in this file. +# 99% of projects do NOT use those, so they do NOT want to version control this file. +# ..but if you're in the 1%, comment out the line "*.pbxuser" + +# .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html + +*.pbxuser + +# .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html + +*.mode1v3 + +# .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html + +*.mode2v3 + +# .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file + +*.perspectivev3 + +# NB: also, whitelist the default ones, some projects need to use these +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + + +#### +# Xcode 4 - semi-personal settings +# +# +# OPTION 1: --------------------------------- +# throw away ALL personal settings (including custom schemes! +# - unless they are "shared") +# +# NB: this is exclusive with OPTION 2 below +xcuserdata + +# OPTION 2: --------------------------------- +# get rid of ALL personal settings, but KEEP SOME OF THEM +# - NB: you must manually uncomment the bits you want to keep +# +# NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X, +# or manually install git over the top of the OS X version +# NB: this is exclusive with OPTION 1 above +# +#xcuserdata/**/* + +# (requires option 2 above): Personal Schemes +# +#!xcuserdata/**/xcschemes/* + +#### +# XCode 4 workspaces - more detailed +# +# Workspaces are important! They are a core feature of Xcode - don't exclude them :) +# +# Workspace layout is quite spammy. For reference: +# +# /(root)/ +# /(project-name).xcodeproj/ +# project.pbxproj +# /project.xcworkspace/ +# contents.xcworkspacedata +# /xcuserdata/ +# /(your name)/xcuserdatad/ +# UserInterfaceState.xcuserstate +# /xcsshareddata/ +# /xcschemes/ +# (shared scheme name).xcscheme +# /xcuserdata/ +# /(your name)/xcuserdatad/ +# (private scheme).xcscheme +# xcschememanagement.plist +# +# + +#### +# Xcode 4 - Deprecated classes +# +# Allegedly, if you manually "deprecate" your classes, they get moved here. +# +# We're using source-control, so this is a "feature" that we do not want! + +*.moved-aside + +#### +# OPTIONAL: Some well-known tools that people use side-by-side with Xcode / iOS development +# +# NB: I'd rather not include these here, but gitignore's design is weak and doesn't allow +# modular gitignore: you have to put EVERYTHING in one file. +# +# COCOAPODS: +# +# c.f. http://guides.cocoapods.org/using/using-cocoapods.html#what-is-a-podfilelock +# c.f. http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +#!Podfile.lock +# +# RUBY: +# +# c.f. http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ +# +#!Gemfile.lock +# +# IDEA: +# +#.idea +# +# TEXTMATE: +# +# -- UNVERIFIED: c.f. http://stackoverflow.com/a/50283/153422 +# +#tm_build_errors + +#### +# UNKNOWN: recommended by others, but I can't discover what these files are +# +# Community suggestions (unverified, no evidence available - DISABLED by default) +# +# 1. Xcode 5 - VCS file +# +# "The data in this file not represent state of your project. +# If you'll leave this file in git - you will have merge conflicts during +# pull your cahnges to other's repo" +# +#*.xccheckout \ No newline at end of file -- cgit v1.2.3 From ffa99ec96899716ce1084177810303d336f51ff6 Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Wed, 25 Feb 2015 12:36:17 -0800 Subject: Conversion of common files to ifdef for ARC --- tikzit/TikZiT.xcodeproj/project.pbxproj | 56 +++--- .../xcshareddata/TikZiT.xccheckout | 12 +- tikzit/src/common/ColorRGB.m | 26 ++- tikzit/src/common/Edge.m | 44 ++++- tikzit/src/common/EdgeStyle.m | 20 +- tikzit/src/common/Graph.m | 112 +++++++++--- tikzit/src/common/GraphChange.m | 201 ++++++++++++++++----- tikzit/src/common/GraphElementData.m | 59 ++++-- tikzit/src/common/GraphElementProperty.m | 23 ++- tikzit/src/common/NSString+LatexConstants.m | 4 + tikzit/src/common/NSString+Tikz.m | 11 +- tikzit/src/common/Node.m | 34 +++- tikzit/src/common/NodeStyle.m | 24 ++- tikzit/src/common/PickSupport.m | 19 +- tikzit/src/common/Preambles.m | 28 +++ tikzit/src/common/PropertyHolder.m | 2 + tikzit/src/common/Shape.m | 16 ++ tikzit/src/common/StyleManager.m | 47 ++++- tikzit/src/common/TikzGraphAssembler.m | 30 ++- tikzit/src/common/TikzShape.m | 4 + tikzit/src/common/Transformer.m | 12 +- tikzit/src/common/tikzparserdefs.h | 9 +- 22 files changed, 641 insertions(+), 152 deletions(-) (limited to 'tikzit') diff --git a/tikzit/TikZiT.xcodeproj/project.pbxproj b/tikzit/TikZiT.xcodeproj/project.pbxproj index 8e3e7c9..feba845 100644 --- a/tikzit/TikZiT.xcodeproj/project.pbxproj +++ b/tikzit/TikZiT.xcodeproj/project.pbxproj @@ -21,9 +21,9 @@ 55391AF813D3250F007DBE71 /* Preamble.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55391AF713D3250F007DBE71 /* Preamble.xib */; }; 55391B0213D32608007DBE71 /* PropertyInspector.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55391B0013D32608007DBE71 /* PropertyInspector.xib */; }; 55391B0A13D32765007DBE71 /* PropertyInspectorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55391B0913D32765007DBE71 /* PropertyInspectorController.m */; }; - 55397C7914498C22006942FB /* EdgeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7814498C22006942FB /* EdgeStyle.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55397C7914498C22006942FB /* EdgeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7814498C22006942FB /* EdgeStyle.m */; }; 55397C7C144990EA006942FB /* EdgeStyle+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7B144990EA006942FB /* EdgeStyle+Coder.m */; }; - 55397C7F144999C4006942FB /* PropertyHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7E144999C4006942FB /* PropertyHolder.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55397C7F144999C4006942FB /* PropertyHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7E144999C4006942FB /* PropertyHolder.m */; }; 55397C811449A877006942FB /* ED_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C801449A877006942FB /* ED_arrow.png */; }; 55397C831449A8F1006942FB /* ED_tick.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C821449A8F1006942FB /* ED_tick.png */; }; 55397C851449A9BF006942FB /* ED_none.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C841449A9BF006942FB /* ED_none.png */; }; @@ -33,17 +33,17 @@ 55397C901449AC7C006942FB /* AH_latex_head.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C8E1449AC7C006942FB /* AH_latex_head.png */; }; 55397C911449AC7C006942FB /* AH_plain_head.png in Resources */ = {isa = PBXBuildFile; fileRef = 55397C8F1449AC7C006942FB /* AH_plain_head.png */; }; 553A4C5A144ED3D500AA6FAC /* NilToEmptyStringTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 553A4C59144ED3D500AA6FAC /* NilToEmptyStringTransformer.m */; }; - 55432E061444BF2D00401BB3 /* GraphElementProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 55432E051444BF2D00401BB3 /* GraphElementProperty.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55598E351635372E0023450A /* DiamondShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55598E341635372E0023450A /* DiamondShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55432E061444BF2D00401BB3 /* GraphElementProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 55432E051444BF2D00401BB3 /* GraphElementProperty.m */; }; + 55598E351635372E0023450A /* DiamondShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55598E341635372E0023450A /* DiamondShape.m */; }; 555B30F911D8BE3300CAECF5 /* emblem-important.png in Resources */ = {isa = PBXBuildFile; fileRef = 555B30F811D8BE3300CAECF5 /* emblem-important.png */; }; 555B313511D8C6DA00CAECF5 /* color.m in Sources */ = {isa = PBXBuildFile; fileRef = 555B313411D8C6DA00CAECF5 /* color.m */; }; 555ECE9B1378A3AA0052DB71 /* CALayer+DrawLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 555ECE9A1378A3AA0052DB71 /* CALayer+DrawLabel.m */; }; - 55652DF913E1F2030023F4C6 /* SupportDir.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652DF813E1F2030023F4C6 /* SupportDir.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55652E3B13E1FAEE0023F4C6 /* CircleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3413E1FAED0023F4C6 /* CircleShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55652E3C13E1FAEE0023F4C6 /* RectangleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3613E1FAED0023F4C6 /* RectangleShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55652E3D13E1FAEE0023F4C6 /* RegularPolyShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3813E1FAED0023F4C6 /* RegularPolyShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55652E3E13E1FAEE0023F4C6 /* TikzShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3A13E1FAEE0023F4C6 /* TikzShape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55652E4113E1FB0A0023F4C6 /* Shape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E4013E1FB0A0023F4C6 /* Shape.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55652DF913E1F2030023F4C6 /* SupportDir.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652DF813E1F2030023F4C6 /* SupportDir.m */; }; + 55652E3B13E1FAEE0023F4C6 /* CircleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3413E1FAED0023F4C6 /* CircleShape.m */; }; + 55652E3C13E1FAEE0023F4C6 /* RectangleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3613E1FAED0023F4C6 /* RectangleShape.m */; }; + 55652E3D13E1FAEE0023F4C6 /* RegularPolyShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3813E1FAED0023F4C6 /* RegularPolyShape.m */; }; + 55652E3E13E1FAEE0023F4C6 /* TikzShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3A13E1FAEE0023F4C6 /* TikzShape.m */; }; + 55652E4113E1FB0A0023F4C6 /* Shape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E4013E1FB0A0023F4C6 /* Shape.m */; }; 55652E5613E1FC660023F4C6 /* cap.tikz in Copy Shapes */ = {isa = PBXBuildFile; fileRef = 55652E5113E1FC660023F4C6 /* cap.tikz */; }; 55652E5713E1FC660023F4C6 /* copants.tikz in Copy Shapes */ = {isa = PBXBuildFile; fileRef = 55652E5213E1FC660023F4C6 /* copants.tikz */; }; 55652E5813E1FC660023F4C6 /* cup.tikz in Copy Shapes */ = {isa = PBXBuildFile; fileRef = 55652E5313E1FC660023F4C6 /* cup.tikz */; }; @@ -55,11 +55,11 @@ 5573B90F11DA231A00B5DC5D /* PreambleController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573B90E11DA231A00B5DC5D /* PreambleController.m */; }; 5573B92111DA259C00B5DC5D /* text-x-generic.png in Resources */ = {isa = PBXBuildFile; fileRef = 5573B92011DA259C00B5DC5D /* text-x-generic.png */; }; 5573B92511DA273400B5DC5D /* format-indent-less.png in Resources */ = {isa = PBXBuildFile; fileRef = 5573B92411DA273400B5DC5D /* format-indent-less.png */; }; - 5573B92911DA292F00B5DC5D /* Preambles.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573B92811DA292F00B5DC5D /* Preambles.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 5573B92911DA292F00B5DC5D /* Preambles.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573B92811DA292F00B5DC5D /* Preambles.m */; }; 5573B98811DA377C00B5DC5D /* text-x-script.png in Resources */ = {isa = PBXBuildFile; fileRef = 5573B98711DA377C00B5DC5D /* text-x-script.png */; }; 5573BDCB11DB4D2600B5DC5D /* Preambles+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573BDCA11DB4D2600B5DC5D /* Preambles+Coder.m */; }; 5585E5C2117F681800124513 /* NodeStyle+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5585E5C1117F681800124513 /* NodeStyle+Coder.m */; }; - 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; }; 5589AA6C11C542D30064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; }; 5589AA6D11C542D30064D310 /* tikzlexer.lm in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AA11C500060064D310 /* tikzlexer.lm */; }; 5589AA6E11C542D30064D310 /* tikzparser.ym in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AB11C500060064D310 /* tikzparser.ym */; }; @@ -71,14 +71,14 @@ 5589AA8011C542E60064D310 /* NodeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C4117B031C009863B2 /* NodeStyle.m */; }; 5589AA8511C543500064D310 /* util.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CD117B03DD009863B2 /* util.m */; }; 5589AD4411C633EE0064D310 /* SelectBoxLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589AD4311C633EE0064D310 /* SelectBoxLayer.m */; }; - 558F18C5117B031C009863B2 /* Edge.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BA117B031C009863B2 /* Edge.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 558F18C6117B031C009863B2 /* Graph.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BC117B031C009863B2 /* Graph.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 558F18C7117B031C009863B2 /* GraphChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BE117B031C009863B2 /* GraphChange.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 558F18C8117B031C009863B2 /* GraphElementData.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C0117B031C009863B2 /* GraphElementData.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 558F18C9117B031C009863B2 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C2117B031C009863B2 /* Node.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 558F18CA117B031C009863B2 /* NodeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C4117B031C009863B2 /* NodeStyle.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 558F18C5117B031C009863B2 /* Edge.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BA117B031C009863B2 /* Edge.m */; }; + 558F18C6117B031C009863B2 /* Graph.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BC117B031C009863B2 /* Graph.m */; }; + 558F18C7117B031C009863B2 /* GraphChange.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18BE117B031C009863B2 /* GraphChange.m */; }; + 558F18C8117B031C009863B2 /* GraphElementData.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C0117B031C009863B2 /* GraphElementData.m */; }; + 558F18C9117B031C009863B2 /* Node.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C2117B031C009863B2 /* Node.m */; }; + 558F18CA117B031C009863B2 /* NodeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18C4117B031C009863B2 /* NodeStyle.m */; }; 558F18CE117B03DD009863B2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CB117B03DD009863B2 /* main.m */; }; - 558F18CF117B03DD009863B2 /* util.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CD117B03DD009863B2 /* util.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 558F18CF117B03DD009863B2 /* util.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18CD117B03DD009863B2 /* util.m */; }; 558F18F7117B043C009863B2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18DA117B043B009863B2 /* AppDelegate.m */; }; 558F18F9117B043C009863B2 /* EdgeControlLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18DE117B043B009863B2 /* EdgeControlLayer.m */; }; 558F18FA117B043C009863B2 /* GraphicsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 558F18E0117B043B009863B2 /* GraphicsView.m */; }; @@ -97,12 +97,12 @@ 559EFA4811C7D49800D020F4 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559EFA4711C7D49800D020F4 /* Sparkle.framework */; }; 559EFA4E11C7D4BD00D020F4 /* Sparkle.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 559EFA4711C7D49800D020F4 /* Sparkle.framework */; }; 559EFA5711C7D95F00D020F4 /* tikzit_dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 559EFA5611C7D95F00D020F4 /* tikzit_dsa_pub.pem */; }; - 559EFB6811CB88E300D020F4 /* ColorRGB.m in Sources */ = {isa = PBXBuildFile; fileRef = 559EFB6711CB88E300D020F4 /* ColorRGB.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 559EFB6811CB88E300D020F4 /* ColorRGB.m in Sources */ = {isa = PBXBuildFile; fileRef = 559EFB6711CB88E300D020F4 /* ColorRGB.m */; }; 55CA98D512EF8FCE008F0368 /* SFBInspectors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 55CA98DA12EF9098008F0368 /* SFBInspectors.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 55CA98DD12EF910F008F0368 /* SFBInspectors.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 55CA997212F08281008F0368 /* TikzWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA997112F08281008F0368 /* TikzWindowController.m */; }; - 55CA9AC912F831E5008F0368 /* RColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA9AC812F831E5008F0368 /* RColor.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55CA9AC912F831E5008F0368 /* RColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA9AC812F831E5008F0368 /* RColor.m */; }; 55CA9ACA12F831E5008F0368 /* RColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 55CA9AC812F831E5008F0368 /* RColor.m */; }; 55D2E0B21186ED950060B4EC /* Graph+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55D2E0B11186ED950060B4EC /* Graph+Coder.m */; }; 55D945721165904F0044178C /* tikzitdoc.icns in Resources */ = {isa = PBXBuildFile; fileRef = 55D945701165904F0044178C /* tikzitdoc.icns */; }; @@ -111,9 +111,9 @@ 55D949151165D8870044178C /* draw-path.png in Resources */ = {isa = PBXBuildFile; fileRef = 55D949121165D8870044178C /* draw-path.png */; }; 55D949161165D8870044178C /* select-rectangular.png in Resources */ = {isa = PBXBuildFile; fileRef = 55D949131165D8870044178C /* select-rectangular.png */; }; 55E5E99E1215C8E300256F69 /* transform-crop-and-resize.png in Resources */ = {isa = PBXBuildFile; fileRef = 55E5E99D1215C8E300256F69 /* transform-crop-and-resize.png */; }; - 55F9585C1181B09600F99434 /* PickSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F958591181B09600F99434 /* PickSupport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55F9585D1181B09600F99434 /* Transformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9585B1181B09600F99434 /* Transformer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 55F9E04511FF54F000F5659E /* NSString+LatexConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9E04411FF54F000F5659E /* NSString+LatexConstants.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 55F9585C1181B09600F99434 /* PickSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F958591181B09600F99434 /* PickSupport.m */; }; + 55F9585D1181B09600F99434 /* Transformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9585B1181B09600F99434 /* Transformer.m */; }; + 55F9E04511FF54F000F5659E /* NSString+LatexConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9E04411FF54F000F5659E /* NSString+LatexConstants.m */; }; 7F18A321184C577000BC3081 /* UpdatePreferenceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F18A320184C577000BC3081 /* UpdatePreferenceController.m */; }; 7F18A323184C599100BC3081 /* UpdatePreferencePanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7F18A322184C599100BC3081 /* UpdatePreferencePanel.xib */; }; 7F6E2C7D16B007F000BFE20D /* EdgeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7814498C22006942FB /* EdgeStyle.m */; }; @@ -131,11 +131,11 @@ 7F6E2C8C16B00ABA00BFE20D /* SFBInspectors.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 7F73438A184AC559002897D0 /* DraggablePDFView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F734389184AC559002897D0 /* DraggablePDFView.m */; }; 7F781C1A16B5DE1400239826 /* ParseErrorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F781C1916B5DE1400239826 /* ParseErrorView.m */; }; - 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEA18DE0C9E004F6CA8 /* tikzlexer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEC18DE0C9E004F6CA8 /* tikzparser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEA18DE0C9E004F6CA8 /* tikzlexer.m */; }; + 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEC18DE0C9E004F6CA8 /* tikzparser.m */; }; 7F7B6DF418DE0D7A004F6CA8 /* CustomNodeCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DF118DE0D7A004F6CA8 /* CustomNodeCellView.m */; }; 7F7B6DF518DE0D7A004F6CA8 /* CustomNodeController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DF318DE0D7A004F6CA8 /* CustomNodeController.m */; }; - 7F90E88616DD29600069EBCD /* NSString+Tikz.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F90E88516DD29600069EBCD /* NSString+Tikz.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 7F90E88616DD29600069EBCD /* NSString+Tikz.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F90E88516DD29600069EBCD /* NSString+Tikz.m */; }; 7F90E88D16DD47540069EBCD /* PreferenceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F90E88B16DD47540069EBCD /* PreferenceController.m */; }; 7F90E88E16DD47540069EBCD /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7F90E88C16DD47540069EBCD /* Preferences.xib */; }; 7F90E89116DD54440069EBCD /* UserDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7F90E88F16DD54440069EBCD /* UserDefaults.plist */; }; @@ -145,7 +145,7 @@ 7FB9BFEE16B57C2E00773146 /* TikzFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FB9BFED16B57C2E00773146 /* TikzFormatter.m */; }; 7FD5D44B18E1CB5300E2A930 /* CustomNodes.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7FD5D44918E1CB5300E2A930 /* CustomNodes.xib */; }; 7FD5D44D18E1CC0B00E2A930 /* customshape.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FD5D44C18E1CC0B00E2A930 /* customshape.png */; }; - 7FEED45716B1A7C500B056CB /* StyleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEED45616B1A7C500B056CB /* StyleManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 7FEED45716B1A7C500B056CB /* StyleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FEED45616B1A7C500B056CB /* StyleManager.m */; }; 8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; }; 8D15AC2F0486D014006FF6A4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165FFE840EACC02AAC07 /* InfoPlist.strings */; }; 8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; }; diff --git a/tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout b/tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout index 2cc312b..c3ec4fe 100644 --- a/tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout +++ b/tikzit/TikZiT.xcodeproj/project.xcworkspace/xcshareddata/TikZiT.xccheckout @@ -6,22 +6,18 @@ IDESourceControlProjectIdentifier 26857C1F-E0FE-4FFB-BDAC-44158C649772 - IDESourceControlProjectName - TikZiT IDESourceControlProjectOriginsDictionary F6FA2C351D428A0F1026539971510A626DEEFF59 - https://git.code.sf.net/p/tikzit/code + https://github.com/tikzit/tikzit.git - IDESourceControlProjectPath - tikzit/TikZiT.xcodeproj IDESourceControlProjectRelativeInstallPathDictionary F6FA2C351D428A0F1026539971510A626DEEFF59 - ../../.. + TikZiT/ IDESourceControlProjectURL - https://git.code.sf.net/p/tikzit/code + https://github.com/tikzit/tikzit.git IDESourceControlProjectVersion 111 IDESourceControlProjectWCCIdentifier @@ -34,7 +30,7 @@ IDESourceControlWCCIdentifierKey F6FA2C351D428A0F1026539971510A626DEEFF59 IDESourceControlWCCName - tikzit-code + TikZiT diff --git a/tikzit/src/common/ColorRGB.m b/tikzit/src/common/ColorRGB.m index c108cfe..840d716 100644 --- a/tikzit/src/common/ColorRGB.m +++ b/tikzit/src/common/ColorRGB.m @@ -25,7 +25,11 @@ #import "util.h" typedef struct { - NSString *name; +#if __has_feature(objc_arc) + __unsafe_unretained NSString *name; +#else + NSString *name; +#endif unsigned short r, g, b; } ColorRGBEntry; @@ -278,17 +282,29 @@ static NSMapTable *colorHash = nil; + (ColorRGB*)colorWithRed:(unsigned short)r green:(unsigned short)g blue:(unsigned short)b { ColorRGB *col = [[ColorRGB alloc] initWithRed:r green:g blue:b]; - return [col autorelease]; +#if __has_feature(objc_arc) + return col; +#else + return [col autorelease]; +#endif } + (ColorRGB*)colorWithFloatRed:(float)r green:(float)g blue:(float)b { ColorRGB *col = [[ColorRGB alloc] initWithFloatRed:r green:g blue:b]; - return [col autorelease]; +#if __has_feature(objc_arc) + return col; +#else + return [col autorelease]; +#endif } + (ColorRGB*) colorWithRColor:(RColor)color { +#if __has_feature(objc_arc) + return [[self alloc] initWithRColor:color]; +#else return [[[self alloc] initWithRColor:color] autorelease]; +#endif } + (void)makeColorHash { @@ -300,13 +316,17 @@ static NSMapTable *colorHash = nil; blue:kColors[i].b]; [h setObject:kColors[i].name forKey:col]; //NSLog(@"adding color %@ (%d)", kColors[i].name, [col hash]); +#if ! __has_feature(objc_arc) [col release]; +#endif } colorHash = h; } + (void)releaseColorHash { +#if ! __has_feature(objc_arc) [colorHash release]; +#endif } - (void)setToClosestHashed { diff --git a/tikzit/src/common/Edge.m b/tikzit/src/common/Edge.m index ba80aef..ee0f03d 100644 --- a/tikzit/src/common/Edge.m +++ b/tikzit/src/common/Edge.m @@ -72,7 +72,11 @@ } // if we didn't find a style, fill in a default one +#if __has_feature(objc_arc) + style = [EdgeStyle defaultEdgeStyleWithName:style_name]; +#else style = [[EdgeStyle defaultEdgeStyleWithName:style_name] retain]; +#endif return NO; } @@ -318,8 +322,12 @@ - (EdgeStyle*)style {return style;} - (void)setStyle:(EdgeStyle*)s { if (style != s) { +#if __has_feature(objc_arc) + style = s; +#else [style release]; style = [s retain]; +#endif } } @@ -335,9 +343,13 @@ [self setSourceAnchor:@""]; } +#if __has_feature(objc_arc) + source = s; +#else [source release]; source = [s retain]; - +#endif + if (source==target) { bendMode = EdgeBendModeInOut; weight = 1.0f; @@ -365,9 +377,13 @@ [self setTargetAnchor:@""]; } +#if __has_feature(objc_arc) + target = t; +#else [target release]; target = [t retain]; - +#endif + if (source==target) { bendMode = EdgeBendModeInOut; weight = 1.0f; @@ -422,8 +438,12 @@ [self willChangeValueForKey:@"hasEdgeNode"]; if (edgeNode != n) { hasEdgeNode = (n != nil); +#if __has_feature(objc_arc) + edgeNode = n; +#else [edgeNode release]; edgeNode = [n retain]; +#endif // don't set dirty bit, because control points don't need update } [self didChangeValueForKey:@"edgeNode"]; @@ -450,7 +470,9 @@ }else{ sourceAnchor = @""; } +#if ! __has_feature(objc_arc) [oldSourceAnchor release]; +#endif } - (NSString*) targetAnchor { return targetAnchor; } @@ -461,7 +483,9 @@ }else{ targetAnchor = @""; } +#if ! __has_feature(objc_arc) [oldTargetAnchor release]; +#endif } @synthesize data; @@ -558,11 +582,15 @@ - (void)setPropertiesFromEdge:(Edge*)e { Node *en = [[e edgeNode] copy]; [self setEdgeNode:en]; +#if ! __has_feature(objc_arc) [en release]; +#endif GraphElementData *d = [[e data] copy]; [self setData:d]; +#if ! __has_feature(objc_arc) [d release]; +#endif [self setStyle:[e style]]; [self setBend:[e bend]]; @@ -683,12 +711,14 @@ forKeyPath:@"style"]; [target removeObserver:self forKeyPath:@"style"]; +#if ! __has_feature(objc_arc) [source release]; [target release]; [data release]; [sourceAnchor release]; [targetAnchor release]; [super dealloc]; +#endif } - (id)copyWithZone:(NSZone*)zone { @@ -702,11 +732,19 @@ } + (Edge*)edge { +#if __has_feature(objc_arc) + return [[Edge alloc] init]; +#else return [[[Edge alloc] init] autorelease]; +#endif } + (Edge*)edgeWithSource:(Node*)s andTarget:(Node*)t { - return [[[Edge alloc] initWithSource:s andTarget:t] autorelease]; +#if __has_feature(objc_arc) + return [[Edge alloc] initWithSource:s andTarget:t]; +#else + return [[[Edge alloc] initWithSource:s andTarget:t] autorelease]; +#endif } @end diff --git a/tikzit/src/common/EdgeStyle.m b/tikzit/src/common/EdgeStyle.m index 39810fa..c61e94a 100644 --- a/tikzit/src/common/EdgeStyle.m +++ b/tikzit/src/common/EdgeStyle.m @@ -77,10 +77,12 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [name release]; [category release]; [colorRGB release]; [super dealloc]; +#endif } - (NSString*) description { @@ -98,7 +100,11 @@ } + (EdgeStyle*)defaultEdgeStyleWithName:(NSString*)nm { +#if __has_feature(objc_arc) + return [[EdgeStyle alloc] initWithName:nm]; +#else return [[[EdgeStyle alloc] initWithName:nm] autorelease]; +#endif } - (NSString*)name { return name; } @@ -107,7 +113,9 @@ NSString *oldValue = name; name = [s copy]; [self postPropertyChanged:@"name" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; +#endif } } @@ -147,8 +155,10 @@ NSString *oldValue = category; category = [s copy]; [self postPropertyChanged:@"category" oldValue:oldValue]; - [oldValue release]; - } +#if ! __has_feature(objc_arc) + [oldValue release]; +#endif + } } - (ColorRGB*)colorRGB { @@ -160,8 +170,10 @@ ColorRGB *oldValue = colorRGB; colorRGB = [c copy]; [self postPropertyChanged:@"colorRGB" oldValue:oldValue]; - [oldValue release]; - } +#if ! __has_feature(objc_arc) + [oldValue release]; +#endif + } } - (NSString*)tikz { diff --git a/tikzit/src/common/Graph.m b/tikzit/src/common/Graph.m index 2d07ccc..cf09a69 100644 --- a/tikzit/src/common/Graph.m +++ b/tikzit/src/common/Graph.m @@ -51,8 +51,12 @@ } - (id)initFromTikz:(NSString*)tikz error:(NSError**)e { - [self release]; - return [[TikzGraphAssembler parseTikz:tikz error:e] retain]; +#if __has_feature(objc_arc) + return [TikzGraphAssembler parseTikz:tikz error:e]; +#else + [self release]; + return [[TikzGraphAssembler parseTikz:tikz error:e] retain]; +#endif } - (id)initFromTikz:(NSString*)tikz { @@ -69,7 +73,8 @@ [[NSNotificationCenter defaultCenter] removeObserver:self]; [graphLock lock]; - [inEdges release]; +#if ! __has_feature(objc_arc) + [inEdges release]; [outEdges release]; [edges release]; [nodes release]; @@ -78,18 +83,23 @@ [graphLock release]; [super dealloc]; +#endif } - (void)sync { [graphLock lock]; if (dirty) { - [inEdges release]; - [outEdges release]; +#if ! __has_feature(objc_arc) + [inEdges release]; + [outEdges release]; +#endif inEdges = [[NSMapTable alloc] initWithKeyOptions:NSMapTableStrongMemory valueOptions:NSMapTableStrongMemory capacity:10]; outEdges = [[NSMapTable alloc] initWithKeyOptions:NSMapTableStrongMemory valueOptions:NSMapTableStrongMemory capacity:10]; +#if ! __has_feature(objc_arc) NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - +#endif + for (Edge *e in edges) { NSMutableSet *ie = [inEdges objectForKey:[e target]]; NSMutableSet *oe = [outEdges objectForKey:[e source]]; @@ -108,8 +118,9 @@ [oe addObject:e]; } +#if ! __has_feature(objc_arc) [pool drain]; - +#endif dirty = NO; } @@ -150,12 +161,20 @@ - (NSSet*)inEdgesForNode:(Node*)nd { [self sync]; - return [[[inEdges objectForKey:nd] retain] autorelease]; +#if __has_feature(objc_arc) + return [inEdges objectForKey:nd]; +#else + return [[[inEdges objectForKey:nd] retain] autorelease]; +#endif } - (NSSet*)outEdgesForNode:(Node*)nd { [self sync]; - return [[[outEdges objectForKey:nd] retain] autorelease]; +#if __has_feature(objc_arc) + return [outEdges objectForKey:nd]; +#else + return [[[outEdges objectForKey:nd] retain] autorelease]; +#endif } - (NSSet*)incidentEdgesForNodes:(NSSet*)nds { @@ -347,7 +366,10 @@ } GraphChange *change = [GraphChange nodeOrderChangeFrom:oldOrder to:nodes moved:nodeSet]; [graphLock unlock]; - [oldOrder release]; + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif return change; } @@ -365,8 +387,11 @@ } } GraphChange *change = [GraphChange nodeOrderChangeFrom:oldOrder to:nodes moved:nodeSet]; - [oldOrder release]; - + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif + return change; } @@ -383,7 +408,10 @@ } GraphChange *change = [GraphChange edgeOrderChangeFrom:oldOrder to:edges moved:edgeSet]; [graphLock unlock]; - [oldOrder release]; + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif return change; } @@ -401,8 +429,11 @@ } } GraphChange *change = [GraphChange edgeOrderChangeFrom:oldOrder to:edges moved:edgeSet]; - [oldOrder release]; - + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif + return change; } @@ -419,7 +450,10 @@ } GraphChange *change = [GraphChange nodeOrderChangeFrom:oldOrder to:nodes moved:nodeSet]; [graphLock unlock]; - [oldOrder release]; + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif return change; } @@ -437,7 +471,10 @@ } GraphChange *change = [GraphChange edgeOrderChangeFrom:oldOrder to:edges moved:edgeSet]; [graphLock unlock]; - [oldOrder release]; + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif return change; } @@ -455,8 +492,11 @@ } } GraphChange *change = [GraphChange nodeOrderChangeFrom:oldOrder to:nodes moved:nodeSet]; - [oldOrder release]; - + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif + return change; } @@ -473,8 +513,11 @@ } } GraphChange *change = [GraphChange edgeOrderChangeFrom:oldOrder to:edges moved:edgeSet]; - [oldOrder release]; - + +#if ! __has_feature(objc_arc) + [oldOrder release]; +#endif + return change; } @@ -571,7 +614,9 @@ [e1 setSource:[newNds objectForKey:[e source]]]; [e1 setTarget:[newNds objectForKey:[e target]]]; [newGraph addEdge:e1]; - [e1 release]; // e1 belongs to newGraph +#if ! __has_feature(objc_arc) + [e1 release]; // e1 belongs to newGraph +#endif } } @@ -584,8 +629,9 @@ [self sync]; NSMutableSet *cover = [NSMutableSet set]; +#if ! __has_feature(objc_arc) NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - +#endif NSMutableSet *remainingEdges = [NSMutableSet setWithArray:edges]; while ([remainingEdges count] != 0) { @@ -610,10 +656,14 @@ } [cover addObject:path]; +#if ! __has_feature(objc_arc) [path release]; +#endif } - + +#if ! __has_feature(objc_arc) [pool drain]; +#endif return cover; } @@ -780,7 +830,11 @@ } + (Graph*)graph { +#if __has_feature(objc_arc) + return [[self alloc] init]; +#else return [[[self alloc] init] autorelease]; +#endif } + (Graph*)graphFromTikz:(NSString*)tikz error:(NSError**)e { @@ -803,9 +857,15 @@ for (Node *n in nds) { Node *ncopy = [n copyWithZone:zone]; [tab setObject:ncopy forKey:n]; +#if ! __has_feature(objc_arc) [ncopy release]; // tab should still retain ncopy. +#endif } - return [tab autorelease]; +#if __has_feature(objc_arc) + return tab; +#else + return [tab autorelease]; +#endif } + (NSMapTable*)edgeTableForEdges:(NSSet*)es { @@ -820,7 +880,9 @@ for (Edge *e in es) { Edge *ecopy = [e copyWithZone:zone]; [tab setObject:ecopy forKey:e]; +#if ! __has_feature(objc_arc) [ecopy release]; // tab should still retain ecopy. +#endif } return tab; } diff --git a/tikzit/src/common/GraphChange.m b/tikzit/src/common/GraphChange.m index 239ae23..29a3939 100644 --- a/tikzit/src/common/GraphChange.m +++ b/tikzit/src/common/GraphChange.m @@ -36,6 +36,7 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [affectedNodes release]; [affectedEdges release]; [nodeRef release]; @@ -56,6 +57,7 @@ [nwEdgeOrder release]; [super dealloc]; +#endif } @synthesize changeType; @@ -77,65 +79,128 @@ switch ([self changeType]) { case GraphAddition: [inverse setChangeType:GraphDeletion]; - inverse->affectedNodes = [affectedNodes retain]; - inverse->affectedEdges = [affectedEdges retain]; +#if __has_feature(objc_arc) + inverse->affectedNodes = affectedNodes; + inverse->affectedEdges = affectedEdges; +#else + inverse->affectedNodes = [affectedNodes retain]; + inverse->affectedEdges = [affectedEdges retain]; +#endif break; case GraphDeletion: [inverse setChangeType:GraphAddition]; - inverse->affectedNodes = [affectedNodes retain]; - inverse->affectedEdges = [affectedEdges retain]; +#if __has_feature(objc_arc) + inverse->affectedNodes = affectedNodes; + inverse->affectedEdges = affectedEdges; +#else + inverse->affectedNodes = [affectedNodes retain]; + inverse->affectedEdges = [affectedEdges retain]; +#endif break; case NodePropertyChange: - inverse->nodeRef = [nodeRef retain]; - inverse->oldNode = [nwNode retain]; - inverse->nwNode = [oldNode retain]; +#if __has_feature(objc_arc) + inverse->nodeRef = nodeRef; + inverse->oldNode = nwNode; + inverse->nwNode = oldNode; +#else + inverse->nodeRef = [nodeRef retain]; + inverse->oldNode = [nwNode retain]; + inverse->nwNode = [oldNode retain]; +#endif break; case NodesPropertyChange: - inverse->oldNodeTable = [nwNodeTable retain]; - inverse->nwNodeTable = [oldNodeTable retain]; +#if __has_feature(objc_arc) + +#else + inverse->oldNodeTable = [nwNodeTable retain]; + inverse->nwNodeTable = [oldNodeTable retain]; +#endif break; case EdgePropertyChange: - inverse->edgeRef = [edgeRef retain]; - inverse->oldEdge = [nwEdge retain]; - inverse->nwEdge = [oldEdge retain]; +#if __has_feature(objc_arc) + inverse->edgeRef = edgeRef; + inverse->oldEdge = nwEdge; + inverse->nwEdge = oldEdge; +#else + inverse->edgeRef = [edgeRef retain]; + inverse->oldEdge = [nwEdge retain]; + inverse->nwEdge = [oldEdge retain]; +#endif break; case EdgesPropertyChange: - inverse->oldEdgeTable = [nwEdgeTable retain]; - inverse->nwEdgeTable = [oldEdgeTable retain]; +#if __has_feature(objc_arc) + inverse->oldEdgeTable = nwEdgeTable; + inverse->nwEdgeTable = oldEdgeTable; +#else + inverse->oldEdgeTable = [nwEdgeTable retain]; + inverse->nwEdgeTable = [oldEdgeTable retain]; +#endif break; case NodesShift: - inverse->affectedNodes = [affectedNodes retain]; - [inverse setShiftPoint:NSMakePoint(-[self shiftPoint].x, - -[self shiftPoint].y)]; +#if __has_feature(objc_arc) + inverse->affectedNodes = affectedNodes; +#else + inverse->affectedNodes = [affectedNodes retain]; +#endif + [inverse setShiftPoint:NSMakePoint(-[self shiftPoint].x, + -[self shiftPoint].y)]; break; case NodesFlip: - inverse->affectedNodes = [affectedNodes retain]; - [inverse setHorizontal:[self horizontal]]; +#if __has_feature(objc_arc) + inverse->affectedNodes = affectedNodes; +#else + inverse->affectedNodes = [affectedNodes retain]; +#endif + [inverse setHorizontal:[self horizontal]]; break; case EdgesReverse: - inverse->affectedEdges = [affectedEdges retain]; +#if __has_feature(objc_arc) + inverse->affectedEdges = affectedEdges; +#else + inverse->affectedEdges = [affectedEdges retain]; +#endif break; case BoundingBoxChange: inverse->oldBoundingBox = nwBoundingBox; inverse->nwBoundingBox = oldBoundingBox; break; case GraphPropertyChange: - inverse->oldGraphData = [nwGraphData retain]; - inverse->nwGraphData = [oldGraphData retain]; +#if __has_feature(objc_arc) + inverse->oldGraphData = nwGraphData; + inverse->nwGraphData = oldGraphData; +#else + inverse->oldGraphData = [nwGraphData retain]; + inverse->nwGraphData = [oldGraphData retain]; +#endif break; case NodeOrderChange: - inverse->affectedNodes = [affectedNodes retain]; - inverse->oldNodeOrder = [nwNodeOrder retain]; - inverse->nwNodeOrder = [oldNodeOrder retain]; +#if __has_feature(objc_arc) + inverse->affectedNodes = affectedNodes; + inverse->oldNodeOrder = nwNodeOrder; + inverse->nwNodeOrder = oldNodeOrder; +#else + inverse->affectedNodes = [affectedNodes retain]; + inverse->oldNodeOrder = [nwNodeOrder retain]; + inverse->nwNodeOrder = [oldNodeOrder retain]; +#endif break; case EdgeOrderChange: - inverse->affectedEdges = [affectedEdges retain]; - inverse->oldEdgeOrder = [nwEdgeOrder retain]; - inverse->nwEdgeOrder = [oldEdgeOrder retain]; +#if __has_feature(objc_arc) + inverse->affectedEdges = affectedEdges; + inverse->oldEdgeOrder = nwEdgeOrder; + inverse->nwEdgeOrder = oldEdgeOrder; +#else + inverse->affectedEdges = [affectedEdges retain]; + inverse->oldEdgeOrder = [nwEdgeOrder retain]; + inverse->nwEdgeOrder = [oldEdgeOrder retain]; +#endif break; } - +#if __has_feature(objc_arc) + return inverse; +#else return [inverse autorelease]; +#endif } + (GraphChange*)graphAdditionWithNodes:(NSSet *)ns edges:(NSSet *)es { @@ -143,7 +208,11 @@ [gc setChangeType:GraphAddition]; [gc setAffectedNodes:ns]; [gc setAffectedEdges:es]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)graphDeletionWithNodes:(NSSet *)ns edges:(NSSet *)es { @@ -151,7 +220,11 @@ [gc setChangeType:GraphDeletion]; [gc setAffectedNodes:ns]; [gc setAffectedEdges:es]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)propertyChangeOfNode:(Node*)nd fromOld:(Node*)old toNew:(Node*)nw { @@ -160,7 +233,11 @@ [gc setNodeRef:nd]; [gc setOldNode:old]; [gc setNwNode:nw]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)propertyChangeOfNodesFromOldCopies:(NSMapTable*)oldC @@ -169,7 +246,11 @@ [gc setChangeType:NodesPropertyChange]; [gc setOldNodeTable:oldC]; [gc setNwNodeTable:newC]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)propertyChangeOfEdge:(Edge*)e fromOld:(Edge *)old toNew:(Edge *)nw { @@ -178,7 +259,11 @@ [gc setEdgeRef:e]; [gc setOldEdge:old]; [gc setNwEdge:nw]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)propertyChangeOfEdgesFromOldCopies:(NSMapTable*)oldC @@ -187,7 +272,11 @@ [gc setChangeType:EdgesPropertyChange]; [gc setOldEdgeTable:oldC]; [gc setNwEdgeTable:newC]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)shiftNodes:(NSSet*)ns byPoint:(NSPoint)p { @@ -195,7 +284,11 @@ [gc setChangeType:NodesShift]; [gc setAffectedNodes:ns]; [gc setShiftPoint:p]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)flipNodes:(NSSet*)ns horizontal:(BOOL)b { @@ -203,14 +296,22 @@ [gc setChangeType:NodesFlip]; [gc setAffectedNodes:ns]; [gc setHorizontal:b]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)reverseEdges:(NSSet*)es { GraphChange *gc = [[GraphChange alloc] init]; [gc setChangeType:EdgesReverse]; [gc setAffectedEdges:es]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)changeBoundingBoxFrom:(NSRect)oldBB to:(NSRect)newBB { @@ -218,7 +319,11 @@ [gc setChangeType:BoundingBoxChange]; [gc setOldBoundingBox:oldBB]; [gc setNwBoundingBox:newBB]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)propertyChangeOfGraphFrom:(GraphElementData*)oldData to:(GraphElementData*)newData { @@ -226,7 +331,11 @@ [gc setChangeType:GraphPropertyChange]; [gc setOldGraphData:oldData]; [gc setNwGraphData:newData]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)nodeOrderChangeFrom:(NSArray*)old to:(NSArray*)new moved:(NSSet*)affected { @@ -235,7 +344,11 @@ [gc setAffectedNodes:affected]; [gc setOldNodeOrder:old]; [gc setNwNodeOrder:new]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } + (GraphChange*)edgeOrderChangeFrom:(NSArray*)old to:(NSArray*)new moved:(NSSet*)affected { @@ -244,7 +357,11 @@ [gc setAffectedEdges:affected]; [gc setOldEdgeOrder:old]; [gc setNwEdgeOrder:new]; - return [gc autorelease]; +#if __has_feature(objc_arc) + return gc; +#else + return [gc autorelease]; +#endif } @end diff --git a/tikzit/src/common/GraphElementData.m b/tikzit/src/common/GraphElementData.m index 0750296..41dc9aa 100644 --- a/tikzit/src/common/GraphElementData.m +++ b/tikzit/src/common/GraphElementData.m @@ -28,7 +28,11 @@ @implementation GraphElementData + (id)data { +#if __has_feature(objc_arc) + return [[self alloc] init]; +#else return [[[self alloc] init] autorelease]; +#endif } - (id)init { @@ -48,9 +52,15 @@ - (NSArray*)objectsAtIndexes:(NSIndexSet*)indexes { return [properties objectsAtIndexes:indexes]; } + +#if __has_feature(objc_arc) +- (void) getObjects:(__unsafe_unretained id*)buffer range:(NSRange)range { +#else - (void) getObjects:(id*)buffer range:(NSRange)range { +#endif [properties getObjects:buffer range:range]; } + - (void)insertObject:(id)anObject atIndex:(NSUInteger)index { [properties insertObject:anObject atIndex:index]; } @@ -66,22 +76,33 @@ - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)anObject { [properties replaceObjectAtIndex:index withObject:anObject]; } + +#if __has_feature(objc_arc) +- (NSUInteger) countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(__unsafe_unretained id [])stackbuf + count:(NSUInteger)len { +#else - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len { - return [properties countByEnumeratingWithState:state objects:stackbuf count:len]; +#endif + return [properties countByEnumeratingWithState:state objects:stackbuf count:len]; } - (void)setProperty:(NSString*)val forKey:(NSString*)key { GraphElementProperty *m = [[GraphElementProperty alloc] initWithKeyMatching:key]; NSInteger idx = [properties indexOfObject:m]; - [m release]; +#if !__has_feature(objc_arc) + [m release]; +#endif GraphElementProperty *p; if (idx == NSNotFound) { p = [[GraphElementProperty alloc] initWithPropertyValue:val forKey:key]; [properties addObject:p]; - [p release]; +#if !__has_feature(objc_arc) + [p release]; +#endif } else { p = [properties objectAtIndex:idx]; [p setValue:val]; @@ -91,13 +112,19 @@ - (void)unsetProperty:(NSString*)key { GraphElementProperty *m = [[GraphElementProperty alloc] initWithKeyMatching:key]; [properties removeObject:m]; - [m release]; +#if !__has_feature(objc_arc) + [m release]; +#endif + } - (NSString*)propertyForKey:(NSString*)key { GraphElementProperty *m = [[GraphElementProperty alloc] initWithKeyMatching:key]; NSInteger idx = [properties indexOfObject:m]; - [m release]; +#if !__has_feature(objc_arc) + [m release]; +#endif + if (idx == NSNotFound) { return nil; @@ -110,19 +137,25 @@ - (void)setAtom:(NSString*)atom { GraphElementProperty *a = [[GraphElementProperty alloc] initWithAtomName:atom]; if (![properties containsObject:a]) [properties addObject:a]; - [a release]; +#if !__has_feature(objc_arc) + [a release]; +#endif } - (void)unsetAtom:(NSString*)atom { GraphElementProperty *a = [[GraphElementProperty alloc] initWithAtomName:atom]; [properties removeObject:a]; - [a release]; +#if !__has_feature(objc_arc) + [a release]; +#endif } - (BOOL)isAtomSet:(NSString*)atom { GraphElementProperty *a = [[GraphElementProperty alloc] initWithAtomName:atom]; BOOL set = [properties containsObject:a]; - [a release]; +#if !__has_feature(objc_arc) + [a release]; +#endif return set; } @@ -136,14 +169,18 @@ for (GraphElementProperty *p in properties) { GraphElementProperty *p2 = [p copy]; [cp addObject:p2]; - [p2 release]; +#if !__has_feature(objc_arc) + [p2 release]; +#endif } return cp; } - (void)dealloc { - [properties release]; - [super dealloc]; +#if !__has_feature(objc_arc) + [properties release]; + [super dealloc]; +#endif } @end diff --git a/tikzit/src/common/GraphElementProperty.m b/tikzit/src/common/GraphElementProperty.m index 1acdc09..25e1b15 100644 --- a/tikzit/src/common/GraphElementProperty.m +++ b/tikzit/src/common/GraphElementProperty.m @@ -28,13 +28,25 @@ @implementation GraphElementProperty + (id)atom:(NSString*)n { - return [[[self alloc] initWithAtomName:n] autorelease]; +#if __has_feature(objc_arc) + return [[self alloc] initWithAtomName:n]; +#else + return [[[self alloc] initWithAtomName:n] autorelease]; +#endif } + (id)property:(NSString*)k withValue:(NSString*)v { +#if __has_feature(objc_arc) + return [[self alloc] initWithPropertyValue:v forKey:k]; +#else return [[[self alloc] initWithPropertyValue:v forKey:k] autorelease]; +#endif } + (id)keyMatching:(NSString*)k { +#if __has_feature(objc_arc) + return [[self alloc] initWithKeyMatching:k]; +#else return [[[self alloc] initWithKeyMatching:k] autorelease]; +#endif } - (id)initWithAtomName:(NSString*)n { @@ -65,15 +77,18 @@ } - (void) dealloc { +#if ! __has_feature(objc_arc) [key release]; -// the below line causes a exc_bad_access. Uncommenting it gains a memory leak but at least no crashing. -// [value release]; + [value release]; [super dealloc]; +#endif } - (void)setValue:(NSString *)v { if (value != v) { +#if ! __has_feature(objc_arc) [value release]; +#endif value = [v copy]; } } @@ -89,7 +104,9 @@ - (void)setKey:(NSString *)k { if (key != k) { +#if ! __has_feature(objc_arc) [key release]; +#endif key = [k copy]; } if (key == nil) diff --git a/tikzit/src/common/NSString+LatexConstants.m b/tikzit/src/common/NSString+LatexConstants.m index bd598b7..634c189 100644 --- a/tikzit/src/common/NSString+LatexConstants.m +++ b/tikzit/src/common/NSString+LatexConstants.m @@ -197,10 +197,14 @@ static NSSet *texModifiers = nil; } NSString *ret = [buf copy]; +#if __has_feature(objc_arc) + return ret; +#else [buf release]; [wordBuf release]; return [ret autorelease]; +#endif } @end diff --git a/tikzit/src/common/NSString+Tikz.m b/tikzit/src/common/NSString+Tikz.m index 520ffd3..1e3073b 100644 --- a/tikzit/src/common/NSString+Tikz.m +++ b/tikzit/src/common/NSString+Tikz.m @@ -23,12 +23,21 @@ - (NSString*) tikzEscapedString { static NSCharacterSet *avoid = nil; if (avoid == nil) - avoid = [[[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<>-'0123456789. "] invertedSet] retain]; +#if __has_feature(objc_arc) + avoid = [[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<>-'0123456789. "] invertedSet]; +#else + avoid = [[[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<>-'0123456789. "] invertedSet] retain]; +#endif + if ([self rangeOfCharacterFromSet:avoid].length > 0) { return [NSString stringWithFormat:@"{%@}", self]; } else { +#if __has_feature(objc_arc) + return self; +#else return [[self retain] autorelease]; +#endif } } diff --git a/tikzit/src/common/Node.m b/tikzit/src/common/Node.m index 8c64b6b..c5b11d1 100644 --- a/tikzit/src/common/Node.m +++ b/tikzit/src/common/Node.m @@ -50,11 +50,13 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [name release]; [style release]; [data release]; [label release]; [super dealloc]; +#endif } - (Shape*) shape { @@ -67,7 +69,11 @@ - (Transformer*) shapeTransformerFromTransformer:(Transformer*)t { // we take a copy to keep the reflection attributes +#if ! __has_feature(objc_arc) Transformer *transformer = [[t copy] autorelease]; +#else + Transformer *transformer = [t copy]; +#endif NSPoint screenPos = [t toScreen:point]; [transformer setOrigin:screenPos]; float scale = [t scale]; @@ -101,7 +107,11 @@ } - (BOOL)attachStyleFromTable:(NSArray*)styles { - NSString *style_name = [[[data propertyForKey:@"style"] retain] autorelease]; +#if __has_feature(objc_arc) + NSString *style_name = [data propertyForKey:@"style"]; +#else + NSString *style_name = [[[data propertyForKey:@"style"] retain] autorelease]; +#endif [self setStyle:nil]; @@ -137,11 +147,19 @@ } + (Node*)nodeWithPoint:(NSPoint)p { - return [[[Node alloc] initWithPoint:p] autorelease]; +#if __has_feature(objc_arc) + return [[Node alloc] initWithPoint:p]; +#else + return [[[Node alloc] initWithPoint:p] autorelease]; +#endif } + (Node*)node { - return [[[Node alloc] init] autorelease]; +#if __has_feature(objc_arc) + return [[Node alloc] init]; +#else + return [[[Node alloc] init] autorelease]; +#endif } @@ -180,9 +198,13 @@ - (void)setStyle:(NodeStyle *)st { if (style != st) { - NodeStyle *oldStyle = style; - style = [st retain]; - [oldStyle release]; +#if __has_feature(objc_arc) + style = st; +#else + NodeStyle *oldStyle = style; + style = [st retain]; + [oldStyle release]; +#endif } [self updateData]; } diff --git a/tikzit/src/common/NodeStyle.m b/tikzit/src/common/NodeStyle.m index 26ab793..193d44d 100644 --- a/tikzit/src/common/NodeStyle.m +++ b/tikzit/src/common/NodeStyle.m @@ -87,12 +87,14 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [name release]; [category release]; [shapeName release]; [strokeColorRGB release]; [fillColorRGB release]; [super dealloc]; +#endif } - (NSString*) description { @@ -110,7 +112,11 @@ } + (NodeStyle*)defaultNodeStyleWithName:(NSString*)nm { - return [[[NodeStyle alloc] initWithName:nm] autorelease]; +#if __has_feature(objc_arc) + return [[NodeStyle alloc] initWithName:nm]; +#else + return [[[NodeStyle alloc] initWithName:nm] autorelease]; +#endif } - (NSString*)name { @@ -122,7 +128,9 @@ NSString *oldValue = name; name = [s copy]; [self postPropertyChanged:@"name" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; +#endif } } @@ -135,7 +143,9 @@ NSString *oldValue = shapeName; shapeName = [s copy]; [self postPropertyChanged:@"shapeName" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; +#endif } } @@ -148,8 +158,10 @@ NSString *oldValue = category; category = [s copy]; [self postPropertyChanged:@"category" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; - } +#endif + } } - (int)strokeThickness { return strokeThickness; } @@ -175,8 +187,10 @@ ColorRGB *oldValue = strokeColorRGB; strokeColorRGB = [c copy]; [self postPropertyChanged:@"strokeColorRGB" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; - } +#endif + } } - (ColorRGB*)fillColorRGB { @@ -188,8 +202,10 @@ ColorRGB *oldValue = fillColorRGB; fillColorRGB = [c copy]; [self postPropertyChanged:@"fillColorRGB" oldValue:oldValue]; +#if ! __has_feature(objc_arc) [oldValue release]; - } +#endif + } } - (NSString*)tikz { diff --git a/tikzit/src/common/PickSupport.m b/tikzit/src/common/PickSupport.m index 6470214..560fc2c 100644 --- a/tikzit/src/common/PickSupport.m +++ b/tikzit/src/common/PickSupport.m @@ -42,15 +42,24 @@ self = [super init]; if (self) { - selectedNodes = [[NSMutableSet set] retain]; - selectedEdges = [[NSMutableSet set] retain]; +#if __has_feature(objc_arc) + selectedNodes = [NSMutableSet set]; + selectedEdges = [NSMutableSet set]; +#else + selectedNodes = [[NSMutableSet set] retain]; + selectedEdges = [[NSMutableSet set] retain]; +#endif } return self; } + (PickSupport*)pickSupport { - return [[[PickSupport alloc] init] autorelease]; +#if __has_feature(objc_arc) + return [[PickSupport alloc] init]; +#else + return [[[PickSupport alloc] init] autorelease]; +#endif } @synthesize selectedNodes; @@ -176,7 +185,9 @@ } if (replace) { +#if ! __has_feature(objc_arc) [selectedNodes release]; +#endif selectedNodes = [nodes mutableCopy]; } else { [selectedNodes unionSet:nodes]; @@ -208,10 +219,12 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [selectedNodes release]; [selectedEdges release]; [super dealloc]; +#endif } @end diff --git a/tikzit/src/common/Preambles.m b/tikzit/src/common/Preambles.m index 651bbcd..922fc30 100644 --- a/tikzit/src/common/Preambles.m +++ b/tikzit/src/common/Preambles.m @@ -55,7 +55,11 @@ static NSString *POSTAMBLE = @implementation Preambles + (Preambles*)preambles { +#if __has_feature(objc_arc) + return [[self alloc] init]; +#else return [[[self alloc] init] autorelease]; +#endif } - (id)init { @@ -72,10 +76,12 @@ static NSString *POSTAMBLE = } - (void)dealloc { +#if ! __has_feature(objc_arc) [selectedPreambleName release]; [styles release]; [styleManager release]; [super dealloc]; +#endif } - (NSString*)preambleForName:(NSString*)name { @@ -101,14 +107,18 @@ static NSString *POSTAMBLE = } - (void)setStyles:(NSArray*)sty { +#if ! __has_feature(objc_arc) [sty retain]; [styles release]; +#endif styles = sty; } - (void)setEdges:(NSArray*)edg { +#if ! __has_feature(objc_arc) [edg retain]; [edges release]; +#endif edges = edg; } @@ -116,7 +126,9 @@ static NSString *POSTAMBLE = if (styleManager != nil) { [self setStyles:[styleManager nodeStyles]]; } +#if ! __has_feature(objc_arc) NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; +#endif NSMutableString *buf = [NSMutableString string]; NSMutableString *colbuf = [NSMutableString string]; NSMutableSet *colors = [NSMutableSet setWithCapacity:2*[styles count]]; @@ -154,8 +166,12 @@ static NSString *POSTAMBLE = NSString *defs = [[NSString alloc] initWithFormat:@"%@\n%@", colbuf, buf]; +#if __has_feature(objc_arc) + return defs; +#else [pool drain]; return [defs autorelease]; +#endif } - (NSString*)defaultPreamble { @@ -170,7 +186,9 @@ static NSString *POSTAMBLE = - (NSString*)selectedPreambleName { return selectedPreambleName; } - (void)setSelectedPreambleName:(NSString *)sel { if (sel != selectedPreambleName) { +#if ! __has_feature(objc_arc) [selectedPreambleName release]; +#endif selectedPreambleName = [sel copy]; } } @@ -190,8 +208,10 @@ static NSString *POSTAMBLE = } - (void)setStyleManager:(StyleManager *)manager { +#if ! __has_feature(objc_arc) [manager retain]; [styleManager release]; +#endif styleManager = manager; } @@ -240,10 +260,14 @@ static NSString *POSTAMBLE = isSelected = YES; } NSString *preamble = [preambleDict objectForKey:old]; +#if ! __has_feature(objc_arc) [preamble retain]; +#endif [preambleDict removeObjectForKey:old]; [preambleDict setObject:preamble forKey:new]; +#if ! __has_feature(objc_arc) [preamble release]; +#endif if (isSelected) { [self setSelectedPreambleName:new]; } @@ -254,11 +278,15 @@ static NSString *POSTAMBLE = if ([name isEqualToString:@"default"]) return NO; // "name" may be held only by being the selected preamble... +#if ! __has_feature(objc_arc) [name retain]; +#endif if ([name isEqualToString:selectedPreambleName]) [self setSelectedPreambleName:nil]; [preambleDict removeObjectForKey:name]; +#if ! __has_feature(objc_arc) [name release]; +#endif return YES; } diff --git a/tikzit/src/common/PropertyHolder.m b/tikzit/src/common/PropertyHolder.m index 2b3442f..6aaf125 100644 --- a/tikzit/src/common/PropertyHolder.m +++ b/tikzit/src/common/PropertyHolder.m @@ -63,8 +63,10 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [notificationName release]; [super dealloc]; +#endif } @end diff --git a/tikzit/src/common/Shape.m b/tikzit/src/common/Shape.m index 5dc25e3..e887688 100644 --- a/tikzit/src/common/Shape.m +++ b/tikzit/src/common/Shape.m @@ -61,8 +61,12 @@ - (NSSet*)paths {return paths;} - (void)setPaths:(NSSet *)p { if (paths != p) { +#if __has_feature(objc_arc) + paths = p; +#else [paths release]; paths = [p retain]; +#endif [self calcBoundingRect]; } } @@ -79,9 +83,11 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [paths release]; [styleTikz release]; [super dealloc]; +#endif } NSDictionary *shapeDictionary = nil; @@ -101,7 +107,9 @@ NSDictionary *shapeDictionary = nil; [shapeDir stringByAppendingPathComponent:f]]; if (sh != nil) { [shapeDict setObject:sh forKey:nm]; +#if ! __has_feature(objc_arc) [sh release]; +#endif } } } @@ -122,7 +130,9 @@ NSDictionary *shapeDictionary = nil; shapes[3], SHAPE_UP_TRIANGLE, shapes[4], SHAPE_DOWN_TRIANGLE, nil]; +#if ! __has_feature(objc_arc) for (int i = 0; i<5; ++i) [shapes[i] release]; +#endif NSString *systemShapeDir = [[SupportDir systemSupportDir] stringByAppendingPathComponent:@"shapes"]; NSString *userShapeDir = [[SupportDir userSupportDir] stringByAppendingPathComponent:@"shapes"]; @@ -137,7 +147,9 @@ NSDictionary *shapeDictionary = nil; postNotificationName:@"ShapeDictionaryReplaced" object:self]; +#if ! __has_feature(objc_arc) [oldShapeDictionary release]; +#endif } + (NSDictionary*)shapeDictionary { @@ -147,7 +159,11 @@ NSDictionary *shapeDictionary = nil; + (Shape*)shapeForName:(NSString*)shapeName { Shape *s = [[[self shapeDictionary] objectForKey:shapeName] copy]; +#if __has_feature(objc_arc) + return s; +#else return [s autorelease]; +#endif } @end diff --git a/tikzit/src/common/StyleManager.m b/tikzit/src/common/StyleManager.m index ae0d488..05c6c86 100644 --- a/tikzit/src/common/StyleManager.m +++ b/tikzit/src/common/StyleManager.m @@ -90,7 +90,11 @@ } + (StyleManager*) manager { +#if __has_feature(objc_arc) + return [[self alloc] init]; +#else return [[[self alloc] init] autorelease]; +#endif } - (id) init { @@ -107,15 +111,18 @@ - (void) dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - +#if ! __has_feature(objc_arc) [nodeStyles release]; [edgeStyles release]; [super dealloc]; +#endif } - (void) loadDefaultEdgeStyles { +#if ! __has_feature(objc_arc) [edgeStyles release]; +#endif edgeStyles = [[NSMutableArray alloc] initWithCapacity:3]; EdgeStyle *simple = [EdgeStyle defaultEdgeStyleWithName:@"simple"]; @@ -138,7 +145,9 @@ } - (void) loadDefaultNodeStyles { +#if ! __has_feature(objc_arc) [nodeStyles release]; +#endif nodeStyles = [[NSMutableArray alloc] initWithCapacity:3]; NodeStyle *rn = [NodeStyle defaultNodeStyleWithName:@"rn"]; @@ -212,8 +221,10 @@ - (void) _setNodeStyles:(NSMutableArray*)styles { [self ignoreAllNodeStyles]; +#if ! __has_feature(objc_arc) [nodeStyles release]; [styles retain]; +#endif nodeStyles = styles; for (NodeStyle *style in styles) { [self listenToNodeStyle:style]; @@ -223,8 +234,10 @@ - (void) _setEdgeStyles:(NSMutableArray*)styles { [self ignoreAllEdgeStyles]; +#if ! __has_feature(objc_arc) [edgeStyles release]; [styles retain]; +#endif edgeStyles = styles; for (EdgeStyle *style in styles) { [self listenToEdgeStyle:style]; @@ -257,10 +270,14 @@ } [self ignoreNodeStyle:style]; +#if ! __has_feature(objc_arc) [style retain]; +#endif [nodeStyles removeObject:style]; [self postNodeStyleRemoved:style]; +#if ! __has_feature(objc_arc) [style release]; +#endif } - (EdgeStyle*) edgeStyleForName:(NSString*)name { @@ -288,10 +305,14 @@ } [self ignoreEdgeStyle:style]; +#if ! __has_feature(objc_arc) [style retain]; +#endif [edgeStyles removeObject:style]; [self postEdgeStyleRemoved:style]; +#if ! __has_feature(objc_arc) [style release]; +#endif } - (void) updateFromManager:(StyleManager*)m { @@ -302,7 +323,11 @@ [currentStyle updateFromStyle:style]; [ns addObject:currentStyle]; } else { +#if __has_feature(objc_arc) + [ns addObject:[style copy]]; +#else [ns addObject:[[style copy] autorelease]]; +#endif } } NSMutableArray *es = [NSMutableArray arrayWithCapacity:[[m edgeStyles] count]]; @@ -312,8 +337,12 @@ [currentStyle updateFromStyle:style]; [es addObject:currentStyle]; } else { - [es addObject:[[style copy] autorelease]]; - } +#if __has_feature(objc_arc) + [es addObject:[style copy]]; +#else + [es addObject:[[style copy] autorelease]]; +#endif + } } [self _setNodeStyles:ns]; [self _setEdgeStyles:es]; @@ -324,11 +353,19 @@ NSMutableArray *ns = [NSMutableArray arrayWithCapacity:[nodeStyles count]]; for (NodeStyle *style in nodeStyles) { - [ns addObject:[[style copyWithZone:zone] autorelease]]; +#if __has_feature(objc_arc) + [ns addObject:[style copyWithZone:zone]]; +#else + [ns addObject:[[style copyWithZone:zone] autorelease]]; +#endif } NSMutableArray *es = [NSMutableArray arrayWithCapacity:[edgeStyles count]]; for (EdgeStyle *style in edgeStyles) { - [es addObject:[[style copyWithZone:zone] autorelease]]; +#if __has_feature(objc_arc) + [es addObject:[style copyWithZone:zone]]; +#else + [es addObject:[[style copyWithZone:zone] autorelease]]; +#endif } [m _setNodeStyles:ns]; [m _setEdgeStyles:es]; diff --git a/tikzit/src/common/TikzGraphAssembler.m b/tikzit/src/common/TikzGraphAssembler.m index 380b71c..c5d2811 100644 --- a/tikzit/src/common/TikzGraphAssembler.m +++ b/tikzit/src/common/TikzGraphAssembler.m @@ -31,14 +31,20 @@ @implementation TikzGraphAssembler - (id)init { +#if ! __has_feature(objc_arc) [self release]; +#endif return nil; } - (id)initWithGraph:(Graph*)g { self = [super init]; if (self) { +#if __has_feature(objc_arc) + graph = g; +#else graph = [g retain]; +#endif nodeMap = [[NSMutableDictionary alloc] init]; yylex_init (&scanner); yyset_extra(self, scanner); @@ -47,29 +53,39 @@ } - (void)dealloc { +#if ! __has_feature(objc_arc) [graph release]; [nodeMap release]; [lastError release]; yylex_destroy (scanner); [super dealloc]; +#endif } - (BOOL) parseTikz:(NSString*)t error:(NSError**)error { +#if ! __has_feature(objc_arc) NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; +#endif tikzStr = [t UTF8String]; yy_scan_string(tikzStr, scanner); int result = yyparse(scanner); tikzStr = NULL; +#if ! __has_feature(objc_arc) [pool drain]; +#endif if (result == 0) { return YES; } else { if (error) { if (lastError) { +#if __has_feature(objc_arc) + *error = lastError; +#else *error = [[lastError retain] autorelease]; +#endif } else if (result == 1) { *error = [NSError errorWithMessage:@"Syntax error" code:TZ_ERR_PARSE]; @@ -91,10 +107,16 @@ + (Graph*) parseTikz:(NSString*)tikz error:(NSError**)e { Graph *gr = [[Graph alloc] init]; if ([self parseTikz:tikz forGraph:gr error:e]) { +#if __has_feature(objc_arc) + return gr; +#else return [gr autorelease]; +#endif } else { +#if ! __has_feature(objc_arc) [gr release]; - return nil; +#endif + return nil; } } + (Graph*) parseTikz:(NSString*)tikz { @@ -109,8 +131,10 @@ TikzGraphAssembler *assembler = [[self alloc] initWithGraph:gr]; BOOL success = [assembler parseTikz:tikz error:error]; +#if ! __has_feature(objc_arc) [assembler release]; - return success; +#endif + return success; } + (BOOL)validateTikzPropertyNameOrValue:(NSString*)tikz { @@ -171,8 +195,10 @@ } - (void) setLastError:(NSError*)error { +#if ! __has_feature(objc_arc) [error retain]; [lastError release]; +#endif lastError = error; } diff --git a/tikzit/src/common/TikzShape.m b/tikzit/src/common/TikzShape.m index c07c61e..555a7df 100644 --- a/tikzit/src/common/TikzShape.m +++ b/tikzit/src/common/TikzShape.m @@ -55,7 +55,11 @@ -NSMidY(bds)); [t setOrigin:shift]; [graph applyTransformer:t]; +#if __has_feature(objc_arc) + paths = [graph pathCover]; +#else paths = [[graph pathCover] retain]; +#endif } return self; } diff --git a/tikzit/src/common/Transformer.m b/tikzit/src/common/Transformer.m index 403ae87..2b56813 100644 --- a/tikzit/src/common/Transformer.m +++ b/tikzit/src/common/Transformer.m @@ -28,11 +28,19 @@ float const PIXELS_PER_UNIT = 50; @implementation Transformer + (Transformer*)transformer { - return [[[Transformer alloc] init] autorelease]; +#if __has_feature(objc_arc) + return [[Transformer alloc] init]; +#else + return [[[Transformer alloc] init] autorelease]; +#endif } + (Transformer*)transformerWithTransformer:(Transformer*)t { - return [[t copy] autorelease]; +#if __has_feature(objc_arc) + return [t copy]; +#else + return [[t copy] autorelease]; +#endif } + (Transformer*)transformerWithOrigin:(NSPoint)o andScale:(float)scale { diff --git a/tikzit/src/common/tikzparserdefs.h b/tikzit/src/common/tikzparserdefs.h index 587bcd6..cde3345 100644 --- a/tikzit/src/common/tikzparserdefs.h +++ b/tikzit/src/common/tikzparserdefs.h @@ -37,8 +37,13 @@ @class Node; struct noderef { - Node *node; - NSString *anchor; +#if __has_feature(objc_arc) + __unsafe_unretained Node *node; + __unsafe_unretained NSString *anchor; +#else + Node *node; + NSString *anchor; +#endif }; // vi:ft=objc:noet:ts=4:sts=4:sw=4 -- cgit v1.2.3 From e29f8204df052ddd634e04053ac9144cee64df08 Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Thu, 12 Mar 2015 12:55:07 -0700 Subject: Reverted flex/bison files together with TikzGraphAssembler to be compiled with no ARC --- tikzit/TikZiT.xcodeproj/project.pbxproj | 12 ++++++------ tikzit/src/common/tikzlexer.lm | 1 + tikzit/src/common/tikzparser.ym | 14 +++++++++----- 3 files changed, 16 insertions(+), 11 deletions(-) (limited to 'tikzit') diff --git a/tikzit/TikZiT.xcodeproj/project.pbxproj b/tikzit/TikZiT.xcodeproj/project.pbxproj index feba845..04a7f3f 100644 --- a/tikzit/TikZiT.xcodeproj/project.pbxproj +++ b/tikzit/TikZiT.xcodeproj/project.pbxproj @@ -59,7 +59,7 @@ 5573B98811DA377C00B5DC5D /* text-x-script.png in Resources */ = {isa = PBXBuildFile; fileRef = 5573B98711DA377C00B5DC5D /* text-x-script.png */; }; 5573BDCB11DB4D2600B5DC5D /* Preambles+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5573BDCA11DB4D2600B5DC5D /* Preambles+Coder.m */; }; 5585E5C2117F681800124513 /* NodeStyle+Coder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5585E5C1117F681800124513 /* NodeStyle+Coder.m */; }; - 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; }; + 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 5589AA6C11C542D30064D310 /* TikzGraphAssembler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9FE11C51E780064D310 /* TikzGraphAssembler.m */; }; 5589AA6D11C542D30064D310 /* tikzlexer.lm in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AA11C500060064D310 /* tikzlexer.lm */; }; 5589AA6E11C542D30064D310 /* tikzparser.ym in Sources */ = {isa = PBXBuildFile; fileRef = 5589A9AB11C500060064D310 /* tikzparser.ym */; }; @@ -131,8 +131,8 @@ 7F6E2C8C16B00ABA00BFE20D /* SFBInspectors.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 7F73438A184AC559002897D0 /* DraggablePDFView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F734389184AC559002897D0 /* DraggablePDFView.m */; }; 7F781C1A16B5DE1400239826 /* ParseErrorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F781C1916B5DE1400239826 /* ParseErrorView.m */; }; - 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEA18DE0C9E004F6CA8 /* tikzlexer.m */; }; - 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEC18DE0C9E004F6CA8 /* tikzparser.m */; }; + 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEA18DE0C9E004F6CA8 /* tikzlexer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DEC18DE0C9E004F6CA8 /* tikzparser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 7F7B6DF418DE0D7A004F6CA8 /* CustomNodeCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DF118DE0D7A004F6CA8 /* CustomNodeCellView.m */; }; 7F7B6DF518DE0D7A004F6CA8 /* CustomNodeController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7B6DF318DE0D7A004F6CA8 /* CustomNodeController.m */; }; 7F90E88616DD29600069EBCD /* NSString+Tikz.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F90E88516DD29600069EBCD /* NSString+Tikz.m */; }; @@ -645,9 +645,9 @@ 55D2E0B11186ED950060B4EC /* Graph+Coder.m */, 558F18BD117B031C009863B2 /* GraphChange.h */, 558F18BE117B031C009863B2 /* GraphChange.m */, - 558F18BF117B031C009863B2 /* GraphElementData.h */, 7FEED45516B1A7C400B056CB /* StyleManager.h */, 7FEED45616B1A7C500B056CB /* StyleManager.m */, + 558F18BF117B031C009863B2 /* GraphElementData.h */, 558F18C0117B031C009863B2 /* GraphElementData.m */, 558F18C1117B031C009863B2 /* Node.h */, 558F18C2117B031C009863B2 /* Node.m */, @@ -987,13 +987,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */, + 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */, 558F18C5117B031C009863B2 /* Edge.m in Sources */, 558F18C6117B031C009863B2 /* Graph.m in Sources */, 558F18C7117B031C009863B2 /* GraphChange.m in Sources */, 7F7B6DF418DE0D7A004F6CA8 /* CustomNodeCellView.m in Sources */, 558F18C8117B031C009863B2 /* GraphElementData.m in Sources */, 558F18C9117B031C009863B2 /* Node.m in Sources */, - 7F7B6DEE18DE0C9E004F6CA8 /* tikzparser.m in Sources */, 558F18CA117B031C009863B2 /* NodeStyle.m in Sources */, 558F18CE117B03DD009863B2 /* main.m in Sources */, 558F18CF117B03DD009863B2 /* util.m in Sources */, @@ -1013,7 +1014,6 @@ 5585E5C2117F681800124513 /* NodeStyle+Coder.m in Sources */, 55F9585C1181B09600F99434 /* PickSupport.m in Sources */, 55F9585D1181B09600F99434 /* Transformer.m in Sources */, - 7F7B6DED18DE0C9E004F6CA8 /* tikzlexer.m in Sources */, 55D2E0B21186ED950060B4EC /* Graph+Coder.m in Sources */, 5589A9FF11C51E780064D310 /* TikzGraphAssembler.m in Sources */, 7F7B6DF518DE0D7A004F6CA8 /* CustomNodeController.m in Sources */, diff --git a/tikzit/src/common/tikzlexer.lm b/tikzit/src/common/tikzlexer.lm index 96690d2..1e92f73 100644 --- a/tikzit/src/common/tikzlexer.lm +++ b/tikzit/src/common/tikzlexer.lm @@ -37,6 +37,7 @@ %option header-file="common/tikzlexer.h" %option extra-type="TikzGraphAssembler *" + %s props %s xcoord %s ycoord diff --git a/tikzit/src/common/tikzparser.ym b/tikzit/src/common/tikzparser.ym index a6dc1ee..344e969 100644 --- a/tikzit/src/common/tikzparser.ym +++ b/tikzit/src/common/tikzparser.ym @@ -41,11 +41,11 @@ /* possible data types for semantic values */ %union { - NSPoint pt; - NSString *nsstr; - GraphElementProperty *prop; - GraphElementData *data; - Node *node; + NSString *nsstr; + GraphElementProperty *prop; + GraphElementData *data; + Node *node; + NSPoint pt; struct noderef noderef; } @@ -166,7 +166,9 @@ node: "\\node" optproperties nodename "at" COORD DELIMITEDSTRING ";" [node setLabel:$6]; [assembler addNodeToMap:node]; [[assembler graph] addNode:node]; +#if ! __has_feature(objc_arc) [node release]; +#endif }; optanchor: { $$ = nil; } | "." REFSTRING { $$ = $2; }; @@ -204,7 +206,9 @@ edge: "\\draw" optproperties noderef "to" optedgenode optnoderef ";" } [edge setAttributesFromData]; [[assembler graph] addEdge:edge]; +#if ! __has_feature(objc_arc) [edge release]; +#endif }; ignoreprop: val | val "=" val; -- cgit v1.2.3 From 49c0d2041f0aae6d08d325b7f7fc1cd707d942f8 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Wed, 25 Mar 2015 09:57:29 +0000 Subject: update anchors on edge reverse --- tikzit/src/common/Edge.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tikzit') diff --git a/tikzit/src/common/Edge.m b/tikzit/src/common/Edge.m index ee0f03d..0c88e9d 100644 --- a/tikzit/src/common/Edge.m +++ b/tikzit/src/common/Edge.m @@ -692,6 +692,7 @@ - (void)reverse { Node *n; float f; + NSString *a; n = source; source = target; @@ -701,6 +702,10 @@ inAngle = outAngle; outAngle = f; + a = sourceAnchor; + sourceAnchor = targetAnchor; + targetAnchor = a; + [self setBend:-bend]; dirty = YES; -- cgit v1.2.3