mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-27 18:38:49 +00:00
nib2cib support for CPMenu, CPMenuItem, CPPopUpButton, including MainMenu support. New test NIBs.
This commit is contained in:
1 parent
39ff2b46ab
commit
cfbdb1ce76
11 files changed
+3900
-148
No files matched your search
@@ -63,6 +63,14 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey";
|
||||
|
||||
var owner = [anExternalNameTable objectForKey:CPCibOwner],
|
||||
topLevelObjects = [anExternalNameTable objectForKey:CPCibTopLevelObjects];
|
||||
|
||||
var menu;
|
||||
if ((menu = [objectData mainMenu]) != nil)
|
||||
{
|
||||
[CPApp setMainMenu:menu];
|
||||
[CPMenu setMenuBarVisible:YES];
|
||||
}
|
||||
|
||||
/*
|
||||
// [objectData establishConnectionsWithOwner:owner topLevelObjects:topLevelObjects];
|
||||
// [objectData cibInstantiateWithOwner:owner topLevelObjects:topLevelObjects];
|
||||
|
||||
@@ -80,6 +80,15 @@
|
||||
return topLevelObjects;
|
||||
}
|
||||
|
||||
- (CPMenu)mainMenu
|
||||
{
|
||||
var index = [_namesValues indexOfObjectIdenticalTo:"MainMenu"];
|
||||
if (index === CPNotFound)
|
||||
return nil;
|
||||
|
||||
return _namesKeys[index];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var _CPCibObjectDataNamesKeysKey = @"_CPCibObjectDataNamesKeysKey",
|
||||
|
||||
@@ -78,7 +78,6 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemplateMinSizeKey",
|
||||
[NSException raise:NSInvalidArgumentException format:@"Unable to locate NSWindow class %@, using NSWindow",_windowClass];
|
||||
class=[NSWindow class];*/
|
||||
|
||||
_windowStyleMask = (CPHUDBackgroundWindowMask | CPClosableWindowMask | CPResizableWindowMask);
|
||||
var theWindow = [[windowClass alloc] initWithContentRect:_windowRect styleMask:_windowStyleMask];
|
||||
|
||||
if (_minSize)
|
||||
|
||||
@@ -6,7 +6,6 @@ import <AppKit/CPCib.j>
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
CPWindow _window;
|
||||
CPWindow _secondWindow;
|
||||
CPView _view;
|
||||
}
|
||||
|
||||
@@ -23,7 +22,8 @@ import <AppKit/CPCib.j>
|
||||
[contentView addSubview:_view];
|
||||
[theWindow orderFront:self];
|
||||
|
||||
[_secondWindow orderFront:self];
|
||||
// HACK: shift the window down to accomodate for menubar
|
||||
[theWindow setFrameOrigin:CGPointMake([theWindow frame].origin.x, [theWindow frame].origin.y + 29)];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,731 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1050</int>
|
||||
<string key="IBDocument.SystemVersion">9F33</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">672</string>
|
||||
<string key="IBDocument.AppKitVersion">949.34</string>
|
||||
<string key="IBDocument.HIToolboxVersion">352.00</string>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="1" id="9"/>
|
||||
<integer value="12"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSCustomObject" id="1001">
|
||||
<string key="NSClassName">NSObject</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1003">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1004">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSCustomView" id="1005">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSButton" id="684874808">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">301</int>
|
||||
<string key="NSFrame">{{20, 18}, {92, 19}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="296757445">
|
||||
<int key="NSCellFlags">-2080244224</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">Open!</string>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">1.200000e+01</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="684874808"/>
|
||||
<int key="NSButtonFlags">-2038152961</int>
|
||||
<int key="NSButtonFlags2">164</int>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
<int key="NSPeriodicDelay">400</int>
|
||||
<int key="NSPeriodicInterval">75</int>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{480, 272}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<string key="NSClassName">NSView</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="728415824">
|
||||
<int key="NSWindowStyleMask">15</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{0, 0}, {374, 374}}</string>
|
||||
<int key="NSWTFlags">603979776</int>
|
||||
<string key="NSWindowTitle">Window</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
<nil key="NSViewClass"/>
|
||||
<string key="NSWindowContentMaxSize">{668, 668}</string>
|
||||
<string key="NSWindowContentMinSize">{374, 374}</string>
|
||||
<object class="NSView" key="NSWindowView" id="882339348">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSColorWell" id="141112977">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">296</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{20, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="867611453">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">264</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{58, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">1</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="905749352">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">312</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{96, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">2</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="1020241583">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">280</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{134, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">3</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="98446711">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">288</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{210, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">4</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="461780408">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{248, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">5</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="782986636">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">304</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{286, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">6</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="331835340">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">272</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{324, 172}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">7</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="192849442">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">261</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 324}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">8</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="139943842">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">260</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 286}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">9</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="760823980">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">263</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 248}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">10</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="1064333419">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">262</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 210}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">11</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="514823898">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">257</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 134}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">12</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="433378660">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 96}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">13</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="380909981">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">259</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 58}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">14</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColorWell" id="505664463">
|
||||
<reference key="NSNextResponder" ref="882339348"/>
|
||||
<int key="NSvFlags">258</int>
|
||||
<object class="NSMutableSet" key="NSDragTypes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="set.sortedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSColor pasteboard type</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{172, 20}, {30, 30}}</string>
|
||||
<reference key="NSSuperview" ref="882339348"/>
|
||||
<int key="NSTag">15</int>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSIsBordered">YES</bool>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4wNTgxMzA0OTkgMC4wNTU1NDE4OTkgMQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{374, 374}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
|
||||
<string key="NSMinSize">{374, 396}</string>
|
||||
<string key="NSMaxSize">{668, 690}</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="1005"/>
|
||||
</object>
|
||||
<int key="connectionID">20</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">window</string>
|
||||
<reference key="source" ref="1001"/>
|
||||
<reference key="destination" ref="728415824"/>
|
||||
</object>
|
||||
<int key="connectionID">21</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">orderFront:</string>
|
||||
<reference key="source" ref="728415824"/>
|
||||
<reference key="destination" ref="684874808"/>
|
||||
</object>
|
||||
<int key="connectionID">150</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="1002">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1001"/>
|
||||
<reference key="parent" ref="1002"/>
|
||||
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1003"/>
|
||||
<reference key="parent" ref="1002"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1004"/>
|
||||
<reference key="parent" ref="1002"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="1005"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="684874808"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1002"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">12</int>
|
||||
<reference key="object" ref="728415824"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="882339348"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1002"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">13</int>
|
||||
<reference key="object" ref="882339348"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="141112977"/>
|
||||
<reference ref="867611453"/>
|
||||
<reference ref="905749352"/>
|
||||
<reference ref="1020241583"/>
|
||||
<reference ref="98446711"/>
|
||||
<reference ref="461780408"/>
|
||||
<reference ref="782986636"/>
|
||||
<reference ref="331835340"/>
|
||||
<reference ref="192849442"/>
|
||||
<reference ref="139943842"/>
|
||||
<reference ref="760823980"/>
|
||||
<reference ref="1064333419"/>
|
||||
<reference ref="433378660"/>
|
||||
<reference ref="380909981"/>
|
||||
<reference ref="505664463"/>
|
||||
<reference ref="514823898"/>
|
||||
</object>
|
||||
<reference key="parent" ref="728415824"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">148</int>
|
||||
<reference key="object" ref="684874808"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="296757445"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">149</int>
|
||||
<reference key="object" ref="296757445"/>
|
||||
<reference key="parent" ref="684874808"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">503</int>
|
||||
<reference key="object" ref="141112977"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">504</int>
|
||||
<reference key="object" ref="867611453"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">505</int>
|
||||
<reference key="object" ref="905749352"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">506</int>
|
||||
<reference key="object" ref="1020241583"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">507</int>
|
||||
<reference key="object" ref="98446711"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">508</int>
|
||||
<reference key="object" ref="461780408"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">509</int>
|
||||
<reference key="object" ref="782986636"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">510</int>
|
||||
<reference key="object" ref="331835340"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">513</int>
|
||||
<reference key="object" ref="192849442"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">514</int>
|
||||
<reference key="object" ref="139943842"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">515</int>
|
||||
<reference key="object" ref="760823980"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">516</int>
|
||||
<reference key="object" ref="1064333419"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">517</int>
|
||||
<reference key="object" ref="514823898"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">518</int>
|
||||
<reference key="object" ref="433378660"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">519</int>
|
||||
<reference key="object" ref="380909981"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">520</int>
|
||||
<reference key="object" ref="505664463"/>
|
||||
<reference key="parent" ref="882339348"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>1.IBEditorWindowLastContentRect</string>
|
||||
<string>1.IBPluginDependency</string>
|
||||
<string>1.WindowOrigin</string>
|
||||
<string>1.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>12.IBEditorWindowLastContentRect</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>12.IBWindowTemplateEditedContentRect</string>
|
||||
<string>12.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>12.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>12.windowTemplate.hasMaxSize</string>
|
||||
<string>12.windowTemplate.hasMinSize</string>
|
||||
<string>12.windowTemplate.maxSize</string>
|
||||
<string>12.windowTemplate.minSize</string>
|
||||
<string>13.IBPluginDependency</string>
|
||||
<string>148.IBPluginDependency</string>
|
||||
<string>149.IBPluginDependency</string>
|
||||
<string>503.IBPluginDependency</string>
|
||||
<string>504.IBPluginDependency</string>
|
||||
<string>505.IBPluginDependency</string>
|
||||
<string>506.IBPluginDependency</string>
|
||||
<string>507.IBPluginDependency</string>
|
||||
<string>508.IBPluginDependency</string>
|
||||
<string>509.IBPluginDependency</string>
|
||||
<string>510.IBPluginDependency</string>
|
||||
<string>513.IBPluginDependency</string>
|
||||
<string>514.IBPluginDependency</string>
|
||||
<string>515.IBPluginDependency</string>
|
||||
<string>516.IBPluginDependency</string>
|
||||
<string>517.IBPluginDependency</string>
|
||||
<string>518.IBPluginDependency</string>
|
||||
<string>519.IBPluginDependency</string>
|
||||
<string>520.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{395, 799}, {480, 272}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{628, 654}</string>
|
||||
<string>{{319, 416}, {480, 272}}</string>
|
||||
<string>{{233, 273}, {374, 374}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{233, 273}, {374, 374}}</string>
|
||||
<reference ref="9"/>
|
||||
<string>{{196, 240}, {480, 270}}</string>
|
||||
<integer value="1" id="5"/>
|
||||
<reference ref="5"/>
|
||||
<string>{668, 668}</string>
|
||||
<string>{374, 374}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">522</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>view</string>
|
||||
<string>window</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
||||
+2891
-145
File diff suppressed because it is too large.
Load diff
@@ -29,7 +29,10 @@
|
||||
@import "NSCustomView.j"
|
||||
@import "NSFont.j"
|
||||
@import "NSIBObjectData.j"
|
||||
@import "NSMenu.j"
|
||||
@import "NSMenuItem.j"
|
||||
@import "NSNibConnector.j"
|
||||
@import "NSPopUpButton.j"
|
||||
@import "NSResponder.j"
|
||||
@import "NSSlider.j"
|
||||
@import "NSSplitView.j"
|
||||
@@ -39,6 +42,7 @@
|
||||
@import "NSWindowTemplate.j"
|
||||
@import "WebView.j"
|
||||
|
||||
|
||||
function CP_NSMapClassName(aClassName)
|
||||
{
|
||||
if (aClassName == @"NSView")
|
||||
@@ -47,5 +51,7 @@ function CP_NSMapClassName(aClassName)
|
||||
if (aClassName == @"NSWindow")
|
||||
return @"CPWindow";
|
||||
|
||||
CPLog.warn("No class name mapping for \""+aClassName+"\"");
|
||||
|
||||
return aClassName;
|
||||
}
|
||||
@@ -91,3 +91,10 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSActionCell : NSCell
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* NSMenu.j
|
||||
* nib2cib
|
||||
*
|
||||
* Created by Thomas Robinson.
|
||||
* 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 <AppKit/CPMenu.j>
|
||||
|
||||
@import "NSMenuItem.j"
|
||||
|
||||
|
||||
@implementation CPMenu (NSCoding)
|
||||
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
_title = [aCoder decodeObjectForKey:"NSTitle"];
|
||||
_items = [aCoder decodeObjectForKey:"NSMenuItems"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSMenu : CPMenu
|
||||
{
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
return [self NS_initWithCoder:aCoder];
|
||||
}
|
||||
|
||||
- (Class)classForKeyedArchiver
|
||||
{
|
||||
return [CPMenu class];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* NSMenuItem.j
|
||||
* nib2cib
|
||||
*
|
||||
* Created by Thomas Robinson.
|
||||
* 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 <AppKit/CPMenuItem.j>
|
||||
|
||||
@import "NSMenu.j"
|
||||
|
||||
|
||||
@implementation CPMenuItem (NSCoding)
|
||||
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
_title = [aCoder decodeObjectForKey:"NSTitle"];
|
||||
|
||||
// _font = [aCoder decodeObjectForKey:"NSTitle"];
|
||||
|
||||
_target = [aCoder decodeObjectForKey:"NSTarget"];
|
||||
_action = [aCoder decodeObjectForKey:"NSAction"];
|
||||
|
||||
_isEnabled = ![aCoder decodeBoolForKey:"NSIsDisabled"];
|
||||
_isHidden = [aCoder decodeBoolForKey:"NSIsHidden"];
|
||||
|
||||
// _tag = [aCoder decodeIntForKey:"NSTag"];
|
||||
// _state = [aCoder decodeIntForKey:"NSState"];
|
||||
|
||||
// _image = [aCoder decodeObjectForKey:"NSImage"];
|
||||
// _alternateImage = [aCoder decodeObjectForKey:""];
|
||||
// _onStateImage = [aCoder decodeObjectForKey:"NSOnImage"];
|
||||
// _offStateImage = [aCoder decodeObjectForKey:"NSOffImage"];
|
||||
// _mixedStateImage = [aCoder decodeObjectForKey:"NSMixedImage"];
|
||||
|
||||
_submenu = [aCoder decodeObjectForKey:"NSSubmenu"];
|
||||
_menu = [aCoder decodeObjectForKey:"NSMenu"];
|
||||
|
||||
// _keyEquivalent = [aCoder decodeObjectForKey:"NSKeyEquiv"];
|
||||
// _keyEquivalentModifierMask = [aCoder decodeObjectForKey:"NSKeyEquivModMask"];
|
||||
|
||||
// _mnemonicLocation = [aCoder decodeObjectForKey:"NSMnemonicLoc"];
|
||||
|
||||
// _isAlternate = [aCoder decodeBoolForKey:"NSIsAlternate"];
|
||||
// _indentationLevel = [aCoder decodeBoolForKey:"NSIndent"];
|
||||
|
||||
// _toolTip;
|
||||
|
||||
// _representedObject = [aCoder decodeObjectForKey:CPMenuItemRepresentedObjectKey];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSMenuItem : CPMenuItem
|
||||
{
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
return [self NS_initWithCoder:aCoder];
|
||||
}
|
||||
|
||||
- (Class)classForKeyedArchiver
|
||||
{
|
||||
return [CPMenuItem class];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSMenuItemCell : NSButtonCell
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* NSPopUpButton.j
|
||||
* nib2cib
|
||||
*
|
||||
* Created by Thomas Robinson.
|
||||
* 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 <AppKit/CPPopUpButton.j>
|
||||
|
||||
@import "NSMenu.j"
|
||||
|
||||
@implementation CPPopUpButton (CPCoding)
|
||||
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (self = [super NS_initWithCoder:aCoder])
|
||||
{
|
||||
var cell = [aCoder decodeObjectForKey:@"NSCell"];
|
||||
|
||||
_menu = [cell menu];
|
||||
|
||||
// make sure it's not null/undefined
|
||||
//FIXME push this check to CPPopUpButton?
|
||||
_selectedIndex = [cell selectedIndex] || 0;
|
||||
|
||||
_pullsDown = [cell pullsDown];
|
||||
_preferredEdge = [cell preferredEdge];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSPopUpButton : CPPopUpButton
|
||||
{
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
return [self NS_initWithCoder:aCoder];
|
||||
}
|
||||
|
||||
- (Class)classForKeyedArchiver
|
||||
{
|
||||
return [CPPopUpButton class];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSPopUpButtonCell : NSMenuItemCell
|
||||
{
|
||||
BOOL pullsDown @accessors(readonly);
|
||||
int selectedIndex @accessors(readonly);
|
||||
int preferredEdge @accessors(readonly);
|
||||
CPMenu menu @accessors(readonly);
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super initWithCoder:aCoder];
|
||||
|
||||
if (self)
|
||||
{
|
||||
pullsDown = [aCoder decodeBoolForKey:@"NSPullDown"];
|
||||
selectedIndex = [aCoder decodeIntForKey:@"NSSelectedIndex"];
|
||||
preferredEdge = [aCoder decodeIntForKey:@"NSPreferredEdge"];
|
||||
menu = [aCoder decodeObjectForKey:@"NSMenu"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user