Permalink
Browse files

code now properly references the Briefs-sharedUI project as a submodu…

…le. Cleaned up project references.
  • Loading branch information...
1 parent 9d1ee24 commit 91f947c5cc25c2cb93de74f4a89d2c69d8af7fd3 @capttaco committed Mar 1, 2010
View
@@ -1,3 +1,6 @@
[submodule "Classes/Briefs-data"]
path = Classes/Briefs-data
url = git://github.com/capttaco/Briefs-data.git
+[submodule "Classes/Briefs-sharedUI"]
+ path = Classes/Briefs-sharedUI
+ url = git://github.com/capttaco/Briefs-sharedUI.git

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,24 +0,0 @@
-//
-// BFActorView.h
-// Briefs
-//
-// Created by Rob Rhyne on 8/17/09.
-// Copyright Digital Arch Design, 2009. See LICENSE file for details.
-//
-
-#import <UIKit/UIKit.h>
-#import "BFActor.h"
-
-@interface BFActorView : UIImageView {
- BFActor *actor;
-}
-
-@property (nonatomic, retain) BFActor *actor;
-
-// initialization
-- (id)initWithActor:(BFActor *)source;
-
-// action handling
-- (void)executeAction:(NSString *)action;
-
-@end
View
@@ -1,134 +0,0 @@
-//
-// BFActorView.m
-// Briefs
-//
-// Created by Rob Rhyne on 8/17/09.
-// Copyright Digital Arch Design, 2009. See LICENSE file for details.
-//
-
-#import "BFActorView.h"
-#import "BFRootView.h"
-#import "BFPresentationDispatch.h"
-#import "BFViewUtilityParser.h"
-#import "BFUtilityParser.h"
-#import "BFConstants.h"
-
-
-@implementation BFActorView
-
-@synthesize actor;
-
-- (id)initWithActor:(BFActor *)source
-{
- if (self = [super initWithImage:[BFViewUtilityParser parseImageFromRepresentation:[source background]]]) {
- // enable user interaction, per documentation
- [self setUserInteractionEnabled:YES];
-
- // initialize the view
- self.frame = [source size];
- self.actor = source;
- }
-
- return self;
-}
-
-- (void) dealloc
-{
- [actor release];
- [super dealloc];
-}
-
-
-- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
-{
- BFRootView *rootView = (BFRootView *) self.superview.superview;
- if ([rootView respondsToSelector:@selector(cancelGestureTimer)])
- [rootView cancelGestureTimer];
-
- if (self.actor.isActive == YES) {
- [self executeAction:[self.actor action]];
- }
-}
-
-- (void)executeAction:(NSString *)action
-{
- NSString *typeOfAction = [BFUtilityParser parseActionCommand:action];
- NSArray *actionArguments = [BFUtilityParser parseActionArgsIntoArray:action withPrefix:typeOfAction];
-
- if (typeOfAction == kBFActorActionGoto) {
-
- // GOTO (index)
- // action contains one argument: the index of the scene to goto
- // scene is not zero-based, so convert.
-
- NSString *arg1 = [actionArguments objectAtIndex:0];
-
- if ([actionArguments count] <= 1) {
- [[BFPresentationDispatch sharedBFPresentationDispatch] gotoScene:[arg1 intValue]];
- }
- else {
- NSString *arg2 = [[actionArguments objectAtIndex:1] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
- [[BFPresentationDispatch sharedBFPresentationDispatch] gotoScene:[arg1 intValue] usingTransition:arg2];
- }
- }
-
- else if (typeOfAction == kBFActorActionToggle) {
-
- // TOGGLE (index)
- // action contains one argument: the index of the actor
- // is not zero-based, so convert.
-
- NSString *arg1 = [actionArguments objectAtIndex:0];
- [[BFPresentationDispatch sharedBFPresentationDispatch] toggleActor:[arg1 intValue]];
- }
-
- else if (typeOfAction == kBFActorActionHide) {
-
- // HIDE (index)
- // action contains one argument: the index of the actor
- // is not zero-based, so convert.
-
- NSString *arg1 = [actionArguments objectAtIndex:0];
- [[BFPresentationDispatch sharedBFPresentationDispatch] hide:[arg1 intValue]];
- }
-
- else if (typeOfAction == kBFActorActionShow) {
-
- // SHOW (index)
- // action contains one argument: the index of the actor
- // is not zero-based, so convert.
-
- NSString *arg1 = [actionArguments objectAtIndex:0];
- [[BFPresentationDispatch sharedBFPresentationDispatch] show:[arg1 intValue]];
- }
-
- else if (typeOfAction == kBFActorActionMove) {
-
- // MOVE (index, x, y)
- // action contains two arguments, broken over three passed arguments:
- // actor index is not zero-based, so convert. Convert x, y into CGPoint
-
- NSString *arg1 = [actionArguments objectAtIndex:0];
- NSString *arg2 = [actionArguments objectAtIndex:1];
- NSString *arg3 = [actionArguments objectAtIndex:2];
- CGPoint arg2AsPoint = CGPointMake([arg2 floatValue], [arg3 floatValue]);
- [[BFPresentationDispatch sharedBFPresentationDispatch] move:[arg1 intValue] toPoint:arg2AsPoint];
- }
-
- else if (typeOfAction == kBFActorActionResize) {
-
- // RESIZE (index, w, h)
- // action contains two arguments, broken over three passed arguments:
- // actor index is not zero-based, so convert. Convert x, y into CGPoint
-
- NSString *arg1 = [actionArguments objectAtIndex:0];
- NSString *arg2 = [actionArguments objectAtIndex:1];
- NSString *arg3 = [actionArguments objectAtIndex:2];
- CGSize arg2AsSize = CGSizeMake([arg2 floatValue], [arg3 floatValue]);
- [[BFPresentationDispatch sharedBFPresentationDispatch] resize:[arg1 intValue] withSize:arg2AsSize];
- }
-
-}
-
-
-@end
View
@@ -1,31 +0,0 @@
-//
-// BFDispatch.h
-// Briefs
-//
-// Created by Rob Rhyne on 8/9/09.
-// Copyright Digital Arch Design, 2009. See LICENSE file for details.
-//
-
-
-@protocol BFLocalActionDispatch
-
-// Acts upon Scenes
-- (void)gotoScene:(int)indexOfScene;
-- (void)gotoScene:(int)indexOfScene usingTransition:(NSString *)transition;
-
-// Acts upon Actors
-- (void)toggleActor:(int)indexOfActor;
-- (void)resize:(int)indexOfActor withSize:(CGSize)size;
-- (void)move:(int)indexOfActor toPoint:(CGPoint)point;
-- (void)show:(int)indexOfActor;
-- (void)hide:(int)indexOfActor;
-
-@end
-
-@protocol BFGlobalActionDispatch
-
-- (void)toggleKeyboard:(NSString *)type;
-
-@end
-
-
@@ -1,28 +0,0 @@
-//
-// BFPresentationController.h
-// Briefs
-//
-// Created by Rob Rhyne on 8/4/09.
-// Copyright Digital Arch Design, 2009. See LICENSE file for details.
-//
-
-#import <Foundation/Foundation.h>
-#import "BFDispatch.h"
-#import "BFSceneViewController.h"
-
-@interface BFPresentationDispatch : NSObject <BFLocalActionDispatch, BFGlobalActionDispatch>
-{
- BFSceneViewController *viewController;
-}
-
-@property (assign) BFSceneViewController *viewController;
-
-
-// Singleton Accessors
-+ (BFPresentationDispatch *) sharedBFPresentationDispatch;
-+ (id<BFLocalActionDispatch>) sharedLocalDispatch;
-+ (id<BFGlobalActionDispatch>) sharedGlobalDispatch;
-
-
-
-@end
@@ -1,139 +0,0 @@
-//
-// BFPresentationController.m
-// Briefs
-//
-// Created by Rob Rhyne on 8/4/09.
-// Copyright Digital Arch Design, 2009. See LICENSE file for details.
-//
-
-#import "BFPresentationDispatch.h"
-#import "SynthesizeSingleton.h"
-
-@implementation BFPresentationDispatch
-
-@synthesize viewController;
-
-SYNTHESIZE_SINGLETON_FOR_CLASS(BFPresentationDispatch);
-
-
-///////////////////////////////////////////////////////////////////////////////
-#pragma mark -
-#pragma mark Singleton Accessor Methods
-
-+ (id<BFLocalActionDispatch>)sharedLocalDispatch
-{
- return (id<BFLocalActionDispatch>) [BFPresentationDispatch sharedBFPresentationDispatch];
-}
-
-+ (id<BFGlobalActionDispatch>)sharedGlobalDispatch
-{
- return (id<BFGlobalActionDispatch>) [BFPresentationDispatch sharedBFPresentationDispatch];
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-#pragma mark -
-#pragma mark Local Dispatch Methods
-
-- (void)gotoScene:(int)indexOfScene
-{
- if (self.viewController != nil) {
- if ([self.viewController willLoadSceneWithIndex:indexOfScene] == false)
- // TODO: throw exception
- NSLog(@"Throw an exception, because the scene did not load!");
- else {
- NSLog(@"Scene %d was just loaded", indexOfScene);
- }
- }
-}
-
-- (void)gotoScene:(int)indexOfScene usingTransition:(NSString *)transition
-{
- if (self.viewController != nil) {
- if ([self.viewController willLoadSceneWithIndex:indexOfScene usingTransition:transition] == false)
- // TODO: throw exception
- NSLog(@"Throw an exception, because the scene did not load!");
- else {
- NSLog(@"Scene %d was just loaded using the transition %@", indexOfScene, transition);
- }
- }
-}
-
-- (void)toggleActor:(int)indexOfActor
-{
- if (self.viewController != nil) {
- if ([self.viewController willToggleActorWithIndex:indexOfActor] == false)
- // TODO: throw exception
- NSLog(@"Throw an exception, because the actor was not toggled!");
- else {
- NSLog(@"Actor %d was just toggled", indexOfActor);
- }
- }
-}
-
-- (void)show:(int)indexOfActor
-{
- if (self.viewController != nil) {
- if ([self.viewController willShowActorWithIndex:indexOfActor] == false)
- // TODO: throw exception
- NSLog(@"Throw an exception, because the actor was not shown!");
- else {
- NSLog(@"Actor %d is now showing.", indexOfActor);
- }
- }
-}
-
-- (void)hide:(int)indexOfActor
-{
- if (self.viewController != nil) {
- if ([self.viewController willHideActorWithIndex:indexOfActor] == false)
- // TODO: throw exception
- NSLog(@"Throw an exception, because the actor was not hidden!");
- else {
- NSLog(@"Actor %d was just hidden", indexOfActor);
- }
- }
-}
-
-
-- (void)resize:(int)indexOfActor withSize:(CGSize)size
-{
- if (self.viewController != nil) {
- if ([self.viewController willResizeActorWithIndex:indexOfActor toSize:size] == false)
- // TODO: throw exception
- NSLog(@"Throw an exception, because I was not able to resize the actor!");
- else {
- NSLog(@"Resized Actor %d, to the size %@", indexOfActor, NSStringFromCGSize(size));
- }
- }
-}
-
-- (void)move:(int)indexOfActor toPoint:(CGPoint)point
-{
- if (self.viewController != nil) {
- if ([self.viewController willMoveActorWithIndex:indexOfActor toPoint:point] == false)
- // TODO: throw exception
- NSLog(@"Throw an exception, because I was not able to move the actor");
- else {
- NSLog(@"Moved Actor %d, to the point %@", indexOfActor, NSStringFromCGPoint(point));
- }
- }
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-#pragma mark -
-#pragma mark Global Dispatch Methods
-
-- (void)toggleKeyboard:(NSString *)type {
- // TODO: toggle keyboard in current view
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
-@end
View
@@ -1,21 +0,0 @@
-//
-// BFRootView.h
-// Briefs
-//
-// Created by Rob Rhyne on 8/19/09.
-// Copyright Digital Arch Design, 2009. See LICENSE file for details.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface BFRootView : UIView <UIActionSheetDelegate>
-{
- UIViewController *viewController;
- NSTimer *timer;
-}
-
-- (id)initWithFrame:(CGRect)frame andViewController:(UIViewController *)controller;
-- (void)cancelGestureTimer;
-
-@end
Oops, something went wrong.

0 comments on commit 91f947c

Please sign in to comment.