Permalink
Browse files

adding in 0.8.1 source for autocompletion

  • Loading branch information...
1 parent 2edbbdd commit ddfc0cffe8a16de7ccab0f455b189986db1a757f @malkomalko committed May 14, 2010
Showing with 68,757 additions and 0 deletions.
  1. +169 −0 Support/source/AppController.j
  2. +87 −0 Support/source/AppKit.j
  3. +449 −0 Support/source/BKShowcaseController.j
  4. +221 −0 Support/source/BKThemeDescriptor.j
  5. +51 −0 Support/source/BKThemeTemplate.j
  6. +51 −0 Support/source/BKThemedObjectTemplate.j
  7. +26 −0 Support/source/BlendKit.j
  8. +257 −0 Support/source/CAAnimation.j
  9. +73 −0 Support/source/CABackingStore.j
  10. +50 −0 Support/source/CAFlashLayer.j
  11. +1,202 −0 Support/source/CALayer.j
  12. +102 −0 Support/source/CAMediaTimingFunction.j
  13. +152 −0 Support/source/CGAffineTransform.j
  14. +288 −0 Support/source/CGColor.j
  15. +240 −0 Support/source/CGColorSpace.j
  16. +705 −0 Support/source/CGContext.j
  17. +449 −0 Support/source/CGContextCanvas.j
  18. +320 −0 Support/source/CGContextVML.j
  19. +238 −0 Support/source/CGGeometry.j
  20. +58 −0 Support/source/CGGradient.j
  21. +397 −0 Support/source/CGPath.j
  22. +381 −0 Support/source/CPAccordionView.j
  23. +316 −0 Support/source/CPAlert.j
  24. +347 −0 Support/source/CPAnimation.j
  25. +1,237 −0 Support/source/CPApplication.j
  26. +511 −0 Support/source/CPArray+KVO.j
  27. +1,237 −0 Support/source/CPArray.j
  28. +859 −0 Support/source/CPAttributedString.j
  29. +291 −0 Support/source/CPBezierPath.j
  30. +245 −0 Support/source/CPBox.j
  31. +182 −0 Support/source/CPBundle.j
  32. +623 −0 Support/source/CPButton.j
  33. +71 −0 Support/source/CPButtonBar.j
  34. +64 −0 Support/source/CPCheckBox.j
  35. +197 −0 Support/source/CPCib.j
  36. +88 −0 Support/source/CPCibConnector.j
  37. +76 −0 Support/source/CPCibControlConnector.j
  38. +126 −0 Support/source/CPCibLoading.j
  39. +48 −0 Support/source/CPCibOutletConnector.j
  40. +228 −0 Support/source/CPClipView.j
  41. +160 −0 Support/source/CPCoder.j
  42. +861 −0 Support/source/CPCollectionView.j
  43. +85 −0 Support/source/CPCollectionViewItem.j
  44. +794 −0 Support/source/CPColor.j
  45. +663 −0 Support/source/CPColorPanel.j
  46. +379 −0 Support/source/CPColorPicker.j
  47. +308 −0 Support/source/CPColorWell.j
  48. +228 −0 Support/source/CPCompatibility.j
  49. +696 −0 Support/source/CPControl.j
  50. +114 −0 Support/source/CPCookie.j
  51. +109 −0 Support/source/CPCountedSet.j
  52. +272 −0 Support/source/CPCursor.j
  53. +128 −0 Support/source/CPDOMWindowLayer.j
  54. +190 −0 Support/source/CPData.j
  55. +214 −0 Support/source/CPDate.j
  56. +573 −0 Support/source/CPDictionary.j
  57. +929 −0 Support/source/CPDocument.j
  58. +457 −0 Support/source/CPDocumentController.j
  59. +449 −0 Support/source/CPDragServer.j
  60. +59 −0 Support/source/CPEnumerator.j
  61. +505 −0 Support/source/CPEvent.j
  62. +207 −0 Support/source/CPException.j
  63. +84 −0 Support/source/CPFlashMovie.j
  64. +204 −0 Support/source/CPFlashView.j
  65. +174 −0 Support/source/CPFont.j
  66. +174 −0 Support/source/CPFontManager.j
  67. +85 −0 Support/source/CPFunctionOperation.j
  68. +509 −0 Support/source/CPGeometry.j
  69. +84 −0 Support/source/CPGraphicsContext.j
  70. +522 −0 Support/source/CPImage.j
  71. +453 −0 Support/source/CPImageView.j
  72. +950 −0 Support/source/CPIndexSet.j
  73. +197 −0 Support/source/CPInvocation.j
  74. +107 −0 Support/source/CPInvocationOperation.j
  75. +142 −0 Support/source/CPJSONPConnection.j
  76. +281 −0 Support/source/CPKeyValueCoding.j
  77. +673 −0 Support/source/CPKeyValueObserving.j
  78. +602 −0 Support/source/CPKeyedArchiver.j
  79. +532 −0 Support/source/CPKeyedUnarchiver.j
  80. +1 −0 Support/source/CPLog.j
  81. +1,098 −0 Support/source/CPMenu.j
  82. +933 −0 Support/source/CPMenuItem.j
  83. +125 −0 Support/source/CPNotification.j
  84. +357 −0 Support/source/CPNotificationCenter.j
  85. +60 −0 Support/source/CPNull.j
  86. +336 −0 Support/source/CPNumber.j
  87. +69 −0 Support/source/CPObjJRuntime.j
  88. +537 −0 Support/source/CPObject.j
  89. +46 −0 Support/source/CPOpenPanel.j
  90. +293 −0 Support/source/CPOperation.j
  91. +293 −0 Support/source/CPOperationQueue.j
  92. +1,088 −0 Support/source/CPOutlineView.j
  93. +117 −0 Support/source/CPPanel.j
  94. +447 −0 Support/source/CPPasteboard.j
  95. +133 −0 Support/source/CPPlatform.j
  96. +141 −0 Support/source/CPPlatformString.j
  97. +1,423 −0 Support/source/CPPlatformWindow+DOM.j
  98. +231 −0 Support/source/CPPlatformWindow+DOMKeys.j
  99. +252 −0 Support/source/CPPlatformWindow.j
  100. +749 −0 Support/source/CPPopUpButton.j
  101. +469 −0 Support/source/CPProgressIndicator.j
  102. +64 −0 Support/source/CPPropertyListSerialization.j
  103. +161 −0 Support/source/CPProxy.j
  104. +259 −0 Support/source/CPRadio.j
  105. +175 −0 Support/source/CPRange.j
  106. +369 −0 Support/source/CPResponder.j
  107. +389 −0 Support/source/CPRunLoop.j
  108. +67 −0 Support/source/CPSavePanel.j
  109. +16 −0 Support/source/CPScreen.j
  110. +801 −0 Support/source/CPScrollView.j
  111. +638 −0 Support/source/CPScroller.j
  112. +714 −0 Support/source/CPSearchField.j
  113. +16 −0 Support/source/CPSecureTextField.j
  114. +950 −0 Support/source/CPSegmentedControl.j
  115. +513 −0 Support/source/CPSet.j
  116. +102 −0 Support/source/CPShadow.j
  117. +180 −0 Support/source/CPShadowView.j
  118. +456 −0 Support/source/CPSlider.j
  119. +432 −0 Support/source/CPSliderColorPicker.j
  120. +151 −0 Support/source/CPSortDescriptor.j
  121. +611 −0 Support/source/CPSplitView.j
  122. +753 −0 Support/source/CPString.j
  123. +48 −0 Support/source/CPStringDrawing.j
  124. +802 −0 Support/source/CPTabView.j
  125. +216 −0 Support/source/CPTabViewItem.j
  126. +466 −0 Support/source/CPTableColumn.j
  127. +499 −0 Support/source/CPTableHeaderView.j
  128. +3,403 −0 Support/source/CPTableView.j
  129. +1,157 −0 Support/source/CPTextField.j
  130. +588 −0 Support/source/CPTheme.j
  131. +79 −0 Support/source/CPThemeBlend.j
  132. +288 −0 Support/source/CPTimer.j
  133. +1,121 −0 Support/source/CPToolbar.j
  134. +636 −0 Support/source/CPToolbarItem.j
  135. +119 −0 Support/source/CPTreeNode.j
  136. +211 −0 Support/source/CPURL.j
  137. +295 −0 Support/source/CPURLConnection.j
  138. +158 −0 Support/source/CPURLRequest.j
  139. +92 −0 Support/source/CPURLResponse.j
  140. +801 −0 Support/source/CPUndoManager.j
  141. +98 −0 Support/source/CPUserSessionManager.j
  142. +114 −0 Support/source/CPValue.j
  143. +2,643 −0 Support/source/CPView.j
  144. +179 −0 Support/source/CPViewAnimation.j
  145. +243 −0 Support/source/CPViewController.j
  146. +214 −0 Support/source/CPWebDAVManager.j
  147. +620 −0 Support/source/CPWebView.j
  148. +2,628 −0 Support/source/CPWindow.j
  149. +453 −0 Support/source/CPWindowController.j
  150. +77 −0 Support/source/Foundation.j
  151. +907 −0 Support/source/ThemeDescriptors.j
  152. +83 −0 Support/source/_CPBorderlessBridgeWindowView.j
  153. +29 −0 Support/source/_CPBorderlessWindowView.j
  154. +76 −0 Support/source/_CPCibClassSwapper.j
  155. +72 −0 Support/source/_CPCibCustomObject.j
  156. +115 −0 Support/source/_CPCibCustomResource.j
  157. +128 −0 Support/source/_CPCibCustomView.j
  158. +57 −0 Support/source/_CPCibKeyedUnarchiver.j
  159. +291 −0 Support/source/_CPCibObjectData.j
  160. +33 −0 Support/source/_CPCibProxyObject.j
  161. +159 −0 Support/source/_CPCibWindowTemplate.j
  162. +47 −0 Support/source/_CPCornerView.j
  163. +111 −0 Support/source/_CPDisplayServer.j
  164. +50 −0 Support/source/_CPDocModalWindowView.j
  165. +214 −0 Support/source/_CPHUDWindowView.j
  166. +705 −0 Support/source/_CPImageAndTextView.j
  167. +556 −0 Support/source/_CPMenuBarWindow.j
  168. +235 −0 Support/source/_CPMenuItemMenuBarView.j
  169. +38 −0 Support/source/_CPMenuItemSeparatorView.j
  170. +300 −0 Support/source/_CPMenuItemStandardView.j
  171. +255 −0 Support/source/_CPMenuItemView.j
  172. +370 −0 Support/source/_CPMenuManager.j
  173. +548 −0 Support/source/_CPMenuWindow.j
  174. +408 −0 Support/source/_CPStandardWindowView.j
  175. +52 −0 Support/source/_CPToolbarFlexibleSpaceItem.j
  176. +52 −0 Support/source/_CPToolbarSeparatorItem.j
  177. +61 −0 Support/source/_CPToolbarShowColorsItem.j
  178. +52 −0 Support/source/_CPToolbarSpaceItem.j
  179. +373 −0 Support/source/_CPWindowView.j
  180. +235 −0 Support/source/blendtask.j
  181. +17 −0 Support/source/main.j
