/Frameworks/AppKit/browser.platform/CPColorPanel.j

http://github.com/jfahrenkrug/MapKit-HelloWorld · Unknown · 366 lines · 366 code · 0 blank · 0 comment · 0 complexity · 58bd868c0eae64b03eeac7186f647c1f MD5 · raw file

  1. i;10;CPButton.ji;10;CPCookie.ji;9;CPPanel.ji;8;CPView.jc;16235;
  2. CPColorPanelColorDidChangeNotification="CPColorPanelColorDidChangeNotification";
  3. var _1=20,_2=32,_3=14,_4=32,_5=12;
  4. var _6=nil,_7=[];
  5. CPWheelColorPickerMode=1;
  6. CPSliderColorPickerMode=2;
  7. CPColorPickerViewWidth=265,CPColorPickerViewHeight=370;
  8. var _8=objj_allocateClassPair(CPPanel,"CPColorPanel"),_9=_8.isa;
  9. class_addIvars(_8,[new objj_ivar("_toolbar"),new objj_ivar("_swatchView"),new objj_ivar("_previewView"),new objj_ivar("_opacitySlider"),new objj_ivar("_colorPickers"),new objj_ivar("_currentView"),new objj_ivar("_activePicker"),new objj_ivar("_color"),new objj_ivar("_target"),new objj_ivar("_action"),new objj_ivar("_mode")]);
  10. objj_registerClassPair(_8);
  11. objj_addClassForBundle(_8,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  12. class_addMethods(_8,[new objj_method(sel_getUid("init"),function(_a,_b){
  13. with(_a){
  14. _a=objj_msgSendSuper({receiver:_a,super_class:objj_getClass("CPPanel")},"initWithContentRect:styleMask:",CGRectMake(500,50,219,370),(CPTitledWindowMask|CPClosableWindowMask|CPResizableWindowMask));
  15. if(_a){
  16. objj_msgSend(objj_msgSend(_a,"contentView"),"setBackgroundColor:",objj_msgSend(CPColor,"colorWithWhite:alpha:",0.95,1));
  17. objj_msgSend(_a,"setTitle:","Color Panel");
  18. objj_msgSend(_a,"setLevel:",CPFloatingWindowLevel);
  19. objj_msgSend(_a,"setFloatingPanel:",YES);
  20. objj_msgSend(_a,"setBecomesKeyOnlyIfNeeded:",YES);
  21. objj_msgSend(_a,"setMinSize:",CGSizeMake(219,342));
  22. objj_msgSend(_a,"setMaxSize:",CGSizeMake(323,537));
  23. }
  24. return _a;
  25. }
  26. }),new objj_method(sel_getUid("setColor:"),function(_c,_d,_e){
  27. with(_c){
  28. _color=_e;
  29. objj_msgSend(_previewView,"setBackgroundColor:",_color);
  30. objj_msgSend(CPApp,"sendAction:to:from:",sel_getUid("changeColor:"),nil,_c);
  31. if(_target&&_action){
  32. objj_msgSend(CPApp,"sendAction:to:from:",_action,_target,_c);
  33. }
  34. objj_msgSend(objj_msgSend(CPNotificationCenter,"defaultCenter"),"postNotificationName:object:",CPColorPanelColorDidChangeNotification,_c);
  35. objj_msgSend(_activePicker,"setColor:",_color);
  36. objj_msgSend(_opacitySlider,"setFloatValue:",objj_msgSend(_color,"alphaComponent"));
  37. }
  38. }),new objj_method(sel_getUid("setColor:updatePicker:"),function(_f,_10,_11,_12){
  39. with(_f){
  40. objj_msgSend(_f,"setColor:",_11);
  41. if(_12){
  42. objj_msgSend(_activePicker,"setColor:",_color);
  43. }
  44. }
  45. }),new objj_method(sel_getUid("color"),function(_13,_14){
  46. with(_13){
  47. return _color;
  48. }
  49. }),new objj_method(sel_getUid("opacity"),function(_15,_16){
  50. with(_15){
  51. return objj_msgSend(_opacitySlider,"floatValue");
  52. }
  53. }),new objj_method(sel_getUid("setTarget:"),function(_17,_18,_19){
  54. with(_17){
  55. _target=_19;
  56. }
  57. }),new objj_method(sel_getUid("target"),function(_1a,_1b){
  58. with(_1a){
  59. return _target;
  60. }
  61. }),new objj_method(sel_getUid("setAction:"),function(_1c,_1d,_1e){
  62. with(_1c){
  63. _action=_1e;
  64. }
  65. }),new objj_method(sel_getUid("action"),function(_1f,_20){
  66. with(_1f){
  67. return _action;
  68. }
  69. }),new objj_method(sel_getUid("setMode:"),function(_21,_22,_23){
  70. with(_21){
  71. _mode=_23;
  72. }
  73. }),new objj_method(sel_getUid("_setPicker:"),function(_24,_25,_26){
  74. with(_24){
  75. var _27=_colorPickers[objj_msgSend(_26,"tag")],_28=objj_msgSend(_27,"provideNewView:",NO);
  76. if(!_28){
  77. _28=objj_msgSend(_27,"provideNewView:",YES);
  78. }
  79. if(_28==_currentView){
  80. return;
  81. }
  82. if(_currentView){
  83. objj_msgSend(_28,"setFrame:",objj_msgSend(_currentView,"frame"));
  84. }else{
  85. var _29=(_2+10+_1+5+_3+32),_2a=objj_msgSend(objj_msgSend(_24,"contentView"),"bounds");
  86. objj_msgSend(_28,"setFrameSize:",CPSizeMake(_2a.size.width-10,_2a.size.height-_29));
  87. objj_msgSend(_28,"setFrameOrigin:",CPPointMake(5,_29));
  88. }
  89. objj_msgSend(_currentView,"removeFromSuperview");
  90. objj_msgSend(objj_msgSend(_24,"contentView"),"addSubview:",_28);
  91. _currentView=_28;
  92. _activePicker=_27;
  93. objj_msgSend(_27,"setColor:",objj_msgSend(_24,"color"));
  94. }
  95. }),new objj_method(sel_getUid("mode"),function(_2b,_2c){
  96. with(_2b){
  97. return _mode;
  98. }
  99. }),new objj_method(sel_getUid("orderFront:"),function(_2d,_2e,_2f){
  100. with(_2d){
  101. objj_msgSend(_2d,"_loadContentsIfNecessary");
  102. objj_msgSendSuper({receiver:_2d,super_class:objj_getClass("CPPanel")},"orderFront:",_2f);
  103. }
  104. }),new objj_method(sel_getUid("_loadContentsIfNecessary"),function(_30,_31){
  105. with(_30){
  106. if(_toolbar){
  107. return;
  108. }
  109. if(!_color){
  110. _color=objj_msgSend(CPColor,"whiteColor");
  111. }
  112. _colorPickers=[];
  113. var _32=objj_msgSend(_7,"count");
  114. for(var i=0;i<_32;i++){
  115. var _34=_7[i],_35=objj_msgSend(objj_msgSend(_34,"alloc"),"initWithPickerMask:colorPanel:",0,_30);
  116. _colorPickers.push(_35);
  117. }
  118. var _36=objj_msgSend(_30,"contentView"),_37=objj_msgSend(_36,"bounds");
  119. _toolbar=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CGRectMake(0,6,CGRectGetWidth(_37),_2));
  120. objj_msgSend(_toolbar,"setAutoresizingMask:",CPViewWidthSizable);
  121. var _38=_32*_4+(_32-1)*_5,_39=(CGRectGetWidth(_37)-_38)/2,_3a=nil;
  122. for(var i=0;i<_32;i++){
  123. var _3b=objj_msgSend(_colorPickers[i],"provideNewButtonImage"),_3c=objj_msgSend(_colorPickers[i],"provideNewAlternateButtonImage"),_3d=objj_msgSend(objj_msgSend(CPButton,"alloc"),"initWithFrame:",CGRectMake(_39+i*(_4+_5),0,_4,_4));
  124. objj_msgSend(_3d,"setTag:",i);
  125. objj_msgSend(_3d,"setTarget:",_30);
  126. objj_msgSend(_3d,"setAction:",sel_getUid("_setPicker:"));
  127. objj_msgSend(_3d,"setBordered:",NO);
  128. objj_msgSend(_3d,"setAutoresizingMask:",CPViewMinXMargin|CPViewMaxXMargin);
  129. objj_msgSend(_3d,"setImage:",_3b);
  130. objj_msgSend(_3d,"setAlternateImage:",_3c);
  131. objj_msgSend(_toolbar,"addSubview:",_3d);
  132. if(!_3a){
  133. _3a=_3d;
  134. }
  135. }
  136. var _3e=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CGRectMake(76,_2+10,CGRectGetWidth(_37)-86,_1));
  137. _previewView=objj_msgSend(objj_msgSend(_CPColorPanelPreview,"alloc"),"initWithFrame:",CGRectInset(objj_msgSend(_3e,"bounds"),2,2));
  138. objj_msgSend(_previewView,"setColorPanel:",_30);
  139. objj_msgSend(_previewView,"setAutoresizingMask:",CPViewWidthSizable);
  140. objj_msgSend(_3e,"setBackgroundColor:",objj_msgSend(CPColor,"colorWithWhite:alpha:",0.8,1));
  141. objj_msgSend(_3e,"setAutoresizingMask:",CPViewWidthSizable);
  142. objj_msgSend(_3e,"addSubview:",_previewView);
  143. var _3f=objj_msgSend(objj_msgSend(CPTextField,"alloc"),"initWithFrame:",CPRectMake(10,_2+10,60,15));
  144. objj_msgSend(_3f,"setStringValue:","Preview:");
  145. objj_msgSend(_3f,"setTextColor:",objj_msgSend(CPColor,"blackColor"));
  146. objj_msgSend(_3f,"setAlignment:",CPRightTextAlignment);
  147. var _40=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CGRectMake(76,_2+10+_1+5,CGRectGetWidth(_37)-86,_3+2));
  148. objj_msgSend(_40,"setBackgroundColor:",objj_msgSend(CPColor,"colorWithWhite:alpha:",0.8,1));
  149. objj_msgSend(_40,"setAutoresizingMask:",CPViewWidthSizable);
  150. _swatchView=objj_msgSend(objj_msgSend(_CPColorPanelSwatches,"alloc"),"initWithFrame:",CGRectInset(objj_msgSend(_40,"bounds"),1,1));
  151. objj_msgSend(_swatchView,"setColorPanel:",_30);
  152. objj_msgSend(_swatchView,"setAutoresizingMask:",CPViewWidthSizable);
  153. objj_msgSend(_40,"addSubview:",_swatchView);
  154. var _41=objj_msgSend(objj_msgSend(CPTextField,"alloc"),"initWithFrame:",CPRectMake(10,_2+8+_1+6,60,15));
  155. objj_msgSend(_41,"setStringValue:","Swatches:");
  156. objj_msgSend(_41,"setTextColor:",objj_msgSend(CPColor,"blackColor"));
  157. objj_msgSend(_41,"setAlignment:",CPRightTextAlignment);
  158. var _42=objj_msgSend(objj_msgSend(CPTextField,"alloc"),"initWithFrame:",CPRectMake(10,_2+_1+35,60,20));
  159. objj_msgSend(_42,"setStringValue:","Opacity:");
  160. objj_msgSend(_42,"setTextColor:",objj_msgSend(CPColor,"blackColor"));
  161. objj_msgSend(_42,"setAlignment:",CPRightTextAlignment);
  162. _opacitySlider=objj_msgSend(objj_msgSend(CPSlider,"alloc"),"initWithFrame:",CGRectMake(76,_2+_1+34,CGRectGetWidth(_37)-86,20));
  163. objj_msgSend(_opacitySlider,"setMinValue:",0);
  164. objj_msgSend(_opacitySlider,"setMaxValue:",1);
  165. objj_msgSend(_opacitySlider,"setTarget:",_30);
  166. objj_msgSend(_opacitySlider,"setAction:",sel_getUid("setOpacity:"));
  167. objj_msgSend(_36,"addSubview:",_toolbar);
  168. objj_msgSend(_36,"addSubview:",_3e);
  169. objj_msgSend(_36,"addSubview:",_3f);
  170. objj_msgSend(_36,"addSubview:",_40);
  171. objj_msgSend(_36,"addSubview:",_41);
  172. objj_msgSend(_36,"addSubview:",_42);
  173. objj_msgSend(_36,"addSubview:",_opacitySlider);
  174. _target=nil;
  175. _action=nil;
  176. _activePicker=nil;
  177. objj_msgSend(_previewView,"setBackgroundColor:",_color);
  178. if(_3a){
  179. objj_msgSend(_30,"_setPicker:",_3a);
  180. }
  181. }
  182. }),new objj_method(sel_getUid("setOpacity:"),function(_43,_44,_45){
  183. with(_43){
  184. var _46=objj_msgSend(objj_msgSend(_43,"color"),"components"),_47=objj_msgSend(_45,"floatValue");
  185. objj_msgSend(_43,"setColor:updatePicker:",objj_msgSend(_color,"colorWithAlphaComponent:",_47),YES);
  186. }
  187. })]);
  188. class_addMethods(_9,[new objj_method(sel_getUid("provideColorPickerClass:"),function(_48,_49,_4a){
  189. with(_48){
  190. _7.push(_4a);
  191. }
  192. }),new objj_method(sel_getUid("sharedColorPanel"),function(_4b,_4c){
  193. with(_4b){
  194. if(!_6){
  195. _6=objj_msgSend(objj_msgSend(CPColorPanel,"alloc"),"init");
  196. }
  197. return _6;
  198. }
  199. }),new objj_method(sel_getUid("setPickerMode:"),function(_4d,_4e,_4f){
  200. with(_4d){
  201. var _50=objj_msgSend(CPColorPanel,"sharedColorPanel");
  202. objj_msgSend(_50,"setMode:",_4f);
  203. }
  204. })]);
  205. CPColorDragType="CPColorDragType";
  206. var _51="CPColorPanelSwatchesCookie";
  207. var _8=objj_allocateClassPair(CPView,"_CPColorPanelSwatches"),_9=_8.isa;
  208. class_addIvars(_8,[new objj_ivar("_swatches"),new objj_ivar("_dragColor"),new objj_ivar("_colorPanel"),new objj_ivar("_swatchCookie")]);
  209. objj_registerClassPair(_8);
  210. objj_addClassForBundle(_8,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  211. class_addMethods(_8,[new objj_method(sel_getUid("initWithFrame:"),function(_52,_53,_54){
  212. with(_52){
  213. _52=objj_msgSendSuper({receiver:_52,super_class:objj_getClass("CPView")},"initWithFrame:",_54);
  214. objj_msgSend(_52,"setBackgroundColor:",objj_msgSend(CPColor,"grayColor"));
  215. objj_msgSend(_52,"registerForDraggedTypes:",objj_msgSend(CPArray,"arrayWithObjects:",CPColorDragType));
  216. var _55=objj_msgSend(CPColor,"whiteColor");
  217. _swatchCookie=objj_msgSend(objj_msgSend(CPCookie,"alloc"),"initWithName:",_51);
  218. var _56=objj_msgSend(_52,"startingColorList");
  219. _swatches=[];
  220. for(var i=0;i<50;i++){
  221. var _58=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CPRectMake(13*i+1,1,12,12)),_59=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CGRectInset(objj_msgSend(_58,"bounds"),1,1));
  222. objj_msgSend(_58,"setBackgroundColor:",_55);
  223. objj_msgSend(_59,"setBackgroundColor:",(i<_56.length)?_56[i]:_55);
  224. objj_msgSend(_58,"addSubview:",_59);
  225. objj_msgSend(_52,"addSubview:",_58);
  226. _swatches.push(_58);
  227. }
  228. return _52;
  229. }
  230. }),new objj_method(sel_getUid("isOpaque"),function(_5a,_5b){
  231. with(_5a){
  232. return YES;
  233. }
  234. }),new objj_method(sel_getUid("startingColorList"),function(_5c,_5d){
  235. with(_5c){
  236. var _5e=objj_msgSend(_swatchCookie,"value");
  237. if(_5e==""){
  238. return [objj_msgSend(CPColor,"blackColor"),objj_msgSend(CPColor,"darkGrayColor"),objj_msgSend(CPColor,"grayColor"),objj_msgSend(CPColor,"lightGrayColor"),objj_msgSend(CPColor,"whiteColor"),objj_msgSend(CPColor,"redColor"),objj_msgSend(CPColor,"greenColor"),objj_msgSend(CPColor,"blueColor"),objj_msgSend(CPColor,"yellowColor")];
  239. }
  240. var _5e=eval(_5e);
  241. var _5f=[];
  242. for(var i=0;i<_5e.length;i++){
  243. _5f.push(objj_msgSend(CPColor,"colorWithHexString:",_5e[i]));
  244. }
  245. return _5f;
  246. }
  247. }),new objj_method(sel_getUid("saveColorList"),function(_61,_62){
  248. with(_61){
  249. var _63=[];
  250. for(var i=0;i<_swatches.length;i++){
  251. _63.push(objj_msgSend(objj_msgSend(objj_msgSend(_swatches[i],"subviews")[0],"backgroundColor"),"hexString"));
  252. }
  253. var _65=new Date();
  254. _65.setYear(2019);
  255. objj_msgSend(_swatchCookie,"setValue:expires:domain:",CPJSObjectCreateJSON(_63),_65,nil);
  256. }
  257. }),new objj_method(sel_getUid("setColorPanel:"),function(_66,_67,_68){
  258. with(_66){
  259. _colorPanel=_68;
  260. }
  261. }),new objj_method(sel_getUid("colorPanel"),function(_69,_6a){
  262. with(_69){
  263. return _colorPanel;
  264. }
  265. }),new objj_method(sel_getUid("colorAtIndex:"),function(_6b,_6c,_6d){
  266. with(_6b){
  267. return objj_msgSend(objj_msgSend(_swatches[_6d],"subviews")[0],"backgroundColor");
  268. }
  269. }),new objj_method(sel_getUid("setColor:atIndex:"),function(_6e,_6f,_70,_71){
  270. with(_6e){
  271. objj_msgSend(objj_msgSend(_swatches[_71],"subviews")[0],"setBackgroundColor:",_70);
  272. objj_msgSend(_6e,"saveColorList");
  273. }
  274. }),new objj_method(sel_getUid("mouseUp:"),function(_72,_73,_74){
  275. with(_72){
  276. var _75=objj_msgSend(_72,"convertPoint:fromView:",objj_msgSend(_74,"locationInWindow"),nil);
  277. if(_75.x>objj_msgSend(_72,"bounds").size.width-1||_75.x<1){
  278. return NO;
  279. }
  280. objj_msgSend(_colorPanel,"setColor:updatePicker:",objj_msgSend(_72,"colorAtIndex:",FLOOR(_75.x/13)),YES);
  281. }
  282. }),new objj_method(sel_getUid("mouseDragged:"),function(_76,_77,_78){
  283. with(_76){
  284. var _79=objj_msgSend(_76,"convertPoint:fromView:",objj_msgSend(_78,"locationInWindow"),nil);
  285. if(_79.x>objj_msgSend(_76,"bounds").size.width-1||_79.x<1){
  286. return NO;
  287. }
  288. objj_msgSend(objj_msgSend(CPPasteboard,"pasteboardWithName:",CPDragPboard),"declareTypes:owner:",objj_msgSend(CPArray,"arrayWithObject:",CPColorDragType),_76);
  289. var _7a=_swatches[FLOOR(_79.x/13)];
  290. _dragColor=objj_msgSend(objj_msgSend(_7a,"subviews")[0],"backgroundColor");
  291. var _7b=CPRectCreateCopy(objj_msgSend(_7a,"bounds"));
  292. var _7c=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",_7b);
  293. dragFillView=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CGRectInset(_7b,1,1));
  294. objj_msgSend(_7c,"setBackgroundColor:",objj_msgSend(CPColor,"blackColor"));
  295. objj_msgSend(dragFillView,"setBackgroundColor:",_dragColor);
  296. objj_msgSend(_7c,"addSubview:",dragFillView);
  297. objj_msgSend(_76,"dragView:at:offset:event:pasteboard:source:slideBack:",_7c,CPPointMake(_79.x-_7b.size.width/2,_79.y-_7b.size.height/2),CPPointMake(0,0),_78,nil,_76,YES);
  298. }
  299. }),new objj_method(sel_getUid("pasteboard:provideDataForType:"),function(_7d,_7e,_7f,_80){
  300. with(_7d){
  301. if(_80==CPColorDragType){
  302. objj_msgSend(_7f,"setData:forType:",_dragColor,_80);
  303. }
  304. }
  305. }),new objj_method(sel_getUid("performDragOperation:"),function(_81,_82,_83){
  306. with(_81){
  307. var _84=objj_msgSend(_81,"convertPoint:fromView:",objj_msgSend(_83,"draggingLocation"),nil),_85=objj_msgSend(_83,"draggingPasteboard"),_86=nil;
  308. if(!objj_msgSend(_85,"availableTypeFromArray:",[CPColorDragType])||_84.x>objj_msgSend(_81,"bounds").size.width-1||_84.x<1){
  309. return NO;
  310. }
  311. objj_msgSend(_81,"setColor:atIndex:",objj_msgSend(_85,"dataForType:",CPColorDragType),FLOOR(_84.x/13));
  312. }
  313. })]);
  314. var _8=objj_allocateClassPair(CPView,"_CPColorPanelPreview"),_9=_8.isa;
  315. class_addIvars(_8,[new objj_ivar("_colorPanel")]);
  316. objj_registerClassPair(_8);
  317. objj_addClassForBundle(_8,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  318. class_addMethods(_8,[new objj_method(sel_getUid("initWithFrame:"),function(_87,_88,_89){
  319. with(_87){
  320. _87=objj_msgSendSuper({receiver:_87,super_class:objj_getClass("CPView")},"initWithFrame:",_89);
  321. objj_msgSend(_87,"registerForDraggedTypes:",objj_msgSend(CPArray,"arrayWithObjects:",CPColorDragType));
  322. return _87;
  323. }
  324. }),new objj_method(sel_getUid("setColorPanel:"),function(_8a,_8b,_8c){
  325. with(_8a){
  326. _colorPanel=_8c;
  327. }
  328. }),new objj_method(sel_getUid("colorPanel"),function(_8d,_8e){
  329. with(_8d){
  330. return _colorPanel;
  331. }
  332. }),new objj_method(sel_getUid("performDragOperation:"),function(_8f,_90,_91){
  333. with(_8f){
  334. var _92=objj_msgSend(_91,"draggingPasteboard");
  335. if(!objj_msgSend(_92,"availableTypeFromArray:",[CPColorDragType])){
  336. return NO;
  337. }
  338. var _93=objj_msgSend(_92,"dataForType:",CPColorDragType);
  339. objj_msgSend(_colorPanel,"setColor:updatePicker:",_93,YES);
  340. }
  341. }),new objj_method(sel_getUid("isOpaque"),function(_94,_95){
  342. with(_94){
  343. return YES;
  344. }
  345. }),new objj_method(sel_getUid("mouseDragged:"),function(_96,_97,_98){
  346. with(_96){
  347. var _99=objj_msgSend(_96,"convertPoint:fromView:",objj_msgSend(_98,"locationInWindow"),nil);
  348. objj_msgSend(objj_msgSend(CPPasteboard,"pasteboardWithName:",CPDragPboard),"declareTypes:owner:",objj_msgSend(CPArray,"arrayWithObject:",CPColorDragType),_96);
  349. var _9a=CPRectMake(0,0,15,15);
  350. var _9b=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",_9a);
  351. dragFillView=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CGRectInset(_9a,1,1));
  352. objj_msgSend(_9b,"setBackgroundColor:",objj_msgSend(CPColor,"blackColor"));
  353. objj_msgSend(dragFillView,"setBackgroundColor:",objj_msgSend(_96,"backgroundColor"));
  354. objj_msgSend(_9b,"addSubview:",dragFillView);
  355. objj_msgSend(_96,"dragView:at:offset:event:pasteboard:source:slideBack:",_9b,CPPointMake(_99.x-_9a.size.width/2,_99.y-_9a.size.height/2),CPPointMake(0,0),_98,nil,_96,YES);
  356. }
  357. }),new objj_method(sel_getUid("pasteboard:provideDataForType:"),function(_9c,_9d,_9e,_9f){
  358. with(_9c){
  359. if(_9f==CPColorDragType){
  360. objj_msgSend(_9e,"setData:forType:",objj_msgSend(_9c,"backgroundColor"),_9f);
  361. }
  362. }
  363. })]);
  364. i;15;CPColorPicker.ji;21;CPSliderColorPicker.jc;155;
  365. objj_msgSend(CPColorPanel,"provideColorPickerClass:",CPColorWheelColorPicker);
  366. objj_msgSend(CPColorPanel,"provideColorPickerClass:",CPSliderColorPicker);