Commit e378fa45 authored by David Fuhrmann's avatar David Fuhrmann

macosx: video effects panel: synchronize text field and stepper values...

macosx: video effects panel: synchronize text field and stepper values properly by using cocoa bindings

This simplifies the code and fixes stepper responseness.
This also fixes enabled state of some steppers.
parent 6310b880
......@@ -21,7 +21,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="730"/>
<integer value="1"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -3823,42 +3823,13 @@
<object class="NSCustomObject" id="707254443">
<string key="NSClassName">VLCVideoEffects</string>
</object>
<object class="NSUserDefaultsController" id="165610035">
<bool key="NSSharedInstance">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="357710165"/>
<reference key="destination" ref="444599762"/>
</object>
<int key="connectionID">173</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="227755793"/>
<reference key="destination" ref="814287388"/>
</object>
<int key="connectionID">175</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="967949481"/>
<reference key="destination" ref="357676033"/>
</object>
<int key="connectionID">239</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="373866613"/>
<reference key="destination" ref="614130362"/>
</object>
<int key="connectionID">253</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_window</string>
......@@ -5083,30 +5054,6 @@
</object>
<int key="connectionID">728</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="559295681"/>
<reference key="destination" ref="1003951278"/>
</object>
<int key="connectionID">748</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="147071705"/>
<reference key="destination" ref="228437242"/>
</object>
<int key="connectionID">773</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">takeIntegerValueFrom:</string>
<reference key="source" ref="642230523"/>
<reference key="destination" ref="979664043"/>
</object>
<int key="connectionID">774</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_clone_ckb</string>
......@@ -5235,6 +5182,446 @@
</object>
<int key="connectionID">797</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.puzzleRowsValue</string>
<reference key="source" ref="357710165"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="357710165"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.puzzleRowsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.puzzleRowsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">799</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">puzzleModifierChanged:</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="444599762"/>
</object>
<int key="connectionID">804</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.puzzleRowsValue</string>
<reference key="source" ref="444599762"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="444599762"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.puzzleRowsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.puzzleRowsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">805</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.puzzleColumnsValue</string>
<reference key="source" ref="227755793"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="227755793"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.puzzleColumnsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.puzzleColumnsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">807</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.puzzleColumnsValue</string>
<reference key="source" ref="814287388"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="814287388"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.puzzleColumnsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.puzzleColumnsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">809</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">puzzleModifierChanged:</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="814287388"/>
</object>
<int key="connectionID">810</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_puzzle_rows_stp</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="444599762"/>
</object>
<int key="connectionID">811</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_puzzle_columns_stp</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="814287388"/>
</object>
<int key="connectionID">812</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_sepia_stp</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="614130362"/>
</object>
<int key="connectionID">814</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropLeftValue</string>
<reference key="source" ref="785525140"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="785525140"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropLeftValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropLeftValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">816</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropLeftValue</string>
<reference key="source" ref="764981534"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="764981534"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropLeftValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropLeftValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">819</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropTopValue</string>
<reference key="source" ref="411363183"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="411363183"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropTopValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropTopValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">821</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropTopValue</string>
<reference key="source" ref="726085921"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="726085921"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropTopValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropTopValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">823</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropRightValue</string>
<reference key="source" ref="950709956"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="950709956"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropRightValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropRightValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">825</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropRightValue</string>
<reference key="source" ref="1010555455"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="1010555455"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropRightValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropRightValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">827</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropBottomValue</string>
<reference key="source" ref="190644777"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="190644777"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropBottomValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropBottomValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">829</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cropBottomValue</string>
<reference key="source" ref="308507287"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="308507287"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cropBottomValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cropBottomValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">831</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.wallRowsValue</string>
<reference key="source" ref="642230523"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="642230523"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.wallRowsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.wallRowsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">833</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.wallRowsValue</string>
<reference key="source" ref="979664043"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="979664043"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.wallRowsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.wallRowsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">836</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.wallColumnsValue</string>
<reference key="source" ref="147071705"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="147071705"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.wallColumnsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.wallColumnsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">838</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.wallColumnsValue</string>
<reference key="source" ref="228437242"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="228437242"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.wallColumnsValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.wallColumnsValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">840</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">wallModifierChanged:</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="979664043"/>
</object>
<int key="connectionID">841</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">wallModifierChanged:</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="228437242"/>
</object>
<int key="connectionID">842</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">cloneModifierChanged:</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="1003951278"/>
</object>
<int key="connectionID">843</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cloneValue</string>
<reference key="source" ref="559295681"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="559295681"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cloneValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cloneValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">845</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.cloneValue</string>
<reference key="source" ref="1003951278"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="1003951278"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.cloneValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.cloneValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">848</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_posterize_stp</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="357676033"/>
</object>
<int key="connectionID">850</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">posterizeModifierChanged:</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="357676033"/>
</object>
<int key="connectionID">851</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.posterizeValue</string>
<reference key="source" ref="357676033"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="357676033"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.posterizeValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.posterizeValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">853</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.posterizeValue</string>
<reference key="source" ref="967949481"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="967949481"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.posterizeValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.posterizeValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">855</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.sepiaValue</string>
<reference key="source" ref="373866613"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="373866613"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.sepiaValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.sepiaValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">857</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: self.sepiaValue</string>
<reference key="source" ref="614130362"/>
<reference key="destination" ref="707254443"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="614130362"/>
<reference key="NSDestination" ref="707254443"/>
<string key="NSLabel">value: self.sepiaValue</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">self.sepiaValue</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">859</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">sepiaModifierChanged:</string>
<reference key="source" ref="707254443"/>
<reference key="destination" ref="614130362"/>
</object>
<int key="connectionID">860</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
......@@ -7340,6 +7727,11 @@
<reference key="object" ref="192718726"/>
<reference key="parent" ref="1038213364"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">800</int>
<reference key="object" ref="165610035"/>
<reference key="parent" ref="0"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
......@@ -7416,6 +7808,7 @@
<string>171.IBPluginDependency</string>
<string>176.IBNumberFormatterBehaviorMetadataKey</string>
<string>176.IBNumberFormatterLocalizesFormatMetadataKey</string>
<string>176.IBNumberFormatterSampleNumberKey</string>
<string>176.IBPluginDependency</string>
<string>185.IBPluginDependency</string>
<string>185.IBViewBoundsToFrameTransform</string>
......@@ -7788,9 +8181,9 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{307, 257}, {642, 274}}</string>
<string>{{316, 110}, {642, 274}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{307, 257}, {642, 274}}</string>
<string>{{316, 110}, {642, 274}}</string>
<boolean value="NO"/>
<string>{196, 240}</string>
<string>{{357, 418}, {480, 270}}</string>
......@@ -7891,6 +8284,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1040"/>
<boolean value="YES"/>
<real value="4"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.binarymethod.BGHUDAppKitPlugin</string>
<object class="NSAffineTransform">
......@@ -8485,7 +8879,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">797</int>
<int key="maxID">860</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
......@@ -8946,17 +9340,21 @@
<string>o_posterize_ckb</string>
<string>o_posterize_fld</string>
<string>o_posterize_lbl</string>
<string>o_posterize_stp</string>
<string>o_profile_pop</string>
<string>o_psychedelic_ckb</string>
<string>o_puzzle_blackslot_ckb</string>
<string>o_puzzle_ckb</string>
<string>o_puzzle_columns_fld</string>
<string>o_puzzle_columns_lbl</string>
<string>o_puzzle_columns_stp</string>
<string>o_puzzle_rows_fld</string>
<string>o_puzzle_rows_lbl</string>
<string>o_puzzle_rows_stp</string>
<string>o_sepia_ckb</string>
<string>o_sepia_fld</string>
<string>o_sepia_lbl</string>
<string>o_sepia_stp</string>
<string>o_sharpen_ckb</string>
<string>o_sharpen_lbl</string>
<string>o_sharpen_sld</string>
......@@ -9086,6 +9484,10 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
......@@ -9159,17 +9561,21 @@
<string>o_posterize_ckb</string>
<string>o_posterize_fld</string>
<string>o_posterize_lbl</string>
<string>o_posterize_stp</string>
<string>o_profile_pop</string>
<string>o_psychedelic_ckb</string>
<string>o_puzzle_blackslot_ckb</string>
<string>o_puzzle_ckb</string>
<string>o_puzzle_columns_fld</string>
<string>o_puzzle_columns_lbl</string>
<string>o_puzzle_columns_stp</string>
<string>o_puzzle_rows_fld</string>
<string>o_puzzle_rows_lbl</string>
<string>o_puzzle_rows_stp</string>
<string>o_sepia_ckb</string>
<string>o_sepia_fld</string>
<string>o_sepia_lbl</string>
<string>o_sepia_stp</string>
<string>o_sharpen_ckb</string>
<string>o_sharpen_lbl</string>
<string>o_sharpen_sld</string>
......@@ -9465,6 +9871,10 @@
<string key="name">o_posterize_lbl</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_posterize_stp</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_profile_pop</string>
<string key="candidateClassName">id</string>
......@@ -9489,6 +9899,10 @@
<string key="name">o_puzzle_columns_lbl</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_puzzle_columns_stp</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_puzzle_rows_fld</string>
<string key="candidateClassName">id</string>
......@@ -9497,6 +9911,10 @@
<string key="name">o_puzzle_rows_lbl</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_puzzle_rows_stp</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_sepia_ckb</string>
<string key="candidateClassName">id</string>
......@@ -9509,6 +9927,10 @@
<string key="name">o_sepia_lbl</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_sepia_stp</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_sharpen_ckb</string>
<string key="candidateClassName">id</string>
......@@ -9720,6 +10142,14 @@
<string key="minorKey">AppKit.framework/Headers/NSLayoutConstraint.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSController</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSFormatter</string>
<string key="superclassName">NSObject</string>
......@@ -10216,6 +10646,14 @@
<string key="minorKey">AppKit.framework/Headers/NSTextFieldCell.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSUserDefaultsController</string>
<string key="superclassName">NSController</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSUserDefaultsController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
......
......@@ -78,8 +78,10 @@
IBOutlet id o_puzzle_ckb;
IBOutlet id o_puzzle_rows_lbl;
IBOutlet id o_puzzle_rows_fld;
IBOutlet id o_puzzle_rows_stp;
IBOutlet id o_puzzle_columns_lbl;
IBOutlet id o_puzzle_columns_fld;
IBOutlet id o_puzzle_columns_stp;
IBOutlet id o_puzzle_blackslot_ckb;
IBOutlet id o_clone_ckb;
IBOutlet id o_clone_number_fld;
......@@ -104,6 +106,7 @@
IBOutlet id o_sepia_ckb;
IBOutlet id o_sepia_lbl;
IBOutlet id o_sepia_fld;
IBOutlet id o_sepia_stp;
IBOutlet id o_noise_ckb;
IBOutlet id o_gradient_ckb;
IBOutlet id o_gradient_mode_lbl;
......@@ -117,6 +120,7 @@
IBOutlet id o_posterize_ckb;
IBOutlet id o_posterize_lbl;
IBOutlet id o_posterize_fld;
IBOutlet id o_posterize_stp;
IBOutlet id o_blur_ckb;
IBOutlet id o_blur_sld;
IBOutlet id o_blur_lbl;
......@@ -207,4 +211,24 @@
- (IBAction)enableAddLogo:(id)sender;
- (IBAction)addLogoModifierChanged:(id)sender;
- (IBAction)enableAnaglyph:(id)sender;
/* text field / stepper binding values */
/* use setter to modify gui elements */
@property (nonatomic) int cropLeftValue;
@property (nonatomic) int cropTopValue;
@property (nonatomic) int cropRightValue;
@property (nonatomic) int cropBottomValue;
@property (nonatomic) int puzzleRowsValue;
@property (nonatomic) int puzzleColumnsValue;
@property (nonatomic) int wallRowsValue;
@property (nonatomic) int wallColumnsValue;
@property (nonatomic) int cloneValue;
@property (nonatomic) int sepiaValue;
@property (nonatomic) int posterizeValue;
@end
......@@ -40,6 +40,13 @@
@implementation VLCVideoEffects
static VLCVideoEffects *_o_sharedInstance = nil;
@synthesize cropLeftValue, cropTopValue, cropRightValue, cropBottomValue;
@synthesize puzzleRowsValue, puzzleColumnsValue;
@synthesize wallRowsValue, wallColumnsValue;
@synthesize cloneValue;
@synthesize sepiaValue;
@synthesize posterizeValue;
+ (VLCVideoEffects *)sharedInstance
{
return _o_sharedInstance ? _o_sharedInstance : [[self alloc] init];
......@@ -328,23 +335,26 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[o_adjust_hue_lbl setEnabled: b_state];
[o_adjust_saturation_lbl setEnabled: b_state];
[o_adjust_reset_btn setEnabled: b_state];
[o_sharpen_sld setFloatValue: config_GetFloat(p_intf, "sharpen-sigma")];
[o_sharpen_sld setToolTip: [NSString stringWithFormat:@"%0.3f", config_GetFloat(p_intf, "sharpen-sigma")]];
[o_sharpen_sld setEnabled: [o_sharpen_ckb state]];
[o_sharpen_lbl setEnabled: [o_sharpen_ckb state]];
[o_banding_sld setIntValue: config_GetInt(p_intf, "gradfun-radius")];
[o_banding_sld setToolTip: [NSString stringWithFormat:@"%lli", config_GetInt(p_intf, "gradfun-radius")]];
[o_banding_sld setEnabled: [o_banding_ckb state]];
[o_banding_lbl setEnabled: [o_banding_ckb state]];
[o_grain_sld setFloatValue: config_GetFloat(p_intf, "grain-variance")];
[o_grain_sld setToolTip: [NSString stringWithFormat:@"%0.3f", config_GetFloat(p_intf, "grain-variance")]];
[o_grain_sld setEnabled: [o_grain_ckb state]];
[o_grain_lbl setEnabled: [o_grain_ckb state]];
[o_crop_top_fld setIntValue: 0];
[o_crop_left_fld setIntValue: 0];
[o_crop_right_fld setIntValue: 0];
[o_crop_bottom_fld setIntValue: 0];
[self setCropLeftValue: 0];
[self setCropTopValue: 0];
[self setCropRightValue: 0];
[self setCropBottomValue: 0];
[o_crop_sync_top_bottom_ckb setState: NSOffState];
[o_crop_sync_left_right_ckb setState: NSOffState];
......@@ -358,38 +368,41 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[o_transform_pop selectItemWithTag:[tmpString intValue]];
FREENULL(tmpChar);
[o_transform_pop setEnabled: [o_transform_ckb state]];
[o_puzzle_rows_fld setIntValue: config_GetInt(p_intf, "puzzle-rows")];
[o_puzzle_columns_fld setIntValue: config_GetInt(p_intf, "puzzle-cols")];
[self setPuzzleColumnsValue: config_GetInt(p_intf, "puzzle-cols")];
[self setPuzzleRowsValue: config_GetInt(p_intf, "puzzle-rows")];
[o_puzzle_blackslot_ckb setState: config_GetInt(p_intf, "puzzle-black-slot")];
b_state = [o_puzzle_ckb state];
[o_puzzle_rows_fld setEnabled: b_state];
[o_puzzle_rows_stp setEnabled: b_state];
[o_puzzle_rows_lbl setEnabled: b_state];
[o_puzzle_columns_fld setEnabled: b_state];
[o_puzzle_columns_stp setEnabled: b_state];
[o_puzzle_columns_lbl setEnabled: b_state];
[o_puzzle_blackslot_ckb setEnabled: b_state];
[o_clone_number_fld setIntValue: config_GetInt(p_intf, "clone-count")];
[self setCloneValue: config_GetInt(p_intf, "clone-count")];
b_state = [o_clone_ckb state];
[o_clone_number_lbl setEnabled: b_state];
[o_clone_number_fld setEnabled: b_state];
[o_clone_number_stp setEnabled: b_state];
b_state = [o_wall_ckb state];
[o_wall_numofrows_fld setIntValue: config_GetInt(p_intf, "wall-rows")];
[self setWallRowsValue: config_GetInt(p_intf, "wall-rows")];
[o_wall_numofrows_lbl setEnabled: b_state];
[o_wall_numofrows_fld setEnabled: b_state];
[o_wall_numofrows_stp setEnabled: b_state];
[o_wall_numofcols_fld setIntValue: config_GetInt(p_intf, "wall-cols")];
[self setWallColumnsValue: config_GetInt(p_intf, "wall-cols")];
[o_wall_numofcols_lbl setEnabled: b_state];
[o_wall_numofcols_fld setEnabled: b_state];
[o_wall_numofcols_stp setEnabled: b_state];
[o_threshold_color_fld setStringValue: [[NSString stringWithFormat:@"%llx", config_GetInt(p_intf, "colorthres-color")] uppercaseString]];
[o_threshold_saturation_sld setIntValue: config_GetInt(p_intf, "colorthres-saturationthres")];
[o_threshold_saturation_sld setToolTip: [NSString stringWithFormat:@"%lli", config_GetInt(p_intf, "colorthres-saturationthres")]];
[o_threshold_similarity_sld setIntValue: config_GetInt(p_intf, "colorthres-similaritythres")];
[o_threshold_similarity_sld setToolTip: [NSString stringWithFormat:@"%lli", config_GetInt(p_intf, "colorthres-similaritythres")]];
b_state = [o_threshold_ckb state];
[o_threshold_color_fld setEnabled: b_state];
[o_threshold_color_lbl setEnabled: b_state];
......@@ -397,9 +410,13 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[o_threshold_saturation_lbl setEnabled: b_state];
[o_threshold_similarity_sld setEnabled: b_state];
[o_threshold_similarity_lbl setEnabled: b_state];
[o_sepia_fld setIntValue: config_GetInt(p_intf, "sepia-intensity")];
[o_sepia_fld setEnabled: [o_sepia_ckb state]];
[o_sepia_lbl setEnabled: [o_sepia_ckb state]];
[self setSepiaValue: config_GetInt(p_intf, "sepia-intensity")];
b_state = [o_sepia_ckb state];
[o_sepia_fld setEnabled: b_state];
[o_sepia_stp setEnabled: b_state];
[o_sepia_lbl setEnabled: b_state];
tmpChar = config_GetPsz(p_intf, "gradient-mode");
tmpString = [NSString stringWithUTF8String: tmpChar];
if ([tmpString isEqualToString:@"hough"])
......@@ -416,12 +433,17 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[o_gradient_mode_lbl setEnabled: b_state];
[o_gradient_cartoon_ckb setEnabled: b_state];
[o_gradient_color_ckb setEnabled: b_state];
[o_extract_fld setStringValue: [[NSString stringWithFormat:@"%llx", config_GetInt(p_intf, "extract-component")] uppercaseString]];
[o_extract_fld setEnabled: [o_extract_ckb state]];
[o_extract_lbl setEnabled: [o_extract_ckb state]];
[o_posterize_fld setIntValue: config_GetInt(p_intf, "posterize-level")];
[o_posterize_fld setEnabled: [o_posterize_ckb state]];
[o_posterize_lbl setEnabled: [o_posterize_ckb state]];
[self setPosterizeValue: config_GetInt(p_intf, "posterize-level")];
b_state = [o_posterize_ckb state];
[o_posterize_fld setEnabled: b_state];
[o_posterize_stp setEnabled: b_state];
[o_posterize_lbl setEnabled: b_state];
[o_blur_sld setIntValue: config_GetInt(p_intf, "blur-factor")];
[o_blur_sld setToolTip: [NSString stringWithFormat:@"%lli", config_GetInt(p_intf, "blur-factor")]];
[o_blur_sld setEnabled: [o_blur_ckb state]];
......@@ -954,38 +976,19 @@ static VLCVideoEffects *_o_sharedInstance = nil;
#pragma mark -
#pragma mark crop
#define updateopposite(giver, taker) \
if (sender == giver) \
[taker setIntValue: [giver intValue]]
- (IBAction)cropObjectChanged:(id)sender
{
updateopposite(o_crop_top_fld, o_crop_top_stp);
updateopposite(o_crop_top_stp, o_crop_top_fld);
updateopposite(o_crop_left_fld, o_crop_left_stp);
updateopposite(o_crop_left_stp, o_crop_left_fld);
updateopposite(o_crop_right_fld, o_crop_right_stp);
updateopposite(o_crop_right_stp, o_crop_right_fld);
updateopposite(o_crop_bottom_fld, o_crop_bottom_stp);
updateopposite(o_crop_bottom_stp, o_crop_bottom_fld);
if ([o_crop_sync_top_bottom_ckb state]) {
if (sender == o_crop_top_fld || sender == o_crop_top_stp) {
[o_crop_bottom_fld setIntValue: [o_crop_top_fld intValue]];
[o_crop_bottom_stp setIntValue: [o_crop_top_fld intValue]];
} else {
[o_crop_top_fld setIntValue: [o_crop_bottom_fld intValue]];
[o_crop_top_stp setIntValue: [o_crop_bottom_fld intValue]];
}
if (sender == o_crop_bottom_fld || sender == o_crop_bottom_stp)
[self setCropTopValue: [self cropBottomValue]];
else
[self setCropBottomValue: [self cropTopValue]];
}
if ([o_crop_sync_left_right_ckb state]) {
if (sender == o_crop_left_fld || sender == o_crop_left_stp) {
[o_crop_right_fld setIntValue: [o_crop_left_fld intValue]];
[o_crop_right_stp setIntValue: [o_crop_left_fld intValue]];
} else {
[o_crop_left_fld setIntValue: [o_crop_right_fld intValue]];
[o_crop_left_stp setIntValue: [o_crop_right_fld intValue]];
}
if (sender == o_crop_right_fld || sender == o_crop_right_stp)
[self setCropLeftValue: [self cropRightValue]];
else
[self setCropRightValue: [self cropLeftValue]];
}
vout_thread_t *p_vout = getVout();
......@@ -998,8 +1001,6 @@ static VLCVideoEffects *_o_sharedInstance = nil;
}
}
#undef updateopposite
#pragma mark -
#pragma mark geometry
- (IBAction)enableTransform:(id)sender
......@@ -1031,8 +1032,10 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[self setVideoFilter: "puzzle" on: b_state];
[o_puzzle_columns_fld setEnabled: b_state];
[o_puzzle_columns_stp setEnabled: b_state];
[o_puzzle_columns_lbl setEnabled: b_state];
[o_puzzle_rows_fld setEnabled: b_state];
[o_puzzle_rows_stp setEnabled: b_state];
[o_puzzle_rows_lbl setEnabled: b_state];
[o_puzzle_blackslot_ckb setEnabled: b_state];
}
......@@ -1041,10 +1044,10 @@ static VLCVideoEffects *_o_sharedInstance = nil;
{
if (sender == o_puzzle_blackslot_ckb)
[self setVideoFilterProperty: "puzzle-black-slot" forFilter: "puzzle" boolean: [o_puzzle_blackslot_ckb state]];
else if (sender == o_puzzle_columns_fld)
[self setVideoFilterProperty: "puzzle-cols" forFilter: "puzzle" integer: [o_puzzle_columns_fld intValue]];
else if (sender == o_puzzle_columns_fld || sender == o_puzzle_columns_stp)
[self setVideoFilterProperty: "puzzle-cols" forFilter: "puzzle" integer: [sender intValue]];
else
[self setVideoFilterProperty: "puzzle-rows" forFilter: "puzzle" integer: [o_puzzle_rows_fld intValue]];
[self setVideoFilterProperty: "puzzle-rows" forFilter: "puzzle" integer: [sender intValue]];
}
- (IBAction)enableClone:(id)sender
......@@ -1088,8 +1091,10 @@ static VLCVideoEffects *_o_sharedInstance = nil;
- (IBAction)wallModifierChanged:(id)sender
{
[self setVideoFilterProperty: "wall-cols" forFilter: "wall" integer: [o_wall_numofcols_fld intValue]];
[self setVideoFilterProperty: "wall-rows" forFilter: "wall" integer: [o_wall_numofrows_fld intValue]];
if (sender == o_wall_numofcols_fld || sender == o_wall_numofcols_stp)
[self setVideoFilterProperty: "wall-cols" forFilter: "wall" integer: [sender intValue]];
else
[self setVideoFilterProperty: "wall-rows" forFilter: "wall" integer: [sender intValue]];
}
#pragma mark -
......@@ -1126,6 +1131,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[self setVideoFilter: "sepia" on: b_state];
[o_sepia_fld setEnabled: b_state];
[o_sepia_stp setEnabled: b_state];
[o_sepia_lbl setEnabled: b_state];
}
......@@ -1189,6 +1195,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
[self setVideoFilter: "posterize" on: b_state];
[o_posterize_fld setEnabled: b_state];
[o_posterize_stp setEnabled: b_state];
[o_posterize_lbl setEnabled: b_state];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment