mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-14 12:34:29 +00:00
capp_lint flags deprecated CPPoint/Rect/Size types/functions
- Changed to corresponding CG types/functions in all files - Fixed some demo app bugs
This commit is contained in:
1 parent
24c0f2aedc
commit
7c831fa19d
51 files changed
+186
-182
No files matched your search
+9
-9
@@ -84,7 +84,7 @@ CPBelowBottom = 6;
|
||||
|
||||
+ (id)themeAttributes
|
||||
{
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null], 1.0, 3.0, CPSizeMakeZero(), 6.0, [CPNull null], CPSizeMakeZero()]
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null], 1.0, 3.0, CGSizeMakeZero(), 6.0, [CPNull null], CGSizeMakeZero()]
|
||||
forKeys:[ @"background-color",
|
||||
@"border-color",
|
||||
@"border-width",
|
||||
@@ -95,7 +95,7 @@ CPBelowBottom = 6;
|
||||
@"content-margin"]];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)frameRect
|
||||
- (id)initWithFrame:(CGRect)frameRect
|
||||
{
|
||||
self = [super initWithFrame:frameRect];
|
||||
|
||||
@@ -123,7 +123,7 @@ CPBelowBottom = 6;
|
||||
|
||||
@return the border rectangle of the box
|
||||
*/
|
||||
- (CPRect)borderRect
|
||||
- (CGRect)borderRect
|
||||
{
|
||||
return [self bounds];
|
||||
}
|
||||
@@ -287,12 +287,12 @@ CPBelowBottom = 6;
|
||||
_contentView = aView;
|
||||
}
|
||||
|
||||
- (CPSize)contentViewMargins
|
||||
- (CGSize)contentViewMargins
|
||||
{
|
||||
return [self valueForThemeAttribute:@"content-margin"];
|
||||
}
|
||||
|
||||
- (void)setContentViewMargins:(CPSize)size
|
||||
- (void)setContentViewMargins:(CGSize)size
|
||||
{
|
||||
if (size.width < 0 || size.height < 0)
|
||||
[CPException raise:CPGenericException reason:@"Margins must be positive"];
|
||||
@@ -301,7 +301,7 @@ CPBelowBottom = 6;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (void)setFrameFromContentFrame:(CPRect)aRect
|
||||
- (void)setFrameFromContentFrame:(CGRect)aRect
|
||||
{
|
||||
var offset = [self _titleHeightOffset],
|
||||
borderWidth = [self borderWidth],
|
||||
@@ -370,7 +370,7 @@ CPBelowBottom = 6;
|
||||
case CPAtTop:
|
||||
case CPAboveTop:
|
||||
case CPBelowTop:
|
||||
[_titleView setFrameOrigin:CPPointMake(5.0, 0.0)];
|
||||
[_titleView setFrameOrigin:CGPointMake(5.0, 0.0)];
|
||||
[_titleView setAutoresizingMask:CPViewNotSizable];
|
||||
break;
|
||||
|
||||
@@ -378,7 +378,7 @@ CPBelowBottom = 6;
|
||||
case CPAtBottom:
|
||||
case CPBelowBottom:
|
||||
var h = [_titleView frameSize].height;
|
||||
[_titleView setFrameOrigin:CPPointMake(5.0, [self frameSize].height - h)];
|
||||
[_titleView setFrameOrigin:CGPointMake(5.0, [self frameSize].height - h)];
|
||||
[_titleView setAutoresizingMask:CPViewMinYMargin];
|
||||
break;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ CPBelowBottom = 6;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)drawRect:(CPRect)rect
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
if (_borderType === CPNoBorder)
|
||||
return;
|
||||
|
||||
+2
-2
@@ -809,13 +809,13 @@
|
||||
return [_browser canDragRowsWithIndexes:rowIndexes inColumn:[_browser columnOfTableView:self] withEvent:[CPApp currentEvent]];
|
||||
}
|
||||
|
||||
- (CPImage)dragImageForRowsWithIndexes:(CPIndexSet)dragRows tableColumns:(CPArray)theTableColumns event:(CPEvent)dragEvent offset:(CPPointPointer)dragImageOffset
|
||||
- (CPImage)dragImageForRowsWithIndexes:(CPIndexSet)dragRows tableColumns:(CPArray)theTableColumns event:(CPEvent)dragEvent offset:(CGPointPointer)dragImageOffset
|
||||
{
|
||||
return [_browser draggingImageForRowsWithIndexes:dragRows inColumn:[_browser columnOfTableView:self] withEvent:dragEvent offset:dragImageOffset] ||
|
||||
[super dragImageForRowsWithIndexes:dragRows tableColumns:theTableColumns event:dragEvent offset:dragImageOffset];
|
||||
}
|
||||
|
||||
- (CPView)dragViewForRowsWithIndexes:(CPIndexSet)dragRows tableColumns:(CPArray)theTableColumns event:(CPEvent)dragEvent offset:(CPPoint)dragViewOffset
|
||||
- (CPView)dragViewForRowsWithIndexes:(CPIndexSet)dragRows tableColumns:(CPArray)theTableColumns event:(CPEvent)dragEvent offset:(CGPoint)dragViewOffset
|
||||
{
|
||||
var count = theTableColumns.length;
|
||||
while (count--)
|
||||
|
||||
@@ -250,8 +250,8 @@ CPColorPickerViewHeight = 370;
|
||||
var height = (TOOLBAR_HEIGHT + 10 + PREVIEW_HEIGHT + 5 + SWATCH_HEIGHT + 32),
|
||||
bounds = [[self contentView] bounds];
|
||||
|
||||
[view setFrameSize:CPSizeMake(bounds.size.width - 10, bounds.size.height - height)];
|
||||
[view setFrameOrigin:CPPointMake(5, height)];
|
||||
[view setFrameSize:CGSizeMake(bounds.size.width - 10, bounds.size.height - height)];
|
||||
[view setFrameOrigin:CGPointMake(5, height)];
|
||||
}
|
||||
|
||||
[_currentView removeFromSuperview];
|
||||
@@ -421,7 +421,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie";
|
||||
CPCookie _swatchCookie;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
{
|
||||
self = [super initWithFrame:aFrame];
|
||||
|
||||
@@ -439,7 +439,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie";
|
||||
for (var i = 0; i < 50; i++)
|
||||
{
|
||||
// FIXME: http://280north.lighthouseapp.com/projects/13294-cappuccino/tickets/25-implement-cpbox
|
||||
var view = [[CPView alloc] initWithFrame:CPRectMake(13 * i + 1, 1, 12, 12)],
|
||||
var view = [[CPView alloc] initWithFrame:CGRectMake(13 * i + 1, 1, 12, 12)],
|
||||
fillView = [[CPView alloc] initWithFrame:CGRectInset([view bounds], 1.0, 1.0)];
|
||||
|
||||
[view setBackgroundColor:whiteColor];
|
||||
@@ -594,7 +594,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie";
|
||||
CPColorPanel _colorPanel;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
{
|
||||
self = [super initWithFrame:aFrame];
|
||||
|
||||
@@ -635,7 +635,7 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie";
|
||||
|
||||
[[CPPasteboard pasteboardWithName:CPDragPboard] declareTypes:[CPColorDragType] owner:self];
|
||||
|
||||
var bounds = CPRectMake(0, 0, 15, 15);
|
||||
var bounds = CGRectMake(0, 0, 15, 15);
|
||||
|
||||
// FIXME: http://280north.lighthouseapp.com/projects/13294-cappuccino/tickets/25-implement-cpbox
|
||||
var dragView = [[CPView alloc] initWithFrame:bounds],
|
||||
@@ -647,8 +647,8 @@ var CPColorPanelSwatchesCookie = "CPColorPanelSwatchesCookie";
|
||||
[dragView addSubview:dragFillView];
|
||||
|
||||
[self dragView:dragView
|
||||
at:CPPointMake(point.x - bounds.size.width / 2.0, point.y - bounds.size.height / 2.0)
|
||||
offset:CPPointMake(0.0, 0.0)
|
||||
at:CGPointMake(point.x - bounds.size.width / 2.0, point.y - bounds.size.height / 2.0)
|
||||
offset:CGPointMake(0.0, 0.0)
|
||||
event:anEvent
|
||||
pasteboard:nil
|
||||
source:self
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
float _radius;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
{
|
||||
if (self = [super initWithFrame:aFrame])
|
||||
{
|
||||
@@ -275,13 +275,13 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)setFrameSize:(CPSize)aSize
|
||||
- (void)setFrameSize:(CGSize)aSize
|
||||
{
|
||||
[super setFrameSize:aSize];
|
||||
[self setWheelSize:aSize];
|
||||
}
|
||||
|
||||
- (void)setWheelSize:(CPSize)aSize
|
||||
- (void)setWheelSize:(CGSize)aSize
|
||||
{
|
||||
var min = MIN(aSize.width, aSize.height);
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
_angle = [self radiansToDegrees:angle];
|
||||
_distance = (distance / _radius) * 100.0;
|
||||
|
||||
[_crosshair setFrameOrigin:CPPointMake(COS(angle) * distance + midX - 2.0, SIN(angle) * distance + midY - 2.0)];
|
||||
[_crosshair setFrameOrigin:CGPointMake(COS(angle) * distance + midX - 2.0, SIN(angle) * distance + midY - 2.0)];
|
||||
}
|
||||
|
||||
- (void)setPositionToColor:(CPColor)aColor
|
||||
|
||||
@@ -74,7 +74,7 @@ var CPDragServerSource = nil,
|
||||
- (unsigned)draggingSourceOperationMask
|
||||
*/
|
||||
|
||||
- (CPPoint)draggingLocation
|
||||
- (CGPoint)draggingLocation
|
||||
{
|
||||
return [[CPDragServer sharedDragServer] draggingLocation];
|
||||
}
|
||||
|
||||
+6
-6
@@ -196,7 +196,7 @@ var _CPEventPeriodicEventPeriod = 0,
|
||||
@implementation CPEvent : CPObject
|
||||
{
|
||||
CPEventType _type;
|
||||
CPPoint _location;
|
||||
CGPoint _location;
|
||||
unsigned _modifierFlags;
|
||||
CPTimeInterval _timestamp;
|
||||
CPGraphicsContext _context;
|
||||
@@ -315,13 +315,13 @@ var _CPEventPeriodicEventPeriod = 0,
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
- (id)_initMouseEventWithType:(CPEventType)anEventType location:(CPPoint)aPoint modifierFlags:(unsigned)modifierFlags
|
||||
- (id)_initMouseEventWithType:(CPEventType)anEventType location:(CGPoint)aPoint modifierFlags:(unsigned)modifierFlags
|
||||
timestamp:(CPTimeInterval)aTimestamp windowNumber:(int)aWindowNumber context:(CPGraphicsContext)aGraphicsContext
|
||||
eventNumber:(int)anEventNumber clickCount:(int)aClickCount pressure:(float)aPressure
|
||||
{
|
||||
if (self = [self _initWithType:anEventType])
|
||||
{
|
||||
_location = CPPointCreateCopy(aPoint);
|
||||
_location = CGPointCreateCopy(aPoint);
|
||||
_modifierFlags = modifierFlags;
|
||||
_timestamp = aTimestamp;
|
||||
_context = aGraphicsContext;
|
||||
@@ -335,13 +335,13 @@ var _CPEventPeriodicEventPeriod = 0,
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
- (id)_initKeyEventWithType:(CPEventType)anEventType location:(CPPoint)aPoint modifierFlags:(unsigned int)modifierFlags
|
||||
- (id)_initKeyEventWithType:(CPEventType)anEventType location:(CGPoint)aPoint modifierFlags:(unsigned int)modifierFlags
|
||||
timestamp:(CPTimeInterval)aTimestamp windowNumber:(int)aWindowNumber context:(CPGraphicsContext)aGraphicsContext
|
||||
characters:(CPString)characters charactersIgnoringModifiers:(CPString)unmodCharacters isARepeat:(BOOL)isARepeat keyCode:(unsigned short)code
|
||||
{
|
||||
if (self = [self _initWithType:anEventType])
|
||||
{
|
||||
_location = CPPointCreateCopy(aPoint);
|
||||
_location = CGPointCreateCopy(aPoint);
|
||||
_modifierFlags = modifierFlags;
|
||||
_timestamp = aTimestamp;
|
||||
_context = aGraphicsContext;
|
||||
@@ -362,7 +362,7 @@ var _CPEventPeriodicEventPeriod = 0,
|
||||
{
|
||||
if (self = [self _initWithType:anEventType])
|
||||
{
|
||||
_location = CPPointCreateCopy(aPoint);
|
||||
_location = CGPointCreateCopy(aPoint);
|
||||
_modifierFlags = modifierFlags;
|
||||
_timestamp = aTimestamp;
|
||||
_context = aGraphicsContext;
|
||||
|
||||
+2
-2
@@ -281,7 +281,7 @@ following:
|
||||
that dynamically tracks the current system font size.
|
||||
@return the requested system font
|
||||
*/
|
||||
+ (CPFont)systemFontOfSize:(CPSize)aSize
|
||||
+ (CPFont)systemFontOfSize:(CGSize)aSize
|
||||
{
|
||||
return _CPSystemFont(aSize === 0 ? _CPFontSystemFontSize : aSize, NO);
|
||||
}
|
||||
@@ -293,7 +293,7 @@ following:
|
||||
that dynamically tracks the current system font size.
|
||||
@return the requested bold system font
|
||||
*/
|
||||
+ (CPFont)boldSystemFontOfSize:(CPSize)aSize
|
||||
+ (CPFont)boldSystemFontOfSize:(CGSize)aSize
|
||||
{
|
||||
return _CPSystemFont(aSize === 0 ? _CPFontSystemFontSize : aSize, YES);
|
||||
}
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ function CPAppKitImage(aFilename, aSize)
|
||||
|
||||
if (self)
|
||||
{
|
||||
_size = CPSizeCreateCopy(aSize);
|
||||
_size = CGSizeCreateCopy(aSize);
|
||||
_filename = aFilename;
|
||||
_loadStatus = CPImageLoadStatusInitialized;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ CPRatingLevelIndicatorStyle = 3;
|
||||
return _isEditable;
|
||||
}
|
||||
|
||||
- (CPView)hitTest:(CPPoint)aPoint
|
||||
- (CPView)hitTest:(CGPoint)aPoint
|
||||
{
|
||||
// Don't swallow clicks when displayed in a table.
|
||||
if (![self isEditable])
|
||||
|
||||
@@ -357,7 +357,7 @@ var STICKY_TIME_INTERVAL = 500;
|
||||
- (_CPManagerScrollingState)scrollingStateForPoint:(CGPoint)aGlobalLocation
|
||||
{
|
||||
var frame = [self frame];
|
||||
if (!CPRectContainsPoint(frame,aGlobalLocation) || ![self canScroll])
|
||||
if (!CGRectContainsPoint(frame,aGlobalLocation) || ![self canScroll])
|
||||
return _CPMenuManagerScrollingStateNone;
|
||||
|
||||
// If we're at or above of the top scroll indicator...
|
||||
|
||||
@@ -1053,7 +1053,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
@ignore
|
||||
We need to offset the dataview and add the disclosure triangle.
|
||||
*/
|
||||
- (CPView)_dragViewForColumn:(int)theColumnIndex event:(CPEvent)theDragEvent offset:(CPPointPointer)theDragViewOffset
|
||||
- (CPView)_dragViewForColumn:(int)theColumnIndex event:(CPEvent)theDragEvent offset:(CGPointPointer)theDragViewOffset
|
||||
{
|
||||
var dragView = [[_CPColumnDragView alloc] initWithLineColor:[self gridColor]],
|
||||
tableColumn = [[self tableColumns] objectAtIndex:theColumnIndex],
|
||||
@@ -1186,7 +1186,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
- (id)_parentItemForUpperRow:(int)theUpperRowIndex andLowerRow:(int)theLowerRowIndex atMouseOffset:(CPPoint)theOffset
|
||||
- (id)_parentItemForUpperRow:(int)theUpperRowIndex andLowerRow:(int)theLowerRowIndex atMouseOffset:(CGPoint)theOffset
|
||||
{
|
||||
if (_shouldRetargetItem)
|
||||
return _retargetedItem;
|
||||
@@ -1216,7 +1216,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
- (CPRect)_rectForDropHighlightViewBetweenUpperRow:(int)theUpperRowIndex andLowerRow:(int)theLowerRowIndex offset:(CPPoint)theOffset
|
||||
- (CGRect)_rectForDropHighlightViewBetweenUpperRow:(int)theUpperRowIndex andLowerRow:(int)theLowerRowIndex offset:(CGPoint)theOffset
|
||||
{
|
||||
// Call super and the update x to reflect the current indentation level
|
||||
var rect = [super _rectForDropHighlightViewBetweenUpperRow:theUpperRowIndex andLowerRow:theLowerRowIndex offset:theOffset],
|
||||
@@ -1729,7 +1729,7 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt
|
||||
return [_outlineView._outlineViewDataSource outlineView:_outlineView writeItems:items toPasteboard:thePasteboard];
|
||||
}
|
||||
|
||||
- (int)_childIndexForDropOperation:(CPTableViewDropOperation)theDropOperation row:(int)theRow offset:(CPPoint)theOffset
|
||||
- (int)_childIndexForDropOperation:(CPTableViewDropOperation)theDropOperation row:(int)theRow offset:(CGPoint)theOffset
|
||||
{
|
||||
if (_outlineView._shouldRetargetChildIndex)
|
||||
return _outlineView._retargedChildIndex;
|
||||
@@ -1753,7 +1753,7 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt
|
||||
return childIndex;
|
||||
}
|
||||
|
||||
- (void)_parentItemForDropOperation:(CPTableViewDropOperation)theDropOperation row:(int)theRow offset:(CPPoint)theOffset
|
||||
- (void)_parentItemForDropOperation:(CPTableViewDropOperation)theDropOperation row:(int)theRow offset:(CGPoint)theOffset
|
||||
{
|
||||
if (theDropOperation === CPTableViewDropAbove)
|
||||
return [_outlineView _parentItemForUpperRow:theRow - 1 andLowerRow:theRow atMouseOffset:theOffset]
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0,
|
||||
|
||||
@param aSize the desired size
|
||||
*/
|
||||
- (void)setContentSize:(CPSize)aSize
|
||||
- (void)setContentSize:(CGSize)aSize
|
||||
{
|
||||
[[_contentViewController view] setFrameSize:aSize];
|
||||
}
|
||||
|
||||
@@ -2066,7 +2066,7 @@ TODO: implement
|
||||
[super setNeedsDisplay:flag];
|
||||
}
|
||||
|
||||
- (void)setFrameSize:(CPSize)size
|
||||
- (void)setFrameSize:(CGSize)size
|
||||
{
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
@@ -2262,7 +2262,7 @@ TODO: implement
|
||||
return [CPIndexSet indexSetWithIndex:CPDragOperationMove];
|
||||
}
|
||||
|
||||
- (void)draggedView:(CPView)dragView endedAt:(CPPoint)aPoint operation:(CPDragOperation)operation
|
||||
- (void)draggedView:(CPView)dragView endedAt:(CGPoint)aPoint operation:(CPDragOperation)operation
|
||||
{
|
||||
_draggingRows = nil;
|
||||
|
||||
@@ -2586,7 +2586,7 @@ var dropSeparatorColor = [CPColor colorWithHexString:@"4886ca"];
|
||||
{
|
||||
}
|
||||
|
||||
- (void)drawRect:(CPRect)rect
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort];
|
||||
CGContextSetFillColor(context, dropSeparatorColor);
|
||||
|
||||
@@ -69,9 +69,9 @@ else if (CPBrowserIsEngine(CPInternetExplorerBrowserEngine))
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)hitTest:(CPPoint)point
|
||||
- (id)hitTest:(CGPoint)point
|
||||
{
|
||||
if (!CPRectContainsPoint([self frame], point) || ![self sliceIsEditable])
|
||||
if (!CGRectContainsPoint([self frame], point) || ![self sliceIsEditable])
|
||||
return nil;
|
||||
|
||||
return self;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
CPRuleEditor _ruleEditor;
|
||||
int _indentation @accessors(property=indentation);
|
||||
int _rowIndex @accessors(property=rowIndex);
|
||||
CPRect _animationTargetRect @accessors(property=_animationTargetRect);
|
||||
CGRect _animationTargetRect @accessors(property=_animationTargetRect);
|
||||
BOOL _selected @accessors(getter=_isSelected, setter=_setSelected:);
|
||||
BOOL _lastSelected @accessors(getter=_isLastSelected, setter=_setLastSelected:);
|
||||
CPColor _backgroundColor @accessors(property=backgroundColor);
|
||||
@@ -44,7 +44,7 @@
|
||||
_selected = select;
|
||||
}
|
||||
|
||||
- (void)drawRect:(CPRect)rect
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
bounds = [self bounds],
|
||||
|
||||
@@ -473,7 +473,7 @@ var CONTROL_HEIGHT = 16.,
|
||||
[self layoutSubviews];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CPRect)rect
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
[super drawRect:rect];
|
||||
}
|
||||
@@ -523,9 +523,9 @@ var CONTROL_HEIGHT = 16.,
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)hitTest:(CPPoint)point
|
||||
- (id)hitTest:(CGPoint)point
|
||||
{
|
||||
if (!CPRectContainsPoint([self frame], point))
|
||||
if (!CGRectContainsPoint([self frame], point))
|
||||
return nil;
|
||||
|
||||
return [self superview];
|
||||
|
||||
@@ -1256,7 +1256,7 @@ Notifies the delegate when the scroll view has finished scrolling.
|
||||
#pragma mark -
|
||||
#pragma mark Overrides
|
||||
|
||||
- (void)drawRect:(CPRect)aRect
|
||||
- (void)drawRect:(CGRect)aRect
|
||||
{
|
||||
[super drawRect:aRect];
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ var RECENT_SEARCH_PREFIX = @" ";
|
||||
*/
|
||||
- (CGRect)searchButtonRectForBounds:(CGRect)rect
|
||||
{
|
||||
var size = [[self valueForThemeAttribute:@"image-search"] size] || CPSizeMakeZero();
|
||||
var size = [[self valueForThemeAttribute:@"image-search"] size] || CGSizeMakeZero();
|
||||
|
||||
return _CGRectMake(5, (_CGRectGetHeight(rect) - size.height) / 2, size.width, size.height);
|
||||
}
|
||||
@@ -262,7 +262,7 @@ var RECENT_SEARCH_PREFIX = @" ";
|
||||
*/
|
||||
- (CGRect)cancelButtonRectForBounds:(CGRect)rect
|
||||
{
|
||||
var size = [[self valueForThemeAttribute:@"image-cancel"] size] || CPSizeMakeZero();
|
||||
var size = [[self valueForThemeAttribute:@"image-cancel"] size] || CGSizeMakeZero();
|
||||
|
||||
return _CGRectMake(_CGRectGetWidth(rect) - size.width - 5, (_CGRectGetHeight(rect) - size.width) / 2, size.height, size.height);
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ CPSegmentSwitchTrackingMomentary = 2;
|
||||
}
|
||||
else if (aName === "right-segment-bezel")
|
||||
{
|
||||
return CPRectMake(CGRectGetWidth([self bounds]) - contentInset.right,
|
||||
return CGRectMake(CGRectGetWidth([self bounds]) - contentInset.right,
|
||||
bezelInset.top,
|
||||
contentInset.right,
|
||||
height);
|
||||
|
||||
+3
-3
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
@implementation CPShadow : CPObject
|
||||
{
|
||||
CPSize _offset;
|
||||
CGSize _offset;
|
||||
float _blurRadius;
|
||||
CPColor _color;
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
- (id)_initWithOffset:(CPSize)anOffset blurRadius:(float)aBlurRadius color:(CPColor)aColor
|
||||
- (id)_initWithOffset:(CGSize)anOffset blurRadius:(float)aBlurRadius color:(CPColor)aColor
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
@@ -99,4 +99,4 @@
|
||||
return _cssString;
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
@@ -787,7 +787,7 @@ var ShouldSuppressResizeNotifications = 1,
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (void)resizeSubviewsWithOldSize:(CPSize)oldSize
|
||||
- (void)resizeSubviewsWithOldSize:(CGSize)oldSize
|
||||
{
|
||||
if ([_delegate respondsToSelector:@selector(splitView:resizeSubviewsWithOldSize:)])
|
||||
{
|
||||
@@ -1143,7 +1143,7 @@ The sum of the views and the sum of the dividers should be equal to the size of
|
||||
|
||||
for (var i = 0, count = [frames count] - 1; i < count; i++)
|
||||
{
|
||||
var frame = CPRectFromString(frames[i]);
|
||||
var frame = CGRectFromString(frames[i]);
|
||||
position += frame.size[_sizeComponent];
|
||||
|
||||
[self setPosition:position ofDividerAtIndex:i];
|
||||
|
||||
@@ -2881,7 +2881,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
// Copy the dataviews add them to a transparent drag view and use that drag view
|
||||
// to make it appear we are dragging images of those rows (as you would do in regular Cocoa)
|
||||
*/
|
||||
- (CPView)_dragViewForColumn:(int)theColumnIndex event:(CPEvent)theDragEvent offset:(CPPointPointer)theDragViewOffset
|
||||
- (CPView)_dragViewForColumn:(int)theColumnIndex event:(CPEvent)theDragEvent offset:(CGPointPointer)theDragViewOffset
|
||||
{
|
||||
var dragView = [[_CPColumnDragView alloc] initWithLineColor:[self gridColor]],
|
||||
tableColumn = [[self tableColumns] objectAtIndex:theColumnIndex],
|
||||
@@ -4153,7 +4153,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
if ([self canDragRowsWithIndexes:_draggedRowIndexes atPoint:aPoint] && [_dataSource tableView:self writeRowsWithIndexes:_draggedRowIndexes toPasteboard:pboard])
|
||||
{
|
||||
var currentEvent = [CPApp currentEvent],
|
||||
offset = CPPointMakeZero(),
|
||||
offset = CGPointMakeZero(),
|
||||
tableColumns = [_tableColumns objectsAtIndexes:_exposedColumns];
|
||||
|
||||
// We deviate from the default Cocoa implementation here by asking for a view in stead of an image
|
||||
@@ -4175,8 +4175,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
}
|
||||
|
||||
var bounds = [view bounds],
|
||||
viewLocation = CPPointMake(aPoint.x - CGRectGetWidth(bounds) / 2 + offset.x, aPoint.y - CGRectGetHeight(bounds) / 2 + offset.y);
|
||||
[self dragView:view at:viewLocation offset:CPPointMakeZero() event:[CPApp currentEvent] pasteboard:pboard source:self slideBack:YES];
|
||||
viewLocation = CGPointMake(aPoint.x - CGRectGetWidth(bounds) / 2 + offset.x, aPoint.y - CGRectGetHeight(bounds) / 2 + offset.y);
|
||||
[self dragView:view at:viewLocation offset:CGPointMakeZero() event:[CPApp currentEvent] pasteboard:pboard source:self slideBack:YES];
|
||||
_startTrackingPoint = nil;
|
||||
|
||||
return NO;
|
||||
@@ -4355,7 +4355,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
// If there is no (the default) or to little inter cell spacing we create some room for the CPTableViewDropAbove indicator
|
||||
// This probably doesn't work if the row height is smaller than or around 5.0
|
||||
if ([self intercellSpacing].height < 5.0)
|
||||
rowRect = CPRectInset(rowRect, 0.0, 5.0 - [self intercellSpacing].height);
|
||||
rowRect = CGRectInset(rowRect, 0.0, 5.0 - [self intercellSpacing].height);
|
||||
|
||||
// If the altered row rect contains the drag point we show the drop on
|
||||
// We don't show the drop on indicator if we are dragging below the last row
|
||||
@@ -4403,7 +4403,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
- (CPRect)_rectForDropHighlightViewOnRow:(int)theRowIndex
|
||||
- (CGRect)_rectForDropHighlightViewOnRow:(int)theRowIndex
|
||||
{
|
||||
if (theRowIndex >= [self numberOfRows])
|
||||
theRowIndex = [self numberOfRows] - 1;
|
||||
@@ -4414,7 +4414,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
/*!
|
||||
@ignore
|
||||
*/
|
||||
- (CPRect)_rectForDropHighlightViewBetweenUpperRow:(int)theUpperRowIndex andLowerRow:(int)theLowerRowIndex offset:(CPPoint)theOffset
|
||||
- (CGRect)_rectForDropHighlightViewBetweenUpperRow:(int)theUpperRowIndex andLowerRow:(int)theLowerRowIndex offset:(CGPoint)theOffset
|
||||
{
|
||||
if (theLowerRowIndex > [self numberOfRows])
|
||||
theLowerRowIndex = [self numberOfRows];
|
||||
|
||||
@@ -95,7 +95,7 @@ var CPScrollDestinationNone = 0,
|
||||
return [CPDictionary dictionaryWithObject:_CGInsetMakeZero() forKey:@"editor-inset"];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)frame
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
if (self = [super initWithFrame:frame])
|
||||
{
|
||||
@@ -998,8 +998,8 @@ var CPScrollDestinationNone = 0,
|
||||
var contentRect = _CGRectMakeCopy([contentView bounds]),
|
||||
contentOrigin = contentRect.origin,
|
||||
contentSize = contentRect.size,
|
||||
offset = CPPointMake(contentOrigin.x, contentOrigin.y),
|
||||
spaceBetweenTokens = CPSizeMake(2.0, 2.0),
|
||||
offset = CGPointMake(contentOrigin.x, contentOrigin.y),
|
||||
spaceBetweenTokens = CGSizeMake(2.0, 2.0),
|
||||
isEditing = [[self window] firstResponder] == self,
|
||||
tokenToken = [_CPTokenFieldToken new],
|
||||
font = [self currentValueForThemeAttribute:@"font"],
|
||||
@@ -1281,11 +1281,11 @@ var CPScrollDestinationNone = 0,
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)frame
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
if (self = [super initWithFrame:frame])
|
||||
{
|
||||
_deleteButton = [[_CPTokenFieldTokenCloseButton alloc] initWithFrame:CPRectMakeZero()];
|
||||
_deleteButton = [[_CPTokenFieldTokenCloseButton alloc] initWithFrame:CGRectMakeZero()];
|
||||
[self addSubview:_deleteButton];
|
||||
|
||||
[self setEditable:NO];
|
||||
@@ -1375,7 +1375,7 @@ var CPScrollDestinationNone = 0,
|
||||
buttonOffset = [_deleteButton currentValueForThemeAttribute:@"offset"],
|
||||
buttonSize = [_deleteButton currentValueForThemeAttribute:@"min-size"];
|
||||
|
||||
[_deleteButton setFrame:_CGRectMake(CPRectGetMaxX(frame) - buttonOffset.x, CPRectGetMinY(frame) + buttonOffset.y, buttonSize.width, buttonSize.height)];
|
||||
[_deleteButton setFrame:_CGRectMake(CGRectGetMaxX(frame) - buttonOffset.x, CGRectGetMinY(frame) + buttonOffset.y, buttonSize.width, buttonSize.height)];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ var CPToolbarsByIdentifier = nil,
|
||||
- (CGRect)_toolbarViewFrame
|
||||
{
|
||||
var height = _desiredHeight || (_sizeMode != CPToolbarSizeModeSmall ? [_toolbarView valueForThemeAttribute:@"regular-size-height"] : [_toolbarView valueForThemeAttribute:@"small-size-height"]);
|
||||
return CPRectMake(0.0, 0.0, 1200.0, height);
|
||||
return CGRectMake(0.0, 0.0, 1200.0, height);
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
|
||||
+5
-5
@@ -1528,7 +1528,7 @@ var CPViewFlags = { },
|
||||
@param aPoint the point to test
|
||||
@return returns the containing view, or nil if the point is not contained
|
||||
*/
|
||||
- (CPView)hitTest:(CPPoint)aPoint
|
||||
- (CPView)hitTest:(CGPoint)aPoint
|
||||
{
|
||||
if (_isHidden || !_hitTests || !_CGRectContainsPoint(_frame, aPoint))
|
||||
return nil;
|
||||
@@ -2049,7 +2049,7 @@ setBoundsOrigin:
|
||||
@param aSourceObject the drag operation controller
|
||||
@param slideBack Whether the view should 'slide back' if the drag is rejected
|
||||
*/
|
||||
- (void)dragView:(CPView)aView at:(CPPoint)aLocation offset:(CPSize)mouseOffset event:(CPEvent)anEvent pasteboard:(CPPasteboard)aPasteboard source:(id)aSourceObject slideBack:(BOOL)slideBack
|
||||
- (void)dragView:(CPView)aView at:(CGPoint)aLocation offset:(CGSize)mouseOffset event:(CPEvent)anEvent pasteboard:(CPPasteboard)aPasteboard source:(id)aSourceObject slideBack:(BOOL)slideBack
|
||||
{
|
||||
[_window dragView:aView at:[self convertPoint:aLocation toView:nil] offset:mouseOffset event:anEvent pasteboard:aPasteboard source:aSourceObject slideBack:slideBack];
|
||||
}
|
||||
@@ -2099,7 +2099,7 @@ setBoundsOrigin:
|
||||
Draws the receiver into \c aRect. This method should be overridden by subclasses.
|
||||
@param aRect the area that should be drawn into
|
||||
*/
|
||||
- (void)drawRect:(CPRect)aRect
|
||||
- (void)drawRect:(CGRect)aRect
|
||||
{
|
||||
|
||||
}
|
||||
@@ -2119,7 +2119,7 @@ setBoundsOrigin:
|
||||
Marks the area denoted by \c aRect as dirty, and initiates a redraw on it.
|
||||
@param aRect the area that needs to be redrawn
|
||||
*/
|
||||
- (void)setNeedsDisplayInRect:(CPRect)aRect
|
||||
- (void)setNeedsDisplayInRect:(CGRect)aRect
|
||||
{
|
||||
if (!(_viewClassFlags & CPViewHasCustomDrawRect))
|
||||
return;
|
||||
@@ -2167,7 +2167,7 @@ setBoundsOrigin:
|
||||
Draws the receiver into the area defined by \c aRect.
|
||||
@param aRect the area to be drawn
|
||||
*/
|
||||
- (void)displayRect:(CPRect)aRect
|
||||
- (void)displayRect:(CGRect)aRect
|
||||
{
|
||||
[self viewWillDraw];
|
||||
|
||||
|
||||
+4
-4
@@ -126,7 +126,7 @@ CPWebViewAppKitScrollMaxPollCount = 3;
|
||||
BOOL _drawsBackground;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)frameRect frameName:(CPString)frameName groupName:(CPString)groupName
|
||||
- (id)initWithFrame:(CGRect)frameRect frameName:(CPString)frameName groupName:(CPString)groupName
|
||||
{
|
||||
if (self = [self initWithFrame:frameRect])
|
||||
{
|
||||
@@ -136,7 +136,7 @@ CPWebViewAppKitScrollMaxPollCount = 3;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
{
|
||||
if (self = [super initWithFrame:aFrame])
|
||||
{
|
||||
@@ -157,7 +157,7 @@ CPWebViewAppKitScrollMaxPollCount = 3;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)_initDOMWithFrame:(CPRect)aFrame
|
||||
- (id)_initDOMWithFrame:(CGRect)aFrame
|
||||
{
|
||||
_ignoreLoadStart = YES;
|
||||
_ignoreLoadEnd = YES;
|
||||
@@ -221,7 +221,7 @@ CPWebViewAppKitScrollMaxPollCount = 3;
|
||||
[self addSubview:_scrollView];
|
||||
}
|
||||
|
||||
- (void)setFrameSize:(CPSize)aSize
|
||||
- (void)setFrameSize:(CGSize)aSize
|
||||
{
|
||||
[super setFrameSize:aSize];
|
||||
[self _resizeWebFrame];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
forKeys:[ @"body-color", @"height-shadow"]];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
- (id)initWithFrame:(CGRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
{
|
||||
self = [super initWithFrame:aFrame styleMask:aStyleMask];
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
return frameRect;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
- (id)initWithFrame:(CGRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
{
|
||||
self = [super initWithFrame:aFrame styleMask:aStyleMask];
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
@"unsaved-image-highlighted-button"]];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
- (id)initWithFrame:(CGRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
{
|
||||
self = [super initWithFrame:aFrame styleMask:aStyleMask];
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
return frameRect;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
- (id)initWithFrame:(CGRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
{
|
||||
self = [super initWithFrame:aFrame styleMask:aStyleMask];
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ var _CPWindowViewCornerResizeRectWidth = 10,
|
||||
return frameRect;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
- (id)initWithFrame:(CGRect)aFrame styleMask:(unsigned)aStyleMask
|
||||
{
|
||||
self = [super initWithFrame:aFrame];
|
||||
|
||||
|
||||
@@ -1453,7 +1453,7 @@ var resizeTimer = nil;
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
- (id)_dragHitTest:(CPPoint)aPoint pasteboard:(CPPasteboard)aPasteboard
|
||||
- (id)_dragHitTest:(CGPoint)aPoint pasteboard:(CPPasteboard)aPasteboard
|
||||
{
|
||||
var levels = _windowLevels,
|
||||
layers = _windowLayers,
|
||||
@@ -1507,17 +1507,17 @@ var resizeTimer = nil;
|
||||
return StopContextMenuDOMEventPropagation;
|
||||
}
|
||||
|
||||
- (CPWindow)_mouseHitTest:(CPPoint)location
|
||||
- (CPWindow)_mouseHitTest:(CGPoint)location
|
||||
{
|
||||
return [self _hitTest:location withTest:@selector(_isValidMousePoint:)]
|
||||
}
|
||||
|
||||
- (CPWindow)hitTest:(CPPoint)location
|
||||
- (CPWindow)hitTest:(CGPoint)location
|
||||
{
|
||||
return [self _hitTest:location withTest:@selector(containsPoint:)]
|
||||
}
|
||||
|
||||
- (CPWindow)_hitTest:(CPPoint)location withTest:(SEL)aTest
|
||||
- (CPWindow)_hitTest:(CGPoint)location withTest:(SEL)aTest
|
||||
{
|
||||
if (self._only)
|
||||
return self._only;
|
||||
|
||||
@@ -713,8 +713,8 @@ var themedButtonValues = nil,
|
||||
[@"knob-color", knobColorDark, CPThemeStateVertical | CPThemeStateScrollerKnobDark],
|
||||
[@"increment-line-color", [CPNull null], CPThemeStateVertical],
|
||||
[@"decrement-line-color", [CPNull null], CPThemeStateVertical],
|
||||
[@"decrement-line-size", CPSizeMakeZero(), CPThemeStateVertical],
|
||||
[@"increment-line-size", CPSizeMakeZero(), CPThemeStateVertical],
|
||||
[@"decrement-line-size", CGSizeMakeZero(), CPThemeStateVertical],
|
||||
[@"increment-line-size", CGSizeMakeZero(), CPThemeStateVertical],
|
||||
|
||||
// Legacy
|
||||
[@"scroller-width", 14.0, CPThemeStateVertical | CPThemeStateScrollViewLegacy],
|
||||
@@ -732,8 +732,8 @@ var themedButtonValues = nil,
|
||||
[@"knob-color", knobColorLegacy, CPThemeStateVertical | CPThemeStateScrollViewLegacy | CPThemeStateScrollerKnobDark],
|
||||
[@"increment-line-color", incrementColorLegacy, CPThemeStateVertical | CPThemeStateScrollViewLegacy],
|
||||
[@"decrement-line-color", decrementColorLegacy, CPThemeStateVertical | CPThemeStateScrollViewLegacy],
|
||||
[@"decrement-line-size", CPSizeMake(14.0, 11.0), CPThemeStateVertical | CPThemeStateScrollViewLegacy],
|
||||
[@"increment-line-size", CPSizeMake(14.0, 11.0), CPThemeStateVertical | CPThemeStateScrollViewLegacy]
|
||||
[@"decrement-line-size", CGSizeMake(14.0, 11.0), CPThemeStateVertical | CPThemeStateScrollViewLegacy],
|
||||
[@"increment-line-size", CGSizeMake(14.0, 11.0), CPThemeStateVertical | CPThemeStateScrollViewLegacy]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themedVerticalScrollerValues forView:scroller];
|
||||
@@ -831,8 +831,8 @@ var themedButtonValues = nil,
|
||||
[@"knob-color", knobColor],
|
||||
[@"knob-color", knobColorLight, CPThemeStateScrollerKnobLight],
|
||||
[@"knob-color", knobColorDark, CPThemeStateScrollerKnobDark],
|
||||
[@"decrement-line-size", CPSizeMakeZero()],
|
||||
[@"increment-line-size", CPSizeMakeZero()],
|
||||
[@"decrement-line-size", CGSizeMakeZero()],
|
||||
[@"increment-line-size", CGSizeMakeZero()],
|
||||
|
||||
// Legacy
|
||||
[@"scroller-width", 14.0, CPThemeStateScrollViewLegacy],
|
||||
@@ -848,8 +848,8 @@ var themedButtonValues = nil,
|
||||
[@"knob-color", knobColorLegacy, CPThemeStateScrollViewLegacy | CPThemeStateScrollerKnobDark],
|
||||
[@"increment-line-color", incrementColorLegacy, CPThemeStateScrollViewLegacy],
|
||||
[@"decrement-line-color", decrementColorLegacy, CPThemeStateScrollViewLegacy],
|
||||
[@"decrement-line-size", CPSizeMake(11.0, 14.0), CPThemeStateScrollViewLegacy],
|
||||
[@"increment-line-size", CPSizeMake(11.0, 14.0), CPThemeStateScrollViewLegacy]
|
||||
[@"decrement-line-size", CGSizeMake(11.0, 14.0), CPThemeStateScrollViewLegacy],
|
||||
[@"increment-line-size", CGSizeMake(11.0, 14.0), CPThemeStateScrollViewLegacy]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themedHorizontalScrollerValues forView:scroller];
|
||||
@@ -1957,7 +1957,7 @@ var themedButtonValues = nil,
|
||||
|
||||
+ (_CPToolTipWindowView)themedTooltip
|
||||
{
|
||||
var toolTipView = [[_CPToolTipWindowView alloc] initWithFrame:CPRectMakeZero() styleMask:_CPToolTipWindowMask],
|
||||
var toolTipView = [[_CPToolTipWindowView alloc] initWithFrame:CGRectMakeZero() styleMask:_CPToolTipWindowMask],
|
||||
|
||||
themeValues =
|
||||
[
|
||||
@@ -2069,10 +2069,10 @@ var themedButtonValues = nil,
|
||||
[@"border-width", 1.0],
|
||||
[@"border-color", [CPColor colorWithHexString:@"B7B7B7"]],
|
||||
[@"corner-radius", 3.0],
|
||||
[@"inner-shadow-offset", CPSizeMakeZero()],
|
||||
[@"inner-shadow-offset", CGSizeMakeZero()],
|
||||
[@"inner-shadow-color", [CPColor blackColor]],
|
||||
[@"inner-shadow-size", 6.0],
|
||||
[@"content-margin", CPSizeMakeZero()]
|
||||
[@"content-margin", CGSizeMakeZero()]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themeValues forView:box];
|
||||
@@ -2283,8 +2283,8 @@ var themedButtonValues = nil,
|
||||
|
||||
themeValues =
|
||||
[
|
||||
[@"close-image-size", CPSizeMake(18.0, 18.0)],
|
||||
[@"close-image-origin", CPPointMake(6.0,4.0)],
|
||||
[@"close-image-size", CGSizeMake(18.0, 18.0)],
|
||||
[@"close-image-origin", CGPointMake(6.0,4.0)],
|
||||
[@"close-image", closeImage],
|
||||
[@"close-active-image", closeActiveImage],
|
||||
[@"bezel-color", HUDBezelColor],
|
||||
@@ -2382,8 +2382,8 @@ var themedButtonValues = nil,
|
||||
[@"minimize-image-button" ,minimizeButtonImage],
|
||||
[@"minimize-image-highlighted-button" ,minimizeButtonImageHighlighted],
|
||||
|
||||
[@"close-image-size", CPSizeMake(16.0, 16.0)],
|
||||
[@"close-image-origin", CPPointMake(8.0, 10.0)],
|
||||
[@"close-image-size", CGSizeMake(16.0, 16.0)],
|
||||
[@"close-image-origin", CGPointMake(8.0, 10.0)],
|
||||
|
||||
[@"resize-indicator", resizeIndicator],
|
||||
[@"attached-sheet-shadow-color", sheetShadow],
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
|
||||
var horizontalTrackColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:
|
||||
[
|
||||
[_CPCibCustomResource imageResourceWithName:"horizontal-track-left.png" size:CPSizeMake(2.0, 4.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"horizontal-track-center.png" size:CPSizeMake(1.0, 4.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"horizontal-track-right.png" size:CPSizeMake(2.0, 4.0)]
|
||||
[_CPCibCustomResource imageResourceWithName:"horizontal-track-left.png" size:CGSizeMake(2.0, 4.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"horizontal-track-center.png" size:CGSizeMake(1.0, 4.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"horizontal-track-right.png" size:CGSizeMake(2.0, 4.0)]
|
||||
]
|
||||
isVertical:NO]],
|
||||
horizontalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 24.0)];
|
||||
@@ -37,8 +37,8 @@
|
||||
[horizontalSlider setTrackWidth:4.0];
|
||||
[horizontalSlider setHorizontalTrackColor:horizontalTrackColor];
|
||||
|
||||
var knobColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"knob.png" size:CPSizeMake(11.0, 11.0)]],
|
||||
knobHighlightedColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"knob-highlighted.png" size:CPSizeMake(12.0, 12.0)]];
|
||||
var knobColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"knob.png" size:CGSizeMake(11.0, 11.0)]],
|
||||
knobHighlightedColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"knob-highlighted.png" size:CGSizeMake(12.0, 12.0)]];
|
||||
|
||||
[horizontalSlider setKnobSize:CGSizeMake(12.0, 12.0)];
|
||||
[horizontalSlider setKnobColor:knobColor];
|
||||
@@ -50,9 +50,9 @@
|
||||
|
||||
var verticalTrackColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:
|
||||
[
|
||||
[_CPCibCustomResource imageResourceWithName:"vertical-track-top.png" size:CPSizeMake(4.0, 2.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"vertical-track-center.png" size:CPSizeMake(4.0, 1.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"vertical-track-bottom.png" size:CPSizeMake(4.0, 2.0)]
|
||||
[_CPCibCustomResource imageResourceWithName:"vertical-track-top.png" size:CGSizeMake(4.0, 2.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"vertical-track-center.png" size:CGSizeMake(4.0, 1.0)],
|
||||
[_CPCibCustomResource imageResourceWithName:"vertical-track-bottom.png" size:CGSizeMake(4.0, 2.0)]
|
||||
]
|
||||
isVertical:YES]],
|
||||
verticalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 24.0, 50.0)];
|
||||
|
||||
@@ -69,7 +69,7 @@ var _CPAutocompleteMenuMaximumHeight = 307;
|
||||
[scrollView setHasHorizontalScroller:NO];
|
||||
[contentView addSubview:scrollView];
|
||||
|
||||
tableView = [[_CPNonFirstResponderTableView alloc] initWithFrame:CPRectMakeZero()];
|
||||
tableView = [[_CPNonFirstResponderTableView alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
var tableColumn = [CPTableColumn new];
|
||||
[tableColumn setResizingMask:CPTableColumnAutoresizingMask];
|
||||
|
||||
+7
-11
@@ -103,7 +103,7 @@ var _CPToolTipHeight = 24.0,
|
||||
@param aText the wanted text
|
||||
@return CPArray containing the computer toolTipSize and textFrameSize
|
||||
*/
|
||||
+ (CPSize)computeCorrectSize:(CPSize)aToolTipSize text:(CPString)aText
|
||||
+ (CGSize)computeCorrectSize:(CGSize)aToolTipSize text:(CPString)aText
|
||||
{
|
||||
var font = [CPFont systemFontOfSize:_CPToolTipFontSize],
|
||||
textFrameSizeSingleLine = [aText sizeWithFont:font],
|
||||
@@ -156,7 +156,7 @@ var _CPToolTipHeight = 24.0,
|
||||
*/
|
||||
- (id)initWithString:(CPString)aString styleMask:(unsigned)aStyleMask
|
||||
{
|
||||
var toolTipFrame = CPRectMake(0.0, 0.0, 250.0, _CPToolTipHeight),
|
||||
var toolTipFrame = CGRectMake(0.0, 0.0, 250.0, _CPToolTipHeight),
|
||||
layout = [_CPToolTip computeCorrectSize:toolTipFrame.size text:aString],
|
||||
textFrameSize = layout[1];
|
||||
|
||||
@@ -171,7 +171,7 @@ var _CPToolTipHeight = 24.0,
|
||||
[_content setLineBreakMode:CPLineBreakByCharWrapping];
|
||||
[_content setAlignment:CPJustifiedTextAlignment];
|
||||
[_content setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
|
||||
[_content setFrameOrigin:CPPointMake(0.0, 0.0)];
|
||||
[_content setFrameOrigin:CGPointMake(0.0, 0.0)];
|
||||
[_content setFrameSize:textFrameSize];
|
||||
[_content setTextShadowOffset:CGSizeMake(0.0, 1.0)];
|
||||
[_content setTextColor:[[[CPTheme defaultTheme] attributeWithName:@"color" forClass:_CPToolTipWindowView] value]];
|
||||
@@ -203,19 +203,15 @@ var _CPToolTipHeight = 24.0,
|
||||
|
||||
if (mousePosition.x < 0)
|
||||
mousePosition.x = 5;
|
||||
if (mousePosition.x + CPRectGetWidth([self frame]) > nativeRect.size.width)
|
||||
mousePosition.x = nativeRect.size.width - CPRectGetWidth([self frame]) - 5;
|
||||
if (mousePosition.x + CGRectGetWidth([self frame]) > nativeRect.size.width)
|
||||
mousePosition.x = nativeRect.size.width - CGRectGetWidth([self frame]) - 5;
|
||||
if (mousePosition.y < 0)
|
||||
mousePosition.y = 5;
|
||||
if (mousePosition.y + CPRectGetHeight([self frame]) > nativeRect.size.height)
|
||||
mousePosition.y = mousePosition.y - CPRectGetHeight([self frame]) - 40;
|
||||
if (mousePosition.y + CGRectGetHeight([self frame]) > nativeRect.size.height)
|
||||
mousePosition.y = mousePosition.y - CGRectGetHeight([self frame]) - 40;
|
||||
|
||||
[self setFrameOrigin:mousePosition];
|
||||
[self orderFront:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
Encodes a point
|
||||
@param aPoint the point to be encoded.
|
||||
*/
|
||||
- (void)encodePoint:(CPPoint)aPoint
|
||||
- (void)encodePoint:(CGPoint)aPoint
|
||||
{
|
||||
[self encodeNumber:aPoint.x];
|
||||
[self encodeNumber:aPoint.y];
|
||||
@@ -100,7 +100,7 @@
|
||||
Encodes a CGSize
|
||||
@param aSize the size to be encoded
|
||||
*/
|
||||
- (void)encodeSize:(CPSize)aSize
|
||||
- (void)encodeSize:(CGSize)aSize
|
||||
{
|
||||
[self encodeNumber:aSize.width];
|
||||
[self encodeNumber:aSize.height];
|
||||
|
||||
@@ -10,35 +10,36 @@
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
CPWindow window;
|
||||
CPWindow wind;
|
||||
CPWindow sheet;
|
||||
CPTextField textField;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
{
|
||||
window = [[CPWindow alloc] initWithContentRect:CGRectMake(100,100,500,300) styleMask:CPResizableWindowMask],
|
||||
contentView = [window contentView];
|
||||
wind = [[CPWindow alloc] initWithContentRect:CGRectMake(100, 100, 500, 300) styleMask:CPTitledWindowMask | CPResizableWindowMask];
|
||||
[wind setMinSize:CGSizeMake(300, 200)];
|
||||
[wind setTitle:@"Untitled"];
|
||||
|
||||
[window setMinSize:CGSizeMake(300, 200)];
|
||||
sheet = [[CPWindow alloc] initWithContentRect:CGRectMake(0,0,300,100) styleMask:CPDocModalWindowMask | CPResizableWindowMask];
|
||||
sheet = [[CPWindow alloc] initWithContentRect:CGRectMake(0, 0, 300, 100) styleMask:CPDocModalWindowMask | CPResizableWindowMask];
|
||||
[sheet setMinSize:CGSizeMake(300,100)];
|
||||
|
||||
var sheetContent = [sheet contentView];
|
||||
|
||||
textField = [[CPTextField alloc] initWithFrame:CGRectMake(10,30,280,30)];
|
||||
textField = [[CPTextField alloc] initWithFrame:CGRectMake(10, 30, 280, 30)];
|
||||
[textField setEditable:YES];
|
||||
[textField setBezeled:YES];
|
||||
[textField setAutoresizingMask:CPViewWidthSizable];
|
||||
|
||||
var okButton = [[CPButton alloc] initWithFrame:CGRectMake(230,70,50,24)];
|
||||
var buttonHeight = [[CPTheme defaultTheme] valueForAttributeWithName:@"min-size" forClass:CPButton].height,
|
||||
okButton = [[CPButton alloc] initWithFrame:CGRectMake(230, 70, 50, buttonHeight)];
|
||||
[okButton setTitle:"OK"];
|
||||
[okButton setTarget:self];
|
||||
[okButton setTag:1];
|
||||
[okButton setAction:@selector(closeSheet:)];
|
||||
[okButton setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin];
|
||||
|
||||
var cancelButton = [[CPButton alloc] initWithFrame:CGRectMake(120,70,100,24)];
|
||||
var cancelButton = [[CPButton alloc] initWithFrame:CGRectMake(120, 70, 100, buttonHeight)];
|
||||
[cancelButton setTitle:"Cancel"];
|
||||
[cancelButton setTarget:self];
|
||||
[cancelButton setTag:0];
|
||||
@@ -49,13 +50,13 @@
|
||||
[sheetContent addSubview:okButton];
|
||||
[sheetContent addSubview:cancelButton];
|
||||
|
||||
var displayButton = [[CPButton alloc] initWithFrame:CGRectMake(200,150,100,24)];
|
||||
var displayButton = [[CPButton alloc] initWithFrame:CGRectMake(200, 150, 100, buttonHeight)];
|
||||
[displayButton setTitle:"Display Sheet"];
|
||||
[displayButton setTarget:self];
|
||||
[displayButton setAction:@selector(displaySheet:)];
|
||||
[contentView addSubview:displayButton];
|
||||
[[wind contentView] addSubview:displayButton];
|
||||
|
||||
[window orderFront:self]
|
||||
[wind orderFront:self]
|
||||
}
|
||||
|
||||
- (void)displaySheet:(id)sender
|
||||
@@ -63,7 +64,7 @@
|
||||
[textField setStringValue:""];
|
||||
[sheet makeFirstResponder:textField];
|
||||
|
||||
[CPApp beginSheet:sheet modalForWindow:window modalDelegate:self didEndSelector:@selector(didEndSheet:returnCode:contextInfo:) contextInfo:nil];
|
||||
[CPApp beginSheet:sheet modalForWindow:wind modalDelegate:self didEndSelector:@selector(didEndSheet:returnCode:contextInfo:) contextInfo:nil];
|
||||
}
|
||||
|
||||
- (void)closeSheet:(id)sender
|
||||
@@ -78,7 +79,7 @@
|
||||
[sheet orderOut:self];
|
||||
|
||||
if (returnCode == CPOKButton && [str length] > 0)
|
||||
[window setTitle:str];
|
||||
[wind setTitle:str];
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
@@ -27,13 +27,13 @@
|
||||
// DEBUG OPTIONS:
|
||||
|
||||
// Uncomment to enable printing of backtraces on exceptions:
|
||||
objj_msgSend_decorate(objj_backtrace_decorator);
|
||||
//objj_msgSend_decorate(objj_backtrace_decorator);
|
||||
|
||||
// Uncomment to enable runtime type checking:
|
||||
objj_msgSend_decorate(objj_typecheck_decorator);
|
||||
//objj_msgSend_decorate(objj_typecheck_decorator);
|
||||
|
||||
// Uncomment (along with both above) to print backtraces on type check errors:
|
||||
objj_typecheck_prints_backtrace = true;
|
||||
//objj_typecheck_prints_backtrace = true;
|
||||
</script>
|
||||
|
||||
<style type = "text/css">
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
- (void)positionWindow
|
||||
{
|
||||
var keyWindow = [CPApp keyWindow],
|
||||
origin = CPPointMake(40, 40);
|
||||
origin = CGPointMake(40, 40);
|
||||
|
||||
if (keyWindow)
|
||||
{
|
||||
origin = ([keyWindow frame]).origin;
|
||||
origin = CPPointMake(origin.x + 20, origin.y + 20);
|
||||
origin = CGPointMake(origin.x + 20, origin.y + 20);
|
||||
}
|
||||
|
||||
[[self window] setFrameOrigin:origin];
|
||||
@@ -254,7 +254,7 @@
|
||||
[[self window] close];
|
||||
}
|
||||
|
||||
- (void)windowWillClose:(NSNotification*)notification
|
||||
- (void)windowWillClose:(CPNotification)notification
|
||||
{
|
||||
CPLog.debug("[%@ %@]", [self class], _cmd);
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
return [_shadeParentWindow state];
|
||||
}
|
||||
|
||||
- (void)windowWillBeginSheet:(NSNotification*)notification
|
||||
- (void)windowWillBeginSheet:(CPNotification)notification
|
||||
{
|
||||
CPLog.debug("[%@ %@]", [self class], _cmd);
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidEndSheet:(NSNotification *)notification
|
||||
- (void)windowDidEndSheet:(CPNotification)notification
|
||||
{
|
||||
CPLog.debug("[%@ %@]", [self class], _cmd);
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
|
||||
- (IBAction)click:(id)sender
|
||||
{
|
||||
[box1 setFrameFromContentFrame:CPRectMake(18, 81, 326, 133)];
|
||||
[box1 setFrameFromContentFrame:CGRectMake(18, 81, 326, 133)];
|
||||
}
|
||||
|
||||
- (IBAction)click2:(id)sender
|
||||
{
|
||||
[box1 setFrameFromContentFrame:CPRectMake(18, 81, 300, 250)];
|
||||
[box1 setFrameFromContentFrame:CGRectMake(18, 81, 300, 250)];
|
||||
}
|
||||
|
||||
- (IBAction)change:(id)aSender
|
||||
|
||||
@@ -198,7 +198,7 @@ var rowHeights = [ ];
|
||||
[_outlineView setAllowsMultipleSelection:YES];
|
||||
[_outlineView expandItem:nil expandChildren:YES];
|
||||
// [_outlineView setRowHeight:50.0];
|
||||
// [_outlineView setIntercellSpacing:CPSizeMake(0.0, 10.0)]
|
||||
// [_outlineView setIntercellSpacing:CGSizeMake(0.0, 10.0)]
|
||||
|
||||
[scrollView setDocumentView:_outlineView];
|
||||
[theWindow setContentView:scrollView];
|
||||
@@ -207,7 +207,7 @@ var rowHeights = [ ];
|
||||
|
||||
[theWindow orderFront:self];
|
||||
|
||||
[column setWidth:CPRectGetWidth([_outlineView bounds])];
|
||||
[column setWidth:CGRectGetWidth([_outlineView bounds])];
|
||||
}
|
||||
|
||||
- (id)outlineView:(CPOutlineView)theOutlineView child:(int)theIndex ofItem:(id)theItem
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CPRect)frame
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:CGRectMake(0, 0, 500, 24)];
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{
|
||||
}
|
||||
|
||||
- (id) initWithFrame:(CPRect)frame
|
||||
- (id) initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:CGRectMake(0, 0, 500, 18)];
|
||||
|
||||
@@ -73,4 +73,4 @@
|
||||
return copy;
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
@@ -63,7 +63,7 @@
|
||||
[[aWindow contentView] addSubview:scrollView];
|
||||
|
||||
var button = [CPButton buttonWithTitle:@"Change Scroller Mode"];
|
||||
[button setFrameOrigin:CPPointMake(10.0, 10.0)];
|
||||
[button setFrameOrigin:CGPointMake(10.0, 10.0)];
|
||||
[button setTarget:self];
|
||||
[button setAction:@selector(changeScrollerMode:)];
|
||||
|
||||
|
||||
@@ -80,22 +80,22 @@
|
||||
|
||||
- (IBAction)makeBigDocView:(id)aSender
|
||||
{
|
||||
[contentView setFrameSize:CPSizeMake(1000, 1000)];
|
||||
[contentView setFrameSize:CGSizeMake(1000, 1000)];
|
||||
}
|
||||
|
||||
- (IBAction)makeSmallDocView:(id)aSender
|
||||
{
|
||||
[contentView setFrameSize:CPSizeMake(200, 200)];
|
||||
[contentView setFrameSize:CGSizeMake(200, 200)];
|
||||
}
|
||||
|
||||
- (IBAction)makeNarrowDocView:(id)aSender
|
||||
{
|
||||
[contentView setFrameSize:CPSizeMake(200, 1000)];
|
||||
[contentView setFrameSize:CGSizeMake(200, 1000)];
|
||||
}
|
||||
|
||||
- (IBAction)makeShortDocView:(id)aSender
|
||||
{
|
||||
[contentView setFrameSize:CPSizeMake(1000, 200)];
|
||||
[contentView setFrameSize:CGSizeMake(1000, 200)];
|
||||
}
|
||||
|
||||
- (IBAction)flash:(id)aSender
|
||||
|
||||
@@ -21,40 +21,40 @@
|
||||
contentView = [theWindow contentView];
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Small tooltip"];
|
||||
[b setFrameOrigin:CPPointMake([contentView center].x - [b frameSize].width / 2, [contentView center].y - [b frameSize].height / 2 - 30)];
|
||||
[b setFrameOrigin:CGPointMake([contentView center].x - [b frameSize].width / 2, [contentView center].y - [b frameSize].height / 2 - 30)];
|
||||
[b setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet."];
|
||||
[contentView addSubview:b];
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Medium tooltip"];
|
||||
[b setFrameOrigin:CPPointMake([contentView center].x - [b frameSize].width / 2, [contentView center].y - [b frameSize].height / 2)];
|
||||
[b setFrameOrigin:CGPointMake([contentView center].x - [b frameSize].width / 2, [contentView center].y - [b frameSize].height / 2)];
|
||||
[b setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi."];
|
||||
[contentView addSubview:b];
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Big tooltip"];
|
||||
[b setFrameOrigin:CPPointMake([contentView center].x - [b frameSize].width / 2, [contentView center].y - [b frameSize].height / 2 + 30)];
|
||||
[b setFrameOrigin:CGPointMake([contentView center].x - [b frameSize].width / 2, [contentView center].y - [b frameSize].height / 2 + 30)];
|
||||
[b setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue. Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet."];
|
||||
[contentView addSubview:b];
|
||||
[theWindow orderFront:self];
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Constraints 0"];
|
||||
[b setFrameOrigin:CPPointMake(10, 10)];
|
||||
[b setFrameOrigin:CGPointMake(10, 10)];
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue. Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet."];
|
||||
[contentView addSubview:b];
|
||||
[theWindow orderFront:self];
|
||||
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Constraints 1"];
|
||||
[b setFrameOrigin:CPPointMake([contentView center].x - [b frameSize].width / 2, 10)];
|
||||
[b setFrameOrigin:CGPointMake([contentView center].x - [b frameSize].width / 2, 10)];
|
||||
[b setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin]
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue. Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet."];
|
||||
[contentView addSubview:b];
|
||||
[theWindow orderFront:self];
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Constraints 2"];
|
||||
[b setFrameOrigin:CPPointMake([contentView frame].size.width - 100, 10)];
|
||||
[b setFrameOrigin:CGPointMake([contentView frame].size.width - 100, 10)];
|
||||
[b setAutoresizingMask:CPViewMinXMargin]
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue. Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet."];
|
||||
[contentView addSubview:b];
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Constraints 3"];
|
||||
[b setFrameOrigin:CPPointMake(10, [contentView frame].size.height - 34)];
|
||||
[b setFrameOrigin:CGPointMake(10, [contentView frame].size.height - 34)];
|
||||
[b setAutoresizingMask:CPViewMaxXMargin | CPViewMinYMargin]
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue. Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet."];
|
||||
[contentView addSubview:b];
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Constraints 4"];
|
||||
[b setFrameOrigin:CPPointMake([contentView center].x - [b frameSize].width / 2, [contentView frame].size.height - 34)];
|
||||
[b setFrameOrigin:CGPointMake([contentView center].x - [b frameSize].width / 2, [contentView frame].size.height - 34)];
|
||||
[b setAutoresizingMask:CPViewMinYMargin | CPViewMinXMargin | CPViewMaxXMargin];
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue. Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet."];
|
||||
[contentView addSubview:b];
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
|
||||
var b = [CPButton buttonWithTitle:@"Constraints 5"];
|
||||
[b setFrameOrigin:CPPointMake([contentView frame].size.width - 100, [contentView frame].size.height - 34)];
|
||||
[b setFrameOrigin:CGPointMake([contentView frame].size.width - 100, [contentView frame].size.height - 34)];
|
||||
[b setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin]
|
||||
[b setToolTip:@"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit. Ut velit mauris, egestas sed, gravida nec, ornare ut, mi. Aenean ut orci vel massa suscipit pulvinar. Nulla sollicitudin. Fusce varius, ligula non tempus aliquam, nunc turpis ullamcorper nibh, in tempus sapien eros vitae ligula. Pellentesque rhoncus nunc et augue. Integer id felis. Curabitur aliquet pellentesque diam. Integer quis metus vitae elit lobortis egestas. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi vel erat non mauris convallis vehicula. Nulla et sapien. Integer tortor tellus, aliquam faucibus, convallis id, congue eu, quam. Mauris ullamcorper felis vitae erat. Proin feugiat, augue non elementum posuere, metus purus iaculis lectus, et tristique ligula justo vitae magna. Aliquam convallis sollicitudin purus. Praesent aliquam, enim at fermentum mollis, ligula massa adipiscing nisl, ac euismod nibh nisl eu lectus. Fusce vulputate sem at sapien. Vivamus leo. Aliquam euismod libero eu enim. Nulla nec felis sed leo placerat imperdiet. Aenean suscipit nulla in justo. Suspendisse cursus rutrum augue. Nulla tincidunt tincidunt mi. Curabitur iaculis, lorem vel rhoncus faucibus, felis magna fermentum augue, et ultricies lacus lorem varius purus. Curabitur eu amet."];
|
||||
[contentView addSubview:b];
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
var tbItem1 = [[CPToolbarItem alloc] initWithItemIdentifier:@"1"];
|
||||
[tbItem1 setLabel:@"Mouse over me"];
|
||||
[tbItem1 setImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"test.png"] size:CPSizeMake(35, 32)]];
|
||||
[tbItem1 setImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"test.png"] size:CGSizeMake(35, 32)]];
|
||||
[tbItem1 setToolTip:@"Hey guys, I'm a toolbar tooltip! Isn't it cool?"];
|
||||
_toolbarItems = [tbItem1];
|
||||
|
||||
|
||||
@@ -102,13 +102,13 @@
|
||||
if (itemIdentifier == "colour")
|
||||
{
|
||||
[toolbarItem setLabel:@"Colour"];
|
||||
[toolbarItem setImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"CPImageNameColorPanel.png"] size:CPSizeMake(26, 29)]];
|
||||
[toolbarItem setImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"CPImageNameColorPanel.png"] size:CGSizeMake(26, 29)]];
|
||||
return toolbarItem;
|
||||
}
|
||||
else if (itemIdentifier == "new")
|
||||
{
|
||||
[toolbarItem setLabel:@"Small New"];
|
||||
[toolbarItem setImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"New.png"] size:CPSizeMake(16, 16)]];
|
||||
[toolbarItem setImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"New.png"] size:CGSizeMake(16, 16)]];
|
||||
return toolbarItem;
|
||||
}
|
||||
else if (itemIdentifier == "tallitem")
|
||||
|
||||
@@ -24,21 +24,21 @@
|
||||
|
||||
backgroundMovableCB = [CPCheckBox checkBoxWithTitle:@"Movable by background"];
|
||||
|
||||
[backgroundMovableCB setFrameOrigin:CPPointMake(10, 10)];
|
||||
[backgroundMovableCB setFrameOrigin:CGPointMake(10, 10)];
|
||||
[backgroundMovableCB setTarget:self];
|
||||
[backgroundMovableCB setAction:@selector(setMovableByBackground:)]
|
||||
[contentView addSubview:backgroundMovableCB];
|
||||
|
||||
movableCB = [CPCheckBox checkBoxWithTitle:@"Movable"];
|
||||
|
||||
[movableCB setFrameOrigin:CPPointMake(200, 10)];
|
||||
[movableCB setFrameOrigin:CGPointMake(200, 10)];
|
||||
[movableCB setTarget:self];
|
||||
[movableCB setAction:@selector(setMovable:)]
|
||||
[contentView addSubview:movableCB];
|
||||
|
||||
[theWindow orderFront:self];
|
||||
|
||||
aWindow = [[CPWindow alloc] initWithContentRect:CPRectMake(0, 0, 200, 200) styleMask:CPTitledWindowMask];
|
||||
aWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0, 0, 200, 200) styleMask:CPTitledWindowMask];
|
||||
[aWindow setTitle:@"Move me!"];
|
||||
[aWindow center];
|
||||
[aWindow makeKeyAndOrderFront:self];
|
||||
|
||||
@@ -171,7 +171,7 @@ var CPSourceListDataSource_sourceList_itemHasBadge_ = 1 << 1,
|
||||
|
||||
/* This CPOutlineView subclass is necessary only if you want to delete items by dragging them to the trash. In order to support drags to the trash, you need to implement draggedImage:endedAt:operation: and handle the CPDragOperationDelete operation. For any other operation, pass the message to the superclass
|
||||
*/
|
||||
- (void)draggedImage:(CPImage)image endedAt:(CPPoint)screenPoint operation:(CPDragOperation)operation
|
||||
- (void)draggedImage:(CPImage)image endedAt:(CGPoint)screenPoint operation:(CPDragOperation)operation
|
||||
{
|
||||
if (operation == CPDragOperationDelete)
|
||||
{
|
||||
|
||||
@@ -181,6 +181,7 @@ class LintChecker(object):
|
||||
METHOD_RE = ur'[-+]\s*\([a-zA-Z_$]\w*\)\s*[a-zA-Z_$]\w*'
|
||||
FUNCTION_RE = re.compile(ur'\s*function\s*(?P<name>[a-zA-Z_$]\w*)?\(.*\)\s*\{?')
|
||||
RE_RE = re.compile(ur'(?<!\\)/.*?[^\\]/[gims]*')
|
||||
DEPRECATED_CP_RE = re.compile(ur'\b(CP(?:Point|Rect|Size))')
|
||||
EMPTY_STRING_LITERAL_FUNCTION = lambda match: match.group(1) + (len(match.group(2)) * ' ') + match.group(1)
|
||||
EMPTY_SELF_STRING_LITERAL_FUNCTION = lambda self, match: match.group(1) + (len(match.group(2)) * ' ') + match.group(1)
|
||||
|
||||
@@ -315,7 +316,13 @@ class LintChecker(object):
|
||||
'regex': re.compile(ur'^\s*var\s+[a-zA-Z_$]\w*\s*=\s*function\s+([a-zA-Z_$]\w*)\s*\('),
|
||||
'error': 'function name is ignored',
|
||||
'showPositionForGroup': 1,
|
||||
'skip': True,
|
||||
'type': ERROR_TYPE_WARNING
|
||||
},
|
||||
{
|
||||
'regex': DEPRECATED_CP_RE,
|
||||
'preprocess': STD_IGNORES,
|
||||
'error': 'CP types/functions have been deprecated in favor of CG types/functions',
|
||||
'showPositionForGroup': 0,
|
||||
'type': ERROR_TYPE_WARNING
|
||||
},
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
else if ([dataViewCell isKindOfClass:[NSTextFieldCell class]])
|
||||
{
|
||||
_dataView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()];
|
||||
_dataView = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
var font = [dataViewCell font],
|
||||
selectedFont = nil;
|
||||
@@ -87,7 +87,7 @@
|
||||
[_dataView setValue:[dataViewCell alignment] forThemeAttribute:@"alignment"];
|
||||
|
||||
var headerCell = [aCoder decodeObjectForKey:@"NSHeaderCell"],
|
||||
headerView = [[_CPTableColumnHeaderView alloc] initWithFrame:CPRectMakeZero()];
|
||||
headerView = [[_CPTableColumnHeaderView alloc] initWithFrame:CGRectMakeZero()];
|
||||
|
||||
[headerView setStringValue:[headerCell objectValue]];
|
||||
[headerView setFont:[headerCell font]];
|
||||
|
||||
Reference in new issue
Block a user