Move display option editing to VLSheetWindow

This commit is contained in:
Matthias Neeracher 2011-09-06 03:15:51 +02:00
parent 8b04419435
commit 6e44bc5264
9 changed files with 258 additions and 289 deletions

View File

@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1070</int>
<string key="IBDocument.SystemVersion">11C48</string>
<string key="IBDocument.SystemVersion">11B26</string>
<string key="IBDocument.InterfaceBuilderVersion">1617</string>
<string key="IBDocument.AppKitVersion">1138.18</string>
<string key="IBDocument.HIToolboxVersion">567.00</string>
<string key="IBDocument.AppKitVersion">1138</string>
<string key="IBDocument.HIToolboxVersion">566.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">1617</string>
@ -1584,7 +1584,7 @@
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1036200358"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMinSize">{890, 428}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<int key="NSWindowCollectionBehavior">128</int>
@ -1800,7 +1800,7 @@
</array>
<string key="NSFrameSize">{338, 127}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
@ -2385,7 +2385,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
</array>
<string key="NSFrameSize">{372, 142}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
@ -2403,7 +2403,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="144987606">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSButton" id="258969335">
@ -2411,6 +2411,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{334, 12}, {82, 32}}</string>
<reference key="NSSuperview" ref="144987606"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="637723766"/>
<int key="NSTag">1001</int>
<bool key="NSEnabled">YES</bool>
@ -2435,6 +2436,8 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{416, 12}, {113, 32}}</string>
<reference key="NSSuperview" ref="144987606"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<int key="NSTag">1000</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="584837621">
@ -2466,6 +2469,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{109, 72}, {69, 17}}</string>
<reference key="NSSuperview" ref="509937598"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="328622856"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="138800772">
@ -2483,6 +2487,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{164, 66}, {65, 26}}</string>
<reference key="NSSuperview" ref="509937598"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1032808070"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="627467092">
@ -2575,6 +2580,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{109, 46}, {62, 17}}</string>
<reference key="NSSuperview" ref="509937598"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="791084425"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="208063585">
@ -2592,6 +2598,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{164, 40}, {65, 26}}</string>
<reference key="NSSuperview" ref="509937598"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="91286836"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="605582134">
@ -2684,6 +2691,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{15, 72}, {92, 17}}</string>
<reference key="NSSuperview" ref="509937598"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="102112724"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="307904907">
@ -2701,6 +2709,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{15, 14}, {114, 17}}</string>
<reference key="NSSuperview" ref="509937598"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="709188531"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="19061262">
@ -2718,6 +2727,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">256</int>
<string key="NSFrame">{{164, 8}, {65, 26}}</string>
<reference key="NSSuperview" ref="509937598"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="642172756"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="62185014">
@ -2853,11 +2863,13 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
</array>
<string key="NSFrame">{{1, 1}, {244, 100}}</string>
<reference key="NSSuperview" ref="863383585"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="727038923"/>
</object>
</array>
<string key="NSFrame">{{17, 200}, {246, 116}}</string>
<reference key="NSSuperview" ref="144987606"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="509937598"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -2890,6 +2902,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 153}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="458372498"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="8258899">
@ -2972,6 +2985,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{99, 158}, {54, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="266379137"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="587288221">
@ -2989,6 +3003,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{97, 214}, {54, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="219147002"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="41613899">
@ -3006,6 +3021,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 185}, {69, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="839892417"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="804242312">
@ -3023,6 +3039,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{99, 185}, {54, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="122301163"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="542541366">
@ -3040,6 +3057,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 181}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="743522356"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="363498188">
@ -3121,6 +3139,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{76, 103}, {77, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="719009865"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="647784909">
@ -3138,6 +3157,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 130}, {55, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="987717168"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="593337202">
@ -3155,6 +3175,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{120, 130}, {33, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="914298269"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="722043476">
@ -3172,6 +3193,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 126}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="114601629"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="765922073">
@ -3254,6 +3276,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 99}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1045805863"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="97268764">
@ -3336,6 +3359,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{55, 75}, {98, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="887875715"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="484026002">
@ -3353,6 +3377,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 71}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="153772842"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="481342953">
@ -3435,6 +3460,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{59, 47}, {94, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="838857291"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="165321403">
@ -3452,6 +3478,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 43}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="968035490"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="1046169398">
@ -3534,6 +3561,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{65, 19}, {88, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="929450687"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="476815905">
@ -3551,6 +3579,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 15}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="258969335"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="533184280">
@ -3633,6 +3662,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{156, 209}, {60, 26}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="831816087"/>
<bool key="NSEnabled">YES</bool>
<object class="NSComboBoxCell" key="NSCell" id="995739835">
@ -3714,6 +3744,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 214}, {69, 17}}</string>
<reference key="NSSuperview" ref="1028994969"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="67430282"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="307992036">
@ -3729,11 +3760,13 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
</array>
<string key="NSFrame">{{1, 1}, {231, 243}}</string>
<reference key="NSSuperview" ref="642172756"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="540565409"/>
</object>
</array>
<string key="NSFrame">{{293, 56}, {233, 259}}</string>
<reference key="NSSuperview" ref="144987606"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1028994969"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -3755,9 +3788,11 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
</object>
</array>
<string key="NSFrameSize">{537, 336}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="863383585"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMinSize">{213, 129}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
@ -4077,54 +4112,6 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
</object>
<int key="connectionID">265</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedIndex: editNumTopLedgers</string>
<reference key="source" ref="328622856"/>
<reference key="destination" ref="911961120"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="328622856"/>
<reference key="NSDestination" ref="911961120"/>
<string key="NSLabel">selectedIndex: editNumTopLedgers</string>
<string key="NSBinding">selectedIndex</string>
<string key="NSKeyPath">editNumTopLedgers</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">325</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedIndex: editNumBotLedgers</string>
<reference key="source" ref="791084425"/>
<reference key="destination" ref="911961120"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="791084425"/>
<reference key="NSDestination" ref="911961120"/>
<string key="NSLabel">selectedIndex: editNumBotLedgers</string>
<string key="NSBinding">selectedIndex</string>
<string key="NSKeyPath">editNumBotLedgers</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">326</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedIndex: editNumStanzas</string>
<reference key="source" ref="709188531"/>
<reference key="destination" ref="911961120"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="709188531"/>
<reference key="NSDestination" ref="911961120"/>
<string key="NSLabel">selectedIndex: editNumStanzas</string>
<string key="NSBinding">selectedIndex</string>
<string key="NSKeyPath">editNumStanzas</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">327</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">fDisplaySheet</string>
@ -4469,6 +4456,62 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
</object>
<int key="connectionID">100521</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedIndex: sheetView.numTopLedgers</string>
<reference key="source" ref="328622856"/>
<reference key="destination" ref="911961120"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="328622856"/>
<reference key="NSDestination" ref="911961120"/>
<string key="NSLabel">selectedIndex: sheetView.numTopLedgers</string>
<string key="NSBinding">selectedIndex</string>
<string key="NSKeyPath">sheetView.numTopLedgers</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">100523</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedIndex: sheetView.numBotLedgers</string>
<reference key="source" ref="791084425"/>
<reference key="destination" ref="911961120"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="791084425"/>
<reference key="NSDestination" ref="911961120"/>
<string key="NSLabel">selectedIndex: sheetView.numBotLedgers</string>
<string key="NSBinding">selectedIndex</string>
<string key="NSKeyPath">sheetView.numBotLedgers</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">100524</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedIndex: sheetView.numStanzas</string>
<reference key="source" ref="709188531"/>
<reference key="destination" ref="911961120"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="709188531"/>
<reference key="NSDestination" ref="911961120"/>
<string key="NSLabel">selectedIndex: sheetView.numStanzas</string>
<string key="NSBinding">selectedIndex</string>
<string key="NSKeyPath">sheetView.numStanzas</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">100525</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">displaySheet</string>
<reference key="source" ref="911961120"/>
<reference key="destination" ref="244935157"/>
</object>
<int key="connectionID">100526</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@ -6447,7 +6490,7 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">100521</int>
<int key="maxID">100526</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -6469,126 +6512,6 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">IKImageView</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">crop:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">crop:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">crop:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/IKImageView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSDocument</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="printDocument:">id</string>
<string key="revertDocumentToSaved:">id</string>
<string key="runPageLayout:">id</string>
<string key="saveDocument:">id</string>
<string key="saveDocumentAs:">id</string>
<string key="saveDocumentTo:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="printDocument:">
<string key="name">printDocument:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="revertDocumentToSaved:">
<string key="name">revertDocumentToSaved:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="runPageLayout:">
<string key="name">runPageLayout:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="saveDocument:">
<string key="name">saveDocument:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="saveDocumentAs:">
<string key="name">saveDocumentAs:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="saveDocumentTo:">
<string key="name">saveDocumentTo:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/NSDocument.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLDocument</string>
<string key="superclassName">NSDocument</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="adjustTempo:">id</string>
<string key="dump:">id</string>
<string key="play:">id</string>
<string key="playMusic:">id</string>
<string key="playStop:">id</string>
<string key="stop:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="adjustTempo:">
<string key="name">adjustTempo:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="dump:">
<string key="name">dump:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="play:">
<string key="name">play:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="playMusic:">
<string key="name">playMusic:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="playStop:">
<string key="name">playStop:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="stop:">
<string key="name">stop:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/VLDocument.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLLogWindow</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">log</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">log</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">log</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/VLLogWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLPDFWindow</string>
<string key="superclassName">NSWindowController</string>
@ -6618,7 +6541,6 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="copy:">id</string>
<string key="cut:">id</string>
<string key="delete:">id</string>
<string key="editDisplayOptions:">id</string>
<string key="editRepeat:">id</string>
<string key="editRepeatEnding:">id</string>
<string key="endSheetWithButton:">id</string>
@ -6632,6 +6554,8 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="setKey:">id</string>
<string key="setTime:">id</string>
<string key="transposeOctave:">id</string>
<string key="zoomIn:">id</string>
<string key="zoomOut:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="copy:">
@ -6646,10 +6570,6 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="name">delete:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="editDisplayOptions:">
<string key="name">editDisplayOptions:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="editRepeat:">
<string key="name">editRepeat:</string>
<string key="candidateClassName">id</string>
@ -6702,9 +6622,16 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="name">transposeOctave:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="zoomIn:">
<string key="name">zoomIn:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="zoomOut:">
<string key="name">zoomOut:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="fDisplaySheet">id</string>
<string key="fDivisionMenu">id</string>
<string key="fEndingMsg">id</string>
<string key="fEndingSheet">id</string>
@ -6716,10 +6643,6 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="fTimeMenu">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="fDisplaySheet">
<string key="name">fDisplaySheet</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo" key="fDivisionMenu">
<string key="name">fDivisionMenu</string>
<string key="candidateClassName">id</string>
@ -6766,26 +6689,61 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="className">VLSheetWindow</string>
<string key="superclassName">NSWindowController</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="adjustTempo:">id</string>
<string key="playMusic:">id</string>
<string key="playStop:">id</string>
<string key="showOutput:">id</string>
<string key="stop:">id</string>
<string key="togglePlayElements:">id</string>
<string key="zoomIn:">id</string>
<string key="zoomOut:">id</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="adjustTempo:">
<string key="name">adjustTempo:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="playMusic:">
<string key="name">playMusic:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="playStop:">
<string key="name">playStop:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="showOutput:">
<string key="name">showOutput:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="stop:">
<string key="name">stop:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="togglePlayElements:">
<string key="name">togglePlayElements:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="zoomIn:">
<string key="name">zoomIn:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo" key="zoomOut:">
<string key="name">zoomOut:</string>
<string key="candidateClassName">id</string>
</object>
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="displaySheet">NSWindow</string>
<string key="logWin">VLLogWindow</string>
<string key="pdfWin">VLPDFWindow</string>
<string key="progressIndicator">NSProgressIndicator</string>
<string key="sheetView">VLSheetView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="displaySheet">
<string key="name">displaySheet</string>
<string key="candidateClassName">NSWindow</string>
</object>
<object class="IBToOneOutletInfo" key="logWin">
<string key="name">logWin</string>
<string key="candidateClassName">VLLogWindow</string>
@ -6808,14 +6766,6 @@ AAAAAAAAAAAAAHRleHQAAAAAQ29weXJpZ2h0IEFwcGxlIENvbXB1dGVyLCBJbmMuLCAyMDA1AAAAAA</
<string key="minorKey">./Classes/VLSheetWindow.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">VLToolbarButton</string>
<string key="superclassName">NSButton</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/VLToolbarButton.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>

