Skip to content

Commit

Permalink
Merge pull request epreston#8 from GunioRobot/clean
Browse files Browse the repository at this point in the history
Merging changes for everyone who uses text editors with dark themes. Thank you Gunio project !!!!
  • Loading branch information
epreston committed Oct 30, 2011
2 parents 27763e6 + 38b99a1 commit 59f519c
Show file tree
Hide file tree
Showing 26 changed files with 633 additions and 633 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ PROJECT_BRIEF = "A tree graph view control for iPad applications."
# exceed 55 pixels and the maximum width should not exceed 200 pixels.
# Doxygen will copy the logo to the output directory.

PROJECT_LOGO =
PROJECT_LOGO =

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand Down
18 changes: 9 additions & 9 deletions Example 1/Classes/Controller/PSHTreeGraphAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ @implementation PSHTreeGraphAppDelegate

#pragma mark - Application Lifecycle

- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after app launch.
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after app launch.
[window_ addSubview:viewController_.view];
[window_ makeKeyAndVisible];

return YES;
}

- (void) applicationWillResignActive:(UIApplication *)application
- (void) applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for
// certain types of temporary interruptions (such as an incoming phone call or SMS message) or
Expand All @@ -39,13 +39,13 @@ - (void) applicationWillResignActive:(UIApplication *)application
// Games should use this method to pause the game.
}

- (void) applicationDidBecomeActive:(UIApplication *)application
- (void) applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive.
// If the application was previously in the background, optionally refresh the user interface.
}

- (void) applicationWillTerminate:(UIApplication *)application
- (void) applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate.
// See also applicationDidEnterBackground:.
Expand All @@ -54,13 +54,13 @@ - (void) applicationWillTerminate:(UIApplication *)application

#pragma mark - Resouce Management

- (void) applicationDidReceiveMemoryWarning:(UIApplication *)application
- (void) applicationDidReceiveMemoryWarning:(UIApplication *)application
{
// Free up as much memory as possible by purging cached data objects that can be recreated
// Free up as much memory as possible by purging cached data objects that can be recreated
// (or reloaded from disk) later.
}

