PageRenderTime 16ms CodeModel.GetById 8ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/Frameworks/Debug/AppKit/rhino.platform/CPTabViewItem.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 99 lines | 98 code | 1 blank | 0 comment | 0 complexity | 2fe55d695ffbd8e91dc2e6ebe09859ea MD5 | raw file
 1I;21;Foundation/CPObject.jI;15;AppKit/CPView.jc;3722;
 2CPSelectedTab = 0;
 3CPBackgroundTab = 1;
 4CPPressedTab = 2;
 5{var the_class = objj_allocateClassPair(CPObject, "CPTabViewItem"),
 6meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_identifier"), new objj_ivar("_label"), new objj_ivar("_view"), new objj_ivar("_auxiliaryView")]);
 7objj_registerClassPair(the_class);
 8objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 9class_addMethods(the_class, [new objj_method(sel_getUid("initWithIdentifier:"), function $CPTabViewItem__initWithIdentifier_(self, _cmd, anIdentifier)
10{ with(self)
11{
12    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");
13    if (self)
14        _identifier = anIdentifier;
15    return self;
16}
17}), new objj_method(sel_getUid("setLabel:"), function $CPTabViewItem__setLabel_(self, _cmd, aLabel)
18{ with(self)
19{
20    _label = aLabel;
21}
22}), new objj_method(sel_getUid("label"), function $CPTabViewItem__label(self, _cmd)
23{ with(self)
24{
25    return _label;
26}
27}), new objj_method(sel_getUid("tabState"), function $CPTabViewItem__tabState(self, _cmd)
28{ with(self)
29{
30    return _tabState;
31}
32}), new objj_method(sel_getUid("setIdentifier:"), function $CPTabViewItem__setIdentifier_(self, _cmd, anIdentifier)
33{ with(self)
34{
35    _identifier = anIdentifier;
36}
37}), new objj_method(sel_getUid("identifier"), function $CPTabViewItem__identifier(self, _cmd)
38{ with(self)
39{
40    return _identifier;
41}
42}), new objj_method(sel_getUid("setView:"), function $CPTabViewItem__setView_(self, _cmd, aView)
43{ with(self)
44{
45    _view = aView;
46}
47}), new objj_method(sel_getUid("view"), function $CPTabViewItem__view(self, _cmd)
48{ with(self)
49{
50    return _view;
51}
52}), new objj_method(sel_getUid("setAuxiliaryView:"), function $CPTabViewItem__setAuxiliaryView_(self, _cmd, anAuxiliaryView)
53{ with(self)
54{
55    _auxiliaryView = anAuxiliaryView;
56}
57}), new objj_method(sel_getUid("auxiliaryView"), function $CPTabViewItem__auxiliaryView(self, _cmd)
58{ with(self)
59{
60    return _auxiliaryView;
61}
62}), new objj_method(sel_getUid("tabView"), function $CPTabViewItem__tabView(self, _cmd)
63{ with(self)
64{
65    return _tabView;
66}
67})]);
68}
69var CPTabViewItemIdentifierKey = "CPTabViewItemIdentifierKey",
70    CPTabViewItemLabelKey = "CPTabViewItemLabelKey",
71    CPTabViewItemViewKey = "CPTabViewItemViewKey",
72    CPTabViewItemAuxViewKey = "CPTabViewItemAuxViewKey";
73{
74var the_class = objj_getClass("CPTabViewItem")
75if(!the_class) objj_exception_throw(new objj_exception(OBJJClassNotFoundException, "*** Could not find definition for class \"CPTabViewItem\""));
76var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_getUid("initWithCoder:"), function $CPTabViewItem__initWithCoder_(self, _cmd, aCoder)
77{ with(self)
78{
79    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");
80    if (self)
81    {
82        _identifier = objj_msgSend(aCoder, "decodeObjectForKey:", CPTabViewItemIdentifierKey);
83        _label = objj_msgSend(aCoder, "decodeObjectForKey:", CPTabViewItemLabelKey);
84        _view = objj_msgSend(aCoder, "decodeObjectForKey:", CPTabViewItemViewKey);
85        _auxiliaryView = objj_msgSend(aCoder, "decodeObjectForKey:", CPTabViewItemAuxViewKey);
86    }
87    return self;
88}
89}), new objj_method(sel_getUid("encodeWithCoder:"), function $CPTabViewItem__encodeWithCoder_(self, _cmd, aCoder)
90{ with(self)
91{
92    objj_msgSend(aCoder, "encodeObject:forKey:", _identifier, CPTabViewItemIdentifierKey);
93    objj_msgSend(aCoder, "encodeObject:forKey:", _label, CPTabViewItemLabelKey);
94    objj_msgSend(aCoder, "encodeObject:forKey:", _view, CPTabViewItemViewKey);
95    objj_msgSend(aCoder, "encodeObject:forKey:", _auxiliaryView, CPTabViewItemAuxViewKey);
96}
97})]);
98}
99