@@ -0,0 +1,169 @@
+/*
+ * AppController.j
+ *
+ * Created by __Me__ on __Date__.
+ * Copyright 2008 __MyCompanyName__. All rights reserved.
+ */
+
+@import <Foundation/CPObject.j>
+@import <AppKit/_CPCibCustomResource.j>
+
+
+@implementation AppController : CPObject
+{
+}
+
+- (CPArray)themeNames
+{
+ return ["Default"];
+}
+
+- (void)viewsForDefaultTheme
+{
+ var views = [],
+ bundle = [CPBundle mainBundle];
+
+ // Horizontal Slider
+
+ var horizontalTrackColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:
+ [
+ [_CPCibCustomResource imageResourceWithName:"horizontal-track-left.png" size:CPSizeMake(2.0, 4.0)],
+ [_CPCibCustomResource imageResourceWithName:"horizontal-track-center.png" size:CPSizeMake(1.0, 4.0)],
+ [_CPCibCustomResource imageResourceWithName:"horizontal-track-right.png" size:CPSizeMake(2.0, 4.0)]
+ ]
+ isVertical:NO]];
+
+ var horizontalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 24.0)];
+
+ [horizontalSlider setTrackWidth:4.0];
+ [horizontalSlider setHorizontalTrackColor:horizontalTrackColor];
+
+ var knobColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"knob.png" size:CPSizeMake(11.0, 11.0)]];
+ knobHighlightedColor = [CPColor colorWithPatternImage:[_CPCibCustomResource imageResourceWithName:"knob-highlighted.png" size:CPSizeMake(12.0, 12.0)]];
+
+ [horizontalSlider setKnobSize:CGSizeMake(12.0, 12.0)];
+ [horizontalSlider setKnobColor:knobColor];
+ [horizontalSlider setKnobColor:knobHighlightedColor forControlState:CPControlStateHighlighted];
+
+ views.push(horizontalSlider);
+
+ // Vertical Slider
+
+ var verticalTrackColor = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:
+ [
+ [_CPCibCustomResource imageResourceWithName:"vertical-track-top.png" size:CPSizeMake(4.0, 2.0)],
+ [_CPCibCustomResource imageResourceWithName:"vertical-track-center.png" size:CPSizeMake(4.0, 1.0)],
+ [_CPCibCustomResource imageResourceWithName:"vertical-track-bottom.png" size:CPSizeMake(4.0, 2.0)]
+ ]
+ isVertical:YES]];
+
+ var verticalSlider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 24.0, 50.0)];
+
+ [verticalSlider setTrackWidth:4];
+ [verticalSlider setVerticalTrackColor:verticalTrackColor];
+
+ [verticalSlider setKnobSize:CGSizeMake(12.0, 12.0)];
+ [verticalSlider setKnobColor:knobColor];
+ [verticalSlider setKnobColor:knobHighlightedColor forControlState:CPControlStateHighlighted];
+
+ views.push(verticalSlider);
+
+ return views;
+}
+
+- (void)applicationDidFinishLaunching:(CPNotification)aNotification
+{
+ var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
+ contentView = [theWindow contentView],
+ bounds = [contentView bounds],
+ themeNames = [self themeNames],
+ index = 0,
+ count = themeNames.length;
+
+ var tabView = [[CPTabView alloc] initWithFrame:bounds];
+
+ [tabView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
+
+ [contentView addSubview:tabView];
+
+ for (; index < count; ++index)
+ {
+ var item = [[CPTabViewItem alloc] initWithIdentifier:themeNames[index]],
+ selectorName = "viewsFor" + themeNames[index] + "Theme",
+ views = [self performSelector:selectorName],
+ viewsCount = [views count],
+ itemSize = CGSizeMake(0.0, 0.0);
+
+ while (viewsCount--)
+ {
+ var size = [views[viewsCount] frame].size;
+
+ if (size.width > itemSize.width)
+ itemSize.width = size.width;
+
+ if (size.height > itemSize.height)
+ itemSize.height = size.height;
+ }
+
+ itemSize.height += 30;
+ itemSize.width += 40;
+
+ var collectionView = [[CPCollectionView alloc] initWithFrame:CGRectMakeZero()],
+ collectionViewItem = [[CPCollectionViewItem alloc] init];
+
+ [collectionViewItem setView:[[ThemedView alloc] init]];
+
+ [collectionView setItemPrototype:collectionViewItem];
+ [collectionView setMinItemSize:itemSize];
+ [collectionView setMaxItemSize:itemSize];
+ [collectionView setVerticalMargin:5.0];
+ [collectionView setContent:views];
+
+ [item setLabel:themeNames[index]];
+ [item setView:collectionView];
+
+ [tabView addTabViewItem:item];
+ }
+
+ [theWindow orderFront:self];
+}
+
+@end
+
+@implementation ThemedView : CPView
+{
+ CPView _view;
+ CPTextField _label;
+}
+
+- (void)setRepresentedObject:(id)anObject
+{
+ if (!_label)
+ {
+ _label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
+
+ [_label setAlignment:CPCenterTextAlignment];
+ [_label setAutoresizingMask:CPViewMinYMargin | CPViewWidthSizable];
+ [_label setFont:[CPFont boldSystemFontOfSize:12.0]];
+
+ [self addSubview:_label];
+ }
+
+ [_label setStringValue:[anObject className]];
+ [_label sizeToFit];
+
+ [_label setFrame:CGRectMake(0.0, CGRectGetHeight([self bounds]) - CGRectGetHeight([_label frame]),
+ CGRectGetWidth([self bounds]), CGRectGetHeight([_label frame]))];
+
+ if (_view)
+ [_view removeFromSuperview];
+
+ _view = anObject;
+
+ [_view setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin];
+ [_view setFrameOrigin:CGPointMake((CGRectGetWidth([self bounds]) - CGRectGetWidth([_view frame])) / 2.0, (CGRectGetMinY([_label frame]) - CGRectGetHeight([_view frame])) / 2.0)];
+
+ [self addSubview:_view];
+}
+
+@end
View
@@ -0,0 +1,87 @@
+/*
+ * AppKit.j
+ * AppKit
+ *
+ * Created by Francisco Tolmasky.
+ * Copyright 2008, 280 North, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+@import "CALayer.j"
+@import "CPAlert.j"
+@import "CPAnimation.j"
+@import "CPApplication.j"
+@import "CPBezierPath.j"
+@import "CPBox.j"
+@import "CPButton.j"
+@import "CPButtonBar.j"
+@import "CPCheckBox.j"
+@import "CPCib.j"
+@import "CPCibConnector.j"
+@import "CPCibControlConnector.j"
+@import "CPCibLoading.j"
+@import "CPCibOutletConnector.j"
+@import "CPClipView.j"
+@import "CPCollectionViewItem.j"
+@import "CPCollectionView.j"
+@import "CPColor.j"
+@import "CPColorPanel.j"
+@import "CPColorWell.j"
+@import "CPCompatibility.j"
+@import "CPControl.j"
+@import "CPCookie.j"
+@import "CPCursor.j"
+@import "CPDocument.j"
+@import "CPDocumentController.j"
+@import "CPEvent.j"
+@import "CPFlashMovie.j"
+@import "CPFlashView.j"
+@import "CPFont.j"
+@import "CPFontManager.j"
+@import "CPGeometry.j"
+@import "CPImage.j"
+@import "CPImageView.j"
+@import "CPMenu.j"
+@import "CPMenuItem.j"
+@import "CPOpenPanel.j"
+@import "CPOutlineView.j"
+@import "CPPanel.j"
+@import "CPPasteboard.j"
+@import "CPPopUpButton.j"
+@import "CPProgressIndicator.j"
+@import "CPRadio.j"
+@import "CPResponder.j"
+@import "CPSearchField.j"
+@import "CPScrollView.j"
+@import "CPScroller.j"
+@import "CPSecureTextField.j"
+@import "CPSegmentedControl.j"
+@import "CPShadow.j"
+@import "CPSlider.j"
+@import "CPSplitView.j"
+@import "CPTabView.j"
+@import "CPTableColumn.j"
+@import "CPTableView.j"
+@import "CPTextField.j"
+@import "CPToolbar.j"
+@import "CPToolbarItem.j"
+@import "CPTreeNode.j"
+@import "CPView.j"
+@import "CPViewAnimation.j"
+@import "CPViewController.j"
+@import "CPWebView.j"
+@import "CPWindow.j"
+@import "CPWindowController.j"
Oops, something went wrong.

0 comments on commit ddfc0cf

Please sign in to comment.