PageRenderTime 42ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/Frameworks/AppKit/browser.platform/_CPBorderlessBridgeWindowView.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 36 lines | 36 code | 0 blank | 0 comment | 0 complexity | 76f1d115f1ae9d83db4bee7ad1bf611f MD5 | raw file
 1i;15;_CPWindowView.jc;1901;
 2var _1=nil;
 3var _2=objj_allocateClassPair(_CPWindowView,"_CPBorderlessBridgeWindowView"),_3=_2.isa;
 4class_addIvars(_2,[new objj_ivar("_toolbarBackgroundView")]);
 5objj_registerClassPair(_2);
 6objj_addClassForBundle(_2,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 7class_addMethods(_2,[new objj_method(sel_getUid("tile"),function(_4,_5){
 8with(_4){
 9objj_msgSendSuper({receiver:_4,super_class:objj_getClass("_CPWindowView")},"tile");
10var _6=objj_msgSend(_4,"window"),_7=objj_msgSend(_4,"bounds");
11objj_msgSend(objj_msgSend(_6,"contentView"),"setFrame:",CGRectMake(0,objj_msgSend(_4,"toolbarMaxY"),CGRectGetWidth(_7),CGRectGetHeight(_7)-objj_msgSend(_4,"toolbarMaxY")));
12if(!objj_msgSend(objj_msgSend(_6,"toolbar"),"isVisible")){
13objj_msgSend(_toolbarBackgroundView,"removeFromSuperview");
14_toolbarBackgroundView=nil;
15return;
16}
17if(!_toolbarBackgroundView){
18_toolbarBackgroundView=objj_msgSend(objj_msgSend(CPView,"alloc"),"initWithFrame:",CGRectMakeZero());
19objj_msgSend(_toolbarBackgroundView,"setBackgroundColor:",objj_msgSend(objj_msgSend(_4,"class"),"toolbarBackgroundColor"));
20objj_msgSend(_toolbarBackgroundView,"setAutoresizingMask:",CPViewWidthSizable);
21objj_msgSend(_4,"addSubview:positioned:relativeTo:",_toolbarBackgroundView,CPWindowBelow,nil);
22}
23var _8=CGRectMakeZero();
24_8.origin=CGPointMakeCopy(objj_msgSend(_4,"toolbarOffset"));
25_8.size=objj_msgSend(_toolbarView,"frame").size;
26objj_msgSend(_toolbarBackgroundView,"setFrame:",_8);
27}
28})]);
29class_addMethods(_3,[new objj_method(sel_getUid("toolbarBackgroundColor"),function(_9,_a){
30with(_9){
31if(!_1){
32_1=objj_msgSend(CPColor,"colorWithPatternImage:",objj_msgSend(objj_msgSend(CPImage,"alloc"),"initWithContentsOfFile:size:",objj_msgSend(objj_msgSend(CPBundle,"bundleForClass:",objj_msgSend(_CPBorderlessBridgeWindowView,"class")),"pathForResource:","_CPToolbarView/_CPToolbarViewBackground.png"),CGSizeMake(1,59)));
33}
34return _1;
35}
36})]);