View File

@ -53,13 +53,13 @@ enum {
int playElements;
NSURL * tmpURL;
NSFileWrapper * vcsWrapper;
NSMutableArray* observers;
NSMutableDictionary*validTmpFiles;
int repeatVolta;
bool brandNew;
bool hasMusicSequence;
VLSheetWindow * sheetWin;
VLKeyValueUndo* undo;
VLKeyValueUndo* staffMetrics;
NSRange previewRange;
float playRate;
float baseTempo;
@ -95,7 +95,6 @@ enum {
- (void) changedFileWrapper;
- (void) willChangeSong;
- (void) didChangeSong;
- (void) addObserver:(id)observer;
@end

View File

@ -104,7 +104,6 @@
brandNew = true;
hasMusicSequence = false;
playRate = 1.0;
observers = [[NSMutableArray alloc] init];
validTmpFiles = [[NSMutableDictionary alloc] initWithCapacity:10];
[self setHasUndoManager:YES];
undo =
@ -117,6 +116,22 @@
@"", @"songGroove",
@"", @"songTempo",
nil]];
staffMetrics =
[[VLKeyValueUndo alloc] initWithOwner:self
keysAndNames:[NSDictionary dictionaryWithObjectsAndKeys:
@"", @"chordSize",
@"", @"lyricSize",
@"", @"staffSize",
@"", @"topPadding",
@"", @"titlePadding",
@"", @"staffPadding",
@"", @"chordPadding",
@"", @"lyricPadding",
nil]
update:^(NSString *keyPath) {
[validTmpFiles removeObjectForKey:@"ly"];
[validTmpFiles removeObjectForKey:@"pdf"];
}];
}
return self;
}
@ -128,15 +143,8 @@
[super updateChangeCount:changeType];
}
- (void) addObserver:(id)observer
{
[observers addObject:observer];
}
- (void) close
{
[observers makeObjectsPerformSelector:@selector(removeObservers:) withObject:self];
[observers removeAllObjects];
[super close];
}
@ -152,8 +160,8 @@
[songComposer release];
[songArranger release];
[vcsWrapper release];
[staffMetrics release];
[undo release];
[observers release];
if (tmpURL) {
[[NSFileManager defaultManager] removeItemAtURL:tmpURL error:nil];
@ -266,30 +274,6 @@
[self didChangeSong];
}
- (void) setChordSize:(float)size
{
[[[self undoManager] prepareWithInvocationTarget:self] setChordSize:chordSize];
chordSize = size;
[validTmpFiles removeObjectForKey:@"ly"];
[validTmpFiles removeObjectForKey:@"pdf"];
}
- (void) setLyricSize:(float)size
{
[[[self undoManager] prepareWithInvocationTarget:self] setLyricSize:lyricSize];
lyricSize = size;
[validTmpFiles removeObjectForKey:@"ly"];
[validTmpFiles removeObjectForKey:@"pdf"];
}
- (void) setStaffSize:(float)size
{
[[[self undoManager] prepareWithInvocationTarget:self] setStaffSize:staffSize];
staffSize = size;
[validTmpFiles removeObjectForKey:@"ly"];
[validTmpFiles removeObjectForKey:@"pdf"];
}
- (void)setPlayElements:(int)elements
{
[self willChangeValueForKey:@"playElements"];

View File

@ -6,16 +6,20 @@
//
// (MN) Matthias Neeracher
//
// Copyright © 2007 Matthias Neeracher
// Copyright © 2007-2011 Matthias Neeracher
//
#import <Cocoa/Cocoa.h>
typedef void (^VLKeyValueUpdateHook)(NSString * keyPath);
@interface VLKeyValueUndo : NSObject {
id owner;
NSDictionary * keysAndNames;
VLKeyValueUpdateHook updateHook;
}
- (id)initWithOwner:(id)owner keysAndNames:(NSDictionary *)keysAndNames update:(VLKeyValueUpdateHook)hook;
- (id)initWithOwner:(id)owner keysAndNames:(NSDictionary *)keysAndNames;
@end

View File

@ -14,12 +14,12 @@
@implementation VLKeyValueUndo
- (id)initWithOwner:(id)o keysAndNames:(NSDictionary *)kn
- (id)initWithOwner:(id)o keysAndNames:(NSDictionary *)kn update:(VLKeyValueUpdateHook)hook
{
owner = o;
keysAndNames = [kn retain];
updateHook = Block_copy(hook);
[owner addObserver:self];
for (NSEnumerator * e = [keysAndNames keyEnumerator];
NSString * key = [e nextObject];
)
@ -30,17 +30,19 @@
return self;
}
- (void)removeObservers:(id)target
- (id)initWithOwner:(id)o keysAndNames:(NSDictionary *)kn
{
for (NSEnumerator * e = [keysAndNames keyEnumerator];
NSString * key = [e nextObject];
)
[target removeObserver:self forKeyPath:key];
return [self initWithOwner:o keysAndNames:kn update:nil];
}
- (void) dealloc
{
for (NSEnumerator * e = [keysAndNames keyEnumerator];
NSString * key = [e nextObject];
)
[owner removeObserver:self forKeyPath:key];
[keysAndNames release];
[updateHook release];
[super dealloc];
}
@ -55,6 +57,8 @@
[undo registerUndoWithTarget:owner selector:@selector(setValuesForKeysWithDictionary:)
object: [NSDictionary dictionaryWithObjectsAndKeys: oldVal, keyPath, nil]];
[undo setActionName: name];
if (updateHook)
updateHook(keyPath);
}
}

