From 0c08da44745519cd619374b60b7113634cd8074f Mon Sep 17 00:00:00 2001 From: daboe01 Date: Wed, 26 Aug 2026 16:19:52 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20cappucci?= =?UTF-8?q?no/cappuccino@378f7bbda1d640db38f852c88dcb95617b2bc21d=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppKit/Browser.environment/AppKit.sj | 318 +++++++++--------- .../AppKit/CommonJS.environment/AppKit.sj | 318 +++++++++--------- Resources/recipes.txt | 294 ++++++++-------- 3 files changed, 453 insertions(+), 477 deletions(-) diff --git a/Frameworks/AppKit/Browser.environment/AppKit.sj b/Frameworks/AppKit/Browser.environment/AppKit.sj index 68bbbeb51..5c5588342 100644 --- a/Frameworks/AppKit/Browser.environment/AppKit.sj +++ b/Frameworks/AppKit/Browser.environment/AppKit.sj @@ -73169,7 +73169,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("initWithParagraphStyle: ,["id","CPZone"])]); } -p;13;CPRulerView.jt;44897;@STATIC;1.0;I;21;Foundation/CPObject.ji;8;CPView.ji;13;CPTextField.ji;9;CPColor.ji;8;CPFont.ji;8;CPMenu.ji;12;CPMenuItem.jt;44767;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPView.j", YES);objj_executeFile("CPTextField.j", YES);objj_executeFile("CPColor.j", YES);objj_executeFile("CPFont.j", YES);objj_executeFile("CPMenu.j", YES);objj_executeFile("CPMenuItem.j", YES);{var the_typedef = objj_allocateTypeDef("CPRulerOrientation"); +p;13;CPRulerView.jt;46070;@STATIC;1.0;I;21;Foundation/CPObject.ji;8;CPView.ji;13;CPTextField.ji;9;CPColor.ji;8;CPFont.ji;8;CPMenu.ji;12;CPMenuItem.jt;45940;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPView.j", YES);objj_executeFile("CPTextField.j", YES);objj_executeFile("CPColor.j", YES);objj_executeFile("CPFont.j", YES);objj_executeFile("CPMenu.j", YES);objj_executeFile("CPMenuItem.j", YES);{var the_typedef = objj_allocateTypeDef("CPRulerOrientation"); objj_registerTypeDef(the_typedef); }CPHorizontalRuler = 0; CPVerticalRuler = 1; @@ -73218,12 +73218,15 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ self._rulerView = aRulerView; self._imageValue = anImageValue; self._representedObject = anObject; + (self == null ? self : (self.isa.method_msgSend["setHitTests:"] || _objj_forward)(self, "setHitTests:", NO)); self._label = ((___r1 = (CPTextField.isa.method_msgSend["alloc"] || _objj_forward)(CPTextField, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, 0, 12, 12))); ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setFont:"] || _objj_forward)(___r1, "setFont:", (CPFont.isa.method_msgSend["systemFontOfSize:"] || _objj_forward)(CPFont, "systemFontOfSize:", 10.0))); ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setTextColor:"] || _objj_forward)(___r1, "setTextColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.2, 1.0))); ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setAlignment:"] || _objj_forward)(___r1, "setAlignment:", CPCenterTextAlignment)); + ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setHitTests:"] || _objj_forward)(___r1, "setHitTests:", NO)); (self == null ? self : (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", self._label)); self._customHandleView = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMakeZero())); + ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setHitTests:"] || _objj_forward)(___r1, "setHitTests:", NO)); (self == null ? self : (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", self._customHandleView)); (self == null ? self : (self.isa.method_msgSend["updateMarkerIcon"] || _objj_forward)(self, "updateMarkerIcon")); } @@ -73259,15 +73262,14 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setFrame:"] || _objj_forward)(___r1, "setFrame:", CGRectMake(0, 0, frame.size.width, frame.size.height))); ((___r1 = ((___r2 = self._customHandleView), ___r2 == null ? ___r2 : (___r2.isa.method_msgSend["subviews"] || _objj_forward)(___r2, "subviews"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["makeObjectsPerformSelector:"] || _objj_forward)(___r1, "makeObjectsPerformSelector:", sel_getUid("removeFromSuperview"))); var isFirstLine = self._representedObject === "CPFirstLineIndent"; - ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(___r1, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.5, 1.0))); - var innerView = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(1.0, 1.0, frame.size.width - 2.0, frame.size.height - 2.0))); - if (isFirstLine) - (innerView == null ? innerView : (innerView.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(innerView, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.92, 1.0))); - else - (innerView == null ? innerView : (innerView.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(innerView, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.80, 1.0))); + ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(___r1, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.45, 1.0))); + var innerView = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(1.0, 1.0, Math.max(1.0, frame.size.width - 2.0), Math.max(1.0, frame.size.height - 2.0)))); + (innerView == null ? innerView : (innerView.isa.method_msgSend["setHitTests:"] || _objj_forward)(innerView, "setHitTests:", NO)); + (innerView == null ? innerView : (innerView.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(innerView, "setBackgroundColor:", isFirstLine ? (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.95, 1.0) : (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.80, 1.0))); ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addSubview:"] || _objj_forward)(___r1, "addSubview:", innerView)); - var gripLine = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(Math.floor(frame.size.width / 2.0) - 1.0, 2.0, 1.0, frame.size.height - 4.0))); - (gripLine == null ? gripLine : (gripLine.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(gripLine, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.6, 1.0))); + var gripLine = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(Math.floor(frame.size.width / 2.0) - 1.0, 1.0, 1.0, Math.max(1.0, frame.size.height - 3.0)))); + (gripLine == null ? gripLine : (gripLine.isa.method_msgSend["setHitTests:"] || _objj_forward)(gripLine, "setHitTests:", NO)); + (gripLine == null ? gripLine : (gripLine.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(gripLine, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.5, 1.0))); (innerView == null ? innerView : (innerView.isa.method_msgSend["addSubview:"] || _objj_forward)(innerView, "addSubview:", gripLine)); } else @@ -73285,16 +73287,9 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ else if (align === CPRightTextAlignment) ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "◀")); } - else if (((___r1 = self._representedObject), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(___r1, "isKindOfClass:", (CPString.isa.method_msgSend["class"] || _objj_forward)(CPString, "class")))) - { - if (self._representedObject === "CPTailIndent") - ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "⥘")); - else - ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "⇡")); - } else { - ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "⇡")); + ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "▲")); } } var ___r1, ___r2; @@ -73321,15 +73316,10 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ (menu == null ? menu : (menu.isa.method_msgSend["addItem:"] || _objj_forward)(menu, "addItem:", (CPMenuItem.isa.method_msgSend["separatorItem"] || _objj_forward)(CPMenuItem, "separatorItem"))); } var deleteTitle = "Delete Tab Stop"; - if (((___r1 = self._representedObject), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(___r1, "isKindOfClass:", (CPString.isa.method_msgSend["class"] || _objj_forward)(CPString, "class")))) - { - if (self._representedObject === "CPFirstLineIndent") - deleteTitle = "Delete 1st line indentation marker"; - else if (self._representedObject === "CPHeadIndent") - deleteTitle = "Delete head indentation marker"; - else if (self._representedObject === "CPTailIndent") - deleteTitle = "Delete tail indentation marker"; - } + if (self._representedObject === "CPFirstLineIndent") + deleteTitle = "Reset 1st line indentation"; + else if (self._representedObject === "CPHeadIndent") + deleteTitle = "Reset head indentation"; var itemDelete = (menu == null ? menu : (menu.isa.method_msgSend["addItemWithTitle:action:keyEquivalent:"] || _objj_forward)(menu, "addItemWithTitle:action:keyEquivalent:", deleteTitle, sel_getUid("deleteMarker:"), "")); (itemDelete == null ? itemDelete : (itemDelete.isa.method_msgSend["setTarget:"] || _objj_forward)(itemDelete, "setTarget:", self)); return menu; @@ -73355,14 +73345,12 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ { if (!((___r1 = self._representedObject), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(___r1, "isKindOfClass:", (CPTextTab == null ? CPTextTab : (CPTextTab.isa.method_msgSend["class"] || _objj_forward)(CPTextTab, "class"))))) return; - var oldTab = self._representedObject; - var newTab = ((___r1 = (CPTextTab == null ? CPTextTab : (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", alignment, self._imageValue)); + var oldTab = self._representedObject, + newTab = ((___r1 = (CPTextTab == null ? CPTextTab : (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", alignment, self._imageValue)); (self.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(self, "setRepresentedObject:", newTab); var client = ((___r1 = self._rulerView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["clientView"] || _objj_forward)(___r1, "clientView")); if (client && (client == null ? client : (client.isa.method_msgSend["respondsToSelector:"] || _objj_forward)(client, "respondsToSelector:", sel_getUid("rulerView:didUpdateMarker:oldTab:")))) - { (client == null ? client : (client.isa.method_msgSend["rulerView:didUpdateMarker:oldTab:"] || _objj_forward)(client, "rulerView:didUpdateMarker:oldTab:", self._rulerView, self, oldTab)); - } var ___r1; } @@ -73370,9 +73358,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ { var client = ((___r1 = self._rulerView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["clientView"] || _objj_forward)(___r1, "clientView")); if (client && (client == null ? client : (client.isa.method_msgSend["respondsToSelector:"] || _objj_forward)(client, "respondsToSelector:", sel_getUid("rulerView:didRemoveMarker:")))) - { (client == null ? client : (client.isa.method_msgSend["rulerView:didRemoveMarker:"] || _objj_forward)(client, "rulerView:didRemoveMarker:", self._rulerView, self)); - } ((___r1 = self._rulerView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["removeMarker:"] || _objj_forward)(___r1, "removeMarker:", self)); var ___r1; } @@ -73381,7 +73367,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ } {var the_class = objj_allocateClassPair(CPView, "CPRulerView"), -meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_scrollView", "CPScrollView"), new objj_ivar("_orientation", "CPRulerOrientation"), new objj_ivar("_clientView", "CPView"), new objj_ivar("_ruleThickness", "float"), new objj_ivar("_reservedThicknessForMarkers", "float"), new objj_ivar("_markers", "CPArray"), new objj_ivar("_draggingMarker", "CPRulerMarker"), new objj_ivar("_dragStartPoint", "CGPoint"), new objj_ivar("_dragStartLocation", "float")]);objj_registerClassPair(the_class); +meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_scrollView", "CPScrollView"), new objj_ivar("_orientation", "CPRulerOrientation"), new objj_ivar("_ruleThickness", "float"), new objj_ivar("_reservedThicknessForMarkers", "float"), new objj_ivar("_markers", "CPArray"), new objj_ivar("_draggingMarker", "CPRulerMarker"), new objj_ivar("_dragStartPoint", "CGPoint"), new objj_ivar("_dragStartLocation", "float")]);objj_registerClassPair(the_class); class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function $CPRulerView__scrollView(self, _cmd) { return self._scrollView; @@ -73402,17 +73388,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function self._orientation = newValue; } -,["void","CPRulerOrientation"]), new objj_method(sel_getUid("clientView"), function $CPRulerView__clientView(self, _cmd) -{ - return self._clientView; -} - -,["CPView"]), new objj_method(sel_getUid("setClientView:"), function $CPRulerView__setClientView_(self, _cmd, newValue) -{ - self._clientView = newValue; -} - -,["void","CPView"]), new objj_method(sel_getUid("ruleThickness"), function $CPRulerView__ruleThickness(self, _cmd) +,["void","CPRulerOrientation"]), new objj_method(sel_getUid("ruleThickness"), function $CPRulerView__ruleThickness(self, _cmd) { return self._ruleThickness; } @@ -73422,13 +73398,23 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function self._ruleThickness = newValue; } -,["void","float"]), new objj_method(sel_getUid("initWithScrollView:orientation:"), function $CPRulerView__initWithScrollView_orientation_(self, _cmd, aScrollView, anOrientation) +,["void","float"]), new objj_method(sel_getUid("draggingMarker"), function $CPRulerView__draggingMarker(self, _cmd) +{ + return self._draggingMarker; +} + +,["CPRulerMarker"]), new objj_method(sel_getUid("_setDraggingMarker:"), function $CPRulerView___setDraggingMarker_(self, _cmd, newValue) +{ + self._draggingMarker = newValue; +} + +,["void","CPRulerMarker"]), new objj_method(sel_getUid("initWithScrollView:orientation:"), function $CPRulerView__initWithScrollView_orientation_(self, _cmd, aScrollView, anOrientation) { if (self = (objj_getClass("CPRulerView").super_class.method_dtable["initWithFrame:"] || _objj_forward)(self, "initWithFrame:", CGRectMakeZero())) { self._scrollView = aScrollView; self._orientation = anOrientation; - self._clientView = (aScrollView == null ? aScrollView : (aScrollView.isa.method_msgSend["documentView"] || _objj_forward)(aScrollView, "documentView")); + _clientView = (aScrollView == null ? aScrollView : (aScrollView.isa.method_msgSend["documentView"] || _objj_forward)(aScrollView, "documentView")); self._ruleThickness = anOrientation === CPHorizontalRuler ? 16.0 : 24.0; self._reservedThicknessForMarkers = 0.0; self._markers = []; @@ -73443,7 +73429,18 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function (self.isa.method_msgSend["updateRuler"] || _objj_forward)(self, "updateRuler"); } -,["void","CGRect"]), new objj_method(sel_getUid("addMarker:"), function $CPRulerView__addMarker_(self, _cmd, aMarker) +,["void","CGRect"]), new objj_method(sel_getUid("clientView"), function $CPRulerView__clientView(self, _cmd) +{ + return _clientView || ((___r1 = self._scrollView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["documentView"] || _objj_forward)(___r1, "documentView")); + var ___r1; +} + +,["CPView"]), new objj_method(sel_getUid("setClientView:"), function $CPRulerView__setClientView_(self, _cmd, aView) +{ + _clientView = aView; +} + +,["void","CPView"]), new objj_method(sel_getUid("addMarker:"), function $CPRulerView__addMarker_(self, _cmd, aMarker) { if (((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["containsObject:"] || _objj_forward)(___r1, "containsObject:", aMarker))) return; @@ -73471,15 +73468,18 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", marker); (self.isa.method_msgSend["_positionMarker:"] || _objj_forward)(self, "_positionMarker:", marker); } + (self.isa.method_msgSend["updateRuler"] || _objj_forward)(self, "updateRuler"); var ___r1, ___r2; } ,["void","CPArray"]), new objj_method(sel_getUid("_markerAtPoint:"), function $CPRulerView___markerAtPoint_(self, _cmd, aPoint) { - for (var i = 0; i < ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["count"] || _objj_forward)(___r1, "count")); i++) + for (var i = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["count"] || _objj_forward)(___r1, "count")) - 1; i >= 0; i--) { - var marker = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(___r1, "objectAtIndex:", i)); - if (CGRectContainsPoint((marker == null ? marker : (marker.isa.method_msgSend["frame"] || _objj_forward)(marker, "frame")), aPoint)) + var marker = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(___r1, "objectAtIndex:", i)), + frame = (marker == null ? marker : (marker.isa.method_msgSend["frame"] || _objj_forward)(marker, "frame")); + var hitFrame = CGRectMake(frame.origin.x - 3.0, frame.origin.y - 2.0, frame.size.width + 6.0, frame.size.height + 4.0); + if (CGRectContainsPoint(hitFrame, aPoint)) return marker; } return nil; @@ -73495,27 +73495,28 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function isHorizontal = self._orientation === CPHorizontalRuler || self._orientation === CPRulerOrientationHorizontal, rulerHeight = CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")), rulerWidth = CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")), - markerLocation = (aMarker == null ? aMarker : (aMarker.isa.method_msgSend["imageValue"] || _objj_forward)(aMarker, "imageValue")); + markerLocation = (aMarker == null ? aMarker : (aMarker.isa.method_msgSend["imageValue"] || _objj_forward)(aMarker, "imageValue")), + rep = (aMarker == null ? aMarker : (aMarker.isa.method_msgSend["representedObject"] || _objj_forward)(aMarker, "representedObject")); if (isHorizontal) { var x = markerLocation - scrollPoint.x - 6.0, y = rulerHeight - 11.0, w = 12.0, h = 12.0; - if ((aMarker == null ? aMarker : (aMarker.isa.method_msgSend["representedObject"] || _objj_forward)(aMarker, "representedObject")) === "CPFirstLineIndent") + if (rep === "CPFirstLineIndent") { y = 0.0; h = Math.floor(rulerHeight / 2.0); } - else if ((aMarker == null ? aMarker : (aMarker.isa.method_msgSend["representedObject"] || _objj_forward)(aMarker, "representedObject")) === "CPHeadIndent") + else if (rep === "CPHeadIndent") { y = Math.floor(rulerHeight / 2.0); h = rulerHeight - y - 1.0; } else { - if (x < 0.0) - x = 0.0; + if (x < -6.0) + x = -6.0; else if (x + 12.0 > rulerWidth) x = rulerWidth - 12.0; } @@ -73571,12 +73572,12 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function localPoint = (self.isa.method_msgSend["convertPoint:fromView:"] || _objj_forward)(self, "convertPoint:fromView:", locationInWindow, nil), isHorizontal = self._orientation === CPHorizontalRuler || self._orientation === CPRulerOrientationHorizontal; var delta = isHorizontal ? localPoint.x - self._dragStartPoint.x : localPoint.y - self._dragStartPoint.y, - newLocation = self._dragStartLocation + delta; - if (newLocation < 0) - newLocation = 0; + newLocation = Math.max(0.0, self._dragStartLocation + delta); ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setImageValue:"] || _objj_forward)(___r1, "setImageValue:", newLocation)); - (self.isa.method_msgSend["updateRuler"] || _objj_forward)(self, "updateRuler"); - var draggedOff = isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15; + (self.isa.method_msgSend["_positionMarker:"] || _objj_forward)(self, "_positionMarker:", self._draggingMarker); + var rep = ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["representedObject"] || _objj_forward)(___r1, "representedObject")), + isIndent = rep === "CPFirstLineIndent" || rep === "CPHeadIndent" || rep === "CPTailIndent"; + var draggedOff = !isIndent && (isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15); if (draggedOff) { ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setAlphaValue:"] || _objj_forward)(___r1, "setAlphaValue:", 0.4)); @@ -73599,7 +73600,9 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function return; var localPoint = (self.isa.method_msgSend["convertPoint:fromView:"] || _objj_forward)(self, "convertPoint:fromView:", (anEvent == null ? anEvent : (anEvent.isa.method_msgSend["locationInWindow"] || _objj_forward)(anEvent, "locationInWindow")), nil), isHorizontal = self._orientation === CPHorizontalRuler || self._orientation === CPRulerOrientationHorizontal, - draggedOff = isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15; + rep = ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["representedObject"] || _objj_forward)(___r1, "representedObject")), + isIndent = rep === "CPFirstLineIndent" || rep === "CPHeadIndent" || rep === "CPTailIndent"; + var draggedOff = !isIndent && (isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15); if (draggedOff) { var client = (self.isa.method_msgSend["clientView"] || _objj_forward)(self, "clientView"); @@ -73634,6 +73637,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function rulerHeight = CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")), rulerWidth = CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")); var bottomBorder = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, rulerHeight - 1, rulerWidth, 1))); + (bottomBorder == null ? bottomBorder : (bottomBorder.isa.method_msgSend["setHitTests:"] || _objj_forward)(bottomBorder, "setHitTests:", NO)); (bottomBorder == null ? bottomBorder : (bottomBorder.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(bottomBorder, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.75, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", bottomBorder); var firstLineMarker = nil, @@ -73653,6 +73657,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function if (firstLineX > 0) { var firstLineBg = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, 0, firstLineX, halfHeight))); + (firstLineBg == null ? firstLineBg : (firstLineBg.isa.method_msgSend["setHitTests:"] || _objj_forward)(firstLineBg, "setHitTests:", NO)); (firstLineBg == null ? firstLineBg : (firstLineBg.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(firstLineBg, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.93, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", firstLineBg); } @@ -73663,6 +73668,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function if (headX > 0) { var headBg = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, halfHeight, headX, rulerHeight - halfHeight - 1.0))); + (headBg == null ? headBg : (headBg.isa.method_msgSend["setHitTests:"] || _objj_forward)(headBg, "setHitTests:", NO)); (headBg == null ? headBg : (headBg.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(headBg, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.86, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", headBg); } @@ -73676,6 +73682,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function tickHeight = isMajor ? 8.0 : 4.0, tickY = rulerHeight - tickHeight - 1.0; var tick = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(screenX, tickY, 1.0, tickHeight))); + (tick == null ? tick : (tick.isa.method_msgSend["setHitTests:"] || _objj_forward)(tick, "setHitTests:", NO)); (tick == null ? tick : (tick.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(tick, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.65, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", tick); if (isMajor) @@ -73693,6 +73700,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function alignment = CPRightTextAlignment; } var label = ((___r1 = (CPTextField.isa.method_msgSend["alloc"] || _objj_forward)(CPTextField, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(labelX, 1.0, 40.0, 12.0))); + (label == null ? label : (label.isa.method_msgSend["setHitTests:"] || _objj_forward)(label, "setHitTests:", NO)); (label == null ? label : (label.isa.method_msgSend["setStringValue:"] || _objj_forward)(label, "setStringValue:", (CPString.isa.method_msgSend["stringWithFormat:"] || _objj_forward)(CPString, "stringWithFormat:", "%d", val))); (label == null ? label : (label.isa.method_msgSend["setFont:"] || _objj_forward)(label, "setFont:", (CPFont.isa.method_msgSend["systemFontOfSize:"] || _objj_forward)(CPFont, "systemFontOfSize:", 8.0))); (label == null ? label : (label.isa.method_msgSend["setTextColor:"] || _objj_forward)(label, "setTextColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.4, 1.0))); @@ -73740,8 +73748,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function for (var i = 0; i < ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["count"] || _objj_forward)(___r1, "count")); i++) { var marker = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(___r1, "objectAtIndex:", i)); - if ((marker == null ? marker : (marker.isa.method_msgSend["superview"] || _objj_forward)(marker, "superview")) !== self) - (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", marker); + (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", marker); (self.isa.method_msgSend["_positionMarker:"] || _objj_forward)(self, "_positionMarker:", marker); } var ___r1; @@ -74262,7 +74269,7 @@ var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_ ,["void"])]); } -p;12;CPTextView.jt;230260;@STATIC;1.0;i;8;CPText.ji;14;CPPasteboard.ji;14;CPColorPanel.ji;15;CPFontManager.ji;15;CPTextStorage.ji;17;CPTextContainer.ji;17;CPLayoutManager.ji;18;CPParagraphStyle.ji;14;_CPRTFParser.ji;16;_CPRTFProducer.jt;230042;objj_executeFile("CPText.j", YES);objj_executeFile("CPPasteboard.j", YES);objj_executeFile("CPColorPanel.j", YES);objj_executeFile("CPFontManager.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPTextContainer.j", YES);objj_executeFile("CPLayoutManager.j", YES);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("_CPRTFParser.j", YES);objj_executeFile("_CPRTFProducer.j", YES);; +p;12;CPTextView.jt;228816;@STATIC;1.0;i;8;CPText.ji;14;CPPasteboard.ji;14;CPColorPanel.ji;15;CPFontManager.ji;15;CPTextStorage.ji;17;CPTextContainer.ji;17;CPLayoutManager.ji;18;CPParagraphStyle.ji;14;_CPRTFParser.ji;16;_CPRTFProducer.jt;228598;objj_executeFile("CPText.j", YES);objj_executeFile("CPPasteboard.j", YES);objj_executeFile("CPColorPanel.j", YES);objj_executeFile("CPFontManager.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPTextContainer.j", YES);objj_executeFile("CPLayoutManager.j", YES);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("_CPRTFParser.j", YES);objj_executeFile("_CPRTFProducer.j", YES);; ; ; ; @@ -76387,6 +76394,8 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function var ruler = (scrollView == null ? scrollView : (scrollView.isa.method_msgSend["horizontalRulerView"] || _objj_forward)(scrollView, "horizontalRulerView")); if (!ruler) return; + if ((ruler == null ? ruler : (ruler.isa.method_msgSend["draggingMarker"] || _objj_forward)(ruler, "draggingMarker"))) + return; var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), currentAttributes = self._typingAttributes; @@ -76421,50 +76430,6 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function ,["void"]), new objj_method(sel_getUid("rulerView:didAddMarker:"), function $CPTextView__rulerView_didAddMarker_(self, _cmd, rulerView, marker) { - if (!(self.isa.method_msgSend["_didBeginEditing"] || _objj_forward)(self, "_didBeginEditing") || !(self.isa.method_msgSend["shouldChangeTextInRange:replacementString:"] || _objj_forward)(self, "shouldChangeTextInRange:replacementString:", self._selectionRange, nil)) - return; - var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), - paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), - currentAttributes = self._typingAttributes; - var textLength = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["length"] || _objj_forward)(___r1, "length")), - charIndex = selectedRange.location; - if (textLength > 0) - { - if (charIndex >= textLength) - charIndex = textLength - 1; - if (charIndex < 0) - charIndex = 0; - currentAttributes = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["attributesAtIndex:effectiveRange:"] || _objj_forward)(___r1, "attributesAtIndex:effectiveRange:", charIndex, nil)); - } - if ((currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName))) - paragraphStyle = (currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName)); - var mutableStyle = (paragraphStyle == null ? paragraphStyle : (paragraphStyle.isa.method_msgSend["mutableCopy"] || _objj_forward)(paragraphStyle, "mutableCopy")); - var newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), - tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); - (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); - (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); - (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); - var targetRange = selectedRange; - if (targetRange.length === 0) - targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); - if (targetRange.length > 0) - { - ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); - ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); - } - if (selectedRange.length === 0) - { - ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); - ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); - } - var ___r1; -} - -,["void","CPRulerView","CPRulerMarker"]), new objj_method(sel_getUid("rulerView:didMoveMarker:"), function $CPTextView__rulerView_didMoveMarker_(self, _cmd, rulerView, marker) -{ - if (!(self.isa.method_msgSend["_didBeginEditing"] || _objj_forward)(self, "_didBeginEditing") || !(self.isa.method_msgSend["shouldChangeTextInRange:replacementString:"] || _objj_forward)(self, "shouldChangeTextInRange:replacementString:", self._selectionRange, nil)) - return; var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), currentAttributes = self._typingAttributes; @@ -76481,41 +76446,71 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function if ((currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName))) paragraphStyle = (currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName)); var mutableStyle = (paragraphStyle == null ? paragraphStyle : (paragraphStyle.isa.method_msgSend["mutableCopy"] || _objj_forward)(paragraphStyle, "mutableCopy")), - oldTab = (marker == null ? marker : (marker.isa.method_msgSend["representedObject"] || _objj_forward)(marker, "representedObject")); - if (!oldTab) - return; - if ((oldTab == null ? oldTab : (oldTab.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(oldTab, "isKindOfClass:", (CPTextTab.isa.method_msgSend["class"] || _objj_forward)(CPTextTab, "class")))) - { - var newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", (oldTab == null ? oldTab : (oldTab.isa.method_msgSend["alignment"] || _objj_forward)(oldTab, "alignment")), (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), - tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); - (tabs == null ? tabs : (tabs.isa.method_msgSend["removeObject:"] || _objj_forward)(tabs, "removeObject:", oldTab)); - (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); - (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); - (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); - } - else if ((oldTab == null ? oldTab : (oldTab.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(oldTab, "isKindOfClass:", (CPString.isa.method_msgSend["class"] || _objj_forward)(CPString, "class")))) - { - if (oldTab === "CPFirstLineIndent") - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setFirstLineHeadIndent:"] || _objj_forward)(mutableStyle, "setFirstLineHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); - else if (oldTab === "CPHeadIndent") - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setHeadIndent:"] || _objj_forward)(mutableStyle, "setHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); - else if (oldTab === "CPTailIndent") - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTailIndent:"] || _objj_forward)(mutableStyle, "setTailIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); - } + newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), + tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); + (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); + (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); + (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); var targetRange = selectedRange; - if (targetRange.length === 0) + if (targetRange.length === 0 && textLength > 0) targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); if (targetRange.length > 0) { ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); } - if (selectedRange.length === 0) + ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); + ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); + var ___r1; +} + +,["void","CPRulerView","CPRulerMarker"]), new objj_method(sel_getUid("rulerView:didMoveMarker:"), function $CPTextView__rulerView_didMoveMarker_(self, _cmd, rulerView, marker) +{ + var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), + paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), + currentAttributes = self._typingAttributes; + var textLength = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["length"] || _objj_forward)(___r1, "length")), + charIndex = selectedRange.location; + if (textLength > 0) { - ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); - ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); + if (charIndex >= textLength) + charIndex = textLength - 1; + if (charIndex < 0) + charIndex = 0; + currentAttributes = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["attributesAtIndex:effectiveRange:"] || _objj_forward)(___r1, "attributesAtIndex:effectiveRange:", charIndex, nil)); } + if ((currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName))) + paragraphStyle = (currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName)); + var mutableStyle = (paragraphStyle == null ? paragraphStyle : (paragraphStyle.isa.method_msgSend["mutableCopy"] || _objj_forward)(paragraphStyle, "mutableCopy")), + rep = (marker == null ? marker : (marker.isa.method_msgSend["representedObject"] || _objj_forward)(marker, "representedObject")); + if (!rep) + return; + if ((rep == null ? rep : (rep.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(rep, "isKindOfClass:", (CPTextTab.isa.method_msgSend["class"] || _objj_forward)(CPTextTab, "class")))) + { + var newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", (rep == null ? rep : (rep.isa.method_msgSend["alignment"] || _objj_forward)(rep, "alignment")), (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), + tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); + (tabs == null ? tabs : (tabs.isa.method_msgSend["removeObject:"] || _objj_forward)(tabs, "removeObject:", rep)); + (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); + (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); + (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); + } + else if (rep === "CPFirstLineIndent") + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setFirstLineHeadIndent:"] || _objj_forward)(mutableStyle, "setFirstLineHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); + else if (rep === "CPHeadIndent") + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setHeadIndent:"] || _objj_forward)(mutableStyle, "setHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); + else if (rep === "CPTailIndent") + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTailIndent:"] || _objj_forward)(mutableStyle, "setTailIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); + var targetRange = selectedRange; + if (targetRange.length === 0 && textLength > 0) + targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); + if (targetRange.length > 0) + { + ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); + ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); + } + ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["_validateLayoutAndGlyphs"] || _objj_forward)(___r1, "_validateLayoutAndGlyphs")); (self.isa.method_msgSend["sizeToFit"] || _objj_forward)(self, "sizeToFit"); (self.isa.method_msgSend["setNeedsDisplay:"] || _objj_forward)(self, "setNeedsDisplay:", YES); @@ -76524,8 +76519,6 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function ,["void","CPRulerView","CPRulerMarker"]), new objj_method(sel_getUid("rulerView:didRemoveMarker:"), function $CPTextView__rulerView_didRemoveMarker_(self, _cmd, rulerView, marker) { - if (!(self.isa.method_msgSend["_didBeginEditing"] || _objj_forward)(self, "_didBeginEditing") || !(self.isa.method_msgSend["shouldChangeTextInRange:replacementString:"] || _objj_forward)(self, "shouldChangeTextInRange:replacementString:", self._selectionRange, nil)) - return; var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), currentAttributes = self._typingAttributes; @@ -76549,18 +76542,15 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function (tabs == null ? tabs : (tabs.isa.method_msgSend["removeObject:"] || _objj_forward)(tabs, "removeObject:", oldTab)); (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); var targetRange = selectedRange; - if (targetRange.length === 0) + if (targetRange.length === 0 && textLength > 0) targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); if (targetRange.length > 0) { ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); } - if (selectedRange.length === 0) - { - ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); - ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); - } + ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); + ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); var ___r1; } @@ -77068,7 +77058,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("setPlaceholderValue:wit ,["void","id","CPString"])]); } -p;14;CPTypesetter.jt;29623;@STATIC;1.0;I;21;Foundation/CPObject.ji;18;CPParagraphStyle.ji;15;CPTextStorage.ji;8;CPFont.jt;29522;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPFont.j", YES);CPTypesetterZeroAdvancementAction = 1 << 0; +p;14;CPTypesetter.jt;29295;@STATIC;1.0;I;21;Foundation/CPObject.ji;18;CPParagraphStyle.ji;15;CPTextStorage.ji;8;CPFont.jt;29194;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPFont.j", YES);CPTypesetterZeroAdvancementAction = 1 << 0; CPTypesetterWhitespaceAction = 1 << 1; CPSTypesetterHorizontalTabAction = 1 << 2; CPTypesetterLineBreakAction = 1 << 3; @@ -77153,21 +77143,26 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi ,["CPArray"]), new objj_method(sel_getUid("textTabForWidth:writingDirection:"), function $CPSimpleTypesetter__textTabForWidth_writingDirection_(self, _cmd, aWidth, direction) { - var tabStops = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tabStops"] || _objj_forward)(___r1, "tabStops")); - if (!tabStops) - tabStops = ((___r1 = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tabStops"] || _objj_forward)(___r1, "tabStops")); - var l = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["count"] || _objj_forward)(tabStops, "count")); - if (l === 0) - return nil; - for (var i = 0; i < l; i++) + var tabStops = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tabStops"] || _objj_forward)(___r1, "tabStops")), + defaultInterval = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["defaultTabInterval"] || _objj_forward)(___r1, "defaultTabInterval")) || 28.0; + var nextDefaultLocation = (Math.floor(aWidth / defaultInterval) + 1) * defaultInterval; + var nextCustomTab = nil; + if (tabStops) { - var tab = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(tabStops, "objectAtIndex:", i)); - if ((tab == null ? tab : (tab.isa.method_msgSend["location"] || _objj_forward)(tab, "location")) > aWidth) - return tab; + var l = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["count"] || _objj_forward)(tabStops, "count")); + for (var i = 0; i < l; i++) + { + var tab = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(tabStops, "objectAtIndex:", i)); + if ((tab == null ? tab : (tab.isa.method_msgSend["location"] || _objj_forward)(tab, "location")) > aWidth) + { + nextCustomTab = tab; + break; + } + } } - var defaultInterval = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["defaultTabInterval"] || _objj_forward)(___r1, "defaultTabInterval")) || 28.0; - var nextLocation = CEIL((aWidth + 1.0) / defaultInterval) * defaultInterval; - return ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, nextLocation)); + if (nextCustomTab && (nextCustomTab == null ? nextCustomTab : (nextCustomTab.isa.method_msgSend["location"] || _objj_forward)(nextCustomTab, "location")) <= nextDefaultLocation) + return nextCustomTab; + return ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, nextDefaultLocation)); var ___r1; } @@ -77289,13 +77284,6 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi lineOrigin.x = isFirstLineOfParagraph ? ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["firstLineHeadIndent"] || _objj_forward)(___r1, "firstLineHeadIndent")) : ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["headIndent"] || _objj_forward)(___r1, "headIndent")); isFirstLineOfLayout = NO; } - var tailIndent = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tailIndent"] || _objj_forward)(___r1, "tailIndent")); - if (tailIndent > 0.0) - rightMargin = tailIndent; - else if (tailIndent < 0.0) - rightMargin = containerSizeWidth + tailIndent; - else - rightMargin = containerSizeWidth; if (isFirstLineOfLayout) { if (glyphIndex > 0) @@ -77381,7 +77369,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi } case 9: { - var nextTab = (self.isa.method_msgSend["textTabForWidth:writingDirection:"] || _objj_forward)(self, "textTabForWidth:writingDirection:", rangeWidth + lineOrigin.x, 0); + var nextTab = (self.isa.method_msgSend["textTabForWidth:writingDirection:"] || _objj_forward)(self, "textTabForWidth:writingDirection:", prevRangeWidth + lineOrigin.x, 0); isTabStop = YES; if (nextTab) { @@ -77418,7 +77406,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi } else { - rangeWidth += 28.0; + rangeWidth = prevRangeWidth + 28.0; } break; } diff --git a/Frameworks/AppKit/CommonJS.environment/AppKit.sj b/Frameworks/AppKit/CommonJS.environment/AppKit.sj index d634cc23d..ef9404995 100644 --- a/Frameworks/AppKit/CommonJS.environment/AppKit.sj +++ b/Frameworks/AppKit/CommonJS.environment/AppKit.sj @@ -71003,7 +71003,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("initWithParagraphStyle: ,["id","CPZone"])]); } -p;13;CPRulerView.jt;44897;@STATIC;1.0;I;21;Foundation/CPObject.ji;8;CPView.ji;13;CPTextField.ji;9;CPColor.ji;8;CPFont.ji;8;CPMenu.ji;12;CPMenuItem.jt;44767;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPView.j", YES);objj_executeFile("CPTextField.j", YES);objj_executeFile("CPColor.j", YES);objj_executeFile("CPFont.j", YES);objj_executeFile("CPMenu.j", YES);objj_executeFile("CPMenuItem.j", YES);{var the_typedef = objj_allocateTypeDef("CPRulerOrientation"); +p;13;CPRulerView.jt;46070;@STATIC;1.0;I;21;Foundation/CPObject.ji;8;CPView.ji;13;CPTextField.ji;9;CPColor.ji;8;CPFont.ji;8;CPMenu.ji;12;CPMenuItem.jt;45940;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPView.j", YES);objj_executeFile("CPTextField.j", YES);objj_executeFile("CPColor.j", YES);objj_executeFile("CPFont.j", YES);objj_executeFile("CPMenu.j", YES);objj_executeFile("CPMenuItem.j", YES);{var the_typedef = objj_allocateTypeDef("CPRulerOrientation"); objj_registerTypeDef(the_typedef); }CPHorizontalRuler = 0; CPVerticalRuler = 1; @@ -71052,12 +71052,15 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ self._rulerView = aRulerView; self._imageValue = anImageValue; self._representedObject = anObject; + (self == null ? self : (self.isa.method_msgSend["setHitTests:"] || _objj_forward)(self, "setHitTests:", NO)); self._label = ((___r1 = (CPTextField.isa.method_msgSend["alloc"] || _objj_forward)(CPTextField, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, 0, 12, 12))); ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setFont:"] || _objj_forward)(___r1, "setFont:", (CPFont.isa.method_msgSend["systemFontOfSize:"] || _objj_forward)(CPFont, "systemFontOfSize:", 10.0))); ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setTextColor:"] || _objj_forward)(___r1, "setTextColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.2, 1.0))); ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setAlignment:"] || _objj_forward)(___r1, "setAlignment:", CPCenterTextAlignment)); + ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setHitTests:"] || _objj_forward)(___r1, "setHitTests:", NO)); (self == null ? self : (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", self._label)); self._customHandleView = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMakeZero())); + ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setHitTests:"] || _objj_forward)(___r1, "setHitTests:", NO)); (self == null ? self : (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", self._customHandleView)); (self == null ? self : (self.isa.method_msgSend["updateMarkerIcon"] || _objj_forward)(self, "updateMarkerIcon")); } @@ -71093,15 +71096,14 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setFrame:"] || _objj_forward)(___r1, "setFrame:", CGRectMake(0, 0, frame.size.width, frame.size.height))); ((___r1 = ((___r2 = self._customHandleView), ___r2 == null ? ___r2 : (___r2.isa.method_msgSend["subviews"] || _objj_forward)(___r2, "subviews"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["makeObjectsPerformSelector:"] || _objj_forward)(___r1, "makeObjectsPerformSelector:", sel_getUid("removeFromSuperview"))); var isFirstLine = self._representedObject === "CPFirstLineIndent"; - ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(___r1, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.5, 1.0))); - var innerView = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(1.0, 1.0, frame.size.width - 2.0, frame.size.height - 2.0))); - if (isFirstLine) - (innerView == null ? innerView : (innerView.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(innerView, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.92, 1.0))); - else - (innerView == null ? innerView : (innerView.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(innerView, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.80, 1.0))); + ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(___r1, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.45, 1.0))); + var innerView = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(1.0, 1.0, Math.max(1.0, frame.size.width - 2.0), Math.max(1.0, frame.size.height - 2.0)))); + (innerView == null ? innerView : (innerView.isa.method_msgSend["setHitTests:"] || _objj_forward)(innerView, "setHitTests:", NO)); + (innerView == null ? innerView : (innerView.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(innerView, "setBackgroundColor:", isFirstLine ? (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.95, 1.0) : (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.80, 1.0))); ((___r1 = self._customHandleView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addSubview:"] || _objj_forward)(___r1, "addSubview:", innerView)); - var gripLine = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(Math.floor(frame.size.width / 2.0) - 1.0, 2.0, 1.0, frame.size.height - 4.0))); - (gripLine == null ? gripLine : (gripLine.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(gripLine, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.6, 1.0))); + var gripLine = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(Math.floor(frame.size.width / 2.0) - 1.0, 1.0, 1.0, Math.max(1.0, frame.size.height - 3.0)))); + (gripLine == null ? gripLine : (gripLine.isa.method_msgSend["setHitTests:"] || _objj_forward)(gripLine, "setHitTests:", NO)); + (gripLine == null ? gripLine : (gripLine.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(gripLine, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.5, 1.0))); (innerView == null ? innerView : (innerView.isa.method_msgSend["addSubview:"] || _objj_forward)(innerView, "addSubview:", gripLine)); } else @@ -71119,16 +71121,9 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ else if (align === CPRightTextAlignment) ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "◀")); } - else if (((___r1 = self._representedObject), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(___r1, "isKindOfClass:", (CPString.isa.method_msgSend["class"] || _objj_forward)(CPString, "class")))) - { - if (self._representedObject === "CPTailIndent") - ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "⥘")); - else - ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "⇡")); - } else { - ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "⇡")); + ((___r1 = self._label), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setStringValue:"] || _objj_forward)(___r1, "setStringValue:", "▲")); } } var ___r1, ___r2; @@ -71155,15 +71150,10 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ (menu == null ? menu : (menu.isa.method_msgSend["addItem:"] || _objj_forward)(menu, "addItem:", (CPMenuItem.isa.method_msgSend["separatorItem"] || _objj_forward)(CPMenuItem, "separatorItem"))); } var deleteTitle = "Delete Tab Stop"; - if (((___r1 = self._representedObject), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(___r1, "isKindOfClass:", (CPString.isa.method_msgSend["class"] || _objj_forward)(CPString, "class")))) - { - if (self._representedObject === "CPFirstLineIndent") - deleteTitle = "Delete 1st line indentation marker"; - else if (self._representedObject === "CPHeadIndent") - deleteTitle = "Delete head indentation marker"; - else if (self._representedObject === "CPTailIndent") - deleteTitle = "Delete tail indentation marker"; - } + if (self._representedObject === "CPFirstLineIndent") + deleteTitle = "Reset 1st line indentation"; + else if (self._representedObject === "CPHeadIndent") + deleteTitle = "Reset head indentation"; var itemDelete = (menu == null ? menu : (menu.isa.method_msgSend["addItemWithTitle:action:keyEquivalent:"] || _objj_forward)(menu, "addItemWithTitle:action:keyEquivalent:", deleteTitle, sel_getUid("deleteMarker:"), "")); (itemDelete == null ? itemDelete : (itemDelete.isa.method_msgSend["setTarget:"] || _objj_forward)(itemDelete, "setTarget:", self)); return menu; @@ -71189,14 +71179,12 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ { if (!((___r1 = self._representedObject), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(___r1, "isKindOfClass:", (CPTextTab == null ? CPTextTab : (CPTextTab.isa.method_msgSend["class"] || _objj_forward)(CPTextTab, "class"))))) return; - var oldTab = self._representedObject; - var newTab = ((___r1 = (CPTextTab == null ? CPTextTab : (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", alignment, self._imageValue)); + var oldTab = self._representedObject, + newTab = ((___r1 = (CPTextTab == null ? CPTextTab : (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", alignment, self._imageValue)); (self.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(self, "setRepresentedObject:", newTab); var client = ((___r1 = self._rulerView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["clientView"] || _objj_forward)(___r1, "clientView")); if (client && (client == null ? client : (client.isa.method_msgSend["respondsToSelector:"] || _objj_forward)(client, "respondsToSelector:", sel_getUid("rulerView:didUpdateMarker:oldTab:")))) - { (client == null ? client : (client.isa.method_msgSend["rulerView:didUpdateMarker:oldTab:"] || _objj_forward)(client, "rulerView:didUpdateMarker:oldTab:", self._rulerView, self, oldTab)); - } var ___r1; } @@ -71204,9 +71192,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ { var client = ((___r1 = self._rulerView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["clientView"] || _objj_forward)(___r1, "clientView")); if (client && (client == null ? client : (client.isa.method_msgSend["respondsToSelector:"] || _objj_forward)(client, "respondsToSelector:", sel_getUid("rulerView:didRemoveMarker:")))) - { (client == null ? client : (client.isa.method_msgSend["rulerView:didRemoveMarker:"] || _objj_forward)(client, "rulerView:didRemoveMarker:", self._rulerView, self)); - } ((___r1 = self._rulerView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["removeMarker:"] || _objj_forward)(___r1, "removeMarker:", self)); var ___r1; } @@ -71215,7 +71201,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("rulerView"), function $ } {var the_class = objj_allocateClassPair(CPView, "CPRulerView"), -meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_scrollView", "CPScrollView"), new objj_ivar("_orientation", "CPRulerOrientation"), new objj_ivar("_clientView", "CPView"), new objj_ivar("_ruleThickness", "float"), new objj_ivar("_reservedThicknessForMarkers", "float"), new objj_ivar("_markers", "CPArray"), new objj_ivar("_draggingMarker", "CPRulerMarker"), new objj_ivar("_dragStartPoint", "CGPoint"), new objj_ivar("_dragStartLocation", "float")]);objj_registerClassPair(the_class); +meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_scrollView", "CPScrollView"), new objj_ivar("_orientation", "CPRulerOrientation"), new objj_ivar("_ruleThickness", "float"), new objj_ivar("_reservedThicknessForMarkers", "float"), new objj_ivar("_markers", "CPArray"), new objj_ivar("_draggingMarker", "CPRulerMarker"), new objj_ivar("_dragStartPoint", "CGPoint"), new objj_ivar("_dragStartLocation", "float")]);objj_registerClassPair(the_class); class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function $CPRulerView__scrollView(self, _cmd) { return self._scrollView; @@ -71236,17 +71222,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function self._orientation = newValue; } -,["void","CPRulerOrientation"]), new objj_method(sel_getUid("clientView"), function $CPRulerView__clientView(self, _cmd) -{ - return self._clientView; -} - -,["CPView"]), new objj_method(sel_getUid("setClientView:"), function $CPRulerView__setClientView_(self, _cmd, newValue) -{ - self._clientView = newValue; -} - -,["void","CPView"]), new objj_method(sel_getUid("ruleThickness"), function $CPRulerView__ruleThickness(self, _cmd) +,["void","CPRulerOrientation"]), new objj_method(sel_getUid("ruleThickness"), function $CPRulerView__ruleThickness(self, _cmd) { return self._ruleThickness; } @@ -71256,13 +71232,23 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function self._ruleThickness = newValue; } -,["void","float"]), new objj_method(sel_getUid("initWithScrollView:orientation:"), function $CPRulerView__initWithScrollView_orientation_(self, _cmd, aScrollView, anOrientation) +,["void","float"]), new objj_method(sel_getUid("draggingMarker"), function $CPRulerView__draggingMarker(self, _cmd) +{ + return self._draggingMarker; +} + +,["CPRulerMarker"]), new objj_method(sel_getUid("_setDraggingMarker:"), function $CPRulerView___setDraggingMarker_(self, _cmd, newValue) +{ + self._draggingMarker = newValue; +} + +,["void","CPRulerMarker"]), new objj_method(sel_getUid("initWithScrollView:orientation:"), function $CPRulerView__initWithScrollView_orientation_(self, _cmd, aScrollView, anOrientation) { if (self = (objj_getClass("CPRulerView").super_class.method_dtable["initWithFrame:"] || _objj_forward)(self, "initWithFrame:", CGRectMakeZero())) { self._scrollView = aScrollView; self._orientation = anOrientation; - self._clientView = (aScrollView == null ? aScrollView : (aScrollView.isa.method_msgSend["documentView"] || _objj_forward)(aScrollView, "documentView")); + _clientView = (aScrollView == null ? aScrollView : (aScrollView.isa.method_msgSend["documentView"] || _objj_forward)(aScrollView, "documentView")); self._ruleThickness = anOrientation === CPHorizontalRuler ? 16.0 : 24.0; self._reservedThicknessForMarkers = 0.0; self._markers = []; @@ -71277,7 +71263,18 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function (self.isa.method_msgSend["updateRuler"] || _objj_forward)(self, "updateRuler"); } -,["void","CGRect"]), new objj_method(sel_getUid("addMarker:"), function $CPRulerView__addMarker_(self, _cmd, aMarker) +,["void","CGRect"]), new objj_method(sel_getUid("clientView"), function $CPRulerView__clientView(self, _cmd) +{ + return _clientView || ((___r1 = self._scrollView), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["documentView"] || _objj_forward)(___r1, "documentView")); + var ___r1; +} + +,["CPView"]), new objj_method(sel_getUid("setClientView:"), function $CPRulerView__setClientView_(self, _cmd, aView) +{ + _clientView = aView; +} + +,["void","CPView"]), new objj_method(sel_getUid("addMarker:"), function $CPRulerView__addMarker_(self, _cmd, aMarker) { if (((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["containsObject:"] || _objj_forward)(___r1, "containsObject:", aMarker))) return; @@ -71305,15 +71302,18 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", marker); (self.isa.method_msgSend["_positionMarker:"] || _objj_forward)(self, "_positionMarker:", marker); } + (self.isa.method_msgSend["updateRuler"] || _objj_forward)(self, "updateRuler"); var ___r1, ___r2; } ,["void","CPArray"]), new objj_method(sel_getUid("_markerAtPoint:"), function $CPRulerView___markerAtPoint_(self, _cmd, aPoint) { - for (var i = 0; i < ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["count"] || _objj_forward)(___r1, "count")); i++) + for (var i = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["count"] || _objj_forward)(___r1, "count")) - 1; i >= 0; i--) { - var marker = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(___r1, "objectAtIndex:", i)); - if (CGRectContainsPoint((marker == null ? marker : (marker.isa.method_msgSend["frame"] || _objj_forward)(marker, "frame")), aPoint)) + var marker = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(___r1, "objectAtIndex:", i)), + frame = (marker == null ? marker : (marker.isa.method_msgSend["frame"] || _objj_forward)(marker, "frame")); + var hitFrame = CGRectMake(frame.origin.x - 3.0, frame.origin.y - 2.0, frame.size.width + 6.0, frame.size.height + 4.0); + if (CGRectContainsPoint(hitFrame, aPoint)) return marker; } return nil; @@ -71329,27 +71329,28 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function isHorizontal = self._orientation === CPHorizontalRuler || self._orientation === CPRulerOrientationHorizontal, rulerHeight = CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")), rulerWidth = CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")), - markerLocation = (aMarker == null ? aMarker : (aMarker.isa.method_msgSend["imageValue"] || _objj_forward)(aMarker, "imageValue")); + markerLocation = (aMarker == null ? aMarker : (aMarker.isa.method_msgSend["imageValue"] || _objj_forward)(aMarker, "imageValue")), + rep = (aMarker == null ? aMarker : (aMarker.isa.method_msgSend["representedObject"] || _objj_forward)(aMarker, "representedObject")); if (isHorizontal) { var x = markerLocation - scrollPoint.x - 6.0, y = rulerHeight - 11.0, w = 12.0, h = 12.0; - if ((aMarker == null ? aMarker : (aMarker.isa.method_msgSend["representedObject"] || _objj_forward)(aMarker, "representedObject")) === "CPFirstLineIndent") + if (rep === "CPFirstLineIndent") { y = 0.0; h = Math.floor(rulerHeight / 2.0); } - else if ((aMarker == null ? aMarker : (aMarker.isa.method_msgSend["representedObject"] || _objj_forward)(aMarker, "representedObject")) === "CPHeadIndent") + else if (rep === "CPHeadIndent") { y = Math.floor(rulerHeight / 2.0); h = rulerHeight - y - 1.0; } else { - if (x < 0.0) - x = 0.0; + if (x < -6.0) + x = -6.0; else if (x + 12.0 > rulerWidth) x = rulerWidth - 12.0; } @@ -71405,12 +71406,12 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function localPoint = (self.isa.method_msgSend["convertPoint:fromView:"] || _objj_forward)(self, "convertPoint:fromView:", locationInWindow, nil), isHorizontal = self._orientation === CPHorizontalRuler || self._orientation === CPRulerOrientationHorizontal; var delta = isHorizontal ? localPoint.x - self._dragStartPoint.x : localPoint.y - self._dragStartPoint.y, - newLocation = self._dragStartLocation + delta; - if (newLocation < 0) - newLocation = 0; + newLocation = Math.max(0.0, self._dragStartLocation + delta); ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setImageValue:"] || _objj_forward)(___r1, "setImageValue:", newLocation)); - (self.isa.method_msgSend["updateRuler"] || _objj_forward)(self, "updateRuler"); - var draggedOff = isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15; + (self.isa.method_msgSend["_positionMarker:"] || _objj_forward)(self, "_positionMarker:", self._draggingMarker); + var rep = ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["representedObject"] || _objj_forward)(___r1, "representedObject")), + isIndent = rep === "CPFirstLineIndent" || rep === "CPHeadIndent" || rep === "CPTailIndent"; + var draggedOff = !isIndent && (isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15); if (draggedOff) { ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setAlphaValue:"] || _objj_forward)(___r1, "setAlphaValue:", 0.4)); @@ -71433,7 +71434,9 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function return; var localPoint = (self.isa.method_msgSend["convertPoint:fromView:"] || _objj_forward)(self, "convertPoint:fromView:", (anEvent == null ? anEvent : (anEvent.isa.method_msgSend["locationInWindow"] || _objj_forward)(anEvent, "locationInWindow")), nil), isHorizontal = self._orientation === CPHorizontalRuler || self._orientation === CPRulerOrientationHorizontal, - draggedOff = isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15; + rep = ((___r1 = self._draggingMarker), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["representedObject"] || _objj_forward)(___r1, "representedObject")), + isIndent = rep === "CPFirstLineIndent" || rep === "CPHeadIndent" || rep === "CPTailIndent"; + var draggedOff = !isIndent && (isHorizontal ? localPoint.y < -15 || localPoint.y > CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15 : localPoint.x < -15 || localPoint.x > CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")) + 15); if (draggedOff) { var client = (self.isa.method_msgSend["clientView"] || _objj_forward)(self, "clientView"); @@ -71468,6 +71471,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function rulerHeight = CGRectGetHeight((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")), rulerWidth = CGRectGetWidth((self.isa.method_msgSend["bounds"] || _objj_forward)(self, "bounds")); var bottomBorder = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, rulerHeight - 1, rulerWidth, 1))); + (bottomBorder == null ? bottomBorder : (bottomBorder.isa.method_msgSend["setHitTests:"] || _objj_forward)(bottomBorder, "setHitTests:", NO)); (bottomBorder == null ? bottomBorder : (bottomBorder.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(bottomBorder, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.75, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", bottomBorder); var firstLineMarker = nil, @@ -71487,6 +71491,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function if (firstLineX > 0) { var firstLineBg = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, 0, firstLineX, halfHeight))); + (firstLineBg == null ? firstLineBg : (firstLineBg.isa.method_msgSend["setHitTests:"] || _objj_forward)(firstLineBg, "setHitTests:", NO)); (firstLineBg == null ? firstLineBg : (firstLineBg.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(firstLineBg, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.93, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", firstLineBg); } @@ -71497,6 +71502,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function if (headX > 0) { var headBg = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(0, halfHeight, headX, rulerHeight - halfHeight - 1.0))); + (headBg == null ? headBg : (headBg.isa.method_msgSend["setHitTests:"] || _objj_forward)(headBg, "setHitTests:", NO)); (headBg == null ? headBg : (headBg.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(headBg, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.86, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", headBg); } @@ -71510,6 +71516,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function tickHeight = isMajor ? 8.0 : 4.0, tickY = rulerHeight - tickHeight - 1.0; var tick = ((___r1 = (CPView.isa.method_msgSend["alloc"] || _objj_forward)(CPView, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(screenX, tickY, 1.0, tickHeight))); + (tick == null ? tick : (tick.isa.method_msgSend["setHitTests:"] || _objj_forward)(tick, "setHitTests:", NO)); (tick == null ? tick : (tick.isa.method_msgSend["setBackgroundColor:"] || _objj_forward)(tick, "setBackgroundColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.65, 1.0))); (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", tick); if (isMajor) @@ -71527,6 +71534,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function alignment = CPRightTextAlignment; } var label = ((___r1 = (CPTextField.isa.method_msgSend["alloc"] || _objj_forward)(CPTextField, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithFrame:"] || _objj_forward)(___r1, "initWithFrame:", CGRectMake(labelX, 1.0, 40.0, 12.0))); + (label == null ? label : (label.isa.method_msgSend["setHitTests:"] || _objj_forward)(label, "setHitTests:", NO)); (label == null ? label : (label.isa.method_msgSend["setStringValue:"] || _objj_forward)(label, "setStringValue:", (CPString.isa.method_msgSend["stringWithFormat:"] || _objj_forward)(CPString, "stringWithFormat:", "%d", val))); (label == null ? label : (label.isa.method_msgSend["setFont:"] || _objj_forward)(label, "setFont:", (CPFont.isa.method_msgSend["systemFontOfSize:"] || _objj_forward)(CPFont, "systemFontOfSize:", 8.0))); (label == null ? label : (label.isa.method_msgSend["setTextColor:"] || _objj_forward)(label, "setTextColor:", (CPColor.isa.method_msgSend["colorWithWhite:alpha:"] || _objj_forward)(CPColor, "colorWithWhite:alpha:", 0.4, 1.0))); @@ -71574,8 +71582,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("scrollView"), function for (var i = 0; i < ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["count"] || _objj_forward)(___r1, "count")); i++) { var marker = ((___r1 = self._markers), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(___r1, "objectAtIndex:", i)); - if ((marker == null ? marker : (marker.isa.method_msgSend["superview"] || _objj_forward)(marker, "superview")) !== self) - (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", marker); + (self.isa.method_msgSend["addSubview:"] || _objj_forward)(self, "addSubview:", marker); (self.isa.method_msgSend["_positionMarker:"] || _objj_forward)(self, "_positionMarker:", marker); } var ___r1; @@ -72096,7 +72103,7 @@ var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_ ,["void"])]); } -p;12;CPTextView.jt;215188;@STATIC;1.0;i;8;CPText.ji;14;CPPasteboard.ji;14;CPColorPanel.ji;15;CPFontManager.ji;15;CPTextStorage.ji;17;CPTextContainer.ji;17;CPLayoutManager.ji;18;CPParagraphStyle.ji;14;_CPRTFParser.ji;16;_CPRTFProducer.jt;214970;objj_executeFile("CPText.j", YES);objj_executeFile("CPPasteboard.j", YES);objj_executeFile("CPColorPanel.j", YES);objj_executeFile("CPFontManager.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPTextContainer.j", YES);objj_executeFile("CPLayoutManager.j", YES);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("_CPRTFParser.j", YES);objj_executeFile("_CPRTFProducer.j", YES);; +p;12;CPTextView.jt;213744;@STATIC;1.0;i;8;CPText.ji;14;CPPasteboard.ji;14;CPColorPanel.ji;15;CPFontManager.ji;15;CPTextStorage.ji;17;CPTextContainer.ji;17;CPLayoutManager.ji;18;CPParagraphStyle.ji;14;_CPRTFParser.ji;16;_CPRTFProducer.jt;213526;objj_executeFile("CPText.j", YES);objj_executeFile("CPPasteboard.j", YES);objj_executeFile("CPColorPanel.j", YES);objj_executeFile("CPFontManager.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPTextContainer.j", YES);objj_executeFile("CPLayoutManager.j", YES);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("_CPRTFParser.j", YES);objj_executeFile("_CPRTFProducer.j", YES);; ; ; ; @@ -74178,6 +74185,8 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function var ruler = (scrollView == null ? scrollView : (scrollView.isa.method_msgSend["horizontalRulerView"] || _objj_forward)(scrollView, "horizontalRulerView")); if (!ruler) return; + if ((ruler == null ? ruler : (ruler.isa.method_msgSend["draggingMarker"] || _objj_forward)(ruler, "draggingMarker"))) + return; var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), currentAttributes = self._typingAttributes; @@ -74212,50 +74221,6 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function ,["void"]), new objj_method(sel_getUid("rulerView:didAddMarker:"), function $CPTextView__rulerView_didAddMarker_(self, _cmd, rulerView, marker) { - if (!(self.isa.method_msgSend["_didBeginEditing"] || _objj_forward)(self, "_didBeginEditing") || !(self.isa.method_msgSend["shouldChangeTextInRange:replacementString:"] || _objj_forward)(self, "shouldChangeTextInRange:replacementString:", self._selectionRange, nil)) - return; - var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), - paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), - currentAttributes = self._typingAttributes; - var textLength = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["length"] || _objj_forward)(___r1, "length")), - charIndex = selectedRange.location; - if (textLength > 0) - { - if (charIndex >= textLength) - charIndex = textLength - 1; - if (charIndex < 0) - charIndex = 0; - currentAttributes = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["attributesAtIndex:effectiveRange:"] || _objj_forward)(___r1, "attributesAtIndex:effectiveRange:", charIndex, nil)); - } - if ((currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName))) - paragraphStyle = (currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName)); - var mutableStyle = (paragraphStyle == null ? paragraphStyle : (paragraphStyle.isa.method_msgSend["mutableCopy"] || _objj_forward)(paragraphStyle, "mutableCopy")); - var newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), - tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); - (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); - (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); - (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); - var targetRange = selectedRange; - if (targetRange.length === 0) - targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); - if (targetRange.length > 0) - { - ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); - ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); - } - if (selectedRange.length === 0) - { - ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); - ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); - } - var ___r1; -} - -,["void","CPRulerView","CPRulerMarker"]), new objj_method(sel_getUid("rulerView:didMoveMarker:"), function $CPTextView__rulerView_didMoveMarker_(self, _cmd, rulerView, marker) -{ - if (!(self.isa.method_msgSend["_didBeginEditing"] || _objj_forward)(self, "_didBeginEditing") || !(self.isa.method_msgSend["shouldChangeTextInRange:replacementString:"] || _objj_forward)(self, "shouldChangeTextInRange:replacementString:", self._selectionRange, nil)) - return; var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), currentAttributes = self._typingAttributes; @@ -74272,41 +74237,71 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function if ((currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName))) paragraphStyle = (currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName)); var mutableStyle = (paragraphStyle == null ? paragraphStyle : (paragraphStyle.isa.method_msgSend["mutableCopy"] || _objj_forward)(paragraphStyle, "mutableCopy")), - oldTab = (marker == null ? marker : (marker.isa.method_msgSend["representedObject"] || _objj_forward)(marker, "representedObject")); - if (!oldTab) - return; - if ((oldTab == null ? oldTab : (oldTab.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(oldTab, "isKindOfClass:", (CPTextTab.isa.method_msgSend["class"] || _objj_forward)(CPTextTab, "class")))) - { - var newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", (oldTab == null ? oldTab : (oldTab.isa.method_msgSend["alignment"] || _objj_forward)(oldTab, "alignment")), (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), - tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); - (tabs == null ? tabs : (tabs.isa.method_msgSend["removeObject:"] || _objj_forward)(tabs, "removeObject:", oldTab)); - (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); - (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); - (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); - } - else if ((oldTab == null ? oldTab : (oldTab.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(oldTab, "isKindOfClass:", (CPString.isa.method_msgSend["class"] || _objj_forward)(CPString, "class")))) - { - if (oldTab === "CPFirstLineIndent") - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setFirstLineHeadIndent:"] || _objj_forward)(mutableStyle, "setFirstLineHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); - else if (oldTab === "CPHeadIndent") - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setHeadIndent:"] || _objj_forward)(mutableStyle, "setHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); - else if (oldTab === "CPTailIndent") - (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTailIndent:"] || _objj_forward)(mutableStyle, "setTailIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); - } + newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), + tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); + (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); + (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); + (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); var targetRange = selectedRange; - if (targetRange.length === 0) + if (targetRange.length === 0 && textLength > 0) targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); if (targetRange.length > 0) { ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); } - if (selectedRange.length === 0) + ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); + ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); + var ___r1; +} + +,["void","CPRulerView","CPRulerMarker"]), new objj_method(sel_getUid("rulerView:didMoveMarker:"), function $CPTextView__rulerView_didMoveMarker_(self, _cmd, rulerView, marker) +{ + var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), + paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), + currentAttributes = self._typingAttributes; + var textLength = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["length"] || _objj_forward)(___r1, "length")), + charIndex = selectedRange.location; + if (textLength > 0) { - ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); - ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); + if (charIndex >= textLength) + charIndex = textLength - 1; + if (charIndex < 0) + charIndex = 0; + currentAttributes = ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["attributesAtIndex:effectiveRange:"] || _objj_forward)(___r1, "attributesAtIndex:effectiveRange:", charIndex, nil)); } + if ((currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName))) + paragraphStyle = (currentAttributes == null ? currentAttributes : (currentAttributes.isa.method_msgSend["objectForKey:"] || _objj_forward)(currentAttributes, "objectForKey:", CPParagraphStyleAttributeName)); + var mutableStyle = (paragraphStyle == null ? paragraphStyle : (paragraphStyle.isa.method_msgSend["mutableCopy"] || _objj_forward)(paragraphStyle, "mutableCopy")), + rep = (marker == null ? marker : (marker.isa.method_msgSend["representedObject"] || _objj_forward)(marker, "representedObject")); + if (!rep) + return; + if ((rep == null ? rep : (rep.isa.method_msgSend["isKindOfClass:"] || _objj_forward)(rep, "isKindOfClass:", (CPTextTab.isa.method_msgSend["class"] || _objj_forward)(CPTextTab, "class")))) + { + var newTab = ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", (rep == null ? rep : (rep.isa.method_msgSend["alignment"] || _objj_forward)(rep, "alignment")), (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))), + tabs = ((___r1 = (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["tabStops"] || _objj_forward)(mutableStyle, "tabStops"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["mutableCopy"] || _objj_forward)(___r1, "mutableCopy")); + (tabs == null ? tabs : (tabs.isa.method_msgSend["removeObject:"] || _objj_forward)(tabs, "removeObject:", rep)); + (tabs == null ? tabs : (tabs.isa.method_msgSend["addObject:"] || _objj_forward)(tabs, "addObject:", newTab)); + (tabs == null ? tabs : (tabs.isa.method_msgSend["sortUsingFunction:context:"] || _objj_forward)(tabs, "sortUsingFunction:context:", compareTabStops, nil)); + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); + (marker == null ? marker : (marker.isa.method_msgSend["setRepresentedObject:"] || _objj_forward)(marker, "setRepresentedObject:", newTab)); + } + else if (rep === "CPFirstLineIndent") + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setFirstLineHeadIndent:"] || _objj_forward)(mutableStyle, "setFirstLineHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); + else if (rep === "CPHeadIndent") + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setHeadIndent:"] || _objj_forward)(mutableStyle, "setHeadIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); + else if (rep === "CPTailIndent") + (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTailIndent:"] || _objj_forward)(mutableStyle, "setTailIndent:", (marker == null ? marker : (marker.isa.method_msgSend["imageValue"] || _objj_forward)(marker, "imageValue")))); + var targetRange = selectedRange; + if (targetRange.length === 0 && textLength > 0) + targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); + if (targetRange.length > 0) + { + ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); + ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); + } + ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["_validateLayoutAndGlyphs"] || _objj_forward)(___r1, "_validateLayoutAndGlyphs")); (self.isa.method_msgSend["sizeToFit"] || _objj_forward)(self, "sizeToFit"); (self.isa.method_msgSend["setNeedsDisplay:"] || _objj_forward)(self, "setNeedsDisplay:", YES); @@ -74315,8 +74310,6 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function ,["void","CPRulerView","CPRulerMarker"]), new objj_method(sel_getUid("rulerView:didRemoveMarker:"), function $CPTextView__rulerView_didRemoveMarker_(self, _cmd, rulerView, marker) { - if (!(self.isa.method_msgSend["_didBeginEditing"] || _objj_forward)(self, "_didBeginEditing") || !(self.isa.method_msgSend["shouldChangeTextInRange:replacementString:"] || _objj_forward)(self, "shouldChangeTextInRange:replacementString:", self._selectionRange, nil)) - return; var selectedRange = (self.isa.method_msgSend["selectedRange"] || _objj_forward)(self, "selectedRange"), paragraphStyle = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle"), currentAttributes = self._typingAttributes; @@ -74340,18 +74333,15 @@ class_addMethods(the_class, [new objj_method(sel_getUid("updateRuler"), function (tabs == null ? tabs : (tabs.isa.method_msgSend["removeObject:"] || _objj_forward)(tabs, "removeObject:", oldTab)); (mutableStyle == null ? mutableStyle : (mutableStyle.isa.method_msgSend["setTabStops:"] || _objj_forward)(mutableStyle, "setTabStops:", tabs)); var targetRange = selectedRange; - if (targetRange.length === 0) + if (targetRange.length === 0 && textLength > 0) targetRange = (self.isa.method_msgSend["selectionRangeForProposedRange:granularity:"] || _objj_forward)(self, "selectionRangeForProposedRange:granularity:", CPMakeRange(targetRange.location, 0), CPSelectByParagraph); if (targetRange.length > 0) { ((___r1 = self._textStorage), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["addAttribute:value:range:"] || _objj_forward)(___r1, "addAttribute:value:range:", CPParagraphStyleAttributeName, mutableStyle, CPMakeRangeCopy(targetRange))); ((___r1 = self._layoutManager), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["textStorage:edited:range:changeInLength:invalidatedRange:"] || _objj_forward)(___r1, "textStorage:edited:range:changeInLength:invalidatedRange:", self._textStorage, 0, CPMakeRangeCopy(targetRange), 0, CPMakeRangeCopy(targetRange))); } - if (selectedRange.length === 0) - { - ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); - ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); - } + ((___r1 = self._typingAttributes), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["setObject:forKey:"] || _objj_forward)(___r1, "setObject:forKey:", mutableStyle, CPParagraphStyleAttributeName)); + ((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:"] || _objj_forward)(___r1, "postNotificationName:object:", CPTextViewDidChangeTypingAttributesNotification, self)); var ___r1; } @@ -74675,7 +74665,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("setPlaceholderValue:wit ,["void","id","CPString"])]); } -p;14;CPTypesetter.jt;29623;@STATIC;1.0;I;21;Foundation/CPObject.ji;18;CPParagraphStyle.ji;15;CPTextStorage.ji;8;CPFont.jt;29522;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPFont.j", YES);CPTypesetterZeroAdvancementAction = 1 << 0; +p;14;CPTypesetter.jt;29295;@STATIC;1.0;I;21;Foundation/CPObject.ji;18;CPParagraphStyle.ji;15;CPTextStorage.ji;8;CPFont.jt;29194;objj_executeFile("Foundation/CPObject.j", NO);objj_executeFile("CPParagraphStyle.j", YES);objj_executeFile("CPTextStorage.j", YES);objj_executeFile("CPFont.j", YES);CPTypesetterZeroAdvancementAction = 1 << 0; CPTypesetterWhitespaceAction = 1 << 1; CPSTypesetterHorizontalTabAction = 1 << 2; CPTypesetterLineBreakAction = 1 << 3; @@ -74760,21 +74750,26 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi ,["CPArray"]), new objj_method(sel_getUid("textTabForWidth:writingDirection:"), function $CPSimpleTypesetter__textTabForWidth_writingDirection_(self, _cmd, aWidth, direction) { - var tabStops = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tabStops"] || _objj_forward)(___r1, "tabStops")); - if (!tabStops) - tabStops = ((___r1 = (CPParagraphStyle.isa.method_msgSend["defaultParagraphStyle"] || _objj_forward)(CPParagraphStyle, "defaultParagraphStyle")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tabStops"] || _objj_forward)(___r1, "tabStops")); - var l = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["count"] || _objj_forward)(tabStops, "count")); - if (l === 0) - return nil; - for (var i = 0; i < l; i++) + var tabStops = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tabStops"] || _objj_forward)(___r1, "tabStops")), + defaultInterval = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["defaultTabInterval"] || _objj_forward)(___r1, "defaultTabInterval")) || 28.0; + var nextDefaultLocation = (Math.floor(aWidth / defaultInterval) + 1) * defaultInterval; + var nextCustomTab = nil; + if (tabStops) { - var tab = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(tabStops, "objectAtIndex:", i)); - if ((tab == null ? tab : (tab.isa.method_msgSend["location"] || _objj_forward)(tab, "location")) > aWidth) - return tab; + var l = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["count"] || _objj_forward)(tabStops, "count")); + for (var i = 0; i < l; i++) + { + var tab = (tabStops == null ? tabStops : (tabStops.isa.method_msgSend["objectAtIndex:"] || _objj_forward)(tabStops, "objectAtIndex:", i)); + if ((tab == null ? tab : (tab.isa.method_msgSend["location"] || _objj_forward)(tab, "location")) > aWidth) + { + nextCustomTab = tab; + break; + } + } } - var defaultInterval = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["defaultTabInterval"] || _objj_forward)(___r1, "defaultTabInterval")) || 28.0; - var nextLocation = CEIL((aWidth + 1.0) / defaultInterval) * defaultInterval; - return ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, nextLocation)); + if (nextCustomTab && (nextCustomTab == null ? nextCustomTab : (nextCustomTab.isa.method_msgSend["location"] || _objj_forward)(nextCustomTab, "location")) <= nextDefaultLocation) + return nextCustomTab; + return ((___r1 = (CPTextTab.isa.method_msgSend["alloc"] || _objj_forward)(CPTextTab, "alloc")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["initWithType:location:"] || _objj_forward)(___r1, "initWithType:location:", CPLeftTextAlignment, nextDefaultLocation)); var ___r1; } @@ -74896,13 +74891,6 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi lineOrigin.x = isFirstLineOfParagraph ? ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["firstLineHeadIndent"] || _objj_forward)(___r1, "firstLineHeadIndent")) : ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["headIndent"] || _objj_forward)(___r1, "headIndent")); isFirstLineOfLayout = NO; } - var tailIndent = ((___r1 = self._currentParagraph), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tailIndent"] || _objj_forward)(___r1, "tailIndent")); - if (tailIndent > 0.0) - rightMargin = tailIndent; - else if (tailIndent < 0.0) - rightMargin = containerSizeWidth + tailIndent; - else - rightMargin = containerSizeWidth; if (isFirstLineOfLayout) { if (glyphIndex > 0) @@ -74988,7 +74976,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi } case 9: { - var nextTab = (self.isa.method_msgSend["textTabForWidth:writingDirection:"] || _objj_forward)(self, "textTabForWidth:writingDirection:", rangeWidth + lineOrigin.x, 0); + var nextTab = (self.isa.method_msgSend["textTabForWidth:writingDirection:"] || _objj_forward)(self, "textTabForWidth:writingDirection:", prevRangeWidth + lineOrigin.x, 0); isTabStop = YES; if (nextTab) { @@ -75025,7 +75013,7 @@ class_addMethods(the_class, [new objj_method(sel_getUid("layoutManager"), functi } else { - rangeWidth += 28.0; + rangeWidth = prevRangeWidth + 28.0; } break; } diff --git a/Resources/recipes.txt b/Resources/recipes.txt index 16a2528ad..81c412195 100644 --- a/Resources/recipes.txt +++ b/Resources/recipes.txt @@ -1,147 +1,147 @@ -1787690216872|ArrayController1| -1787690216885|ArrayControllerInitialSelectionTest| -1787690216898|ArrayControllerRemovingFirstTest| -1787690216911|AttachedSheet| -1787690216924|AttachedSheet2| -1787690216937|Bindings| -1787690216950|CGCanvasContext| -1787690216963|CGPath| -1787690216976|CPAlertTest| -1787690216989|CPAnimatablePropertyContainerTest| -1787690217002|CPAnimationContextTest| -1787690217015|CPAnimationTest| -1787690217027|CPBinder-echo-bug| -1787690217040|CPBoxCibTest| -1787690217053|CPBoxTest| -1787690217066|CPBrowserTest| -1787690217080|CPButtonBarTest| -1787690217093|CPButtonKeyEquivalentDefaultTest| -1787690217106|CPButtonTest| -1787690217119|CPByteCountFormatter| -1787690217132|CPCollectionViewNibTest| -1787690217145|CPColor-CPImage-description| -1787690217158|CPColorWellBindings| -1787690217171|CPComboBoxTest| -1787690217184|CPControlPerformClickExceptionTest| -1787690217197|CPControlSize| -1787690217210|CPCursor| -1787690217222|CPDateFormatterTest| -1787690217235|CPDatePickerTest| -1787690217248|CPDictionaryControllerTest| -1787690217261|CPDocumentControllerTest| -1787690217274|CPFormatterTest| -1787690217287|CPGraphicsTest| -1787690217300|CPImageAndTextViewImageScaling| -1787690217313|CPImageViewAlignmentScaling| -1787690217326|CPImageViewTest| -1787690217339|CPImageViewbindingsTest| -1787690217352|CPLevelIndicator| -1787690217365|CPLocalizationTest| -1787690217378|CPLogTest| -1787690217391|CPMarkdownParser| -1787690217403|CPMenuCALayerTest| -1787690217416|CPMenuEnabledBindingsTest| -1787690217429|CPMenuKeyEquivalents| -1787690217442|CPMenuRemoveAllTest| -1787690217455|CPMenuSubmenuPlacementConstraints| -1787690217468|CPMenuTest| -1787690217481|CPOutlineViewCibTest| -1787690217494|CPOutlineViewTest| -1787690217507|CPOutlineViewViewBasedCibTest| -1787690217520|CPPanelTest| -1787690217533|CPPlatformWindow| -1787690217546|CPPlattformWindowMinSize| -1787690217559|CPPopUpButtonBindings| -1787690217572|CPPopUpButtonTest| -1787690217585|CPPopover| -1787690217598|CPPredicateEditorCibTest| -1787690217610|CPProgressIndicator| -1787690217624|CPPropertyListSerializationTest| -1787690217637|CPRadioBindings| -1787690217650|CPRuleEditorCibTest| -1787690217662|CPRuleEditorTestI8N| -1787690217675|CPScrollView| -1787690217688|CPScrollView2| -1787690217701|CPSearchField| -1787690217714|CPSearchFieldPredicateBinding| -1787690217727|CPSegmentedControlBindings| -1787690217740|CPSegmentedControlTest| -1787690217753|CPSoundTest| -1787690217766|CPSplitViewDivider| -1787690217779|CPSplitViewTest| -1787690217792|CPStackViewTest| -1787690217805|CPStepperBindings| -1787690217818|CPStepperNibTest| -1787690217831|CPTabView2| -1787690217844|CPTabViewBindings| -1787690217857|CPTabViewNib| -1787690217870|CPTableViewGroupRows| -1787690217882|CPTextField| -1787690217895|CPTextFieldEditingStyleTest| -1787690217908|CPTextFieldHeightTest| -1787690217921|CPTextFieldMovementsTest| -1787690217934|CPTextFieldMultiline| -1787690217947|CPTextView| -1787690217960|CPTextViewCibTest| -1787690217973|CPTextViewDelegateAndNotifications| -1787690217986|CPTimeZone| -1787690217999|CPTokenFieldTest| -1787690218012|CPToolTip| -1787690218025|CPToolbarTest| -1787690218038|CPTreeControllerTest| -1787690218051|CPURLConnectionAsyncTest| -1787690218064|CPURLConnectionSynchronousTest| -1787690218077|CPUserDefaults| -1787690218089|CPUserDefaultsControllerTest| -1787690218102|CPUserNotificationTest| -1787690218115|CPViewController| -1787690218128|CPVisualEffectViewTest| -1787690218141|CPWebViewTest| -1787690218154|CPWebViewTest2| -1787690218167|CPWindowLiveResizeTest| -1787690218180|CPWindowMovableTest| -1787690218193|CPWindowResizeStyle| -1787690218206|ChildWindows| -1787690218218|CompilationTests| -1787690218231|ContinuouslyUpdatesValueBinding| -1787690218244|CopyAndPaste| -1787690218257|CrossOriginTest| -1787690218270|FF4096Test| -1787690218283|FontEnhancementTest| -1787690218296|FontMetricsExplorer| -1787690218309|KeyEquivalents| -1787690218322|KeyViewLoopTest| -1787690218335|KeyWindowInTheBackgroundActivation| -1787690218348|LayoutTest| -1787690218361|LoadTimeTest| -1787690218374|LongBindings| -1787690218386|MobileTest| -1787690218399|MultipleValueBindings| -1787690218412|NSBoxTest| -1787690218426|NSBrowserTest| -1787690218439|NewTextFieldBezel| -1787690218452|Nib2CibAlignment| -1787690218465|Nib2CibBaselineAlignementTest| -1787690218477|Nib2CibSubviewsOrderTest| -1787690218490|NibAppRemixed| -1787690218503|PatternFillTest| -1787690218516|PlatformWindows| -1787690218529|PopUpButtonEscTest| -1787690218542|ScalingTest| -1787690218555|ScalingTest2| -1787690218568|ScrollviewTheming| -1787690218581|SheetWindowOrderFrontIssue| -1787690218594|SimpleBindings2| -1787690218607|SmartFoldersDemo| -1787690218620|TableTest| -1787690218633|ThemeBrowser| -1787690218646|ThemeKitchenSink| -1787690218658|TrackingArea| -1787690218671|UndoRedoWithMenuUpdate| -1787690218684|UserlandNSTest| -1787690218697|layoutEphemeralSubviewTest| -1787690218710|loadDynamicFrameworks| -1787690218723|performKeyEquivalentTest| -1787690218736|predicateWithFormat| -1787690218749|resignFirstResponder-CPControlTextDidEndEditing| -1787690218762|sizeToFitFix| +1787761187068|ArrayController1| +1787761187083|ArrayControllerInitialSelectionTest| +1787761187097|ArrayControllerRemovingFirstTest| +1787761187110|AttachedSheet| +1787761187124|AttachedSheet2| +1787761187138|Bindings| +1787761187151|CGCanvasContext| +1787761187165|CGPath| +1787761187179|CPAlertTest| +1787761187193|CPAnimatablePropertyContainerTest| +1787761187206|CPAnimationContextTest| +1787761187220|CPAnimationTest| +1787761187234|CPBinder-echo-bug| +1787761187248|CPBoxCibTest| +1787761187261|CPBoxTest| +1787761187275|CPBrowserTest| +1787761187289|CPButtonBarTest| +1787761187303|CPButtonKeyEquivalentDefaultTest| +1787761187317|CPButtonTest| +1787761187331|CPByteCountFormatter| +1787761187345|CPCollectionViewNibTest| +1787761187359|CPColor-CPImage-description| +1787761187373|CPColorWellBindings| +1787761187387|CPComboBoxTest| +1787761187401|CPControlPerformClickExceptionTest| +1787761187415|CPControlSize| +1787761187429|CPCursor| +1787761187443|CPDateFormatterTest| +1787761187456|CPDatePickerTest| +1787761187470|CPDictionaryControllerTest| +1787761187484|CPDocumentControllerTest| +1787761187498|CPFormatterTest| +1787761187511|CPGraphicsTest| +1787761187525|CPImageAndTextViewImageScaling| +1787761187539|CPImageViewAlignmentScaling| +1787761187553|CPImageViewTest| +1787761187567|CPImageViewbindingsTest| +1787761187580|CPLevelIndicator| +1787761187594|CPLocalizationTest| +1787761187608|CPLogTest| +1787761187622|CPMarkdownParser| +1787761187635|CPMenuCALayerTest| +1787761187649|CPMenuEnabledBindingsTest| +1787761187663|CPMenuKeyEquivalents| +1787761187677|CPMenuRemoveAllTest| +1787761187691|CPMenuSubmenuPlacementConstraints| +1787761187705|CPMenuTest| +1787761187718|CPOutlineViewCibTest| +1787761187732|CPOutlineViewTest| +1787761187746|CPOutlineViewViewBasedCibTest| +1787761187760|CPPanelTest| +1787761187773|CPPlatformWindow| +1787761187787|CPPlattformWindowMinSize| +1787761187801|CPPopUpButtonBindings| +1787761187815|CPPopUpButtonTest| +1787761187828|CPPopover| +1787761187842|CPPredicateEditorCibTest| +1787761187856|CPProgressIndicator| +1787761187870|CPPropertyListSerializationTest| +1787761187883|CPRadioBindings| +1787761187897|CPRuleEditorCibTest| +1787761187911|CPRuleEditorTestI8N| +1787761187925|CPScrollView| +1787761187939|CPScrollView2| +1787761187952|CPSearchField| +1787761187966|CPSearchFieldPredicateBinding| +1787761187980|CPSegmentedControlBindings| +1787761187994|CPSegmentedControlTest| +1787761188007|CPSoundTest| +1787761188021|CPSplitViewDivider| +1787761188035|CPSplitViewTest| +1787761188049|CPStackViewTest| +1787761188063|CPStepperBindings| +1787761188077|CPStepperNibTest| +1787761188090|CPTabView2| +1787761188104|CPTabViewBindings| +1787761188118|CPTabViewNib| +1787761188131|CPTableViewGroupRows| +1787761188145|CPTextField| +1787761188159|CPTextFieldEditingStyleTest| +1787761188173|CPTextFieldHeightTest| +1787761188186|CPTextFieldMovementsTest| +1787761188200|CPTextFieldMultiline| +1787761188214|CPTextView| +1787761188228|CPTextViewCibTest| +1787761188242|CPTextViewDelegateAndNotifications| +1787761188255|CPTimeZone| +1787761188269|CPTokenFieldTest| +1787761188283|CPToolTip| +1787761188297|CPToolbarTest| +1787761188310|CPTreeControllerTest| +1787761188324|CPURLConnectionAsyncTest| +1787761188338|CPURLConnectionSynchronousTest| +1787761188351|CPUserDefaults| +1787761188365|CPUserDefaultsControllerTest| +1787761188379|CPUserNotificationTest| +1787761188392|CPViewController| +1787761188406|CPVisualEffectViewTest| +1787761188420|CPWebViewTest| +1787761188434|CPWebViewTest2| +1787761188447|CPWindowLiveResizeTest| +1787761188461|CPWindowMovableTest| +1787761188475|CPWindowResizeStyle| +1787761188489|ChildWindows| +1787761188502|CompilationTests| +1787761188516|ContinuouslyUpdatesValueBinding| +1787761188530|CopyAndPaste| +1787761188544|CrossOriginTest| +1787761188557|FF4096Test| +1787761188571|FontEnhancementTest| +1787761188585|FontMetricsExplorer| +1787761188599|KeyEquivalents| +1787761188613|KeyViewLoopTest| +1787761188626|KeyWindowInTheBackgroundActivation| +1787761188640|LayoutTest| +1787761188654|LoadTimeTest| +1787761188667|LongBindings| +1787761188681|MobileTest| +1787761188695|MultipleValueBindings| +1787761188709|NSBoxTest| +1787761188722|NSBrowserTest| +1787761188736|NewTextFieldBezel| +1787761188750|Nib2CibAlignment| +1787761188764|Nib2CibBaselineAlignementTest| +1787761188777|Nib2CibSubviewsOrderTest| +1787761188791|NibAppRemixed| +1787761188805|PatternFillTest| +1787761188818|PlatformWindows| +1787761188832|PopUpButtonEscTest| +1787761188846|ScalingTest| +1787761188860|ScalingTest2| +1787761188873|ScrollviewTheming| +1787761188887|SheetWindowOrderFrontIssue| +1787761188901|SimpleBindings2| +1787761188915|SmartFoldersDemo| +1787761188928|TableTest| +1787761188942|ThemeBrowser| +1787761188956|ThemeKitchenSink| +1787761188969|TrackingArea| +1787761188983|UndoRedoWithMenuUpdate| +1787761188997|UserlandNSTest| +1787761189011|layoutEphemeralSubviewTest| +1787761189024|loadDynamicFrameworks| +1787761189038|performKeyEquivalentTest| +1787761189052|predicateWithFormat| +1787761189066|resignFirstResponder-CPControlTextDidEndEditing| +1787761189079|sizeToFitFix|