This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
{var the_class = objj_allocateClassPair(MKMapItem, "MKMarker"), | |
meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_gMarker"), new objj_ivar("_location"), new objj_ivar("_draggable"), new objj_ivar("_withShadow"), new objj_ivar("_iconUrl"), new objj_ivar("_shadowUrl"), new objj_ivar("_delegate")]); | |
objj_registerClassPair(the_class); | |
objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path)); | |
class_addMethods(the_class, [new objj_method(sel_getUid("gMarker"), function $MKMarker__gMarker(self, _cmd) | |
{ with(self) | |
{ | |
return _gMarker; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aColumn row:(int)aRow | |
{ | |
if (![timePlaceMarkerArray count]) | |
{ | |
return nil; | |
} | |
var myMarker = [timePlaceMarkerArray objectAtIndex:aRow]; | |
var myValue = ""; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Time/Place markersTable View | |
var tableViewRect = CPRectCreateCopy([notesTextView frame]); | |
tableViewRect.origin.y += ([notesTextView frame].size.height + 10); | |
tableViewRect.size.width = ([containerView frame].size.width - (2 * margin)); | |
// We want to fill the space between the bottom of the notes text view and the top of the buttons on the | |
// bottom of this form | |
var tableHeight = ([containerView frame].size.height - [createNewButton frame].size.height | |
- margin - 3 - tableViewRect.origin.y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setFrame:(CGRect)aFrame | |
{ | |
log('here in MKMapView setFrame aFrame is ' +CPStringFromRect(aFrame)); | |
[super setFrame:aFrame]; | |
log('[_frameView frame] is ' +CPStringFromRect([_frameView frame])); | |
var bounds = [self bounds]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setAnchorPoint:(CGPoint)anAnchorPoint | |
inPhotoLayer:(CALayer)aPhotoLayer | |
{ | |
log('anAnchorPoint is ' +CPStringFromPoint(anAnchorPoint)); | |
if (aPhotoLayer._DOMContentsElement == null) | |
{ | |
log('aPhotoLayer has no _DOMContentsElement cannot set its anchor point, bail'); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setAnchorPoint:(CGPoint)anAnchorPoint | |
inPhotoLayer:(CALayer)aPhotoLayer | |
{ | |
log('anAnchorPoint is ' +CPStringFromPoint(anAnchorPoint)); | |
if (aPhotoLayer._DOMContentsElement == null) | |
{ | |
log('aPhotoLayer has no _DOMContentsElement cannot set its anchor point, bail'); | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)drawRect:(CGRect)aRect | |
{ | |
log('here in MMSGradientView drawRect'); | |
var myContext = [[CPGraphicsContext currentContext] graphicsPort]; | |
var myGradient = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [1, 1, 1,1.0, .5, .5, .5,1.0], [0,1], 2); | |
var startPoint = CGPointMake(0, 0); | |
var endPoint = CGPointMake(0, [self bounds].size.height); | |
CGContextDrawLinearGradient(myContext, myGradient, startPoint, endPoint, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* MMSSimpleWhiteScroller.j | |
* | |
* Created by John C. Fox on 04/29/2010. | |
* Copyright 2010 GroupSmarts, LLC. All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> | |
@import <AppKit/CPTheme.j> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* CPBundle.j | |
* AppKit | |
* | |
* Created by Nicholas Small, extended by John C. Fox | |
* Copyright 2009, 280 North, Inc. | |
* | |
* This library is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CPString)pathForLocalizedResource:(CPString)aResourceName | |
{ | |
var mainBundle = [CPBundle mainBundle]; | |
return [mainBundle pathForResource:[mainBundle bundleLocale] + ".lproj/" +aResourceName]; | |
} | |
+ (CPCib)loadLocalizedCibNamed:(CPString)aName | |
owner:(id)anOwner | |
loadDelegate:(id)aDelegate | |
{ |