Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't start the presentation immediately on launch (possibly good/bad…

…, Wolf?)

but add a button to start the presentation.  With this, the document will sit
idle on the first slide until the 'Click to Blitz!' button is pressed on the
presnter notes window.
  • Loading branch information...
commit 141ebfd0e1892c224fc99d7a48e4b726ec4d6f10 1 parent 05d7104
@tjw tjw authored
View
6 Blitz.xcodeproj/project.pbxproj
@@ -11,6 +11,7 @@
1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; };
345BF6AC10668503004BCEE3 /* SpeakerSlidesView.m in Sources */ = {isa = PBXBuildFile; fileRef = 345BF6AB10668503004BCEE3 /* SpeakerSlidesView.m */; };
345BF8FE1066A324004BCEE3 /* SlidesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 345BF8FD1066A324004BCEE3 /* SlidesWindowController.m */; };
+ 3484EC60106722D500B1BC64 /* BlitzButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3484EC5F106722D500B1BC64 /* BlitzButtonCell.m */; };
34E6611E1065E938001B6FE9 /* presenter-notes.xsl in Resources */ = {isa = PBXBuildFile; fileRef = 34E6611D1065E938001B6FE9 /* presenter-notes.xsl */; };
34E6612E1065EB97001B6FE9 /* SpeakerNotes.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34E6612D1065EB97001B6FE9 /* SpeakerNotes.xib */; };
34E6614E1065EBAE001B6FE9 /* SpeakerNotesWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E6614D1065EBAE001B6FE9 /* SpeakerNotesWindowController.m */; };
@@ -58,6 +59,8 @@
345BF6AB10668503004BCEE3 /* SpeakerSlidesView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpeakerSlidesView.m; sourceTree = "<group>"; };
345BF8FC1066A324004BCEE3 /* SlidesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlidesWindowController.h; sourceTree = "<group>"; };
345BF8FD1066A324004BCEE3 /* SlidesWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SlidesWindowController.m; sourceTree = "<group>"; };
+ 3484EC5E106722D500B1BC64 /* BlitzButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlitzButtonCell.h; sourceTree = "<group>"; };
+ 3484EC5F106722D500B1BC64 /* BlitzButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BlitzButtonCell.m; sourceTree = "<group>"; };
34E6611D1065E938001B6FE9 /* presenter-notes.xsl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "presenter-notes.xsl"; sourceTree = "<group>"; };
34E6612D1065EB97001B6FE9 /* SpeakerNotes.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SpeakerNotes.xib; sourceTree = "<group>"; };
34E6614C1065EBAE001B6FE9 /* SpeakerNotesWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpeakerNotesWindowController.h; sourceTree = "<group>"; };
@@ -143,6 +146,8 @@
345BF6AB10668503004BCEE3 /* SpeakerSlidesView.m */,
345BF8FC1066A324004BCEE3 /* SlidesWindowController.h */,
345BF8FD1066A324004BCEE3 /* SlidesWindowController.m */,
+ 3484EC5E106722D500B1BC64 /* BlitzButtonCell.h */,
+ 3484EC5F106722D500B1BC64 /* BlitzButtonCell.m */,
);
name = Classes;
sourceTree = "<group>";
@@ -268,6 +273,7 @@
34E6614E1065EBAE001B6FE9 /* SpeakerNotesWindowController.m in Sources */,
345BF6AC10668503004BCEE3 /* SpeakerSlidesView.m in Sources */,
345BF8FE1066A324004BCEE3 /* SlidesWindowController.m in Sources */,
+ 3484EC60106722D500B1BC64 /* BlitzButtonCell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
12 BlitzButtonCell.h
@@ -0,0 +1,12 @@
+//
+// BlitzButton.h
+// Blitz
+//
+// Created by Timothy J. Wood on 9/20/09.
+// Copyright 2009 The Omni Group. All rights reserved.
+//
+
+#import <AppKit/NSButtonCell.h>
+
+@interface BlitzButtonCell : NSButtonCell
+@end
View
52 BlitzButtonCell.m
@@ -0,0 +1,52 @@
+//
+// BlitzButton.m
+// Blitz
+//
+// Created by Timothy J. Wood on 9/20/09.
+// Copyright 2009 The Omni Group. All rights reserved.
+//
+
+#import "BlitzButtonCell.h"
+
+static void OSAppendRoundedRect(CGContextRef ctx, NSRect rect, CGFloat radius)
+{
+ NSPoint topMid = NSMakePoint(NSMidX(rect), NSMaxY(rect));
+ NSPoint topLeft = NSMakePoint(NSMinX(rect), NSMaxY(rect));
+ NSPoint topRight = NSMakePoint(NSMaxX(rect), NSMaxY(rect));
+ NSPoint bottomRight = NSMakePoint(NSMaxX(rect), NSMinY(rect));
+
+ CGContextMoveToPoint(ctx, topMid.x, topMid.y);
+ CGContextAddArcToPoint(ctx, topLeft.x, topLeft.y, rect.origin.x, rect.origin.y, radius);
+ CGContextAddArcToPoint(ctx, rect.origin.x, rect.origin.y, bottomRight.x, bottomRight.y, radius);
+ CGContextAddArcToPoint(ctx, bottomRight.x, bottomRight.y, topRight.x, topRight.y, radius);
+ CGContextAddArcToPoint(ctx, topRight.x, topRight.y, topLeft.x, topLeft.y, radius);
+ CGContextClosePath(ctx);
+}
+
+@implementation BlitzButtonCell
+
+- (void)drawBezelWithFrame:(NSRect)frame inView:(NSView*)controlView;
+{
+ // White with a blue shadow to try to show up on white or black slides, and we have a black background in the slide preview area that this overlays.
+ [NSGraphicsContext saveGraphicsState];
+ {
+ BOOL pressed = [self isHighlighted];
+
+ [[NSColor colorWithCalibratedWhite:1.0f alpha:(pressed ? 0.80f : 0.6f)] set];
+ NSShadow *shadow = [[[NSShadow alloc] init] autorelease];
+
+ [shadow setShadowBlurRadius:(pressed ? 3.0f : 6.0f)];
+
+ [shadow setShadowOffset:NSZeroSize];
+ [shadow setShadowColor:[NSColor blueColor]];
+ [shadow set];
+
+ NSRect bezelFrame = NSInsetRect(frame, 3, 3);
+ CGContextRef ctx = [[NSGraphicsContext currentContext] graphicsPort];
+ OSAppendRoundedRect(ctx, bezelFrame, NSHeight(bezelFrame)/2.0);
+ CGContextFillPath(ctx);
+ }
+ [NSGraphicsContext restoreGraphicsState];
+}
+
+@end
View
2  MyDocument.h
@@ -15,4 +15,6 @@
@property (readwrite) NSUInteger pageIndex;
@property (readonly) BOOL running;
+- (IBAction)start:(id)sender;
+
@end
View
18 MyDocument.m
@@ -67,13 +67,6 @@ - (void)toggleFullScreenMode {
}
- (void)initPDFView {
- self.running = YES;
- self.secondsElapsed = 0.0;
- self.timer = [[NSTimer scheduledTimerWithTimeInterval:1.0
- target:self
- selector:@selector(updateElapsedTimer:)
- userInfo:nil
- repeats:YES] retain];
self.isInFullScreenMode = NO;
[self toggleFullScreenMode];
}
@@ -193,4 +186,15 @@ - (void)dealloc {
[super dealloc];
}
+- (IBAction)start:(id)sender;
+{
+ self.running = YES;
+ self.secondsElapsed = 0.0;
+ self.timer = [[NSTimer scheduledTimerWithTimeInterval:1.0
+ target:self
+ selector:@selector(updateElapsedTimer:)
+ userInfo:nil
+ repeats:YES] retain];
+}
+
@end
View
159 SpeakerNotes.xib
@@ -75,6 +75,30 @@
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSButton" id="876564196">
+ <reference key="NSNextResponder" ref="120059249"/>
+ <int key="NSvFlags">293</int>
+ <string key="NSFrame">{{296, 16}, {431, 90}}</string>
+ <reference key="NSSuperview" ref="120059249"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="210053149">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Click to Blitz!</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">65</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <reference key="NSControlView" ref="876564196"/>
+ <int key="NSButtonFlags">-2033434369</int>
+ <int key="NSButtonFlags2">130</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ </object>
+ </object>
<object class="PDFView" id="57970415">
<reference key="NSNextResponder" ref="120059249"/>
<int key="NSvFlags">12</int>
@@ -89,7 +113,7 @@
<reference key="NSSuperview" ref="120059249"/>
<int key="DisplayMode">0</int>
<bool key="PageBreaks">NO</bool>
- <float key="ScaleFactor">0.25252524018287659</float>
+ <float key="ScaleFactor">0.10000000149011612</float>
<bool key="AutoScale">YES</bool>
</object>
<object class="PDFView" id="775359069">
@@ -106,7 +130,7 @@
<reference key="NSSuperview" ref="120059249"/>
<int key="DisplayMode">0</int>
<bool key="PageBreaks">NO</bool>
- <float key="ScaleFactor">0.25252524018287659</float>
+ <float key="ScaleFactor">0.10000000149011612</float>
<bool key="AutoScale">YES</bool>
</object>
</object>
@@ -232,6 +256,42 @@
</object>
<int key="connectionID">12</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">hidden: document.running</string>
+ <reference key="source" ref="876564196"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="876564196"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">hidden: document.running</string>
+ <string key="NSBinding">hidden</string>
+ <string key="NSKeyPath">document.running</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">22</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">target: document</string>
+ <reference key="source" ref="876564196"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="876564196"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">target: document</string>
+ <string key="NSBinding">target</string>
+ <string key="NSKeyPath">document</string>
+ <object class="NSDictionary" key="NSOptions">
+ <string key="NS.key.0">NSSelectorName</string>
+ <string key="NS.object.0">start:</string>
+ </object>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">26</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -295,6 +355,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="775359069"/>
<reference ref="57970415"/>
+ <reference ref="876564196"/>
</object>
<reference key="parent" ref="901506032"/>
</object>
@@ -313,6 +374,20 @@
<reference key="object" ref="57970415"/>
<reference key="parent" ref="120059249"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="876564196"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="210053149"/>
+ </object>
+ <reference key="parent" ref="120059249"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">20</int>
+ <reference key="object" ref="210053149"/>
+ <reference key="parent" ref="876564196"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -330,7 +405,10 @@
<string>1.editorWindowContentRectSynchronizationRect</string>
<string>10.CustomClassName</string>
<string>10.IBPluginDependency</string>
+ <string>19.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
+ <string>20.CustomClassName</string>
+ <string>20.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
<string>6.IBPluginDependency</string>
<string>9.CustomClassName</string>
@@ -341,15 +419,18 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{624, 356}, {1024, 740}}</string>
+ <string>{{589, 186}, {1024, 740}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{624, 356}, {1024, 740}}</string>
+ <string>{{589, 186}, {1024, 740}}</string>
<integer value="1"/>
<string>{196, 240}</string>
<string>{{357, 418}, {480, 270}}</string>
<string>SpeakerSlidePDFView</string>
<string>com.apple.pdfkit.ibplugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>BlitzButtonCell</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.WebKitIBPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>SpeakerSlidePDFView</string>
@@ -372,12 +453,27 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">12</int>
+ <int key="maxID">26</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
+ <string key="className">BlitzButtonCell</string>
+ <string key="superclassName">NSButtonCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">BlitzButtonCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">FirstResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">SpeakerNotesWindowController</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="outlets">
@@ -428,6 +524,14 @@
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
+ <string key="className">NSActionCell</string>
+ <string key="superclassName">NSCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSActionCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<string key="superclassName">NSResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="918036418">
@@ -471,6 +575,46 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSButton</string>
+ <string key="superclassName">NSControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSButtonCell</string>
+ <string key="superclassName">NSActionCell</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSButtonCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSCell</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSControl</string>
+ <string key="superclassName">NSView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="159149555">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSFormatter</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSMenu</string>
<string key="superclassName">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="5241529">
@@ -499,10 +643,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
- </object>
+ <reference key="sourceIdentifier" ref="159149555"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
Please sign in to comment.
Something went wrong with that request. Please try again.