From 702a3875c5c7c5c937e55d50039ccb0c7bced754 Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Thu, 24 Jan 2013 16:30:02 +0000 Subject: Anchor support for the parser and osx gui --- tikzit/English.lproj/PropertyInspector.xib | 2264 ++++++++++++++++---------- tikzit/English.lproj/StylePalette.xib | 1417 +++++++--------- tikzit/TikZiT-Info.plist | 8 +- tikzit/TikZiT.xcodeproj/project.pbxproj | 46 +- tikzit/src/common/Edge.h | 14 + tikzit/src/common/Edge.m | 23 + tikzit/src/common/Graph.m | 4 +- tikzit/src/common/TikzGraphAssembler.h | 3 +- tikzit/src/common/TikzGraphAssembler.m | 25 +- tikzit/src/common/test/parser.m | 11 +- tikzit/src/common/test/test.m | 2 +- tikzit/src/common/tikzlexer.lm | 4 +- tikzit/src/common/tikzparser.ym | 39 +- tikzit/src/osx/PropertyInspectorController.h | 10 + tikzit/src/osx/PropertyInspectorController.m | 7 +- 15 files changed, 2135 insertions(+), 1742 deletions(-) diff --git a/tikzit/English.lproj/PropertyInspector.xib b/tikzit/English.lproj/PropertyInspector.xib index b22b186..4ba24a7 100644 --- a/tikzit/English.lproj/PropertyInspector.xib +++ b/tikzit/English.lproj/PropertyInspector.xib @@ -1,43 +1,42 @@ - 1050 - 11C74 - 1617 - 1138.23 - 567.00 + 1070 + 12C60 + 2844 + 1187.34 + 625.00 com.apple.InterfaceBuilder.CocoaPlugin - 1617 + 2844 YES - NSScroller - NSTableHeaderView - NSButton NSArrayController - NSScrollView - NSButtonCell - NSTextFieldCell NSBox - NSTableView + NSButton + NSButtonCell + NSComboBox + NSComboBoxCell NSCustomObject NSCustomView + NSScrollView + NSScroller NSTableColumn - NSWindowTemplate + NSTableHeaderView + NSTableView NSTextField + NSTextFieldCell NSView + NSWindowTemplate YES com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - + PluginDependencyRecalculationVersion + YES @@ -70,23 +69,20 @@ 274 {193, 256} - - SFBInspectorView {193, 256} - - {{0, 0}, {1440, 878}} + {{0, 0}, {1600, 1200}} {200, 246} {10000000000000, 10000000000000} YES - + 268 YES @@ -107,6 +103,8 @@ YES + NO + YES 256 @@ -128,7 +126,7 @@ 40 1000 - 75628096 + 75497536 2048 Key/Atom @@ -151,7 +149,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -186,7 +184,7 @@ 40 1000 - 75628096 + 75497536 2048 Value @@ -194,7 +192,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -248,6 +246,7 @@ {{224, 17}, {15, 102}} + NO _doScroller: 0.87903225806451613 @@ -258,6 +257,7 @@ {{1, 126}, {181, 15}} + NO 1 _doScroller: @@ -287,6 +287,9 @@ QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 @@ -296,7 +299,7 @@ YES - -1804468671 + -1804599231 272630784 @@ -315,6 +318,7 @@ + NO @@ -323,7 +327,7 @@ YES - -2080244224 + -2080374784 134217728 @@ -332,7 +336,7 @@ 1044 - -2033434369 + -2033434624 162 NSImage @@ -343,6 +347,7 @@ 400 75 + NO @@ -352,7 +357,7 @@ YES - -2080244224 + -2080374784 134217728 a @@ -361,7 +366,7 @@ 16 - -2033434369 + -2033434624 162 NSImage @@ -372,6 +377,7 @@ 400 75 + NO @@ -381,12 +387,12 @@ YES - -2080244224 + -2080374784 134217728 - -2032385793 + -2032386048 162 @@ -394,6 +400,7 @@ 400 75 + NO @@ -403,7 +410,7 @@ YES - 68288064 + 68157504 272630784 Label @@ -420,14 +427,16 @@ + NO {193, 152} + NSView - + 268 YES @@ -448,6 +457,8 @@ YES + NO + YES 256 @@ -469,7 +480,7 @@ 40 1000 - 75628096 + 75497536 2048 Key/Atom @@ -480,7 +491,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -498,7 +509,7 @@ 40 1000 - 75628096 + 75497536 2048 Value @@ -506,7 +517,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -549,6 +560,7 @@ {{224, 17}, {15, 102}} + NO _doScroller: 0.87903225806451613 @@ -559,6 +571,7 @@ {{1, 126}, {181, 15}} + NO 1 _doScroller: @@ -588,6 +601,9 @@ QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 @@ -596,12 +612,12 @@ YES - -2080244224 + -2080374784 134217728 - -2033434369 + -2033434624 162 @@ -609,6 +625,7 @@ 400 75 + NO @@ -618,12 +635,12 @@ YES - -2080244224 + -2080374784 134217728 a - -2033434369 + -2033434624 162 @@ -631,6 +648,7 @@ 400 75 + NO @@ -640,12 +658,12 @@ YES - -2080244224 + -2080374784 134217728 - -2032385793 + -2032386048 162 @@ -653,26 +671,198 @@ 400 75 + NO {193, 130} + NSView - + 268 YES + + + 268 + {{59, 152}, {133, 26}} + + + _NS:9 + YES + + 342884416 + 272630784 + + + _NS:9 + + YES + + + 5 + YES + YES + + + + 274 + {13, 0} + + + _NS:24 + YES + NO + YES + + 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 + + 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, 143}, {185, 5}} + {{4, 146}, {185, 5}} {0, 0} - 67239424 + 67108864 0 Box @@ -690,12 +880,12 @@ 268 - {{55, 104}, {134, 19}} + {{55, 107}, {134, 19}} YES - -1804468671 + -1804599231 272630784 @@ -704,16 +894,71 @@ + 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, 104}, {38, 14}} + {{8, 107}, {38, 14}} YES - 68288064 + 68157504 272630784 Label @@ -721,21 +966,22 @@ + NO 268 - {{3, 123}, {82, 18}} + {{3, 126}, {82, 18}} YES - 67239424 + 67108864 0 Child Node - 1211912703 + 1211912448 2 NSImage @@ -749,6 +995,7 @@ 200 25 + NO @@ -767,6 +1014,8 @@ YES + NO + YES 256 @@ -787,7 +1036,7 @@ 40 1000 - 75628096 + 75497536 2048 Key/Atom @@ -798,7 +1047,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -816,7 +1065,7 @@ 40 1000 - 75628096 + 75497536 2048 Value @@ -824,7 +1073,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -867,6 +1116,7 @@ {{224, 17}, {15, 102}} + NO _doScroller: 0.87903225806451613 @@ -877,6 +1127,7 @@ {{1, 126}, {181, 15}} + NO 1 _doScroller: @@ -897,7 +1148,7 @@ 4 - {{4, 34}, {185, 62}} + {{4, 37}, {185, 62}} 133682 @@ -906,6 +1157,9 @@ QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 @@ -924,6 +1178,8 @@ YES + NO + YES 256 @@ -945,7 +1201,7 @@ 40 1000 - 75628096 + 75497536 2048 Key/Atom @@ -956,7 +1212,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -974,7 +1230,7 @@ 40 1000 - 75628096 + 75497536 2048 Value @@ -982,7 +1238,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -1025,6 +1281,7 @@ {{224, 17}, {15, 102}} + NO _doScroller: 0.87903225806451613 @@ -1035,6 +1292,7 @@ {{1, 126}, {181, 15}} + NO 1 _doScroller: @@ -1055,7 +1313,7 @@ 4 - {{4, 179}, {185, 92}} + {{4, 247}, {185, 92}} 133682 @@ -1064,20 +1322,23 @@ QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 292 - {{53, 5}, {26, 26}} + {{53, 8}, {26, 26}} YES - -2080244224 + -2080374784 134217728 - -2033434369 + -2033434624 162 @@ -1085,21 +1346,22 @@ 400 75 + NO 292 - {{28, 5}, {26, 26}} + {{28, 8}, {26, 26}} YES - -2080244224 + -2080374784 134217728 a - -2033434369 + -2033434624 162 @@ -1107,21 +1369,22 @@ 400 75 + NO 292 - {{4, 5}, {26, 26}} + {{4, 8}, {26, 26}} YES - -2080244224 + -2080374784 134217728 - -2032385793 + -2032386048 162 @@ -1129,21 +1392,22 @@ 400 75 + NO 292 - {{53, 150}, {26, 26}} + {{53, 218}, {26, 26}} - + YES - -2080244224 + -2080374784 134217728 - -2033434369 + -2033434624 162 @@ -1151,21 +1415,22 @@ 400 75 + NO 292 - {{28, 150}, {26, 26}} + {{28, 218}, {26, 26}} YES - -2080244224 + -2080374784 134217728 a - -2033434369 + -2033434624 162 @@ -1173,21 +1438,22 @@ 400 75 + NO 292 - {{4, 150}, {26, 26}} + {{4, 218}, {26, 26}} YES - -2080244224 + -2080374784 134217728 - -2032385793 + -2032386048 162 @@ -1195,9 +1461,11 @@ 400 75 + NO - {193, 276} + {193, 344} + NSView @@ -1293,6 +1561,58 @@ 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 + @@ -1305,74 +1625,6 @@ 188 - - - value: arrangedObjects.key - - - - - - value: arrangedObjects.key - value - arrangedObjects.key - 2 - - - 274 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 277 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 278 - - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 281 - nodeDataArrayController @@ -1381,70 +1633,6 @@ 282 - - - delegate - - - - 290 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 297 - - - - delegate - - - - 331 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 346 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 347 - addNodeProperty: @@ -1493,42 +1681,6 @@ 354 - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 356 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 357 - removeGraphProperty: @@ -1545,14 +1697,6 @@ 359 - - - delegate - - - - 382 - edgePropertiesView @@ -1593,102 +1737,6 @@ 393 - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 394 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 401 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 405 - - - - delegate - - - - 421 - - - - delegate - - - - 440 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 443 - - - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - 2 - - - 445 - addEdgeNodeProperty: @@ -1737,42 +1785,6 @@ 454 - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 459 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 460 - propertyInspectorView @@ -1781,26 +1793,6 @@ 464 - - - enabled: arrangedObjects.isAtom - - - - - - enabled: arrangedObjects.isAtom - enabled - arrangedObjects.isAtom - - NSValueTransformerName - NSNegateBoolean - - 2 - - - 467 - window @@ -1809,22 +1801,6 @@ 567 - - - contentArray: selectedNodes - - - - - - contentArray: selectedNodes - contentArray - selectedNodes - 2 - - - 577 - selectedNodesArrayController @@ -1833,14 +1809,6 @@ 583 - - - delegate - - - - 584 - selectedEdgesArrayController @@ -1850,51 +1818,406 @@ 586 - - contentArray: selectedEdges - - - - - - contentArray: selectedEdges - contentArray - selectedEdges - 2 - + + refreshDocument: + + - 589 + 596 - - value: selection.hasEdgeNode - - - - - - value: selection.hasEdgeNode - value - selection.hasEdgeNode - 2 - + + sourceAnchorNamesArrayController + + - 595 + 678 - - refreshDocument: + + targetAnchorNamesArrayController - + - 596 + 682 - - enabled: canAdd - - - + + sourceAnchorComboBox + + + + 716 + + + + targetAnchorComboBox + + + + 717 + + + + delegate + + + + 584 + + + + value: selection.label + + + + + + value: selection.label + value + selection.label + + YES + + YES + NSMultipleValuesPlaceholder + NSValueTransformerName + + + YES + Multiple Values + NilToEmptyStringTransformer + + + 2 + + + 644 + + + + 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 + + + + 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 + + + + enabled: canAdd + + + enabled: canAdd @@ -1908,66 +2231,260 @@ enabled: canAdd - - + + - - + + enabled: canAdd enabled canAdd 2 - 615 + 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 + + + + 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 - enabled: canAdd - - + value: arrangedObjects.value + + - - - enabled: canAdd - enabled - canAdd + + + value: arrangedObjects.value + value + arrangedObjects.value 2 - 618 + 445 - enabled: isEditable - - + enabled: arrangedObjects.isAtom + + - - - enabled: isEditable + + + enabled: arrangedObjects.isAtom enabled - isEditable + arrangedObjects.isAtom + + NSValueTransformerName + NSNegateBoolean + 2 - 622 + 459 - enabled: canAdd - - + value: arrangedObjects.key + + - - - enabled: canAdd - enabled - canAdd + + + value: arrangedObjects.key + value + arrangedObjects.key + + NSValueTransformerName + NilToEmptyStringTransformer + 2 - 624 + 647 @@ -2003,35 +2520,43 @@ - enabled: isEditable - - + enabled: canRemove + + - - - enabled: isEditable + + + enabled: canRemove enabled - isEditable + canRemove 2 - 630 + 460 - enabled: isEditable - - + value: selection.hasEdgeNode + + - - - enabled: isEditable - enabled - isEditable + + + value: selection.hasEdgeNode + value + selection.hasEdgeNode 2 - 632 + 595 + + + + delegate + + + + 440 @@ -2051,92 +2576,83 @@ - enabled: isEditable - - + value: selection.edgeNode.label + + - - - enabled: isEditable - enabled - isEditable + + + value: selection.edgeNode.label + value + selection.edgeNode.label + + NSValueTransformerName + NilToEmptyStringTransformer + 2 - 638 + 648 - enabled: canAdd - - + contentArray: selectedNodes + + - - - enabled: canAdd - enabled - canAdd + + + contentArray: selectedNodes + contentArray + selectedNodes 2 - 640 + 577 - enabled: canAdd - - + contentArray: selectedEdges + + - - - enabled: canAdd - enabled - canAdd + + + contentArray: selectedEdges + contentArray + selectedEdges 2 - 643 + 589 - value: selection.label - - + enabled: selection.hasEdgeNode + + - - - value: selection.label - value - selection.label - - YES - - YES - NSMultipleValuesPlaceholder - NSValueTransformerName - - - YES - Multiple Values - NilToEmptyStringTransformer - - + + + enabled: selection.hasEdgeNode + enabled + selection.hasEdgeNode 2 - 644 + 661 - value: arrangedObjects.key - - + value: selection.edgeNode.label + + - - - value: arrangedObjects.key + + + value: selection.edgeNode.label value - arrangedObjects.key + selection.edgeNode.label NSValueTransformerName NilToEmptyStringTransformer @@ -2144,135 +2660,171 @@ 2 - 645 + 662 + + + + delegate + + + + 663 - value: arrangedObjects.key - - - - - - value: arrangedObjects.key - value - arrangedObjects.key - - NSValueTransformerName - NilToEmptyStringTransformer - + content: arrangedObjects + + + + + + content: arrangedObjects + content + arrangedObjects 2 - 646 + 707 - value: arrangedObjects.key - - + contentValues: arrangedObjects + + + + + + contentValues: arrangedObjects + contentValues + arrangedObjects + + 2 + + + 708 + + + + value: selection.sourceAnchor + + - - - value: arrangedObjects.key + + + value: selection.sourceAnchor value - arrangedObjects.key - - NSValueTransformerName - NilToEmptyStringTransformer - + selection.sourceAnchor + 2 - 647 + 709 + + + + delegate + + + + 714 - value: selection.edgeNode.label - - - - - - value: selection.edgeNode.label - value - selection.edgeNode.label - - NSValueTransformerName - NilToEmptyStringTransformer - + content: arrangedObjects + + + + + + content: arrangedObjects + content + arrangedObjects 2 - 648 + 710 - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - + contentValues: arrangedObjects + + + + + + contentValues: arrangedObjects + contentValues + arrangedObjects + 2 - 650 + 711 - selectionIndexes: selectionIndexes - - + value: selection.targetAnchor + + - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - + + + value: selection.targetAnchor + value + selection.targetAnchor + 2 - 652 + 713 + + + + delegate + + + + 715 + + + + content + + + + 675 - selectionIndexes: selectionIndexes - - + contentArray: sourceAnchorNames + + - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - + + + contentArray: sourceAnchorNames + contentArray + sourceAnchorNames 2 - 654 + 680 - selectionIndexes: selectionIndexes - - + contentArray: targetAnchorNames + + - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - + + + contentArray: targetAnchorNames + contentArray + targetAnchorNames 2 - 656 + 684 @@ -2280,7 +2832,9 @@ YES 0 - + + YES + @@ -2607,6 +3161,11 @@ + + + + + Edge Properties View @@ -2913,6 +3472,116 @@ Selected Edges Array Controller + + 657 + + + YES + + + + + + 658 + + + YES + + + + + + 659 + + + + + 660 + + + + + 664 + + + YES + + + + + + 665 + + + + + 666 + + + YES + + + + + + 667 + + + + + 668 + + + YES + + + + + + 669 + + + + + 670 + + + YES + + + + + + 671 + + + + + 672 + + + YES + + + + + + 673 + + + + + 674 + + + Source Anchor Names Array Controller + + + 681 + + + Target Anchor Names Array Controller + @@ -3009,8 +3678,24 @@ 463.IBPluginDependency 575.IBPluginDependency 585.IBPluginDependency - - + 657.IBPluginDependency + 658.IBPluginDependency + 659.IBPluginDependency + 660.IBPluginDependency + 664.IBPluginDependency + 665.IBPluginDependency + 666.IBPluginDependency + 667.IBPluginDependency + 668.IBPluginDependency + 669.IBPluginDependency + 670.IBPluginDependency + 671.IBPluginDependency + 672.IBPluginDependency + 673.IBPluginDependency + 674.IBPluginDependency + 681.IBPluginDependency + + YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3102,6 +3787,22 @@ 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 @@ -3116,7 +3817,7 @@ - 656 + 717 @@ -3130,7 +3831,7 @@ applyStyleToSelectedNodes: clearStyleOfSelectedNodes: - + YES id id @@ -3143,7 +3844,7 @@ applyStyleToSelectedNodes: clearStyleOfSelectedNodes: - + YES applyStyleToSelectedNodes: @@ -3160,240 +3861,13 @@ - - PropertyInspectorController - NSWindowController - - YES - - YES - addEdgeAtom: - addEdgeNodeAtom: - addEdgeNodeProperty: - addEdgeProperty: - addGraphAtom: - addGraphProperty: - addNodeAtom: - addNodeProperty: - refreshDocument: - removeEdgeNodeProperty: - removeEdgeProperty: - removeGraphProperty: - removeNodeProperty: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - addEdgeAtom: - addEdgeNodeAtom: - addEdgeNodeProperty: - addEdgeProperty: - addGraphAtom: - addGraphProperty: - addNodeAtom: - addNodeProperty: - refreshDocument: - removeEdgeNodeProperty: - removeEdgeProperty: - removeGraphProperty: - removeNodeProperty: - - - YES - - addEdgeAtom: - id - - - addEdgeNodeAtom: - id - - - addEdgeNodeProperty: - id - - - addEdgeProperty: - id - - - addGraphAtom: - id - - - addGraphProperty: - id - - - addNodeAtom: - id - - - addNodeProperty: - id - - - refreshDocument: - id - - - removeEdgeNodeProperty: - id - - - removeEdgeProperty: - id - - - removeGraphProperty: - id - - - removeNodeProperty: - id - - - - - YES - - YES - edgeDataArrayController - edgeNodeCheckbox - edgeNodeDataArrayController - edgeNodeLabelField - edgePropertiesView - graphDataArrayController - graphPropertiesView - nodeDataArrayController - nodePropertiesView - propertyInspectorView - selectedEdgesArrayController - selectedNodesArrayController - - - YES - NSArrayController - NSButton - NSArrayController - NSTextField - NSView - NSArrayController - NSView - NSArrayController - NSView - SFBInspectorView - NSArrayController - NSArrayController - - - - YES - - YES - edgeDataArrayController - edgeNodeCheckbox - edgeNodeDataArrayController - edgeNodeLabelField - edgePropertiesView - graphDataArrayController - graphPropertiesView - nodeDataArrayController - nodePropertiesView - propertyInspectorView - selectedEdgesArrayController - selectedNodesArrayController - - - YES - - edgeDataArrayController - NSArrayController - - - edgeNodeCheckbox - NSButton - - - edgeNodeDataArrayController - NSArrayController - - - edgeNodeLabelField - NSTextField - - - edgePropertiesView - NSView - - - graphDataArrayController - NSArrayController - - - graphPropertiesView - NSView - - - nodeDataArrayController - NSArrayController - - - nodePropertiesView - NSView - - - propertyInspectorView - SFBInspectorView - - - selectedEdgesArrayController - NSArrayController - - - selectedNodesArrayController - NSArrayController - - - - - IBProjectSource - ./Classes/PropertyInspectorController.h - - - - SFBInspectorView - NSView - - IBProjectSource - ./Classes/SFBInspectorView.h - - 0 IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 @@ -3409,7 +3883,7 @@ NSRemoveTemplate NSSwitch - + YES {8, 8} {8, 8} diff --git a/tikzit/English.lproj/StylePalette.xib b/tikzit/English.lproj/StylePalette.xib index af04249..2d3472c 100644 --- a/tikzit/English.lproj/StylePalette.xib +++ b/tikzit/English.lproj/StylePalette.xib @@ -1,52 +1,49 @@ - 1050 - 11C74 - 1617 - 1138.23 - 567.00 + 1070 + 12C60 + 2843 + 1187.34 + 625.00 com.apple.InterfaceBuilder.CocoaPlugin - 1617 + 2843 YES - NSColorWell - NSMenu - NSSliderCell - NSButton - NSCustomObject NSArrayController - NSSlider + NSButton + NSButtonCell NSCollectionView - NSCustomView - NSTableView + NSCollectionViewItem + NSColorWell NSComboBox - NSTextField NSComboBoxCell - NSWindowTemplate - NSTextFieldCell - NSButtonCell - NSTableColumn + NSCustomObject + NSCustomView + NSMenu + NSMenuItem + NSPopUpButton NSPopUpButtonCell - NSCollectionViewItem - NSView NSScrollView NSScroller - NSPopUpButton - NSMenuItem + NSSlider + NSSliderCell + NSTableColumn + NSTableView + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate YES com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - + PluginDependencyRecalculationVersion + YES @@ -79,27 +76,26 @@ 274 {193, 313} - SFBInspectorView {193, 313} - - {{0, 0}, {1440, 878}} + {{0, 0}, {1600, 1200}} {200, 246} {10000000000000, 10000000000000} YES - + 268 {33, 33} + + YES - 2 SelectableNodeView @@ -113,11 +109,10 @@ 268 {{67, 164}, {122, 23}} - YES - 343014976 + 342884416 272630784 @@ -151,18 +146,20 @@ 274 - {15, 0} + {13, 0} YES + NO + YES YES - 12 + 10 10 1000 - 75628032 + 75497472 0 @@ -177,7 +174,7 @@ - 338820672 + 338690112 1024 @@ -212,7 +209,7 @@ 15 tableViewAction: - -767524864 + -765427712 @@ -224,17 +221,17 @@ 1 + NO 268 {{67, 193}, {28, 18}} - YES - -1804468671 + -1804599231 272630784 @@ -248,17 +245,17 @@ + NO 268 {{101, 188}, {87, 26}} - YES - 67239424 + 67108864 0 @@ -271,17 +268,17 @@ YES NO + NO 268 {{64, 269}, {125, 26}} - YES - -2076049856 + -2076180416 2048 LucidaGrande @@ -289,7 +286,7 @@ 16 - 109199615 + 109199360 129 @@ -314,22 +311,22 @@ YES 2 + NO 268 {{97, 217}, {21, 22}} - YES - 67239424 + 67108864 0 - -2039201537 + -2039201792 6 NSImage @@ -340,22 +337,22 @@ 400 75 + NO 268 {{97, 243}, {21, 22}} - YES - 67239424 + 67108864 0 - -2039201537 + -2039201792 6 @@ -363,17 +360,17 @@ 400 75 + NO 268 {{4, 169}, {57, 14}} - YES - 68288064 + 68157504 4195328 Category @@ -390,17 +387,17 @@ + NO 268 {{5, 194}, {57, 14}} - YES - 68288064 + 68157504 4195328 Scale @@ -408,17 +405,17 @@ + NO 266 {{67, 301}, {119, 19}} - YES - -1804468671 + -1804599231 272630784 @@ -427,17 +424,17 @@ + NO 268 {{4, 303}, {57, 14}} - YES - 68288064 + 68157504 4195328 Name @@ -445,17 +442,17 @@ + NO 268 {{4, 275}, {57, 14}} - YES - 68288064 + 68157504 4195328 Shape @@ -463,17 +460,17 @@ + NO 268 {{4, 220}, {56, 14}} - YES - 68288064 + 68157504 4195328 Fill @@ -481,17 +478,17 @@ + NO 268 {{4, 247}, {57, 14}} - YES - 68288064 + 68157504 4195328 Stroke @@ -499,6 +496,7 @@ + NO @@ -512,9 +510,9 @@ {{67, 216}, {28, 23}} - YES + NO YES 1 @@ -533,9 +531,9 @@ {{67, 243}, {28, 23}} - YES + NO YES 1 @@ -547,15 +545,14 @@ 268 {{64, 137}, {125, 26}} - YES - -2076049856 + -2076180416 2048 - 109199615 + 109199360 129 @@ -576,17 +573,17 @@ YES 2 + NO 268 {{4, 143}, {57, 14}} - YES - 68288064 + 68157504 4195328 Show @@ -594,22 +591,22 @@ + NO 292 {{110, 5}, {52, 26}} - YES - -2080244224 + -2080374784 134217728 Clear - -2038021889 + -2038022144 162 @@ -617,22 +614,22 @@ 400 75 + NO 292 {{59, 5}, {52, 26}} - YES - -2080244224 + -2080374784 134217728 Apply - -2038021889 + -2038022144 162 @@ -640,22 +637,22 @@ 400 75 + NO 292 {{30, 5}, {26, 26}} - YES - -2080244224 + -2080374784 134217728 - -2033434369 + -2033434624 162 NSImage @@ -666,22 +663,22 @@ 400 75 + NO 292 {{5, 5}, {26, 26}} - YES - -2080244224 + -2080374784 134217728 - -2033434369 + -2033434624 162 NSImage @@ -692,6 +689,7 @@ 400 75 + NO @@ -708,7 +706,6 @@ 274 {181, 99} - {0, 0} {0, 0} @@ -725,7 +722,6 @@ {{1, 1}, {181, 99}} - @@ -736,8 +732,8 @@ -2147483392 {{234, 1}, {15, 143}} - + NO _doScroller: 1 @@ -748,8 +744,8 @@ -2147483392 {{1, 144}, {233, 15}} - + NO 1 _doScroller: @@ -758,17 +754,18 @@ {{5, 34}, {183, 101}} - 133682 + 0.25 + 4 + 1 {193, 326} - NSView @@ -810,7 +807,7 @@ YES - + 268 YES @@ -819,15 +816,14 @@ 268 {{66, 105}, {125, 26}} - YES - -2076049856 + -2076180416 2048 - 109199615 + 109199360 129 @@ -848,17 +844,17 @@ YES 2 + NO 268 {{6, 111}, {57, 14}} - YES - 68288064 + 68157504 4195328 Show @@ -866,6 +862,7 @@ + NO @@ -882,10 +879,11 @@ 256 {180, 68} - _NS:1197 YES + NO + YES -2147483392 @@ -899,7 +897,7 @@ 40 1000 - 75628096 + 75497536 2048 @@ -919,7 +917,7 @@ - 337772096 + 337641536 2048 Text Cell @@ -951,7 +949,6 @@ {{1, 1}, {180, 68}} - _NS:1195 @@ -963,9 +960,9 @@ -2147483392 {{224, 17}, {15, 102}} - _NS:1214 + NO _doScroller: 0.98863636363636365 @@ -975,9 +972,9 @@ -2147483392 {{1, 73}, {143, 15}} - _NS:1216 + NO 1 _doScroller: @@ -986,7 +983,6 @@ {{6, 33}, {182, 70}} - _NS:1193 133682 @@ -994,23 +990,25 @@ QSAAAEEgAABBmAAAQZgAAA + 0.25 + 4 + 1 268 {{133, 155}, {60, 26}} - _NS:179 YES - -2076049856 + -2076180416 67110912 _NS:179 - 109199615 + 109199360 129 @@ -1081,23 +1079,23 @@ YES 2 + NO 268 {{2, 155}, {60, 26}} - _NS:179 YES - -2076049856 + -2076180416 2048 _NS:179 - 109199615 + 109199360 129 @@ -1159,17 +1157,17 @@ YES 2 + NO 268 {{69, 132}, {122, 23}} - YES - 343014976 + 342884416 272630784 @@ -1183,18 +1181,20 @@ 274 - {15, 0} + {13, 0} YES + NO + YES YES - 12 + 10 10 1000 - 75628032 + 75497472 0 @@ -1205,7 +1205,7 @@ - 338820672 + 338690112 1024 @@ -1224,7 +1224,7 @@ 15 tableViewAction: - -767524864 + -765427712 @@ -1236,17 +1236,17 @@ 1 + NO 268 {{6, 137}, {57, 14}} - YES - 68288064 + 68157504 4195328 Category @@ -1254,23 +1254,23 @@ + NO 268 {{59, 155}, {77, 26}} - _NS:179 YES - -2076049856 + -2076180416 2048 _NS:179 - 109199615 + 109199360 129 @@ -1335,17 +1335,17 @@ YES 2 + NO 266 {{69, 183}, {119, 19}} - YES - -1804468671 + -1804599231 272630784 @@ -1354,17 +1354,17 @@ + NO 268 {{6, 185}, {57, 14}} - YES - 68288064 + 68157504 4195328 Name @@ -1372,22 +1372,21 @@ + NO 292 {{111, 4}, {52, 26}} - - YES - -2080244224 + -2080374784 134217728 Clear - -2038021889 + -2038022144 162 @@ -1395,22 +1394,22 @@ 400 75 + NO 292 {{60, 4}, {52, 26}} - YES - -2080244224 + -2080374784 134217728 Apply - -2038021889 + -2038022144 162 @@ -1418,22 +1417,22 @@ 400 75 + NO 292 {{31, 4}, {26, 26}} - YES - -2080244224 + -2080374784 134217728 - -2033434369 + -2033434624 162 @@ -1441,22 +1440,22 @@ 400 75 + NO 292 {{6, 4}, {26, 26}} - YES - -2080244224 + -2080374784 134217728 - -2033434369 + -2033434624 162 @@ -1464,11 +1463,10 @@ 400 75 + NO {193, 208} - - _NS:499 NSView @@ -1521,38 +1519,6 @@ 5 - - - view - - - - 54 - - - - itemPrototype - - - - 55 - - - - contentArray: nodeStyles - - - - - - contentArray: nodeStyles - contentArray - nodeStyles - 2 - - - 58 - collectionView @@ -1577,14 +1543,6 @@ 75 - - - stylePaletteController - - - - 108 - setStrokeToClosestHashed: @@ -1610,403 +1568,390 @@ 497 - - toolTip: representedObject.name - - - - - - toolTip: representedObject.name - toolTip - representedObject.name - 2 - + + nodeStyleView + + - 504 + 650 - delegate - - + edgeStyleView + + - 505 + 651 - - filterPredicate: displayedNodeStylePredicate - - - - - - filterPredicate: displayedNodeStylePredicate - filterPredicate - displayedNodeStylePredicate - 2 - + + nodeStyleArrayController + + - 626 + 652 - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - - contentValues: arrangedObjects.@distinctUnionOfObjects.category - contentValues - arrangedObjects.@distinctUnionOfObjects.category - - YES - - YES - NSInsertsNullPlaceholder - NSNullPlaceholder - - - YES - - uncategorized - - - 2 - + + nodeStyleInspectorView + + - 630 + 653 - - selectedValue: displayedNodeStyleCategory - - - - - - selectedValue: displayedNodeStyleCategory - selectedValue - displayedNodeStyleCategory - - 2 - + + addNodeStyle: + + - 631 + 727 - - value: selection.name - - - - - - value: selection.name - value - selection.name - 2 - + + applyActiveNodeStyle: + + - 634 + 729 - - selectedValue: selection.shapeName - - - - - - selectedValue: selection.shapeName - selectedValue - selection.shapeName - 2 - + + clearActiveNodeStyle: + + - 635 + 731 - - value: selection.strokeColor - + + filteredNodeStyleArrayController + - - - - value: selection.strokeColor - value - selection.strokeColor - 2 - - 636 + 733 - - hidden: selection.strokeColorIsKnown - - - - - - hidden: selection.strokeColorIsKnown - hidden - selection.strokeColorIsKnown - 2 - + + edgeStyleArrayController + + - 637 + 734 - - value: selection.fillColor - - - - - - value: selection.fillColor - value - selection.fillColor - 2 - + + addEdgeStyle: + + - 638 + 735 + + + + appleActiveEdgeStyle: + + + + 737 + + + + clearActiveEdgeStyle: + + + + 738 + + + + filteredEdgeStyleArrayController + + + + 818 - hidden: selection.fillColorIsKnown - + value: selection.strokeColor + - + - hidden: selection.fillColorIsKnown - hidden - selection.fillColorIsKnown + value: selection.strokeColor + value + selection.strokeColor 2 - 639 + 636 - value: selection.scale - + value: selection.fillColor + - + - value: selection.scale + value: selection.fillColor value - selection.scale + selection.fillColor 2 - 640 + 638 - value: selection.scale - + value: selection.name + - + - value: selection.scale + value: selection.name value - selection.scale + selection.name 2 - 641 - - - - nodeStyleView - - - - 650 + 634 - edgeStyleView - - + itemPrototype + + - 651 + 55 - nodeStyleArrayController - - + delegate + + - 652 + 505 - - nodeStyleInspectorView - - + + content: arrangedObjects + + + + + + content: arrangedObjects + content + arrangedObjects + 2 + - 653 + 840 - contentArray: edgeStyles - - + selectionIndexes: selectionIndexes + + - - - contentArray: edgeStyles - contentArray - edgeStyles + + + selectionIndexes: selectionIndexes + selectionIndexes + selectionIndexes + 2 - 725 - - - - addNodeStyle: - - - - 727 + 841 - - applyActiveNodeStyle: - - + + toolTip: representedObject.name + + + + + + toolTip: representedObject.name + toolTip + representedObject.name + 2 + - 729 + 504 - - clearActiveNodeStyle: - - + + view + + - 731 + 54 - filteredNodeStyleArrayController - - + stylePaletteController + + - 733 + 108 - - edgeStyleArrayController - - + + contentArray: nodeStyles + + + + + + contentArray: nodeStyles + contentArray + nodeStyles + 2 + - 734 + 58 - - addEdgeStyle: - - + + enabled: canRemove + + + + + + enabled: canRemove + enabled + canRemove + 2 + - 735 + 820 - - appleActiveEdgeStyle: - - + + hidden: selection.strokeColorIsKnown + + + + + + hidden: selection.strokeColorIsKnown + hidden + selection.strokeColorIsKnown + 2 + - 737 + 637 - - clearActiveEdgeStyle: - - + + hidden: selection.fillColorIsKnown + + + + + + hidden: selection.fillColorIsKnown + hidden + selection.fillColorIsKnown + 2 + - 738 + 639 - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects + enabled: canRemove + + + + + + enabled: canRemove + enabled + canRemove + 2 + + + 823 + + + + selectedValue: selection.shapeName + + + + + + selectedValue: selection.shapeName + selectedValue + selection.shapeName 2 - 759 + 635 - value: selection.name - - + value: selection.scale + + - - - value: selection.name + + + value: selection.scale value - selection.name + selection.scale 2 - 762 + 641 - value: arrangedObjects.name - - + value: selection.scale + + - - - value: arrangedObjects.name + + + value: selection.scale value - arrangedObjects.name + selection.scale 2 - 780 + 640 contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - + + + + + contentValues: arrangedObjects.@distinctUnionOfObjects.category contentValues arrangedObjects.@distinctUnionOfObjects.category 2 - 787 + 858 value: selection.category - - + + - - + + value: selection.category value selection.category @@ -2014,20 +1959,20 @@ NSNullPlaceholder uncategorized - + 2 - 788 + 859 contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - + + + + + contentValues: arrangedObjects.@distinctUnionOfObjects.category contentValues arrangedObjects.@distinctUnionOfObjects.category @@ -2038,7 +1983,7 @@ NSInsertsNullPlaceholder NSNullPlaceholder - + YES uncategorized @@ -2047,73 +1992,128 @@ 2 - 797 + 630 - selectedValue: displayedEdgeStyleCategory - + selectedValue: displayedNodeStyleCategory + - + - selectedValue: displayedEdgeStyleCategory + selectedValue: displayedNodeStyleCategory selectedValue - displayedEdgeStyleCategory - + displayedNodeStyleCategory + 2 - 798 + 631 - selectionIndexes: selectionIndexes - - + filterPredicate: displayedNodeStylePredicate + + - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - + + + filterPredicate: displayedNodeStylePredicate + filterPredicate + displayedNodeStylePredicate 2 - 800 + 626 + + + + remove: + + + + 821 - filterPredicate: displayedEdgeStylePredicate - + contentArray: nodeStyles + - + - filterPredicate: displayedEdgeStylePredicate - filterPredicate - displayedEdgeStylePredicate + contentArray: nodeStyles + contentArray + nodeStyles 2 - 807 + 843 - selectedTag: selection.tailStyle - + contentArray: edgeStyles + + + + + + contentArray: edgeStyles + contentArray + edgeStyles + 2 + + + 725 + + + + enabled: canRemove + - + - selectedTag: selection.tailStyle - selectedTag - selection.tailStyle + enabled: canRemove + enabled + canRemove 2 - 811 + 862 + + + + enabled: canRemove + + + + + + enabled: canRemove + enabled + canRemove + 2 + + + 864 + + + + value: selection.name + + + + + + value: selection.name + value + selection.name + 2 + + + 762 @@ -2133,193 +2133,191 @@ - selectedTag: selection.headStyle - - - - - - selectedTag: selection.headStyle - selectedTag - selection.headStyle + contentValues: arrangedObjects.@distinctUnionOfObjects.category + + + + + + contentValues: arrangedObjects.@distinctUnionOfObjects.category + contentValues + arrangedObjects.@distinctUnionOfObjects.category 2 - 817 + 787 - - filteredEdgeStyleArrayController - + + value: selection.category + + + + + value: selection.category + value + selection.category + + NSNullPlaceholder + uncategorized + + + 2 + - 818 + 788 - enabled: canRemove - - + selectedTag: selection.tailStyle + + - - - enabled: canRemove - enabled - canRemove + + + selectedTag: selection.tailStyle + selectedTag + selection.tailStyle 2 - 820 - - - - remove: - - - - 821 + 811 - enabled: canRemove - - + selectedTag: selection.headStyle + + - - - enabled: canRemove - enabled - canRemove + + + selectedTag: selection.headStyle + selectedTag + selection.headStyle 2 - 823 + 817 content: arrangedObjects - - - - - + + + + + content: arrangedObjects content arrangedObjects 2 - 840 + 759 selectionIndexes: selectionIndexes - - + + - - + + selectionIndexes: selectionIndexes selectionIndexes selectionIndexes - + 2 - 841 + 800 - contentArray: nodeStyles - - + value: arrangedObjects.name + + - - - contentArray: nodeStyles - contentArray - nodeStyles + + + value: arrangedObjects.name + value + arrangedObjects.name 2 - 843 + 780 contentValues: arrangedObjects.@distinctUnionOfObjects.category - - - - - + + + + + contentValues: arrangedObjects.@distinctUnionOfObjects.category contentValues arrangedObjects.@distinctUnionOfObjects.category + + YES + + YES + NSInsertsNullPlaceholder + NSNullPlaceholder + + + YES + + uncategorized + + 2 - 858 + 797 - value: selection.category - - + selectedValue: displayedEdgeStyleCategory + + - - - value: selection.category - value - selection.category - - NSNullPlaceholder - uncategorized - - + + + selectedValue: displayedEdgeStyleCategory + selectedValue + displayedEdgeStyleCategory + 2 - 859 - - - - remove: - - - - 860 + 798 - enabled: canRemove - - + filterPredicate: displayedEdgeStylePredicate + + - - - enabled: canRemove - enabled - canRemove + + + filterPredicate: displayedEdgeStylePredicate + filterPredicate + displayedEdgeStylePredicate 2 - 862 + 807 - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - + + remove: + + - 864 + 860 @@ -2343,7 +2341,9 @@ YES 0 - + + YES + @@ -3244,7 +3244,7 @@ 96.IBPluginDependency 97.IBPluginDependency - + YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3386,7 +3386,7 @@ - 866 + 869 @@ -3400,7 +3400,7 @@ applyStyleToSelectedNodes: clearStyleOfSelectedNodes: - + YES id id @@ -3413,7 +3413,7 @@ applyStyleToSelectedNodes: clearStyleOfSelectedNodes: - + YES applyStyleToSelectedNodes: @@ -3430,218 +3430,13 @@ - - SFBInspectorView - NSView - - IBProjectSource - ./Classes/SFBInspectorView.h - - - - SelectableCollectionViewItem - NSCollectionViewItem - - stylePaletteController - StylePaletteController - - - stylePaletteController - - stylePaletteController - StylePaletteController - - - - IBProjectSource - ./Classes/SelectableCollectionViewItem.h - - - - SelectableNodeView - NSView - - IBProjectSource - ./Classes/SelectableNodeView.h - - - - StylePaletteController - NSWindowController - - YES - - YES - addEdgeStyle: - addNodeStyle: - appleActiveEdgeStyle: - applyActiveNodeStyle: - clearActiveEdgeStyle: - clearActiveNodeStyle: - refreshCollection: - setFillToClosestHashed: - setStrokeToClosestHashed: - - - YES - id - id - id - id - id - id - id - id - id - - - - YES - - YES - addEdgeStyle: - addNodeStyle: - appleActiveEdgeStyle: - applyActiveNodeStyle: - clearActiveEdgeStyle: - clearActiveNodeStyle: - refreshCollection: - setFillToClosestHashed: - setStrokeToClosestHashed: - - - YES - - addEdgeStyle: - id - - - addNodeStyle: - id - - - appleActiveEdgeStyle: - id - - - applyActiveNodeStyle: - id - - - clearActiveEdgeStyle: - id - - - clearActiveNodeStyle: - id - - - refreshCollection: - id - - - setFillToClosestHashed: - id - - - setStrokeToClosestHashed: - id - - - - - YES - - YES - collectionView - edgeStyleArrayController - edgeStyleView - filteredEdgeStyleArrayController - filteredNodeStyleArrayController - nodeStyleArrayController - nodeStyleInspectorView - nodeStyleView - shapeDropdown - - - YES - NSCollectionView - NSArrayController - NSView - NSArrayController - NSArrayController - NSArrayController - SFBInspectorView - NSView - NSPopUpButton - - - - YES - - YES - collectionView - edgeStyleArrayController - edgeStyleView - filteredEdgeStyleArrayController - filteredNodeStyleArrayController - nodeStyleArrayController - nodeStyleInspectorView - nodeStyleView - shapeDropdown - - - YES - - collectionView - NSCollectionView - - - edgeStyleArrayController - NSArrayController - - - edgeStyleView - NSView - - - filteredEdgeStyleArrayController - NSArrayController - - - filteredNodeStyleArrayController - NSArrayController - - - nodeStyleArrayController - NSArrayController - - - nodeStyleInspectorView - SFBInspectorView - - - nodeStyleView - NSView - - - shapeDropdown - NSPopUpButton - - - - - IBProjectSource - ./Classes/StylePaletteController.h - - 0 IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 @@ -3667,19 +3462,19 @@ NSRemoveTemplate emblem-important - + YES {26, 12} {26, 12} - {26, 2} + {26, 12} {26, 14} {26, 14} {58, 14} - {58, 2} - {58, 13} + {58, 14} + {58, 14} {8, 8} - {9, 8} - {7, 2} + {11, 11} + {10, 3} {8, 8} {12.801422684151452, 12.801422684151452} diff --git a/tikzit/TikZiT-Info.plist b/tikzit/TikZiT-Info.plist index 7345266..a495c5b 100644 --- a/tikzit/TikZiT-Info.plist +++ b/tikzit/TikZiT-Info.plist @@ -2,10 +2,6 @@ - SUPublicDSAKeyFile - tikzit_dsa_pub.pem - SUFeedURL - http://tikzit.sourceforge.net/appcast/tikzit.xml CFBundleDevelopmentRegion English CFBundleDocumentTypes @@ -57,5 +53,9 @@ MainMenu NSPrincipalClass NSApplication + SUFeedURL + http://tikzit.sourceforge.net/appcast/tikzit.xml + SUPublicDSAKeyFile + tikzit_dsa_pub.pem diff --git a/tikzit/TikZiT.xcodeproj/project.pbxproj b/tikzit/TikZiT.xcodeproj/project.pbxproj index 7b73ab4..1cc67ab 100644 --- a/tikzit/TikZiT.xcodeproj/project.pbxproj +++ b/tikzit/TikZiT.xcodeproj/project.pbxproj @@ -116,6 +116,19 @@ 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 */; }; + 7F6E2C7D16B007F000BFE20D /* EdgeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7814498C22006942FB /* EdgeStyle.m */; }; + 7F6E2C7E16B0080400BFE20D /* GraphElementProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 55432E051444BF2D00401BB3 /* GraphElementProperty.m */; }; + 7F6E2C7F16B0081D00BFE20D /* PropertyHolder.m in Sources */ = {isa = PBXBuildFile; fileRef = 55397C7E144999C4006942FB /* PropertyHolder.m */; }; + 7F6E2C8016B0083300BFE20D /* Shape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E4013E1FB0A0023F4C6 /* Shape.m */; }; + 7F6E2C8116B0084600BFE20D /* Transformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F9585B1181B09600F99434 /* Transformer.m */; }; + 7F6E2C8216B008B000BFE20D /* DiamondShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55598E341635372E0023450A /* DiamondShape.m */; }; + 7F6E2C8316B008B000BFE20D /* CircleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3413E1FAED0023F4C6 /* CircleShape.m */; }; + 7F6E2C8416B008B000BFE20D /* RectangleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3613E1FAED0023F4C6 /* RectangleShape.m */; }; + 7F6E2C8516B008B000BFE20D /* RegularPolyShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3813E1FAED0023F4C6 /* RegularPolyShape.m */; }; + 7F6E2C8616B008B000BFE20D /* TikzShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652E3A13E1FAEE0023F4C6 /* TikzShape.m */; }; + 7F6E2C8916B0091300BFE20D /* maths.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F6E2C8716B0091300BFE20D /* maths.m */; }; + 7F6E2C8A16B0096000BFE20D /* SupportDir.m in Sources */ = {isa = PBXBuildFile; fileRef = 55652DF813E1F2030023F4C6 /* SupportDir.m */; }; + 7F6E2C8C16B00ABA00BFE20D /* SFBInspectors.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 55CA98D412EF8FCE008F0368 /* SFBInspectors.framework */; }; 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 */; }; @@ -159,6 +172,16 @@ name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + 7F6E2C8B16B00A9200BFE20D /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 7F6E2C8C16B00ABA00BFE20D /* SFBInspectors.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -314,6 +337,7 @@ 55F9E04311FF54F000F5659E /* NSString+LatexConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+LatexConstants.h"; path = "src/common/NSString+LatexConstants.h"; sourceTree = ""; }; 55F9E04411FF54F000F5659E /* NSString+LatexConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+LatexConstants.m"; path = "src/common/NSString+LatexConstants.m"; sourceTree = ""; }; 55FF4E64116A401B000C22B4 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; }; + 7F6E2C8716B0091300BFE20D /* maths.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = maths.m; path = src/common/test/maths.m; sourceTree = ""; }; 8D15AC360486D014006FF6A4 /* TikZiT-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TikZiT-Info.plist"; sourceTree = ""; }; 8D15AC370486D014006FF6A4 /* TikZiT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TikZiT.app; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -470,6 +494,7 @@ 5504C82B11D23595002A1478 /* parser.m */, 5504C82C11D23595002A1478 /* test.h */, 5504C82D11D23595002A1478 /* test.m */, + 7F6E2C8716B0091300BFE20D /* maths.m */, ); name = Test; sourceTree = ""; @@ -655,6 +680,7 @@ buildPhases = ( 5589AA6211C5429C0064D310 /* Sources */, 5589AA6311C5429C0064D310 /* Frameworks */, + 7F6E2C8B16B00A9200BFE20D /* CopyFiles */, ); buildRules = ( ); @@ -768,16 +794,28 @@ 5589AA8011C542E60064D310 /* NodeStyle.m in Sources */, 5589AA6C11C542D30064D310 /* TikzGraphAssembler.m in Sources */, 5589AA6D11C542D30064D310 /* tikzlexer.lm in Sources */, + 7F6E2C8216B008B000BFE20D /* DiamondShape.m in Sources */, + 7F6E2C8316B008B000BFE20D /* CircleShape.m in Sources */, + 7F6E2C8A16B0096000BFE20D /* SupportDir.m in Sources */, + 7F6E2C8416B008B000BFE20D /* RectangleShape.m in Sources */, + 7F6E2C8516B008B000BFE20D /* RegularPolyShape.m in Sources */, + 7F6E2C8616B008B000BFE20D /* TikzShape.m in Sources */, + 7F6E2C8016B0083300BFE20D /* Shape.m in Sources */, + 7F6E2C8116B0084600BFE20D /* Transformer.m in Sources */, 5589AA6E11C542D30064D310 /* tikzparser.ym in Sources */, 5504C82E11D23595002A1478 /* common.m in Sources */, 5504C82F11D23595002A1478 /* parser.m in Sources */, 5504C83011D23595002A1478 /* test.m in Sources */, + 7F6E2C7F16B0081D00BFE20D /* PropertyHolder.m in Sources */, 5504C83211D23685002A1478 /* main.m in Sources */, 5504C93F11D39422002A1478 /* osx.m in Sources */, 555B313511D8C6DA00CAECF5 /* color.m in Sources */, + 7F6E2C7E16B0080400BFE20D /* GraphElementProperty.m in Sources */, + 7F6E2C7D16B007F000BFE20D /* EdgeStyle.m in Sources */, 55CA9ACA12F831E5008F0368 /* RColor.m in Sources */, 552202C4135F15FD007EA086 /* MultiField.m in Sources */, 55900AA1135FA918002DD28E /* MultiCombo.m in Sources */, + 7F6E2C8916B0091300BFE20D /* maths.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -940,6 +978,7 @@ AppKit, ); PRODUCT_NAME = tests; + SDKROOT = macosx10.7; }; name = Debug; }; @@ -964,6 +1003,7 @@ AppKit, ); PRODUCT_NAME = tests; + SDKROOT = macosx10.7; ZERO_LINK = NO; }; name = Release; @@ -986,8 +1026,9 @@ INFOPLIST_FILE = "TikZiT-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_NAME = TikZiT; - SDKROOT = macosx10.5; + SDKROOT = macosx10.7; }; name = Debug; }; @@ -1007,8 +1048,9 @@ INFOPLIST_FILE = "TikZiT-Info.plist"; INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_NAME = TikZiT; - SDKROOT = macosx10.5; + SDKROOT = macosx10.7; }; name = Release; }; diff --git a/tikzit/src/common/Edge.h b/tikzit/src/common/Edge.h index 607fcc6..cc636dd 100644 --- a/tikzit/src/common/Edge.h +++ b/tikzit/src/common/Edge.h @@ -58,6 +58,8 @@ typedef enum { float weight; EdgeStyle *style; GraphElementData *data; + NSString *sourceAnchor; + NSString *targetAnchor; // When set to YES, lazily create the edge node, and keep it around when set // to NO (at least until saved/loaded). @@ -114,6 +116,18 @@ typedef enum { */ @property (retain) Node *edgeNode; +/*! + @property sourceAnchor + @brief The source node anchor point, as in north or center. + */ +@property (copy) NSString *sourceAnchor; + +/*! + @property targetAnchor + @brief The target node anchor point, as in north or center. + */ +@property (copy) NSString *targetAnchor; + /*! @property hasEdgeNode @brief A read/write property. When set to true, a new edge node is actually constructed. diff --git a/tikzit/src/common/Edge.m b/tikzit/src/common/Edge.m index 2514fc1..3e25888 100644 --- a/tikzit/src/common/Edge.m +++ b/tikzit/src/common/Edge.m @@ -39,6 +39,8 @@ source = nil; target = nil; edgeNode = nil; + sourceAnchor = [[NSString alloc] initWithString:@""]; + targetAnchor = [[NSString alloc] initWithString:@""]; return self; } @@ -389,6 +391,25 @@ [self didChangeValueForKey:@"hasEdgeNode"]; } +@synthesize sourceAnchor; +@synthesize targetAnchor; + +- (void)setSourceAnchor:(NSString *)_sourceAnchor{ + if(_sourceAnchor != nil){ + sourceAnchor = _sourceAnchor; + }else{ + sourceAnchor = @""; + } +} + +- (void)setTargetAnchor:(NSString *)_targetAnchor{ + if(_targetAnchor != nil){ + targetAnchor = _targetAnchor; + }else{ + targetAnchor = @""; + } +} + @synthesize data; - (void) insertObject:(GraphElementProperty*)gep inDataAtIndex:(NSUInteger)index { @@ -587,6 +608,8 @@ [source release]; [target release]; [data release]; + [sourceAnchor release]; + [targetAnchor release]; [super dealloc]; } diff --git a/tikzit/src/common/Graph.m b/tikzit/src/common/Graph.m index 7f7345c..c8da128 100644 --- a/tikzit/src/common/Graph.m +++ b/tikzit/src/common/Graph.m @@ -726,10 +726,10 @@ [code appendFormat:@"\t\t\\draw%@ (%@%@) to %@(%@%@);\n", ([edata isEqual:@""]) ? @"" : [NSString stringWithFormat:@" %@", edata], [[e source] name], - ([[e source] style] == nil) ? @".center" : @"", + ([[e source] style] == nil) ? @".center" : ([e sourceAnchor] == @"") ? @"" : [NSString stringWithFormat:@".%@", [e sourceAnchor]], nodeStr, ([e source] == [e target]) ? @"" : [[e target] name], - ([e source] != [e target] && [[e target] style] == nil) ? @".center" : @"" + ([e source] != [e target] && [[e target] style] == nil) ? @".center" : ([e targetAnchor] == @"") ? @"" : [NSString stringWithFormat:@".%@", [e targetAnchor]] ]; } diff --git a/tikzit/src/common/TikzGraphAssembler.h b/tikzit/src/common/TikzGraphAssembler.h index 1b006dd..adaf443 100644 --- a/tikzit/src/common/TikzGraphAssembler.h +++ b/tikzit/src/common/TikzGraphAssembler.h @@ -45,7 +45,8 @@ - (void)finishNode; - (void)prepareEdge; -- (void)setEdgeSource:(NSString*)src target:(NSString*)targ; +- (void)setEdgeSource:(NSString*)edge anchor:(NSString*)anch; +- (void)setEdgeTarget:(NSString*)edge anchor:(NSString*)anch; - (void)finishEdge; - (void)invalidate; diff --git a/tikzit/src/common/TikzGraphAssembler.m b/tikzit/src/common/TikzGraphAssembler.m index 5e60b05..7d8d0e7 100644 --- a/tikzit/src/common/TikzGraphAssembler.m +++ b/tikzit/src/common/TikzGraphAssembler.m @@ -37,9 +37,9 @@ static id currentAssembler = nil; void yyerror(const char *str) { NSLog(@"Parse error: %s", str); if (currentAssembler != nil) { - NSError *error = [NSError - errorWithMessage:[NSString stringWithCString:str] - code:TZ_ERR_PARSE]; + NSError *error = [NSError errorWithDomain:@"net.sourceforge.tikzit" + code:TZ_ERR_PARSE + userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithCString:str] forKey: NSLocalizedDescriptionKey]]; [currentAssembler invalidateWithError:error]; } } @@ -137,14 +137,19 @@ int yywrap() { currentEdge = nil; } -- (void)setEdgeSource:(NSString*)src target:(NSString*)targ { - if (![targ isEqualToString:@""]) { - [currentEdge setSource:[nodeMap objectForKey:src]]; - [currentEdge setTarget:[nodeMap objectForKey:targ]]; +- (void)setEdgeSource:(NSString*)edge anchor:(NSString*)anch { + Node *s = [nodeMap objectForKey:edge]; + [currentEdge setSource:s]; + [currentEdge setSourceAnchor:anch]; +} + +- (void)setEdgeTarget:(NSString*)edge anchor:(NSString*)anch { + if (![edge isEqualToString:@""]) { + [currentEdge setTarget:[nodeMap objectForKey:edge]]; + [currentEdge setTargetAnchor:anch]; } else { - Node *s = [nodeMap objectForKey:src]; - [currentEdge setSource:s]; - [currentEdge setTarget:s]; + [currentEdge setTargetAnchor:anch]; + [currentEdge setTarget:[currentEdge source]]; } } diff --git a/tikzit/src/common/test/parser.m b/tikzit/src/common/test/parser.m index 29dabe7..3346acd 100644 --- a/tikzit/src/common/test/parser.m +++ b/tikzit/src/common/test/parser.m @@ -34,7 +34,7 @@ void testParser() { [TikzGraphAssembler setup]; - NodeStyle *rn = [NodeStyle defaultStyleWithName:@"rn"]; + NodeStyle *rn = [NodeStyle defaultNodeStyleWithName:@"rn"]; NSArray *styles = [NSArray arrayWithObject:rn]; NSString *tikz = @@ -74,9 +74,12 @@ void testParser() { TEST(@"Edge has edge node", [e1 edgeNode]!=nil); TEST(@"Edge node labeled correctly", [[[e1 edgeNode] label] isEqualToString:@"-"]); - NSString *sty = [[[[[e1 edgeNode] data] atoms] objectEnumerator] nextObject]; - TEST(@"Edge node styled correctly", sty!=nil && [sty isEqualToString:@"tick"]); - +// NSString *sty = [[[[[e1 edgeNode] data] atoms] objectEnumerator] nextObject]; +// TEST(@"Edge node styled correctly", sty!=nil && [sty isEqualToString:@"tick"]); + + PUTS(@"Source anchor: %@",[e1 sourceAnchor]); + PUTS(@"Target anchor: %@",[e1 targetAnchor]); + endTestBlock(@"parser"); [pool drain]; diff --git a/tikzit/src/common/test/test.m b/tikzit/src/common/test/test.m index 8437646..9afcd67 100644 --- a/tikzit/src/common/test/test.m +++ b/tikzit/src/common/test/test.m @@ -160,7 +160,7 @@ void runTests(); int main() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - setColorEnabled (YES); + setColorEnabled (NO); startTests(); runTests(); diff --git a/tikzit/src/common/tikzlexer.lm b/tikzit/src/common/tikzlexer.lm index 9418d83..9af0c8d 100644 --- a/tikzit/src/common/tikzlexer.lm +++ b/tikzit/src/common/tikzlexer.lm @@ -39,13 +39,13 @@ \\end return LATEXEND; \{tikzpicture\} return TIKZPICTURE; \{pgfonlayer\} return PGFONLAYER; -\.center return ANCHORCENTER; \( return LEFTPARENTHESIS; \) return RIGHTPARENTHESIS; \[ return LEFTBRACKET; \] return RIGHTBRACKET; ; return SEMICOLON; , return COMMA; +\. return FULLSTOP; = return EQUALS; \\draw return DRAW; to return TO; @@ -65,7 +65,7 @@ at return AT; return REALNUMBER; } -\\?[a-zA-Z<>\-\']+ { //' +\\?[a-zA-Z<>\-\'][a-zA-Z<>\-\'0-9]* { //' yylval.nsstr=[NSString stringWithUTF8String:yytext]; return LWORD; } diff --git a/tikzit/src/common/tikzparser.ym b/tikzit/src/common/tikzparser.ym index 57f0600..532b6c8 100644 --- a/tikzit/src/common/tikzparser.ym +++ b/tikzit/src/common/tikzparser.ym @@ -39,17 +39,19 @@ extern void yyerror(const char *str); NSString *nsstr; }; +%error-verbose + %token LATEXBEGIN %token LATEXEND %token TIKZPICTURE %token PGFONLAYER -%token ANCHORCENTER %token LEFTPARENTHESIS %token RIGHTPARENTHESIS %token LEFTBRACKET %token RIGHTBRACKET %token SEMICOLON %token COMMA +%token FULLSTOP %token EQUALS %token DRAW %token TO @@ -65,9 +67,10 @@ extern void yyerror(const char *str); %token DELIMITEDSTRING %type nodename +%type anchor +%type optanchor %type nodeid %type coords -%type target %type propsym %type propsyms %type val @@ -119,6 +122,8 @@ propsym: nodecmd : NODE { [[TikzGraphAssembler currentAssembler] prepareNode]; }; +nodename: LEFTPARENTHESIS nodeid RIGHTPARENTHESIS { $$ = $2; }; + node: nodecmd optproperties nodename AT coords nodelabel SEMICOLON { @@ -135,8 +140,17 @@ nodelabel: [n setLabel:$1]; } -optanchor: | ANCHORCENTER; -nodename: LEFTPARENTHESIS nodeid optanchor RIGHTPARENTHESIS { $$ = $2; }; +anchor: LWORD { $$ = $1; } | NATURALNUMBER { $$ = $1; }; + +optanchor: { $$ = @""; } | FULLSTOP anchor { $$ = $2; }; + +source: LEFTPARENTHESIS nodeid optanchor RIGHTPARENTHESIS + { + TikzGraphAssembler *a = [TikzGraphAssembler currentAssembler]; + [a setEdgeSource:$2 + anchor:$3]; + }; + nodeid: LWORD { $$ = $1; } | NATURALNUMBER { $$ = $1; }; coords: @@ -147,14 +161,23 @@ coords: edgecmd : DRAW { [[TikzGraphAssembler currentAssembler] prepareEdge]; }; edge: - edgecmd optproperties nodename TO optedgenode target SEMICOLON + edgecmd optproperties source TO optedgenode target SEMICOLON { TikzGraphAssembler *a = [TikzGraphAssembler currentAssembler]; - [a setEdgeSource:$3 - target:$6]; [a finishEdge]; }; -target: nodename { $$=$1; } | selfloop { $$=@""; }; +target: LEFTPARENTHESIS nodeid optanchor RIGHTPARENTHESIS + { + TikzGraphAssembler *a = [TikzGraphAssembler currentAssembler]; + [a setEdgeTarget:$2 + anchor:$3]; + } + | selfloop + { + TikzGraphAssembler *a = [TikzGraphAssembler currentAssembler]; + [a setEdgeTarget:@"" + anchor:@""]; + }; selfloop: LEFTPARENTHESIS RIGHTPARENTHESIS; altnodecmd: ALTNODE { [[TikzGraphAssembler currentAssembler] prepareNode]; }; diff --git a/tikzit/src/osx/PropertyInspectorController.h b/tikzit/src/osx/PropertyInspectorController.h index cb14021..0625f9b 100644 --- a/tikzit/src/osx/PropertyInspectorController.h +++ b/tikzit/src/osx/PropertyInspectorController.h @@ -18,6 +18,8 @@ IBOutlet NSView *nodePropertiesView; IBOutlet NSView *graphPropertiesView; IBOutlet NSView *edgePropertiesView; + IBOutlet NSComboBox *sourceAnchorComboBox; + IBOutlet NSComboBox *targetAnchorComboBox; IBOutlet NSTextField *edgeNodeLabelField; IBOutlet NSButton *edgeNodeCheckbox; IBOutlet NSArrayController *nodeDataArrayController; @@ -25,6 +27,12 @@ IBOutlet NSArrayController *edgeDataArrayController; IBOutlet NSArrayController *edgeNodeDataArrayController; + NSMutableArray *sourceAnchorNames; + IBOutlet NSArrayController *sourceAnchorNamesArrayController; + + NSMutableArray *targetAnchorNames; + IBOutlet NSArrayController *targetAnchorNamesArrayController; + NSMutableArray *selectedNodes; IBOutlet NSArrayController *selectedNodesArrayController; @@ -46,6 +54,8 @@ //@property (readonly) BOOL enableEdgeDataControls; @property (retain) NSMutableArray *selectedNodes; @property (retain) NSMutableArray *selectedEdges; +@property (retain) NSMutableArray *sourceAnchorNames; +@property (retain) NSMutableArray *targetAnchorNames; @property (retain) StylePaletteController *stylePaletteController; - (id)initWithWindowNibName:(NSString *)windowNibName; diff --git a/tikzit/src/osx/PropertyInspectorController.m b/tikzit/src/osx/PropertyInspectorController.m index 8254949..1411549 100644 --- a/tikzit/src/osx/PropertyInspectorController.m +++ b/tikzit/src/osx/PropertyInspectorController.m @@ -22,6 +22,7 @@ @synthesize stylePaletteController; @synthesize selectedNodes, selectedEdges; +@synthesize sourceAnchorNames, targetAnchorNames; - (id)initWithWindowNibName:(NSString *)windowNibName { [super initWithWindowNibName:windowNibName]; @@ -50,8 +51,10 @@ name:@"NSWindowDidBecomeMainNotification" object:nil]; - - + [self setSourceAnchorNames: [[NSMutableArray alloc] initWithArray: [@"north south west east" componentsSeparatedByString:@" "]]]; + + [self setTargetAnchorNames: [[NSMutableArray alloc] initWithArray:[@"north south west east" componentsSeparatedByString:@" "]]]; + [[self window] setLevel:NSNormalWindowLevel]; [self showWindow:self]; -- cgit v1.2.3