View File

@ -13,6 +13,7 @@
#import "VLModel.h"
#import "VLLayout.h"
#import "VLKeyValueUndo.h"
@class VLDocument;
@ -98,11 +99,11 @@ enum VLCursorVisual {
size_t fHighlightStanza;
bool fHighlightNow;
bool fHighlightOne;
VLKeyValueUndo * fUndo;
IBOutlet id fFieldEditor;
IBOutlet id fRepeatSheet;
IBOutlet id fEndingSheet;
IBOutlet id fDisplaySheet;
IBOutlet id fRepeatMsg;
IBOutlet id fEndingMsg;
IBOutlet id fGrooveMenu;
@ -111,15 +112,19 @@ enum VLCursorVisual {
IBOutlet id fDivisionMenu;
}
@property (nonatomic) int numTopLedgers;
@property (nonatomic) int numBotLedgers;
@property (nonatomic) int numStanzas;
- (IBAction) setKey:(id)sender;
- (IBAction) setTime:(id)sender;
- (IBAction) setDivisions:(id)sender;
- (IBAction) hideFieldEditor:(id)sender;
- (IBAction) endSheetWithButton:(id)sender;
- (IBAction) selectGroove:(id)sender;
- (IBAction) editDisplayOptions:(id)sender;
- (IBAction) transposeOctave:(id)sender;
- (IBAction) zoomIn: (id) sender;
- (IBAction) zoomOut: (id) sender;
- (VLDocument *) document;
- (VLSong *) song;
@ -133,6 +138,7 @@ enum VLCursorVisual {
- (VLMusicElement)accidentalForVisual:(uint16_t)visual;
- (float) noteYInMeasure:(int)measure withGrid:(int)vertPos;
- (float) noteXInMeasure:(int)measure at:(VLFraction)at;
- (void) needsRecalculation;
- (void) scrollMeasureToVisible:(int)measure;
@ -151,6 +157,7 @@ enum VLCursorVisual {
- (void) playWithGroove:(NSString *)groove;
- (NSColor *)textBackgroundColorForSystem:(int)system;
- (void)removeObservers:(id)target;
@end

View File

@ -25,6 +25,11 @@
@implementation VLSheetView
@synthesize
numTopLedgers = fNumTopLedgers,
numBotLedgers = fNumBotLedgers,
numStanzas = fNumStanzas;
static NSString * sElementNames[kMusicElements] = {
@"g-clef",
@"flat",
@ -105,10 +110,25 @@ static float sFlatPos[] = {
fNumStanzas = 2;
fLastMeasures = 0;
fHighlightOne = false;
fUndo = [[VLKeyValueUndo alloc]
initWithOwner:self
keysAndNames:[NSDictionary dictionaryWithObjectsAndKeys:
@"", @"numTopLedgers",
@"", @"numBotLedgers",
@"", @"numStanzas",
nil]];
}
return self;
}
- (void)dealloc
{
[self removeObservers:[self document]];
delete [] fMusic;
[fUndo release];
[super dealloc];
}
- (BOOL)acceptsFirstResponder
{
return YES;
@ -292,6 +312,12 @@ static float sFlatPos[] = {
fNeedsRecalc = kNoRecalc;
}
- (void)needsRecalculation
{
fNeedsRecalc = kRecalc;
[self setNeedsDisplay:YES];
}
const char * sBreak[3] = {"", "\xE2\xA4\xBE", "\xE2\x8E\x98"};
- (void)drawGridForSystem:(int)system
@ -934,7 +960,6 @@ const float kSemiFloor = -1.0f*kLineH;
{
VLDocument * doc = [self document];
[doc addObserver:self];
[doc addObserver:self forKeyPath:@"song" options:0 context:nil];
[doc addObserver:self forKeyPath:@"songKey" options:0 context:nil];
[doc addObserver:self forKeyPath:@"songTime" options:0 context:nil];
@ -1004,49 +1029,5 @@ const float kSemiFloor = -1.0f*kLineH;
[[self document] playWithGroove:groove inSections:[self sectionsInSelection]];
}
- (IBAction)editDisplayOptions:(id)sender
{
NSUndoManager * undoMgr = [[self document] undoManager];
[undoMgr setGroupsByEvent:NO];
[undoMgr beginUndoGrouping];
VLSheetWindow * wc = [[self window] windowController];
[wc setValue:[NSNumber numberWithInt:fNumTopLedgers]
forKey:@"editNumTopLedgers"];
[wc setValue:[NSNumber numberWithInt:fNumBotLedgers]
forKey:@"editNumBotLedgers"];
[wc setValue:[NSNumber numberWithInt:fNumStanzas]
forKey:@"editNumStanzas"];
[NSApp beginSheet:fDisplaySheet modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(didEndDisplaySheet:returnCode:contextInfo:)
contextInfo:nil];
}
- (void)didEndDisplaySheet:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)ctx
{
NSUndoManager * undoMgr = [[self document] undoManager];
[undoMgr setActionName:@"Display Options"];
[undoMgr endUndoGrouping];
[undoMgr setGroupsByEvent:YES];
switch (returnCode) {
case NSAlertFirstButtonReturn: {
VLSheetWindow * wc = [[self window] windowController];
fNumTopLedgers = [[wc valueForKey:@"editNumTopLedgers"] intValue];
fNumBotLedgers = [[wc valueForKey:@"editNumBotLedgers"] intValue];
fNumStanzas = [[wc valueForKey:@"editNumStanzas"] intValue];
fNeedsRecalc = kRecalc;
[self setNeedsDisplay:YES];
} break;
default:
[undoMgr undo];
break;
}
[sheet orderOut:self];
}
@end

View File

@ -28,11 +28,12 @@
@class VLLogWindow;
@class VLPDFWindow;
@interface VLSheetWindow : NSWindowController <NSToolbarDelegate> {
@interface VLSheetWindow : NSWindowController <NSToolbarDelegate,NSWindowDelegate> {
IBOutlet VLSheetView * sheetView;
IBOutlet NSProgressIndicator * progressIndicator;
IBOutlet VLLogWindow * logWin;
IBOutlet VLPDFWindow * pdfWin;
IBOutlet NSWindow * displaySheet;
id soundStartObserver;
id soundStopObserver;
@ -52,6 +53,8 @@
- (IBAction) playStop:(id)sender;
- (IBAction) playMusic:(id)sender;
- (IBAction) adjustTempo:(id)sender;
- (IBAction) zoomIn: (id) sender;
- (IBAction) zoomOut: (id) sender;
- (VLEditable *) editTarget;
- (void) setEditTarget:(VLEditable *)editable;

View File

@ -13,6 +13,8 @@
#import "VLPDFWindow.h"
#import "VLLogWindow.h"
#import "VLSoundOut.h"
#import "VLSheetView.h"
#import "VLSheetViewSelection.h"
@implementation VLEditable
@ -189,5 +191,40 @@
[[self document] setSongTempo:[[self document] songTempo]+[sender tag]];
}
- (IBAction)editDisplayOptions:(id)sender
{
NSUndoManager * undoMgr = [[self document] undoManager];
[undoMgr setGroupsByEvent:NO];
[undoMgr beginUndoGrouping];
[NSApp beginSheet:displaySheet modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(didEndDisplaySheet:returnCode:contextInfo:)
contextInfo:nil];
}
- (void)didEndDisplaySheet:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)ctx
{
NSUndoManager * undoMgr = [[self document] undoManager];
[undoMgr setActionName:@"Display Options"];
[undoMgr endUndoGrouping];
[undoMgr setGroupsByEvent:YES];
switch (returnCode) {
case NSAlertFirstButtonReturn:
[sheetView needsRecalculation];
break;
default:
[undoMgr undo];
break;
}
[sheet orderOut:self];
}
- (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)window
{
return [[self document] undoManager];
}
@end