Window

Technically, the Window is a View subclass, but only because of it x, y, width and height properties (in fact, I should probably change that). The layout methods don’t make sense for the window because it doesn’t have a superview. It represents, of course, Cocoa’s NSWindow.

class Window(width, height, title)
Parameters:
xProportion
yProportion

Numeric. x and y coordinates in proportion of the main screen frame. This value has to be between 0.0 and 1.0.

title

String. The text on the window. Equivalent to [self title].

canClose
canResize
canMinimize

Boolean. Adjusts the window’s style flags according to boolean values you set in those 3 attributes. The behave the same way as the Close, Resize and Minimize checkboxes in Interface Builder.

initialFirstResponder

See View. Equivalent to [self initialFirstResponder].

autosaveName

String. Equivalent to [self frameAutosaveName].

minSize

Size. Equivalent to [self minSize].

maxSize

Size. Equivalent to [self maxSize].

createToolbar(identifier)
Parameters:identifier – String

Creates a Toolbar linked to this window and returns it. The identifier argument is going to be the identifier of the toolbar.

Panel

Sublclasses Window and represents Cocoa’s NSPanel.

class Panel(width, height, title)

Same initializer as Window

style

One of PanelStyle constants. Sets the style of the panel like IB’s selector does.

Table Of Contents

Previous topic

Formatters

Next topic

Menu

This Page