PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Frameworks/AppKit/browser.platform/_CPCibWindowTemplate.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 68 lines | 68 code | 0 blank | 0 comment | 0 complexity | cf97115dec0dbab7547e60c3e233c12c MD5 | raw file
 1I;21;Foundation/CPObject.jc;3174;
 2var _1="_CPCibWindowTemplateMinSizeKey",_2="_CPCibWindowTemplateMaxSizeKey",_3="_CPCibWindowTemplateViewClassKey",_4="_CPCibWindowTemplateWindowClassKey",_5="_CPCibWindowTemplateWindowRectKey",_6="_CPCibWindowTempatStyleMaskKey",_7="_CPCibWindowTemplateWindowTitleKey",_8="_CPCibWindowTemplateWindowViewKey",_9="_CPCibWindowTemplateWindowIsFullBridgeKey";
 3var _a=objj_allocateClassPair(CPObject,"_CPCibWindowTemplate"),_b=_a.isa;
 4class_addIvars(_a,[new objj_ivar("_minSize"),new objj_ivar("_maxSize"),new objj_ivar("_viewClass"),new objj_ivar("_windowClass"),new objj_ivar("_windowRect"),new objj_ivar("_windowStyleMask"),new objj_ivar("_windowTitle"),new objj_ivar("_windowView"),new objj_ivar("_windowIsFullBridge")]);
 5objj_registerClassPair(_a);
 6objj_addClassForBundle(_a,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 7class_addMethods(_a,[new objj_method(sel_getUid("initWithCoder:"),function(_c,_d,_e){
 8with(_c){
 9_c=objj_msgSendSuper({receiver:_c,super_class:objj_getClass("CPObject")},"init");
10if(_c){
11if(objj_msgSend(_e,"containsValueForKey:",_1)){
12_minSize=objj_msgSend(_e,"decodeSizeForKey:",_1);
13}
14if(objj_msgSend(_e,"containsValueForKey:",_2)){
15_maxSize=objj_msgSend(_e,"decodeSizeForKey:",_2);
16}
17_viewClass=objj_msgSend(_e,"decodeObjectForKey:",_3);
18_windowClass=objj_msgSend(_e,"decodeObjectForKey:",_4);
19_windowRect=objj_msgSend(_e,"decodeRectForKey:",_5);
20_windowStyleMask=objj_msgSend(_e,"decodeIntForKey:",_6);
21_windowTitle=objj_msgSend(_e,"decodeObjectForKey:",_7);
22_windowView=objj_msgSend(_e,"decodeObjectForKey:",_8);
23_windowIsFullBridge=objj_msgSend(_e,"decodeObjectForKey:",_9);
24}
25return _c;
26}
27}),new objj_method(sel_getUid("encodeWithCoder:"),function(_f,_10,_11){
28with(_f){
29if(_minSize){
30objj_msgSend(_11,"encodeSize:forKey:",_minSize,_1);
31}
32if(_maxSize){
33objj_msgSend(_11,"encodeSize:forKey:",_maxSize,_2);
34}
35objj_msgSend(_11,"encodeObject:forKey:",_viewClass,_3);
36objj_msgSend(_11,"encodeObject:forKey:",_windowClass,_4);
37objj_msgSend(_11,"encodeRect:forKey:",_windowRect,_5);
38objj_msgSend(_11,"encodeInt:forKey:",_windowStyleMask,_6);
39objj_msgSend(_11,"encodeObject:forKey:",_windowTitle,_7);
40objj_msgSend(_11,"encodeObject:forKey:",_windowView,_8);
41objj_msgSend(_11,"encodeObject:forKey:",_windowIsFullBridge,_9);
42}
43}),new objj_method(sel_getUid("windowClass"),function(_12,_13){
44with(_12){
45return _windowClass;
46}
47}),new objj_method(sel_getUid("_cibInstantiate"),function(_14,_15){
48with(_14){
49var _16=CPClassFromString(objj_msgSend(_14,"windowClass"));
50var _17=objj_msgSend(objj_msgSend(_16,"alloc"),"initWithContentRect:styleMask:",_windowRect,_windowStyleMask);
51if(_minSize){
52objj_msgSend(_17,"setMinSize:",_minSize);
53}
54if(_maxSize){
55objj_msgSend(_17,"setMaxSize:",_maxSize);
56}
57objj_msgSend(_17,"setLevel:",CPFloatingWindowLevel);
58objj_msgSend(_17,"setTitle:",_windowTitle);
59objj_msgSend(_windowView,"setAutoresizesSubviews:",NO);
60objj_msgSend(_17,"setContentView:",_windowView);
61objj_msgSend(_windowView,"setAutoresizesSubviews:",YES);
62if(objj_msgSend(_viewClass,"isKindOfClass:",objj_msgSend(CPToolbar,"class"))){
63objj_msgSend(_17,"setToolbar:",_viewClass);
64}
65objj_msgSend(_17,"setFullBridge:",_windowIsFullBridge);
66return _17;
67}
68})]);