[Hdrflow-svn] SF.net SVN: hdrflow: [213] trunk/app/HDRFlow
Status: Pre-Alpha
Brought to you by:
glslang
|
From: <gl...@us...> - 2007-07-28 17:32:53
|
Revision: 213
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=213&view=rev
Author: glslang
Date: 2007-07-28 10:32:52 -0700 (Sat, 28 Jul 2007)
Log Message:
-----------
+animated Preferences view
Modified Paths:
--------------
trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib
trunk/app/HDRFlow/English.lproj/MainMenu.nib/keyedobjects.nib
trunk/app/HDRFlow/English.lproj/Preferences.nib/classes.nib
trunk/app/HDRFlow/English.lproj/Preferences.nib/info.nib
trunk/app/HDRFlow/English.lproj/Preferences.nib/keyedobjects.nib
trunk/app/HDRFlow/PreferencesController.h
trunk/app/HDRFlow/PreferencesController.m
Modified: trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib
===================================================================
--- trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib 2007-07-28 15:57:40 UTC (rev 212)
+++ trunk/app/HDRFlow/English.lproj/MainMenu.nib/info.nib 2007-07-28 17:32:52 UTC (rev 213)
@@ -15,9 +15,9 @@
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
+ <integer>29</integer>
<integer>266</integer>
<integer>21</integer>
- <integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>8R2218</string>
Modified: trunk/app/HDRFlow/English.lproj/MainMenu.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/app/HDRFlow/English.lproj/Preferences.nib/classes.nib
===================================================================
--- trunk/app/HDRFlow/English.lproj/Preferences.nib/classes.nib 2007-07-28 15:57:40 UTC (rev 212)
+++ trunk/app/HDRFlow/English.lproj/Preferences.nib/classes.nib 2007-07-28 17:32:52 UTC (rev 213)
@@ -5,7 +5,7 @@
ACTIONS = {toolbarItem = id; };
CLASS = PreferencesController;
LANGUAGE = ObjC;
- OUTLETS = {generalView = NSView; };
+ OUTLETS = {advancedView = NSView; generalView = NSView; plugInsView = NSView; };
SUPERCLASS = NSWindowController;
}
);
Modified: trunk/app/HDRFlow/English.lproj/Preferences.nib/info.nib
===================================================================
--- trunk/app/HDRFlow/English.lproj/Preferences.nib/info.nib 2007-07-28 15:57:40 UTC (rev 212)
+++ trunk/app/HDRFlow/English.lproj/Preferences.nib/info.nib 2007-07-28 17:32:52 UTC (rev 213)
@@ -19,8 +19,8 @@
<array>
<integer>12</integer>
<integer>5</integer>
+ <integer>33</integer>
<integer>10</integer>
- <integer>33</integer>
</array>
<key>IBSystem Version</key>
<string>8R2218</string>
Modified: trunk/app/HDRFlow/English.lproj/Preferences.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Modified: trunk/app/HDRFlow/PreferencesController.h
===================================================================
--- trunk/app/HDRFlow/PreferencesController.h 2007-07-28 15:57:40 UTC (rev 212)
+++ trunk/app/HDRFlow/PreferencesController.h 2007-07-28 17:32:52 UTC (rev 213)
@@ -14,10 +14,14 @@
{
ToolbarHolder* toolbarHolder;
+ NSView* preferencesView;
+
IBOutlet NSView* generalView;
+ IBOutlet NSView* plugInsView;
+ IBOutlet NSView* advancedView;
}
- ( IBAction ) toolbarItem: ( id ) sender;
-- ( void ) setActiveView: ( NSView* ) view;
+- ( void ) setActiveView: ( NSView* ) view animate: ( BOOL ) flag;
@end
Modified: trunk/app/HDRFlow/PreferencesController.m
===================================================================
--- trunk/app/HDRFlow/PreferencesController.m 2007-07-28 15:57:40 UTC (rev 212)
+++ trunk/app/HDRFlow/PreferencesController.m 2007-07-28 17:32:52 UTC (rev 213)
@@ -23,6 +23,8 @@
[ toolbarHolder addToolbarItem: @"PlugIns" label: @"PlugIns" paletteLabel: @"PlugIns" tooltip: @"PlugIns availability" target: self settingSelector: @selector( setImage: ) itemContent: [ NSImage imageNamed: @"PlugInsPreferences" ] action: @selector( toolbarItem: ) ];
[ toolbarHolder addToolbarItem: @"Advanced" label: @"Advanced" paletteLabel: @"Advanced" tooltip: @"Advanced application parameters" target: self settingSelector: @selector( setImage: ) itemContent: [ NSImage imageNamed: @"AdvancedPreferences" ] action: @selector( toolbarItem: ) ];
+ preferencesView = [ [ [ self window ] contentView ] retain ];
+
[ [ self window ] setToolbar: [ toolbarHolder toolbar ] ];
}
@@ -36,10 +38,34 @@
- ( IBAction ) toolbarItem: ( id ) sender
{
+ NSString* identifier = [ sender itemIdentifier ];
+
+ NSView* view;
+ if( [ identifier isEqualToString: @"General" ] )
+ view = generalView;
+ else if( [ identifier isEqualToString: @"PlugIns" ] )
+ view = plugInsView;
+ else if( [ identifier isEqualToString: @"Advanced" ] )
+ view = advancedView;
+ else
+ view = nil;
+
+ [ self setActiveView: view animate: YES ];
}
-- ( void ) setActiveView: ( NSView* ) view
+- ( void ) setActiveView: ( NSView* ) view animate: ( BOOL ) flag
{
+ NSRect windowFrame = [ [ self window ] frame ];
+ NSRect viewFrame = [ [ [ self window ] contentView ] frame ];
+
+ NSRect animatedFrame;
+ animatedFrame.size.width = [ view frame ].size.width + windowFrame.size.width - viewFrame.size.width;
+ animatedFrame.size.height = [ view frame ].size.height + windowFrame.size.height - viewFrame.size.height;
+ animatedFrame.origin.x = windowFrame.origin.x;
+ animatedFrame.origin.y = NSMaxY( windowFrame ) - animatedFrame.size.height;
+
+ [ [ self window ] setContentView: preferencesView ];
+ [ [ self window ] setFrame: animatedFrame display: YES animate: flag ];
[ [ self window ] setContentView: view ];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|