- (void) dealloc
- (void) dealloc
{
[viewController_ release];
[window_ release];
Expand Down
2 changes: 1 addition & 1 deletion Example 1/Classes/Controller/PSHTreeGraphViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@class PSBaseTreeGraphView;

@interface PSHTreeGraphViewController : UIViewController <PSTreeGraphDelegate>
@interface PSHTreeGraphViewController : UIViewController <PSTreeGraphDelegate>
{

@private
Expand Down
50 changes: 25 additions & 25 deletions Example 1/Classes/Controller/PSHTreeGraphViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ @implementation PSHTreeGraphViewController
@synthesize treeGraphView = treeGraphView_;
@synthesize rootClassName = rootClassName_;

- (void) setRootClassName:(NSString *)newRootClassName
{
- (void) setRootClassName:(NSString *)newRootClassName
{
NSParameterAssert(newRootClassName != nil);

if (![rootClassName_ isEqualToString:newRootClassName]) {
[rootClassName_ release];
rootClassName_ = [newRootClassName copy];

// Get an ObjCClassWrapper for the named Objective-C Class, and set it as the TreeGraph's root.
[treeGraphView_ setModelRoot:[ObjCClassWrapper wrapperForClassNamed:rootClassName_]];
}
Expand All @@ -40,76 +40,76 @@ - (void) setRootClassName:(NSString *)newRootClassName
#pragma mark - View Creation and Initializer

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void) viewDidLoad
- (void) viewDidLoad
{
[super viewDidLoad];

// Set the delegate to self.
[self.treeGraphView setDelegate:self];

// Specify a .nib file for the TreeGraph to load each time it needs to create a new node view.
[self.treeGraphView setNodeViewNibName:@"ObjCClassTreeNodeView"];

// Specify a starting root class to inspect on launch.
[self setRootClassName:@"UIControl"];

}

// Override to allow orientations other than the default portrait orientation.
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}

- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
duration:(NSTimeInterval)duration
{
- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
duration:(NSTimeInterval)duration
{
// Keep the view in sync
[self.treeGraphView parentClipViewDidResize:nil];
}


#pragma mark - TreeGraph Delegate

-(void) configureNodeView:(UIView *)nodeView
withModelNode:(id <PSTreeGraphModelNode> )modelNode
{
-(void) configureNodeView:(UIView *)nodeView
withModelNode:(id <PSTreeGraphModelNode> )modelNode
{
NSParameterAssert(nodeView != nil);
NSParameterAssert(modelNode != nil);

// NOT FLEXIBLE: treat it like a model node instead of the interface.
ObjCClassWrapper *objectWrapper = (ObjCClassWrapper *)modelNode;
PSHLeafView *leafView = (PSHLeafView *)nodeView;

// button
if ( [[objectWrapper childModelNodes] count] == 0 ) {
[leafView.expandButton setHidden:YES];
}

// labels
leafView.titleLabel.text = [objectWrapper name];
leafView.titleLabel.text = [objectWrapper name];
leafView.detailLabel.text = [NSString stringWithFormat:@"%d bytes", [objectWrapper wrappedClassInstanceSize]];

}


#pragma mark - Resouce Management

- (void) didReceiveMemoryWarning
- (void) didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];

// Release any cached data, images, etc that aren't in use.
}

- (void) viewDidUnload
- (void) viewDidUnload
{
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}

- (void) dealloc
- (void) dealloc
{
[rootClassName_ release];
[super dealloc];
Expand Down
4 changes: 2 additions & 2 deletions Example 1/Classes/Model/ObjCClass/ObjCClassWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#pragma mark - Creating Instances

// Returns an ObjCClassWrapper for the given Objective-C class. ObjCClassWrapper maintains
// Returns an ObjCClassWrapper for the given Objective-C class. ObjCClassWrapper maintains
// a set of unique instances, so this will always return the same ObjCClassWrapper for a given Class.

+ (ObjCClassWrapper *) wrapperForClass:(Class)aClass;
Expand All @@ -44,7 +44,7 @@

@property (nonatomic, readonly) ObjCClassWrapper *superclassWrapper;

// An array of ObjCClassWrappers representing the wrappedClass' subclasses.
// An array of ObjCClassWrappers representing the wrappedClass' subclasses.
// (For convenience, the subclasses are sorted by name.)

@property (nonatomic, readonly) NSArray *subclasses;
Expand Down
28 changes: 14 additions & 14 deletions Example 1/Classes/Model/ObjCClass/ObjCClassWrapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
#import <objc/runtime.h>


// Keeps track of the ObjCClassWrapper instances we create. We create one unique
// Keeps track of the ObjCClassWrapper instances we create. We create one unique
// ObjCClassWrapper for each Objective-C "Class" we're asked to wrap.

static NSMutableDictionary *classToWrapperMapTable = nil;


// Compares two ObjCClassWrappers by name, and returns an NSComparisonResult.
static NSInteger CompareClassNames(id classA, id classB, void* context)

static NSInteger CompareClassNames(id classA, id classB, void* context)
{
return [[classA description] compare:[classB description]];
}
Expand All @@ -30,15 +30,15 @@ @implementation ObjCClassWrapper

#pragma mark - NSCopying

- (id) copyWithZone:(NSZone *)zone
- (id) copyWithZone:(NSZone *)zone
{
return [self retain];
}


#pragma mark - Creating Instances

- initWithWrappedClass:(Class)aClass
- initWithWrappedClass:(Class)aClass
{
self = [super init];
if (self) {
Expand All @@ -56,7 +56,7 @@ - (id) copyWithZone:(NSZone *)zone
return self;
}

+ (ObjCClassWrapper *) wrapperForClass:(Class)aClass
+ (ObjCClassWrapper *) wrapperForClass:(Class)aClass
{
ObjCClassWrapper *wrapper = [classToWrapperMapTable objectForKey:aClass];
if (wrapper == nil) {
Expand All @@ -65,35 +65,35 @@ + (ObjCClassWrapper *) wrapperForClass:(Class)aClass
return wrapper;
}

+ (ObjCClassWrapper *) wrapperForClassNamed:(NSString *)aClassName
+ (ObjCClassWrapper *) wrapperForClassNamed:(NSString *)aClassName
{
return [self wrapperForClass:NSClassFromString(aClassName)];
}


#pragma mark - Property Accessors

- (NSString *) name
- (NSString *) name
{
return NSStringFromClass(wrappedClass);
}

- (NSString *) description
- (NSString *) description
{
return [self name];
}

- (size_t) wrappedClassInstanceSize
- (size_t) wrappedClassInstanceSize
{
return class_getInstanceSize(wrappedClass);
}

- (ObjCClassWrapper *) superclassWrapper
- (ObjCClassWrapper *) superclassWrapper
{
return [[self class] wrapperForClass:class_getSuperclass(wrappedClass)];
}

- (NSArray *) subclasses
- (NSArray *) subclasses
{
// If we haven't built our array of subclasses yet, do so.
if (subclassesCache == nil) {
Expand Down Expand Up @@ -127,12 +127,12 @@ - (NSArray *) subclasses

#pragma mark - TreeGraphModelNode Protocol

- (id <PSTreeGraphModelNode> ) parentModelNode
- (id <PSTreeGraphModelNode> ) parentModelNode
{
return [self superclassWrapper];
}

- (NSArray *) childModelNodes
- (NSArray *) childModelNodes
{
return [self subclasses];
}
Expand Down
6 changes: 3 additions & 3 deletions Example 1/Classes/View/PSHLeafView.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

#import "PSBaseLeafView.h"

@interface PSHLeafView : PSBaseLeafView
@interface PSHLeafView : PSBaseLeafView
{

@private

// Interface
UIButton *expandButton_;
UILabel *titleLabel_;
Expand Down
12 changes: 6 additions & 6 deletions Example 1/Classes/View/PSHLeafView.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ @implementation PSHLeafView

#pragma mark - NSCoding

- (id) initWithCoder:(NSCoder *)decoder
- (id) initWithCoder:(NSCoder *)decoder
{
self = [super initWithCoder:decoder];
if (self) {

// Initialization code, leaf views are always loaded from the corresponding XIB.
// Be sure to set the view class to your subclass in interface builder.

// Example: Inverse the color scheme

// self.fillColor = [UIColor yellowColor];
// self.selectionColor = [UIColor orangeColor];

}
return self;
}


#pragma mark - Resource Management

- (void) dealloc
- (void) dealloc
{
[super dealloc];
}
Expand Down
2 changes: 1 addition & 1 deletion Example 1/Classes/View/PSHTreeGraphView.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#import "PSBaseTreeGraphView.h"

@interface PSHTreeGraphView : PSBaseTreeGraphView
@interface PSHTreeGraphView : PSBaseTreeGraphView
{
// TODO: Place project specific code, extentions here.
}
Expand Down
Loading

0 comments on commit 59f519c

Please sign in to comment.