[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nibTool
From: |
Pascal J . Bourguignon |
Subject: |
nibTool |
Date: |
Sat, 27 Dec 2003 10:25:42 +0100 (CET) |
In OPENSTEP 4.2, there is a tool named nibTool that is able to dump
nib files in ASCII form .
(Here is an example of the output of: nibTool -a Hang.nib).
It seems to be complete enough to allow for regenerating a new
interface file from it.
------------------------------------------------------------------------
/* Objects */
Object 1 = {
Class = NSApplication;
Name = "File's Owner";
};
Object 2 = {
Class = NSTextField;
Alignment = NSLeftTextAlignment;
BackgroundColor = "{selector = textBackgroundColor;}";
Bezeled = NO;
Bordered = NO;
DrawsBackground = NO;
Enabled = YES;
Font = "{name = Helvetica; pointSize = 18}";
Frame = "{x = 77; y = 115; width = 108; height = 22}";
Name = Field1;
Scrollable = NO;
Selectable = NO;
StringValue = Hangman;
Tag = 0;
TextColor = "{selector = controlTextColor;}";
};
Object 3 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = a;
Tag = 0;
Title = "Select All";
};
Object 4 = {
Class = NSMenu;
CustomClass = NSMenuTemplate;
Location = "{x = 11; y = 416}";
Name = MainMenu;
Title = Hangman;
};
Object 5 = {
Class = NSMenuItem;
Enabled = YES;
Tag = 0;
Title = Windows;
};
Object 6 = {
Class = NSButton;
Alignment = NSCenterTextAlignment;
AutoresizingMask = "(MaxX, MinY)";
Bordered = NO;
Continuous = NO;
Disabled = YES;
Font = "{name = User's Message Font; pointSize = 12}";
Frame = "{x = 19; y = 42; width = 48; height = 48}";
Image = macware;
ImagePosition = NSImageOnly;
Name = Button2;
PixelsInset = 2;
Selected = NO;
Tag = 0;
Transparent = NO;
Type = NSMomentaryPushButton;
};
Object 7 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = v;
Tag = 0;
Title = Paste;
};
Object 8 = {
Class = NSMenuItem;
Enabled = YES;
Tag = 0;
Title = Edit;
};
Object 9 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = c;
Tag = 0;
Title = Copy;
};
Object 10 = {
Class = NSButton;
Alignment = NSCenterTextAlignment;
AutoresizingMask = "(MaxX, MinY)";
Bordered = NO;
Continuous = NO;
Disabled = YES;
Font = "{name = Helvetica; pointSize = 12}";
Frame = "{x = 6; y = 63; width = 73; height = 80}";
Image = knot.vertic;
Name = Button1;
PixelsInset = 2;
Selected = NO;
Tag = 0;
Transparent = NO;
Type = NSMomentaryPushButton;
};
Object 11 = {
Class = NSMenu;
CustomClass = NSMenuTemplate;
Title = Windows;
};
Object 12 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = m;
Tag = 0;
Title = "Miniaturize Window";
};
Object 13 = {
Class = Hangman;
Name = Hangman;
};
Object 14 = {
Class = NSView;
Frame = "{x = 2; y = 2; width = 416; height = 0}";
};
Object 15 = {
Class = NSTextField;
Alignment = NSLeftTextAlignment;
BackgroundColor = "{selector = textBackgroundColor;}";
Bezeled = NO;
Bordered = NO;
DrawsBackground = NO;
Enabled = YES;
Font = "{name = Helvetica; pointSize = 10}";
Frame = "{x = 1; y = 24; width = 439; height = 39}";
Name = Field21;
Scrollable = NO;
Selectable = NO;
StringValue = "The purpose of this application is to test the development
of user interface independant code. The same core of code has been used for a
stdio version and a MacApp version of this game.";
Tag = 0;
TextColor = "{selector = controlTextColor;}";
};
Object 16 = {
Class = NSTextField;
Alignment = NSLeftTextAlignment;
BackgroundColor = "{selector = controlColor;}";
Bezeled = NO;
Bordered = NO;
DrawsBackground = YES;
Enabled = YES;
Font = "{name = Helvetica; pointSize = 10}";
Frame = "{x = 100; y = 3; width = 297; height = 13}";
Name = Field;
Scrollable = NO;
Selectable = NO;
StringValue = "Copyright 1993, Pascal J. Bourguignon. All Rights
Reserved.";
Tag = 0;
TextColor = "{selector = darkGrayColor;}";
};
Object 17 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = h;
Tag = 0;
Title = Hide;
};
Object 18 = {
Class = NSButton;
Alignment = NSCenterTextAlignment;
Bordered = NO;
Continuous = NO;
Disabled = YES;
Font = "{name = User's Message Font; pointSize = 12}";
Frame = "{x = 335; y = 70; width = 64; height = 64}";
Image = pascal;
ImagePosition = NSImageOnly;
Name = Button;
PixelsInset = 2;
Selected = NO;
Tag = 0;
Transparent = NO;
Type = NSMomentaryPushButton;
};
Object 19 = {
Class = NSMatrix;
AutosizesCells = NO;
Autotagged = NO;
BackgroundColor = "{selector = whiteColor;}";
DrawsBackground = NO;
Frame = "{x = 1; y = 0; width = 82; height = 80}";
Mode = NSTrackModeMatrix;
SelectionByRect = YES;
Tag = 0;
};
Object 20 = {
Class = NSMenuItem;
Enabled = YES;
Tag = 0;
Title = Info...;
};
Object 21 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = n;
Tag = 0;
Title = "New game";
};
Object 22 = {
Class = Panel;
Autoposition = ();
Backing = NSBackingStoreBuffered;
Closable = YES;
Deferred = YES;
DynamicDepthLimit = NO;
Frame = "{x = 264; y = 658; width = 418; height = 171}";
HideOnDeactivate = NO;
Miniaturizable = NO;
MinimumSize = "{width = 0; height = 0}";
Name = Info;
OneShot = YES;
ReleaseWhenClosed = NO;
Resizable = NO;
Title = Info;
VisibleAtLaunchTime = NO;
WantsToBeColor = NO;
};
Object 23 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = q;
Tag = 0;
Title = Quit;
};
Object 24 = {
Class = NSMenu;
CustomClass = NSMenuTemplate;
Title = Edit;
};
Object 25 = {
Class = NSMatrix;
AutosizesCells = NO;
Autotagged = NO;
BackgroundColor = "{selector = whiteColor;}";
DrawsBackground = NO;
Frame = "{x = 1; y = 0; width = 137; height = 60}";
Mode = NSTrackModeMatrix;
SelectionByRect = YES;
Tag = 0;
};
Object 26 = {
Class = NSMenuItem;
Enabled = YES;
Tag = 0;
Title = "Arrange in Front";
};
Object 27 = {
Class = NSMatrix;
AutosizesCells = NO;
Autotagged = NO;
BackgroundColor = "{selector = whiteColor;}";
DrawsBackground = NO;
Frame = "{x = 1; y = 0; width = 88; height = 120}";
Mode = NSTrackModeMatrix;
SelectionByRect = YES;
Tag = 0;
};
Object 28 = {
Class = NSBox;
BorderType = NSGrooveBorder;
ContentViewMargins = "{width = 0; height = 0}";
Frame = "{x = -4; y = 20; width = 420; height = 2}";
Name = Box;
Title = Box;
TitleFont = "{name = Helvetica; pointSize = 12}";
TitlePosition = NSNoTitle;
};
Object 29 = {
Class = NSView;
Frame = "{x = 1; y = 1; width = 416; height = 147}";
};
Object 30 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = x;
Tag = 0;
Title = Cut;
};
Object 31 = {
Class = NSTextField;
Alignment = NSLeftTextAlignment;
BackgroundColor = "{selector = textBackgroundColor;}";
Bezeled = NO;
Bordered = NO;
DrawsBackground = NO;
Enabled = YES;
Font = "{name = Helvetica; pointSize = 10}";
Frame = "{x = 8; y = 3; width = 62; height = 13}";
Name = VersionNumber;
Scrollable = NO;
Selectable = NO;
StringValue = "Version 1.0";
Tag = 0;
TextColor = "{selector = darkGrayColor;}";
};
Object 32 = {
Class = NSTextField;
Alignment = NSLeftTextAlignment;
BackgroundColor = "{selector = textBackgroundColor;}";
Bezeled = NO;
Bordered = NO;
DrawsBackground = NO;
Enabled = YES;
Font = "{name = Helvetica; pointSize = 14}";
Frame = "{x = 155; y = 89; width = 170; height = 18}";
Name = Field2;
Scrollable = NO;
Selectable = NO;
StringValue = "by Pascal J. Bourguignon";
Tag = 0;
TextColor = "{selector = controlTextColor;}";
};
Object 33 = {
Class = NSMenuItem;
Enabled = YES;
KeyEquivalent = w;
Tag = 0;
Title = "Close Window";
};
/* Object Hierarchy */
"Object 1 <NSApplication> (File's Owner)" = (
"Object -1 <IBFirstResponder> (First Responder)";
"Object 4 <NSMenu> (MainMenu)" = (
"Object 27 <NSMatrix>" = (
"Object 5 <NSMenuItem>" = (
"Object 11 <NSMenu>" = (
"Object 25 <NSMatrix>" = (
"Object 12 <NSMenuItem>";
"Object 26 <NSMenuItem>";
"Object 33 <NSMenuItem>";
);
);
);
"Object 8 <NSMenuItem>" = (
"Object 24 <NSMenu>" = (
"Object 19 <NSMatrix>" = (
"Object 3 <NSMenuItem>";
"Object 7 <NSMenuItem>";
"Object 9 <NSMenuItem>";
"Object 30 <NSMenuItem>";
);
);
);
"Object 17 <NSMenuItem>";
"Object 20 <NSMenuItem>";
"Object 21 <NSMenuItem>";
"Object 23 <NSMenuItem>";
);
);
"Object 13 <Hangman> (Hangman)";
"Object 22 <Panel> (Info)" = (
"Object 29 <NSView>" = (
"Object 2 <NSTextField> (Field1)";
"Object 6 <NSButton> (Button2)";
"Object 10 <NSButton> (Button1)";
"Object 15 <NSTextField> (Field21)";
"Object 16 <NSTextField> (Field)";
"Object 18 <NSButton> (Button)";
"Object 28 <NSBox> (Box)" = (
"Object 14 <NSView>";
);
"Object 31 <NSTextField> (VersionNumber)";
"Object 32 <NSTextField> (Field2)";
);
);
);
/* Connections */
Connection 34 = {
Class = NSIBControlConnector;
Action = "cut:";
Source = "Object 30 <NSMenuItem>";
};
Connection 35 = {
Class = NSIBControlConnector;
Action = "copy:";
Source = "Object 9 <NSMenuItem>";
};
Connection 36 = {
Class = NSIBControlConnector;
Action = "paste:";
Source = "Object 7 <NSMenuItem>";
};
Connection 37 = {
Class = NSIBControlConnector;
Action = "selectAll:";
Source = "Object 3 <NSMenuItem>";
};
Connection 38 = {
Class = NSIBControlConnector;
Action = "terminate:";
Destination = "Object 1 <NSApplication> (File's Owner)";
Source = "Object 23 <NSMenuItem>";
};
Connection 39 = {
Class = NSIBControlConnector;
Action = "hide:";
Destination = "Object 1 <NSApplication> (File's Owner)";
Source = "Object 17 <NSMenuItem>";
};
Connection 40 = {
Class = NSIBControlConnector;
Action = "makeKeyAndOrderFront:";
Destination = "Object 22 <Panel> (Info)";
Source = "Object 20 <NSMenuItem>";
};
Connection 41 = {
Class = NSIBControlConnector;
Action = "performMiniaturize:";
Source = "Object 12 <NSMenuItem>";
};
Connection 42 = {
Class = NSIBControlConnector;
Action = "performClose:";
Source = "Object 33 <NSMenuItem>";
};
Connection 43 = {
Class = NSIBControlConnector;
Action = "arrangeInFront:";
Source = "Object 26 <NSMenuItem>";
};
Connection 44 = {
Class = NSIBOutletConnector;
Destination = "Object 13 <Hangman> (Hangman)";
Outlet = delegate;
Source = "Object 1 <NSApplication> (File's Owner)";
};
Connection 45 = {
Class = NSIBControlConnector;
Action = "newGame:";
Destination = "Object 13 <Hangman> (Hangman)";
Source = "Object 21 <NSMenuItem>";
};
/* Classes */
"FirstResponder" = {ACTIONS = {}; OUTLETS = {}; SUPERCLASS = NSObject; };
"Hangman" = {
ACTIONS = {
"chooseAnotherWord:" = id;
"newGame:" = id;
"tryALetter:" = id;
"willQuit:" = id;
};
OUTLETS = {};
SUPERCLASS = Object;
};
--
__Pascal_Bourguignon__ . * * . * .* .
http://www.informatimago.com/ . * . .*
There is no worse tyranny than to force * . . /\ . *
a man to pay for what he does not . . / .\ . * .
want merely because you think it .*. / * \ . .
would be good for him. -- Robert Heinlein . /* o \ .
http://www.theadvocates.org/ * '''||''' .
SCO Spam-magnet: postmaster@sco.com ******************
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- nibTool,
Pascal J . Bourguignon <=