Commits

Anonymous committed 100e138

Prefixed category method names with "bw" to avoid collisions

Comments (0)

Files changed (36)

BWAddMiniBottomBarIntegration.m

 
 - (void)addBottomBar
 {
-	if ([[self window] isTextured] == NO)
+	if ([[self window] bwIsTextured] == NO)
 	{
 		[[self window] setContentBorderThickness:16 forEdge:NSMinYEdge];
 		

BWAddRegularBottomBarIntegration.m

 
 - (void)addBottomBar
 {
-	if ([[self window] isTextured] == NO)
+	if ([[self window] bwIsTextured] == NO)
 	{
 		[[self window] setContentBorderThickness:34 forEdge:NSMinYEdge];
 		

BWAddSheetBottomBarIntegration.m

 
 - (void)addBottomBar
 {
-	if ([[self window] isTextured] == NO)
+	if ([[self window] bwIsTextured] == NO)
 	{
 		[[self window] setContentBorderThickness:40 forEdge:NSMinYEdge];
 		

BWAddSmallBottomBarIntegration.m

 
 - (void)addBottomBar
 {
-	if ([[self window] isTextured] == NO)
+	if ([[self window] bwIsTextured] == NO)
 	{
 		[[self window] setContentBorderThickness:24 forEdge:NSMinYEdge];
 	

BWAnchoredButton.m

 
 - (void)mouseDown:(NSEvent *)theEvent
 {
-	[self bringToFront];
+	[self bwBringToFront];
 	[super mouseDown:theEvent];
 }
 

BWAnchoredButtonBar.m

 	if (splitView != nil && [splitView isVertical] && [self isResizable])
 		[splitView setDelegate:self];
 		
-	[self bringToFront];
+	[self bwBringToFront];
 }
 
 - (void)drawRect:(NSRect)rect 
 	
 	// Draw top line
 	if (isAtBottom)
-		[topLineColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+		[topLineColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
 	else
-		[borderedTopLineColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+		[borderedTopLineColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
 	
 	// Draw resize handle
 	if (isResizable)
 	// Draw bottom line and sides if it's in non-bottom mode
 	if (!isAtBottom)
 	{
-		[bottomLineColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
-		[bottomLineColor drawPixelThickLineAtPosition:0 withInset:1 inRect:rect inView:self horizontal:NO flip:NO];
-		[bottomLineColor drawPixelThickLineAtPosition:0 withInset:1 inRect:rect inView:self horizontal:NO flip:YES];
+		[bottomLineColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+		[bottomLineColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:rect inView:self horizontal:NO flip:NO];
+		[bottomLineColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:rect inView:self horizontal:NO flip:YES];
 	}
 }
 
 - (void)drawResizeHandleInRect:(NSRect)handleRect withColor:(NSColor *)color
 {
-	[color drawPixelThickLineAtPosition:0 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
-	[color drawPixelThickLineAtPosition:3 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
-	[color drawPixelThickLineAtPosition:6 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
+	[color bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
+	[color bwDrawPixelThickLineAtPosition:3 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
+	[color bwDrawPixelThickLineAtPosition:6 withInset:0 inRect:handleRect inView:self horizontal:NO flip:NO];
 }
 
 - (void)drawLastButtonInsetInRect:(NSRect)rect
 	if (rightMostView != nil && ([[rightMostView className] isEqualToString:@"BWAnchoredButton"] || [[rightMostView className] isEqualToString:@"BWAnchoredPopUpButton"]))
 	{
 		NSRect newRect = NSOffsetRect(rect,0,-1);
-		[sideInsetColor drawPixelThickLineAtPosition:NSMaxX([rightMostView frame]) withInset:0 inRect:newRect inView:self horizontal:NO flip:NO];
+		[sideInsetColor bwDrawPixelThickLineAtPosition:NSMaxX([rightMostView frame]) withInset:0 inRect:newRect inView:self horizontal:NO flip:NO];
 	}
 }
 

BWAnchoredButtonCell.m

 	
 	[fillGradient drawInRect:cellFrame angle:90];
 	
-	[bottomBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
-	[sideInsetColor drawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
-	[sideInsetColor drawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+	[bottomBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
+	[sideInsetColor bwDrawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+	[sideInsetColor bwDrawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	
 	if (inBorderedBar)
 	{
-		[borderedTopBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
-		[borderedSideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
-		[borderedSideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+		[borderedTopBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
+		[borderedSideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+		[borderedSideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	}
 	else
 	{
-		[topBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
-		[sideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
-		[sideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+		[topBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
+		[sideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+		[sideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	}
 
 	if (inBorderedBar && [[self controlView] respondsToSelector:@selector(isAtLeftEdgeOfBar)])
 	{
 		if ([(BWAnchoredButton *)[self controlView] isAtLeftEdgeOfBar])
-			[bottomBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+			[bottomBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
 		if ([(BWAnchoredButton *)[self controlView] isAtRightEdgeOfBar])
-			[bottomBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+			[bottomBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	}
 	
 	if ([self image] == nil)
 		
 		if ([image isTemplate])
 		{
-			NSImage *glyphImage = [image tintedImageWithColor:imageColor];
-			NSImage *shadowImage = [image tintedImageWithColor:imageShadowColor];
+			NSImage *glyphImage = [image bwTintedImageWithColor:imageColor];
+			NSImage *shadowImage = [image bwTintedImageWithColor:imageShadowColor];
 			NSPoint shadowPoint = drawPoint;
 			shadowPoint.y--;
 			

BWAnchoredPopUpButton.m

 
 - (void)mouseDown:(NSEvent *)theEvent
 {
-	[self bringToFront];
+	[self bwBringToFront];
 	[super mouseDown:theEvent];
 }
 

BWAnchoredPopUpButtonCell.m

 	
 	[fillGradient drawInRect:cellFrame angle:90];
 	
-	[bottomBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
-	[sideInsetColor drawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
-	[sideInsetColor drawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+	[bottomBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
+	[sideInsetColor bwDrawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+	[sideInsetColor bwDrawPixelThickLineAtPosition:1 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	
 	if (inBorderedBar)
 	{
-		[borderedTopBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
-		[borderedSideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
-		[borderedSideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+		[borderedTopBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
+		[borderedSideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+		[borderedSideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	}
 	else
 	{
-		[topBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
-		[sideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
-		[sideBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+		[topBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
+		[sideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+		[sideBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	}
 	
 	if (inBorderedBar && [[self controlView] respondsToSelector:@selector(isAtLeftEdgeOfBar)])
 	{
 		if ([(BWAnchoredPopUpButton *)[self controlView] isAtLeftEdgeOfBar])
-			[bottomBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+			[bottomBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
 		if ([(BWAnchoredPopUpButton *)[self controlView] isAtRightEdgeOfBar])
-			[bottomBorderColor drawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+			[bottomBorderColor bwDrawPixelThickLineAtPosition:0 withInset:1 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
 	}
 	
 	if ([self image] == nil)
 		
 		if ([image isTemplate])
 		{
-			NSImage *glyphImage = [image tintedImageWithColor:imageColor];
-			NSImage *shadowImage = [image tintedImageWithColor:imageShadowColor];
+			NSImage *glyphImage = [image bwTintedImageWithColor:imageColor];
+			NSImage *shadowImage = [image bwTintedImageWithColor:imageShadowColor];
 			NSPoint shadowPoint = drawPoint;
 			shadowPoint.y--;
 			
 		drawPoint.x = NSMaxX(cellFrame) - ARROW_INSET;
 		drawPoint.y = roundf(cellFrame.size.height / 2) - 2;
 
-		NSImage *glyphImage = [pullDownArrow tintedImageWithColor:imageColor];
-		NSImage *shadowImage = [pullDownArrow tintedImageWithColor:imageShadowColor];
+		NSImage *glyphImage = [pullDownArrow bwTintedImageWithColor:imageColor];
+		NSImage *shadowImage = [pullDownArrow bwTintedImageWithColor:imageShadowColor];
 		NSPoint shadowPoint = drawPoint;
 		shadowPoint.y--;
 		
 	NSColor *insetColor = [self customViewLightBorderColor];
 	NSColor *borderColor;
 	
-	if ([[self window] isTextured])
+	if ([[self window] bwIsTextured])
 		borderColor = [self customViewDarkTexturedBorderColor];
 	else
 		borderColor = [self customViewDarkBorderColor];	
 	// Note: These two colors are reversed in IBColor in 10.5
 	if (self.subviews.count == 0)
 	{
-		if ([NSApplication isOnLeopard])
+		if ([NSApplication bwIsOnLeopard])
 			[[self containerCustomViewBackgroundColor] set];
 		else
 			[[self childlessCustomViewBackgroundColor] set];
 	}
 	else
 	{
-		if ([NSApplication isOnLeopard])
+		if ([NSApplication bwIsOnLeopard])
 			[[self childlessCustomViewBackgroundColor] set];
 		else
 			[[self containerCustomViewBackgroundColor] set];
 		
 		if ([subviews objectAtIndex:0] == self)
 		{
-			[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-			[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+			[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+			[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
 			
 			if ([(NSSplitView *)[self superview] isVertical])
 			{
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];	
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];	
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
 			}
 			else
 			{
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
 			}
 
-			[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-			[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];				
+			[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+			[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];				
 		}
 		else if ([subviews lastObject] == self)
 		{
-			[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
-			[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+			[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+			[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
 			
 			if ([(NSSplitView *)[self superview] isVertical])
 			{
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];		
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];		
 			}
 			else
 			{
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
 			}
 			
-			[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+			[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
 		}
 		else
 		{	
 			if ([(NSSplitView *)[self superview] isVertical])
 			{
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];				
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];				
 			}
 			else
 			{
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-				[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
-				[insetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-				[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];				
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+				[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+				[insetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+				[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];				
 			}
 		}
 	}
 	{
 		isOnItsOwn = YES;
 		
-		[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-		[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
-		[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
-		[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+		[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+		[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+		[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+		[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
 		
-		[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
-		[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
-		[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
-		[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
+		[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:NO];
+		[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:NO flip:YES];
+		[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:YES];
+		[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:rect inView:self horizontal:YES flip:NO];
 	}
 	
 	if (rect.size.height > 16)
 	
 	if (hasTopBorder)
 	{
-		[topBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:NO];
-		[[[NSColor whiteColor] colorWithAlphaComponent:topInsetAlpha] drawPixelThickLineAtPosition:1 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:NO];
+		[topBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:NO];
+		[[[NSColor whiteColor] colorWithAlphaComponent:topInsetAlpha] bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:NO];
 	}
 	else
 	{
-		[[[NSColor whiteColor] colorWithAlphaComponent:topInsetAlpha] drawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:NO];
+		[[[NSColor whiteColor] colorWithAlphaComponent:topInsetAlpha] bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:NO];
 	}
 		
 	
 	if (hasBottomBorder)
 	{
-		[bottomBorderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:YES];
-		[[[NSColor whiteColor] colorWithAlphaComponent:bottomInsetAlpha] drawPixelThickLineAtPosition:1 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:YES];
+		[bottomBorderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:YES];
+		[[[NSColor whiteColor] colorWithAlphaComponent:bottomInsetAlpha] bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:YES];
 	}
 	else
 	{
-		[[[NSColor whiteColor] colorWithAlphaComponent:bottomInsetAlpha] drawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:YES];
+		[[[NSColor whiteColor] colorWithAlphaComponent:bottomInsetAlpha] bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:self.bounds inView:self horizontal:YES flip:YES];
 	}
 		
 }

BWRemoveBottomBarIntegration.m

 
 - (void)removeBottomBar
 {
-	if ([[self window] isTextured] == NO)
+	if ([[self window] bwIsTextured] == NO)
 	{
 		[[self window] setContentBorderThickness:0 forEdge:NSMinYEdge];
 		

BWSelectableToolbar.m

 	if ([[helper contentViewsByIdentifier] objectForKey:newIdentifier] == nil) // If we haven't stored the content view in our dictionary. i.e. this is a new tab
 	{
 		// Resize the window
-		[[[self editableToolbar] _window] resizeToSize:[helper initialIBWindowSize] animate:shouldAnimate];	
+		[[[self editableToolbar] _window] bwResizeToSize:[helper initialIBWindowSize] animate:shouldAnimate];	
 		
 		// Record the new tab content view and window size
 		if (inIB)
 	{
 		// Resize the window
 		NSSize windowSize = [[[helper windowSizesByIdentifier] objectForKey:newIdentifier] sizeValue];
-		[[[self editableToolbar] _window] resizeToSize:windowSize animate:shouldAnimate];
+		[[[self editableToolbar] _window] bwResizeToSize:windowSize animate:shouldAnimate];
 
 		NSArray *newSubviews = [[[[[helper contentViewsByIdentifier] objectForKey:newIdentifier] subviews] copy] autorelease];
 		
 	[gradient drawInRect:gradRect angle:90];
 	
 	// Draw top and bottom borders
-	[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:aRect inView:self horizontal:YES flip:NO];
-	[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:aRect inView:self horizontal:YES flip:YES];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:aRect inView:self horizontal:YES flip:NO];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:aRect inView:self horizontal:YES flip:YES];
 	
 	[self drawDimpleInRect:aRect];
 }
 
 - (float)animationDuration
 {
-	if ([NSEvent shiftKeyIsDown])
+	if ([NSEvent bwShiftKeyIsDown])
 		return 2.0;
 	
 	return 0.25;

BWSplitViewInspectorAutosizingButtonCell.m

 	borderColor = [IBColor customViewDarkBorderColor];
 	
 	// Note: These two colors are reversed in IBColor in 10.5
-	if ([NSApplication isOnLeopard])
+	if ([NSApplication bwIsOnLeopard])
 		viewColor = [IBColor containerCustomViewBackgroundColor];
 	else
 		viewColor = [IBColor childlessCustomViewBackgroundColor];
 	[viewColor set];
 	NSRectFillUsingOperation(frame,NSCompositeSourceOver);
 
-	[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:NO flip:NO];
-	[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:NO flip:YES];
-	[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:YES flip:YES];
-	[insetColor drawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:YES flip:NO];
+	[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:NO flip:NO];
+	[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:NO flip:YES];
+	[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:YES flip:YES];
+	[insetColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:frame inView:controlView horizontal:YES flip:NO];
 	
-	[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:NO flip:NO];
-	[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:NO flip:YES];
-	[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:YES flip:YES];
-	[borderColor drawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:YES flip:NO];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:NO flip:NO];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:NO flip:YES];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:YES flip:YES];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:frame inView:controlView horizontal:YES flip:NO];
 }
 
 - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
 	}
 	else
 	{
-		blueArrowStartCap = [blueArrowStart rotateImage90DegreesClockwise:NO];
-		blueArrowEndCap = [blueArrowEnd rotateImage90DegreesClockwise:NO];
-		redArrowStartCap = [redArrowEnd rotateImage90DegreesClockwise:NO];
-		redArrowFillSlice = [redArrowFill rotateImage90DegreesClockwise:NO];
-		redArrowEndCap = [redArrowStart rotateImage90DegreesClockwise:NO];
+		blueArrowStartCap = [blueArrowStart bwRotateImage90DegreesClockwise:NO];
+		blueArrowEndCap = [blueArrowEnd bwRotateImage90DegreesClockwise:NO];
+		redArrowStartCap = [redArrowEnd bwRotateImage90DegreesClockwise:NO];
+		redArrowFillSlice = [redArrowFill bwRotateImage90DegreesClockwise:NO];
+		redArrowEndCap = [redArrowStart bwRotateImage90DegreesClockwise:NO];
 	}
 	
 	float arrowHeight = [blueArrowStartCap size].height;
 	}
 	
 	if (identifierString == nil || [identifierString isEqualToString:@""])
-		[self _setItemIdentifier:[[NSString randomUUID] retain]];
+		[self _setItemIdentifier:[[NSString bwRandomUUID] retain]];
 	else
 		[self _setItemIdentifier:identifierString];
 }

BWTransparentButtonCell.m

 	NSImage *newImage = image;
 	
 	if ([image isTemplate])
-		newImage = [image tintedImageWithColor:[self interiorColor]];
+		newImage = [image bwTintedImageWithColor:[self interiorColor]];
 	
 	[super drawImage:newImage withFrame:frame inView:controlView];
 }

BWTransparentCheckboxCell.m

 			[attributes addEntriesFromDictionary:[[self attributedTitle] attributesAtIndex:0 effectiveRange:NULL]];
 			[attributes setObject:textColor forKey:NSForegroundColorAttributeName];
 			
-			if ([NSApplication isOnLeopard])
+			if ([NSApplication bwIsOnLeopard])
 				[attributes setObject:[NSFont boldSystemFontOfSize:11] forKey:NSFontAttributeName];
 			else
 				[attributes setObject:[NSFont systemFontOfSize:11] forKey:NSFontAttributeName];

BWTransparentPopUpButtonCell.m

 		NSImage *newImage = image;
 		
 		if ([image isTemplate])
-			newImage = [image tintedImageWithColor:[self interiorColor]];
+			newImage = [image bwTintedImageWithColor:[self interiorColor]];
 
 		NSAffineTransform* xform = [NSAffineTransform transform];
 		[xform translateXBy:0.0 yBy:cellFrame.size.height];

BWTransparentTextFieldCell.m

 	[attributes addEntriesFromDictionary:[super _textAttributes]];
 	[attributes setObject:[NSColor whiteColor] forKey:NSForegroundColorAttributeName];
 	
-	if ([NSApplication isOnLeopard])
+	if ([NSApplication bwIsOnLeopard])
 		[attributes setObject:[NSFont boldSystemFontOfSize:11] forKey:NSFontAttributeName];
 	else
 		[attributes setObject:[NSFont systemFontOfSize:11] forKey:NSFontAttributeName];

BWUnanchoredButton.m

 
 - (void)mouseDown:(NSEvent *)theEvent
 {
-	[self bringToFront];
+	[self bwBringToFront];
 	[super mouseDown:theEvent];
 }
 

BWUnanchoredButtonCell.m

 {
 	[fillGradient drawInRect:NSInsetRect(cellFrame, 0, 2) angle:90];
 	
-	[topInsetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];	
-	[topBorderColor drawPixelThickLineAtPosition:1 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
-	[borderColor drawPixelThickLineAtPosition:1 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
-	[bottomInsetColor drawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
+	[topInsetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];	
+	[topBorderColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:NO];
+	[borderColor bwDrawPixelThickLineAtPosition:1 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
+	[bottomInsetColor bwDrawPixelThickLineAtPosition:0 withInset:0 inRect:cellFrame inView:[self controlView] horizontal:YES flip:YES];
 	
-	[borderColor drawPixelThickLineAtPosition:0 withInset:2 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
-	[borderColor drawPixelThickLineAtPosition:0 withInset:2 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:2 inRect:cellFrame inView:[self controlView] horizontal:NO flip:YES];
+	[borderColor bwDrawPixelThickLineAtPosition:0 withInset:2 inRect:cellFrame inView:[self controlView] horizontal:NO flip:NO];
 
 	if ([self image] == nil)
 	{

NSApplication+BWAdditions.h

 
 @interface NSApplication (BWAdditions) 
 
-+ (BOOL)isOnLeopard;
++ (BOOL)bwIsOnLeopard;
 
 @end

NSApplication+BWAdditions.m

 
 @implementation NSApplication (BWAdditions)
 
-+ (BOOL)isOnLeopard 
++ (BOOL)bwIsOnLeopard 
 {
 	SInt32 minorVersion, majorVersion;
 	Gestalt(gestaltSystemVersionMajor, &majorVersion);

NSColor+BWAdditions.h

 @interface NSColor (BWAdditions)
 
 //  Use this method to draw 1 px wide lines independent of scale factor. Handy for resolution independent drawing. Still needs some work - there are issues with drawing at the edges of views.
-- (void)drawPixelThickLineAtPosition:(int)posInPixels withInset:(int)insetInPixels inRect:(NSRect)aRect inView:(NSView *)view horizontal:(BOOL)isHorizontal flip:(BOOL)shouldFlip;
+- (void)bwDrawPixelThickLineAtPosition:(int)posInPixels withInset:(int)insetInPixels inRect:(NSRect)aRect inView:(NSView *)view horizontal:(BOOL)isHorizontal flip:(BOOL)shouldFlip;
 
 @end

NSColor+BWAdditions.m

 @implementation NSColor (BWAdditions)
 
 //  Use this method to draw 1 px wide lines independent of scale factor. Handy for resolution independent drawing. Still needs some work - there are issues with drawing at the edges of views.
-- (void)drawPixelThickLineAtPosition:(int)posInPixels withInset:(int)insetInPixels inRect:(NSRect)aRect inView:(NSView *)view horizontal:(BOOL)isHorizontal flip:(BOOL)shouldFlip
+- (void)bwDrawPixelThickLineAtPosition:(int)posInPixels withInset:(int)insetInPixels inRect:(NSRect)aRect inView:(NSView *)view horizontal:(BOOL)isHorizontal flip:(BOOL)shouldFlip
 {
 	// Convert the given rectangle from points to pixels
 	aRect = [view convertRectToBase:aRect];

NSEvent+BWAdditions.h

 
 @interface NSEvent (BWAdditions)
 
-+ (BOOL)shiftKeyIsDown;
-+ (BOOL)commandKeyIsDown;
-+ (BOOL)optionKeyIsDown;
-+ (BOOL)controlKeyIsDown;
-+ (BOOL)capsLockKeyIsDown;
++ (BOOL)bwShiftKeyIsDown;
++ (BOOL)bwCommandKeyIsDown;
++ (BOOL)bwOptionKeyIsDown;
++ (BOOL)bwControlKeyIsDown;
++ (BOOL)bwCapsLockKeyIsDown;
 
 @end

NSEvent+BWAdditions.m

 
 @implementation NSEvent (BWAdditions)
 
-+ (BOOL)shiftKeyIsDown
++ (BOOL)bwShiftKeyIsDown
 {
 	if ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask)
 		return YES;
 	return NO;
 }
 
-+ (BOOL)commandKeyIsDown
++ (BOOL)bwCommandKeyIsDown
 {
 	if ([[NSApp currentEvent] modifierFlags] & NSCommandKeyMask)
 		return YES;
 	return NO;
 }
 
-+ (BOOL)optionKeyIsDown
++ (BOOL)bwOptionKeyIsDown
 {
 	if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
 		return YES;
 	return NO;
 }
 
-+ (BOOL)controlKeyIsDown
++ (BOOL)bwControlKeyIsDown
 {
 	if ([[NSApp currentEvent] modifierFlags] & NSControlKeyMask)
 		return YES;
 	return NO;
 }
 
-+ (BOOL)capsLockKeyIsDown
++ (BOOL)bwCapsLockKeyIsDown
 {
 	if ([[NSApp currentEvent] modifierFlags] & NSAlphaShiftKeyMask)
 		return YES;

NSImage+BWAdditions.h

 @interface NSImage (BWAdditions)
 
 // Draw a solid color over an image - taking into account alpha. Useful for coloring template images.
-- (NSImage *)tintedImageWithColor:(NSColor *)tint;
+- (NSImage *)bwTintedImageWithColor:(NSColor *)tint;
 
 // Rotate an image 90 degrees clockwise or counterclockwise
-- (NSImage *)rotateImage90DegreesClockwise:(BOOL)clockwise;
+- (NSImage *)bwRotateImage90DegreesClockwise:(BOOL)clockwise;
 
 @end

NSImage+BWAdditions.m

 
 // Draw a solid color over an image - taking into account alpha. Useful for coloring template images.
 
-- (NSImage *)tintedImageWithColor:(NSColor *)tint 
+- (NSImage *)bwTintedImageWithColor:(NSColor *)tint 
 {
 	NSSize size = [self size];
 	NSRect imageBounds = NSMakeRect(0, 0, size.width, size.height);    
 // Rotate an image 90 degrees clockwise or counterclockwise
 // Code from http://swik.net/User:marc/Chipmunk+Ninja+Technical+Articles/Rotating+an+NSImage+object+in+Cocoa/zgha
 
-- (NSImage *)rotateImage90DegreesClockwise:(BOOL)clockwise
+- (NSImage *)bwRotateImage90DegreesClockwise:(BOOL)clockwise
 {
     NSImage *existingImage = self;
     NSSize existingSize;

NSString+BWAdditions.h

 
 @interface NSString (BWAdditions)
 
-+ (NSString *)randomUUID;
++ (NSString *)bwRandomUUID;
 
 @end

NSString+BWAdditions.m

 
 @implementation NSString (BWAdditions)
 
-+ (NSString *)randomUUID
++ (NSString *)bwRandomUUID
 {
 	CFUUIDRef uuidObj = CFUUIDCreate(nil);
 	NSString *newUUID = (NSString*)CFMakeCollectable(CFUUIDCreateString(nil, uuidObj));

NSView+BWAdditions.h

 
 @interface NSView (BWAdditions)
 
-- (void)bringToFront;
+- (void)bwBringToFront;
 
 @end

NSView+BWAdditions.m

 
 @implementation NSView (BWAdditions)
 
-- (void)bringToFront
+- (void)bwBringToFront
 {
 	[[self superview] sortSubviewsUsingFunction:(NSComparisonResult (*)(id, id, void *))compareViews context:self];
 }

NSWindow+BWAdditions.h

 
 @interface NSWindow (BWAdditions)
 
-- (void)resizeToSize:(NSSize)newSize animate:(BOOL)animateFlag;
-- (BOOL)isTextured;
+- (void)bwResizeToSize:(NSSize)newSize animate:(BOOL)animateFlag;
+- (BOOL)bwIsTextured;
 
 @end

NSWindow+BWAdditions.m

 
 @implementation NSWindow (BWAdditions)
 
-- (void)resizeToSize:(NSSize)newSize animate:(BOOL)animateFlag
+- (void)bwResizeToSize:(NSSize)newSize animate:(BOOL)animateFlag
 {
 	NSRect windowFrame;
 	windowFrame.origin.x = [self frame].origin.x;
 		[self setFrame:windowFrame display:YES animate:animateFlag];
 }
 
-- (BOOL)isTextured
+- (BOOL)bwIsTextured
 {
 	return (([self styleMask] & NSTexturedBackgroundWindowMask) != 0);
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.