Merge branch 'master' of git://github.com/280north/cappuccino

This commit is contained in:
Daniel Stolzenberg committed 2010-11-02 13:49:52 +01:00
commit db2c88f2e5
92 files changed
+166 -222

No files matched your search

+2 -3
View File
@@ -26,10 +26,9 @@
@import <Foundation/CPIndexSet.j>
@import <Foundation/CPString.j>
@import <AppKit/CPView.j>
@import <AppKit/CPButton.j>
@import "CPView.j"
@import "CPButton.j"
#import "CoreGraphics/CGGeometry.h"
/*!
@ingroup appkit
+9 -9
View File
@@ -26,14 +26,14 @@
@import <Foundation/CPObject.j>
@import <Foundation/CPString.j>
@import <AppKit/CPApplication.j>
@import <AppKit/CPButton.j>
@import <AppKit/CPColor.j>
@import <AppKit/CPFont.j>
@import <AppKit/CPImage.j>
@import <AppKit/CPImageView.j>
@import <AppKit/CPPanel.j>
@import <AppKit/CPTextField.j>
@import "CPApplication.j"
@import "CPButton.j"
@import "CPColor.j"
@import "CPFont.j"
@import "CPImage.j"
@import "CPImageView.j"
@import "CPPanel.j"
@import "CPTextField.j"
/*
@global
@@ -91,7 +91,7 @@ CPCriticalAlertStyle = 2;
id _modalDelegate;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"alert";
}
-1
View File
@@ -31,7 +31,6 @@
@import "CPCibLoading.j"
@import "CPPlatform.j"
#include "Platform/Platform.h"
var CPMainCibFile = @"CPMainCibFile",
CPMainCibFileHumanFriendly = @"Main cib file base name";
+2 -2
View File
@@ -25,8 +25,8 @@
@import <Foundation/CPIndexSet.j>
@import <AppKit/CPObjectController.j>
@import <AppKit/CPKeyValueBinding.j>
@import "CPObjectController.j"
@import "CPKeyValueBinding.j"
@implementation CPArrayController : CPObjectController
+2 -1
View File
@@ -23,9 +23,10 @@
*/
@import <AppKit/CPGraphicsContext.j>
@import <Foundation/CPObject.j>
@import "CPGraphicsContext.j"
// Class defaults
+1 -3
View File
@@ -26,8 +26,6 @@
@import "CPControl.j"
@import "CPStringDrawing.j"
#include "CoreGraphics/CGGeometry.h"
/* @group CPBezelStyle */
@@ -120,7 +118,7 @@ CPButtonImageOffset = 3.0;
return button;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"button";
}
+2 -4
View File
@@ -1,7 +1,5 @@
@import <AppKit/CPView.j>
#include "CoreGraphics/CGGeometry.h"
@import "CPView.j"
@implementation CPButtonBar : CPView
@@ -50,7 +48,7 @@
return button;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"button-bar";
}
+2 -1
View File
@@ -22,6 +22,7 @@
@import "CPButton.j"
CPCheckBoxImageOffset = 4.0;
@implementation CPCheckBox : CPButton
@@ -38,7 +39,7 @@ CPCheckBoxImageOffset = 4.0;
return [self buttonWithTitle:aTitle];
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"check-box";
}
-2
View File
@@ -22,8 +22,6 @@
@import "CPView.j"
#include "CoreGraphics/CGGeometry.h"
/*!
@ingroup appkit
+1
View File
@@ -22,6 +22,7 @@
@import "CPViewController.j"
/*!
Represents an object inside a CPCollectionView.
*/
+1
View File
@@ -26,6 +26,7 @@
@import "CPPanel.j"
@import "CPView.j"
CPColorPanelColorDidChangeNotification = @"CPColorPanelColorDidChangeNotification";
var PREVIEW_HEIGHT = 20.0,
+2 -2
View File
@@ -21,9 +21,9 @@
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPView.j>
#include "Platform/Platform.h"
@import "CPView.j"
/*!
@ingroup appkit
+1
View File
@@ -23,6 +23,7 @@
@import "CPEvent.j"
@import "CPPlatform.j"
// Browser Engines
CPUnknownBrowserEngine = 0;
CPGeckoBrowserEngine = 1;
-2
View File
@@ -25,8 +25,6 @@
@import "CPView.j"
@import "CPKeyValueBinding.j"
#include "CoreGraphics/CGGeometry.h"
#include "Platform/Platform.h"
CPLeftTextAlignment = 0;
CPRightTextAlignment = 1;
-1
View File
@@ -23,7 +23,6 @@
@import <Foundation/CPObject.j>
@import <Foundation/CPString.j>
#include "Platform/Platform.h"
/*!
@ingroup appkit
-2
View File
@@ -12,8 +12,6 @@ Implemented class methods:
Opera : All except resizeLeftRightCursor resizeUpDownCursor operationNotAllowedCursor dragCopyCursor dragLinkCursor contextualMenuCursor openHandCursor closedHandCursor disappearingItemCursor // Opera does not support url cursors so these won't work with images
*/
#include "Platform/Platform.h"
@import <Foundation/CPObject.j>
var currentCursor = nil,
+6 -9
View File
@@ -20,15 +20,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import <AppKit/CPApplication.j>
@import <AppKit/CPEvent.j>
@import <AppKit/CPImageView.j>
@import <AppKit/CPPasteboard.j>
@import <AppKit/CPView.j>
@import <AppKit/CPWindow.j>
#import "CoreGraphics/CGGeometry.h"
#import "Platform/Platform.h"
@import "CPApplication.j"
@import "CPEvent.j"
@import "CPImageView.j"
@import "CPPasteboard.j"
@import "CPView.j"
@import "CPWindow.j"
CPDragOperationNone = 0,
-2
View File
@@ -23,8 +23,6 @@
@import <Foundation/CPObject.j>
@import "CPText.j"
#include "CoreGraphics/CGGeometry.h"
CPLeftMouseDown = 1;
CPLeftMouseUp = 2;
+1
View File
@@ -22,6 +22,7 @@
@import <Foundation/CPObject.j>
/*!
@ingroup appkit
@class CPFlashMovie
-1
View File
@@ -23,7 +23,6 @@
@import "CPFlashMovie.j"
@import "CPView.j"
#include "Platform/Platform.h"
var IEFlashCLSID = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
+2 -1
View File
@@ -23,7 +23,8 @@
@import <Foundation/CPObject.j>
@import <Foundation/CPBundle.j>
@import <AppKit/CPView.j>
@import "CPView.j"
var _CPFonts = {},
_CPFontSystemFontFace = @"Arial, sans-serif",
+1 -1
View File
@@ -22,7 +22,7 @@
@import <Foundation/CPObject.j>
@import <AppKit/CPFont.j>
@import "CPFont.j"
var CPSharedFontManager = nil,
-2
View File
@@ -23,8 +23,6 @@
@import "CPColor.j"
@import "CPGraphicsContext.j"
#include "CoreGraphics/CGGeometry.h"
function CPDrawTiledRects(
/* CGRect */ boundsRect,
+3 -1
View File
@@ -21,7 +21,9 @@
*/
@import <Foundation/CPObject.j>
@import <AppKit/CGContext.j>
@import "CGContext.j"
var CPGraphicsContextCurrent = nil;
-2
View File
@@ -28,8 +28,6 @@
@import "CPGeometry.j"
#include "Platform/Platform.h"
CPImageLoadStatusInitialized = 0;
CPImageLoadStatusLoading = 1;
-4
View File
@@ -26,10 +26,6 @@
@import "CPImage.j"
@import "CPShadowView.j"
#include "Platform/Platform.h"
#include "Platform/DOM/CPDOMDisplayServer.h"
#include "CoreGraphics/CGGeometry.h"
CPScaleProportionally = 0;
CPScaleToFit = 1;
+2 -1
View File
@@ -21,7 +21,8 @@
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPEvent.j>
@import "CPEvent.j"
CPStandardKeyBindings = {
+1
View File
@@ -28,6 +28,7 @@
@import <Foundation/CPDictionary.j>
@import <Foundation/CPValueTransformer.j>
var exposedBindingsMap = [CPDictionary new],
bindingsMap = [CPDictionary new];
-3
View File
@@ -31,9 +31,6 @@
@import "CPMenuItem.j"
@import "CPPanel.j"
#include "../CoreGraphics/CGGeometry.h"
#include "../Platform/Platform.h"
CPMenuDidAddItemNotification = @"CPMenuDidAddItemNotification";
CPMenuDidChangeItemNotification = @"CPMenuDidChangeItemNotification";
-4
View File
@@ -1,7 +1,3 @@
#include "../CoreGraphics/CGGeometry.h"
#include "../Platform/Platform.h"
@import "CPPanel.j"
@import "_CPMenuWindow.j"
-3
View File
@@ -1,6 +1,3 @@
#include "../CoreGraphics/CGGeometry.h"
@import <Foundation/CPObject.j>
+1 -3
View File
@@ -1,7 +1,5 @@
@import "CPWindow.j"
#include "../CoreGraphics/CGGeometry.h"
@import <AppKit/CPWindow.j>
var _CPMenuWindowPool = [],
_CPMenuWindowPoolCapacity = 5,
+1
View File
@@ -29,6 +29,7 @@
@import "CPView.j"
@import "_CPMenuItemView.j"
/*!
@ingroup appkit
@class CPMenuItem
+2 -1
View File
@@ -1,4 +1,5 @@
@import <AppKit/CPView.j>
@import "CPView.j"
var HORIZONTAL_MARGIN = 8.0,
SUBMENU_INDICATOR_MARGIN = 3.0,
+1 -1
View File
@@ -1,5 +1,5 @@
@import <AppKit/CPView.j>
@import "CPView.j"
@implementation _CPMenuItemSeparatorView : CPView
+2 -1
View File
@@ -1,4 +1,5 @@
@import <AppKit/CPControl.j>
@import "CPControl.j"
var LEFT_MARGIN = 3.0,
RIGHT_MARGIN = 14.0 + 3.0,
+1 -1
View File
@@ -1,5 +1,5 @@
@import <AppKit/CPPanel.j>
@import "CPPanel.j"
@implementation CPOpenPanel : CPPanel
-2
View File
@@ -23,8 +23,6 @@
@import "CPTableColumn.j"
@import "CPTableView.j"
#include "CoreGraphics/CGGeometry.h"
CPOutlineViewColumnDidMoveNotification = @"CPOutlineViewColumnDidMoveNotification";
CPOutlineViewColumnDidResizeNotification = @"CPOutlineViewColumnDidResizeNotification";
-2
View File
@@ -25,8 +25,6 @@
@import <Foundation/CPDictionary.j>
@import <Foundation/CPPropertyListSerialization.j>
#include "Platform/Platform.h"
CPGeneralPboard = @"CPGeneralPboard";
CPFontPboard = @"CPFontPboard";
+1 -3
View File
@@ -25,8 +25,6 @@
@import "CPMenu.j"
@import "CPMenuItem.j"
#include "CoreGraphics/CGGeometry.h"
var VISIBLE_MARGIN = 7.0;
@@ -46,7 +44,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down");
CPMenu _menu;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "popup-button";
}
+3 -5
View File
@@ -20,11 +20,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import <AppKit/CGGeometry.j>
@import <AppKit/CPImageView.j>
@import <AppKit/CPView.j>
#include "CoreGraphics/CGGeometry.h"
@import "CGGeometry.j"
@import "CPImageView.j"
@import "CPView.j"
/*
+2 -1
View File
@@ -25,6 +25,7 @@
@import "CPButton.j"
/*!
@ingroup appkit
@@ -89,7 +90,7 @@ CPRadioImageOffset = 4.0;
return button;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"radio";
}
+1
View File
@@ -22,6 +22,7 @@
@import <Foundation/CPObject.j>
CPDeleteKeyCode = 8;
CPTabKeyCode = 9;
CPReturnKeyCode = 13;
+1 -1
View File
@@ -1,5 +1,5 @@
@import <AppKit/CPPanel.j>
@import "CPPanel.j"
@implementation CPSavePanel : CPPanel
-2
View File
@@ -1,8 +1,6 @@
@import <Foundation/CPObject.j>
#import "CoreGraphics/CGGeometry.h"
#import "Platform/Platform.h"
@implementation CPScreen : CPObject
{
+1 -3
View File
@@ -25,8 +25,6 @@
@import "CPScroller.j"
@import "CPView.j"
#include "CoreGraphics/CGGeometry.h"
/*!
@ingroup appkit
@@ -60,7 +58,7 @@
CPBorderType _borderType;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"scrollview"
}
+1 -3
View File
@@ -22,8 +22,6 @@
@import "CPControl.j"
#include "CoreGraphics/CGGeometry.h"
// CPScroller Constants
CPScrollerNoPart = 0;
@@ -72,7 +70,7 @@ NAMES_FOR_PARTS[CPScrollerKnob] = @"knob";
CGPoint _trackingStartPoint;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "scroller";
}
+1 -3
View File
@@ -23,8 +23,6 @@
@import "CPButton.j"
@import "CPTextField.j"
#include "CoreGraphics/CGGeometry.h"
#include "Platform/Platform.h"
CPSearchFieldRecentsTitleMenuItemTag = 1000;
CPSearchFieldRecentsMenuItemTag = 1001;
@@ -68,7 +66,7 @@ var RECENT_SEARCH_PREFIX = @" ";
CPTimer _partialStringTimer;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"searchfield"
}
+1
View File
@@ -1,6 +1,7 @@
@import "CPTextField.j"
/*!
@ingroup appkit
*/
+1 -2
View File
@@ -24,7 +24,6 @@
@import "CPControl.j"
#include "CoreGraphics/CGGeometry.h"
CPSegmentSwitchTrackingSelectOne = 0;
CPSegmentSwitchTrackingSelectAny = 1;
@@ -49,7 +48,7 @@ CPSegmentSwitchTrackingMomentary = 2;
BOOL _trackingHighlighted;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "segmented-control";
}
-2
View File
@@ -28,8 +28,6 @@
@import "CPView.j"
#include "CoreGraphics/CGGeometry.h"
CPLightShadow = 0;
CPHeavyShadow = 1;
+1 -2
View File
@@ -22,7 +22,6 @@
@import "CPControl.j"
#include "CoreGraphics/CGGeometry.h"
/*! SLIDER STATES */
@@ -42,7 +41,7 @@ CPCircularSlider = 1;
BOOL _isVertical;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "slider";
}
-1
View File
@@ -23,7 +23,6 @@
@import "CPView.j"
@import "CPColorPicker.j"
#include "Platform/Platform.h"
/*
@ignore
+1 -5
View File
@@ -24,10 +24,6 @@
@import "CPImage.j"
@import "CPView.j"
#include "CoreGraphics/CGGeometry.h"
#include "Platform/Platform.h"
#include "Platform/DOM/CPDOMDisplayServer.h"
CPSplitViewDidResizeSubviewsNotification = @"CPSplitViewDidResizeSubviewsNotification";
CPSplitViewWillResizeSubviewsNotification = @"CPSplitViewWillResizeSubviewsNotification";
@@ -61,7 +57,7 @@ var CPSplitViewHorizontalImage = nil,
CPArray _buttonBars;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"splitview";
}
+1
View File
@@ -24,6 +24,7 @@
@import "CPPlatformString.j"
var CPStringSizeWithFontInWidthCache = {};
CPStringSizeCachingEnabled = YES;
+4 -4
View File
@@ -1,7 +1,7 @@
@import <AppKit/CPBox.j>
@import <AppKit/CPSegmentedControl.j>
@import <AppKit/CPTabViewItem.j>
@import <AppKit/CPView.j>
@import "CPBox.j"
@import "CPSegmentedControl.j"
@import "CPTabViewItem.j"
@import "CPView.j"
/*
Places tabs on top with a bezeled border.
+1 -1
View File
@@ -22,7 +22,7 @@
@import <Foundation/CPObject.j>
@import <AppKit/CPView.j>
@import "CPView.j"
/*
-1
View File
@@ -28,7 +28,6 @@
@import "CPTableHeaderView.j"
#include "CoreGraphics/CGGeometry.h"
CPTableColumnNoResizing = 0;
CPTableColumnAutoresizingMask = 1 << 0;
+2 -3
View File
@@ -26,14 +26,13 @@
@import "CPTableView.j"
@import "CPView.j"
#include "CoreGraphics/CGGeometry.h"
@implementation _CPTableColumnHeaderView : CPView
{
_CPImageAndTextView _textField;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"columnHeader";
}
@@ -168,7 +167,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
CPTableView _tableView @accessors(property=tableView);
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"tableHeaderRow";
}
+4 -4
View File
@@ -22,20 +22,20 @@
@import <Foundation/CPArray.j>
@import <Foundation/CPIndexSet.j>
@import <AppKit/CGGradient.j>
@import "CGGradient.j"
@import "CPControl.j"
@import "CPTableColumn.j"
@import "_CPCornerView.j"
@import "CPScroller.j"
CPTableViewColumnDidMoveNotification = @"CPTableViewColumnDidMoveNotification";
CPTableViewColumnDidResizeNotification = @"CPTableViewColumnDidResizeNotification";
CPTableViewSelectionDidChangeNotification = @"CPTableViewSelectionDidChangeNotification";
CPTableViewSelectionIsChangingNotification = @"CPTableViewSelectionIsChangingNotification";
#include "CoreGraphics/CGGeometry.h"
var CPTableViewDataSource_numberOfRowsInTableView_ = 1 << 0,
CPTableViewDataSource_tableView_objectValueForTableColumn_row_ = 1 << 1,
CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_ = 1 << 2,
@@ -221,7 +221,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
CPArray _differedColumnDataToRemove;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"tableview";
}
+1 -4
View File
@@ -26,9 +26,6 @@
@import "CPCompatibility.j"
@import "_CPImageAndTextView.j"
#include "CoreGraphics/CGGeometry.h"
#include "Platform/Platform.h"
#include "Platform/DOM/CPDOMDisplayServer.h"
CPTextFieldSquareBezel = 0; /*! A textfield bezel with a squared corners. */
CPTextFieldRoundedBezel = 1; /*! A textfield bezel with rounded corners. */
@@ -158,7 +155,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
return textField;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "textfield";
}
+9 -3
View File
@@ -24,6 +24,7 @@
@import <Foundation/CPString.j>
@import <Foundation/CPKeyedUnarchiver.j>
var CPThemesByName = { },
CPThemeDefaultTheme = nil,
CPThemeDefaultHudTheme = nil;
@@ -100,7 +101,7 @@ var CPThemesByName = { },
ThemeDescriptors.j file.
NOTE: The names are not class names (such as "CPButton"), but the names returned
by the class' +themeClass method. For example, the name for CPCheckBox is "check-box",
by the class' +defaultThemeClass method. For example, the name for CPCheckBox is "check-box",
as defined in CPCheckBox::themeClass.
*/
- (CPArray)classNames
@@ -140,8 +141,13 @@ var CPThemesByName = { },
{
if ([aClass isKindOfClass:[CPView class]])
{
if ([aClass respondsToSelector:@selector(themeClass)])
if ([aClass respondsToSelector:@selector(defaultThemeClass)])
className = [aClass defaultThemeClass];
else if ([aClass respondsToSelector:@selector(themeClass)])
{
CPLog.warn(@"%@ themeClass is deprecated in favor of defaultThemeClass",CPStringFromClass([anObject class]));
className = [aClass themeClass];
}
else
return nil;
}
@@ -247,7 +253,7 @@ var CPThemesByName = { },
var attributes = [anObject _themeAttributeDictionary],
attributeName = nil,
attributeNames = [attributes keyEnumerator],
objectThemeClass = [[anObject class] themeClass];
objectThemeClass = [anObject themeClass];
while (attributeName = [attributeNames nextObject])
[self _recordAttribute:[attributes objectForKey:attributeName] forClass:objectThemeClass];
+4 -3
View File
@@ -22,9 +22,10 @@
@import <Foundation/CPObject.j>
@import <AppKit/CPTheme.j>
@import <AppKit/_CPCibCustomResource.j>
@import <AppKit/_CPCibKeyedUnarchiver.j>
@import "CPTheme.j"
@import "_CPCibCustomResource.j"
@import "_CPCibKeyedUnarchiver.j"
/*!
@ingroup appkit
+3 -4
View File
@@ -30,7 +30,6 @@
@import "CPWindow.j"
@import "_CPMenuWindow.j"
#include "Platform/Platform.h"
#if PLATFORM(DOM)
@@ -87,7 +86,7 @@ var CPThemeStateAutoCompleting = @"CPThemeStateAutoCompleting",
return [CPCharacterSet characterSetWithCharactersInString:@","];
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "tokenfield";
}
@@ -1146,7 +1145,7 @@ var CPThemeStateAutoCompleting = @"CPThemeStateAutoCompleting",
CPTokenField _tokenField;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "tokenfield-token";
}
@@ -1243,7 +1242,7 @@ var CPThemeStateAutoCompleting = @"CPThemeStateAutoCompleting",
return attributes;
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return "tokenfield-token-close-button";
}
-2
View File
@@ -28,8 +28,6 @@
@import "CPPopUpButton.j"
@import "CPToolbarItem.j"
#include "CoreGraphics/CGGeometry.h"
/*
@global
+3 -2
View File
@@ -23,8 +23,9 @@
@import <Foundation/CPObject.j>
@import <Foundation/CPString.j>
@import <AppKit/CPImage.j>
@import <AppKit/CPView.j>
@import "CPImage.j"
@import "CPView.j"
CPToolbarItemVisibilityPriorityStandard = 0;
CPToolbarItemVisibilityPriorityLow = -1000;
+31 -14
View File
@@ -35,11 +35,6 @@
@import "_CPDisplayServer.j"
#include "Platform/Platform.h"
#include "CoreGraphics/CGAffineTransform.h"
#include "CoreGraphics/CGGeometry.h"
#include "Platform/DOM/CPDOMDisplayServer.h"
/*
@global
@group CPViewAutoresizingMasks
@@ -179,6 +174,7 @@ var CPViewFlags = { },
// Theming Support
CPTheme _theme;
CPString _themeClass;
JSObject _themeAttributes;
unsigned _themeState;
@@ -1004,7 +1000,7 @@ var CPViewFlags = { },
{
var mask = [self autoresizingMask];
if(mask == CPViewNotSizable)
if (mask == CPViewNotSizable)
return;
var frame = _superview._frame,
@@ -1160,7 +1156,7 @@ var CPViewFlags = { },
{
aFlag = !!aFlag;
if(_isHidden === aFlag)
if (_isHidden === aFlag)
return;
// FIXME: Should we return to visibility? This breaks in FireFox, Opera, and IE.
@@ -1352,7 +1348,7 @@ var CPViewFlags = { },
*/
- (CPView)hitTest:(CPPoint)aPoint
{
if(_isHidden || !_hitTests || !CPRectContainsPoint(_frame, aPoint))
if (_isHidden || !_hitTests || !CPRectContainsPoint(_frame, aPoint))
return nil;
var view = nil,
@@ -1960,7 +1956,7 @@ setBoundsOrigin:
var superview = _superview,
clipViewClass = [CPClipView class];
while(superview && ![superview isKindOfClass:clipViewClass])
while (superview && ![superview isKindOfClass:clipViewClass])
superview = superview._superview;
return superview;
@@ -2056,7 +2052,7 @@ setBoundsOrigin:
var superview = _superview,
scrollViewClass = [CPScrollView class];
while(superview && ![superview isKindOfClass:scrollViewClass])
while (superview && ![superview isKindOfClass:scrollViewClass])
superview = superview._superview;
return superview;
@@ -2252,11 +2248,29 @@ setBoundsOrigin:
#pragma mark Theme Attributes
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return nil;
}
- (CPString)themeClass
{
if (_themeClass)
return _themeClass;
return [[self class] defaultThemeClass];
}
- (void)setThemeClass:(CPString)theClass
{
_themeClass = theClass;
[self _loadThemeAttributes];
[self setNeedsLayout];
[self setNeedsDisplay:YES];
}
+ (CPDictionary)themeAttributes
{
return nil;
@@ -2315,7 +2329,7 @@ setBoundsOrigin:
return;
var theme = [self theme],
themeClass = [theClass themeClass];
themeClass = [self themeClass];
_themeAttributes = {};
@@ -2351,7 +2365,7 @@ setBoundsOrigin:
return;
var theme = [self theme],
themeClass = [[self class] themeClass];
themeClass = [self themeClass];
for (var attributeName in _themeAttributes)
if (_themeAttributes.hasOwnProperty(attributeName))
@@ -2502,6 +2516,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
CPViewSubviewsKey = @"CPViewSubviewsKey",
CPViewSuperviewKey = @"CPViewSuperviewKey",
CPViewTagKey = @"CPViewTagKey",
CPViewThemeClassKey = @"CPViewThemeClassKey",
CPViewThemeStateKey = @"CPViewThemeStateKey",
CPViewWindowKey = @"CPViewWindowKey",
CPViewNextKeyViewKey = @"CPViewNextKeyViewKey",
@@ -2581,11 +2596,12 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
[self setupViewFlags];
_theme = [CPTheme defaultTheme];
_themeClass = [aCoder decodeObjectForKey:CPViewThemeClassKey];
_themeState = CPThemeState([aCoder decodeIntForKey:CPViewThemeStateKey]);
_themeAttributes = {};
var theClass = [self class],
themeClass = [theClass themeClass],
themeClass = [self themeClass],
attributes = [theClass _themeAttributes],
count = attributes.length;
@@ -2668,6 +2684,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
if (previousKeyView !== nil)
[aCoder encodeConditionalObject:previousKeyView forKey:CPViewPreviousKeyViewKey];
[aCoder encodeObject:[self themeClass] forKey:CPViewThemeClassKey];
[aCoder encodeInt:CPThemeStateName(_themeState) forKey:CPViewThemeStateKey];
for (var attributeName in _themeAttributes)
+1 -2
View File
@@ -20,9 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import <AppKit/CPAnimation.j>
@import "CPAnimation.j"
#include "CoreGraphics/CGGeometry.h"
CPViewAnimationTargetKey = @"CPViewAnimationTarget";
CPViewAnimationStartFrameKey = @"CPViewAnimationStartFrame";
+4 -3
View File
@@ -22,9 +22,10 @@
@import <Foundation/CPArray.j>
@import <AppKit/CPApplication.j>
@import <AppKit/CPCib.j>
@import <AppKit/CPResponder.j>
@import "CPApplication.j"
@import "CPCib.j"
@import "CPResponder.j"
var CPViewControllerCachedCibs;
+2 -4
View File
@@ -20,10 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import <AppKit/CPView.j>
@import <AppKit/CPScrollView.j>
#include "Platform/Platform.h"
@import "CPView.j"
@import "CPScrollView.j"
// FIXME: implement these where possible:
-5
View File
@@ -30,11 +30,6 @@
@import "CPResponder.j"
@import "CPScreen.j"
#include "../Platform/Platform.h"
#include "../Platform/DOM/CPDOMDisplayServer.h"
#include "../CoreGraphics/CGGeometry.h"
/*
Borderless window mask option.
+1
View File
@@ -22,6 +22,7 @@
@import "_CPWindowView.j"
var GRADIENT_HEIGHT = 41.0;
var _CPTexturedWindowHeadGradientColor = nil,
-2
View File
@@ -23,8 +23,6 @@
@import "CPImageView.j"
@import "CPView.j"
#include "../CoreGraphics/CGGeometry.h"
var _CPWindowViewResizeIndicatorImage = nil;
-2
View File
@@ -27,8 +27,6 @@
@import "CPWindow.j"
@import "CPDocument.j"
#include "Platform/Platform.h"
/*!
@ingroup appkit
+2 -2
View File
@@ -1,8 +1,8 @@
@import <Foundation/CPObject.j>
@import <AppKit/CGGeometry.j>
@import <AppKit/CPWindow.j>
@import "CGGeometry.j"
@import "CPWindow.j"
var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinSizeKey",
+3 -6
View File
@@ -22,13 +22,10 @@
@import <Foundation/CPObject.j>
@import <AppKit/CABackingStore.j>
@import "CABackingStore.j"
@import <AppKit/CGContext.j>
@import <AppKit/CGGeometry.j>
#include "../CoreGraphics/CGGeometry.h"
#include "../CoreGraphics/CGAffineTransform.j"
@import "CGContext.j"
@import "CGGeometry.j"
#define DOM(aLayer) aLayer._DOMElement
+2 -5
View File
@@ -20,14 +20,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "CGGeometry.h"
#include "CGAffineTransform.h"
#define _function(inline) function inline { return _##inline; }
@import "CGGeometry.j"
#define _function(inline) function inline { return _##inline; }
_function(CGAffineTransformMake(a, b, c, d, tx, ty))
_function(CGAffineTransformMakeIdentity())
_function(CGAffineTransformMakeCopy(anAffineTransform))
+1 -3
View File
@@ -20,14 +20,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "CGGeometry.h"
#include "CGAffineTransform.h"
@import "CGAffineTransform.j"
@import "CPCompatibility.j"
@import "CGGeometry.j"
@import "CGPath.j"
kCGLineCapButt = 0;
kCGLineCapRound = 1;
kCGLineCapSquare = 2;
-2
View File
@@ -20,8 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "CGGeometry.h"
#define _function(inline) function inline { return _##inline; }
_function(CGPointMake(x, y))
-3
View File
@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "CGGeometry.h"
#include "CGAffineTransform.h"
@import "CGGeometry.j"
@import "CGAffineTransform.j"
+8 -2
View File
@@ -27,10 +27,16 @@ appKitTask = framework ("AppKit", function(appKitTask)
appKitTask.setFlattensSources(true);
appKitTask.setInfoPlistPath("Info.plist");
// Grab all the .h's and just include them in each file.
var INCLUDES = new FileList("**/*.h").map(function(aFilename)
{
return "--include \"" + aFilename + "\"";
}).join(" ");
if ($CONFIGURATION === "Release")
appKitTask.setCompilerFlags("-O");
appKitTask.setCompilerFlags("-O " + INCLUDES);
else
appKitTask.setCompilerFlags("-DDEBUG -g");
appKitTask.setCompilerFlags("-DDEBUG -g " + INCLUDES);
});
$BUILD_CJS_CAPPUCCINO_APPKIT = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "AppKit");
-2
View File
@@ -22,8 +22,6 @@
@import <Foundation/CPObject.j>
#include "Platform.h"
@implementation CPBasePlatform : CPObject
{
-3
View File
@@ -22,9 +22,6 @@
@import <Foundation/CPObject.j>
#include "../CoreGraphics/CGGeometry.h"
#include "Platform.h"
@implementation CPBasePlatformString : CPObject
{
-3
View File
@@ -22,9 +22,6 @@
@import <Foundation/CPObject.j>
#import "Platform.h"
#import "../CoreGraphics/CGGeometry.h"
var PrimaryPlatformWindow = NULL;
-2
View File
@@ -23,8 +23,6 @@
@import <Foundation/CPArray.j>
@import <Foundation/CPObject.j>
#include "CPDOMDisplayServer.h"
@implementation CPDOMWindowLayer : CPObject
{
-2
View File
@@ -20,8 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "../CoreGraphics/CGGeometry.h"
var DOMFixedWidthSpanElement = nil,
DOMFlexibleWidthSpanElement = nil,
DOMMetricsDivElement = nil,
@@ -120,7 +120,6 @@
@import "CPPlatformWindow.j"
@import "CPPlatformWindow+DOMKeys.j"
#import "../../CoreGraphics/CGGeometry.h"
// List of all open native windows
var PlatformWindows = [CPSet set];
+1 -1
View File
@@ -26,7 +26,7 @@
{
}
+ (CPString)themeClass
+ (CPString)defaultThemeClass
{
return @"cornerview";
}
-4
View File
@@ -20,10 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "CoreGraphics/CGGeometry.h"
#include "CoreGraphics/CGAffineTransform.h"
#include "Platform/DOM/CPDOMDisplayServer.h"
@import <Foundation/CPRunLoop.j>
PREPARE_DOM_OPTIMIZATION();
-4
View File
@@ -28,10 +28,6 @@
@import "CPView.j"
@import "CPControl.j"
#include "CoreGraphics/CGGeometry.h"
#include "Platform/Platform.h"
#include "Platform/DOM/CPDOMDisplayServer.h"
var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
_CPImageAndTextViewImageChangedFlag = 1 << 1,
+4 -2
View File
@@ -42,10 +42,12 @@ foundationTask = framework ("Foundation", function(foundationTask)
foundationTask.setInfoPlistPath("Info.plist");
foundationTask.setEnvironments(require("objective-j/jake/environment").ObjJ);
var INCLUDES = "--include \"../AppKit/Platform/Platform.h\"";
if ($CONFIGURATION === "Release")
foundationTask.setCompilerFlags("-O");
foundationTask.setCompilerFlags("-O " + INCLUDES);
else
foundationTask.setCompilerFlags("-DDEBUG -g");
foundationTask.setCompilerFlags("-DDEBUG -g " + INCLUDES);
});
$BUILD_CJS_FOUNDATION = FILE.join($BUILD_CJS_CAPPUCCINO_FRAMEWORKS, "Foundation");
@@ -112,7 +112,16 @@ function resolveFlags(args)
else if (argument.indexOf("-U") === 0)
gccFlags.push(argument);
else if (argument === "--include")
{
if (++index < count)
{
gccFlags.push(argument);
gccFlags.push(args[index]);
}
}
else if (argument.indexOf("-E") === 0)
objjcFlags &= ~ObjectiveJ.Preprocessor.Flags.Preprocess;