API 0.9.5
CPWindowController Class Reference

#import <CPWindowController.h>

Inheritance diagram for CPWindowController:

List of all members.

Instance Methods

(void) - addDocument:
(void) - close
(CPDocument- document
(CPArray- documents
(id) - init
(id) - initWithWindow:
(id) - initWithWindowCibName:
(id) - initWithWindowCibName:owner:
(id) - initWithWindowCibPath:owner:
(BOOL) - isWindowLoaded
(void) - loadWindow
(id) - owner
(void) - removeDocument:
(void) - removeDocumentAndCloseIfNecessary:
(void) - setDocument:
(void) - setDocumentEdited:
(void) - setShouldCloseDocument:
(void) - setSupportsMultipleDocuments:
(void) - setViewController:
(void) - setViewControllerContainerView:
(void) - setWindow:
(BOOL) - shouldCloseDocument
(action) - showWindow:
(BOOL) - supportsMultipleDocuments
(void) - synchronizeWindowTitleWithDocumentName
(CPViewController- viewController
(void) - viewControllerContainerView
(CPWindow- window
(CPString- windowCibName
(CPString- windowCibPath
(void) - windowDidLoad
(CPString- windowTitleForDocumentDisplayName:
(void) - windowWillLoad

Detailed Description

An instance of a CPWindowController manages a CPWindow. Windows are typically loaded via a cib, but they can also manage windows created in code. A CPWindowController can manage a window by itself or work with AppKits's document-based architecture.

In a Document based app, a CPWindowController instance is created and managed by a CPDocument subclass.

If the CPWindowController is managing a CPWindow created in a cib the owner of the CPWindow is this controller.

Note:
When creating the window programatically (instead of a cib) you should override the loadWindow method.loadWindow is called the first time the window object is needed.

Definition at line 2 of file CPWindowController.h.


Method Documentation

- (void) addDocument: (CPDocument aDocument

Definition at line 297 of file CPWindowController.j.

- (void) close

Definition at line 398 of file CPWindowController.j.

- (CPDocument) document

Returns the CPDocument in the controlled window.

Definition at line 384 of file CPWindowController.j.

- (CPArray) documents

Definition at line 324 of file CPWindowController.j.

- (id) init

Definition at line 57 of file CPWindowController.j.

- (id) initWithWindow: (CPWindow aWindow

Initializes the controller with a window.

Parameters:
aWindowthe window to control
Returns:
the initialized window controller

Definition at line 67 of file CPWindowController.j.

- (id) initWithWindowCibName: (CPString aWindowCibName

Initializes the controller with a Cappuccino Interface Builder name.

Parameters:
aWindowCibNamethe cib name of the window to control
Returns:
the initialized window controller

Definition at line 89 of file CPWindowController.j.

- (id) initWithWindowCibName: (CPString aWindowCibName
owner: (id)  anOwner 

Initializes the controller with a cafe name.

Parameters:
aWindowCibNamethe cib name of the window to control
anOwnerthe owner of the cib file
Returns:
the initialized window controller

Definition at line 100 of file CPWindowController.j.

- (id) initWithWindowCibPath: (CPString aWindowCibPath
owner: (id)  anOwner 

Definition at line 113 of file CPWindowController.j.

- (BOOL) isWindowLoaded

Returns YES if the window has been loaded. Specifically, if loadWindow has been called.

Definition at line 156 of file CPWindowController.j.

- (void) loadWindow

Loads the window. This method should never be called directly. Instead call window which will in turn call windowWillLoad and windowDidLoad. This method should be overwritten if you are creating the view programatically.

Definition at line 130 of file CPWindowController.j.

- (id) owner

Definition at line 413 of file CPWindowController.j.

- (void) removeDocument: (CPDocument aDocument

Definition at line 303 of file CPWindowController.j.

- (void) removeDocumentAndCloseIfNecessary: (CPDocument aDocument

Definition at line 316 of file CPWindowController.j.

- (void) setDocument: (CPDocument aDocument

Sets the document that is inside the controlled window.

Parameters:
aDocumentthe document in the controlled window

Definition at line 226 of file CPWindowController.j.

- (void) setDocumentEdited: (BOOL)  isEdited

Sets whether the document has unsaved changes. The window can use this as a hint to

Parameters:
isEditedYES means the document has unsaved changes.

Definition at line 393 of file CPWindowController.j.

- (void) setShouldCloseDocument: (BOOL)  shouldCloseDocument

Definition at line 403 of file CPWindowController.j.

- (void) setSupportsMultipleDocuments: (BOOL)  shouldSupportMultipleDocuments

Definition at line 287 of file CPWindowController.j.

- (void) setViewController: (CPViewController aViewController

Definition at line 339 of file CPWindowController.j.

- (void) setViewControllerContainerView: (CPView aView

Definition at line 329 of file CPWindowController.j.

- (void) setWindow: (CPWindow aWindow

Sets the window to be controlled.

Parameters:
aWindowthe new window to control

Definition at line 198 of file CPWindowController.j.

- (BOOL) shouldCloseDocument

Definition at line 408 of file CPWindowController.j.

- (action) showWindow: (id)  aSender

Shows the window.

Parameters:
aSenderthe object requesting the show

Definition at line 142 of file CPWindowController.j.

- (BOOL) supportsMultipleDocuments

Definition at line 292 of file CPWindowController.j.

- (void) synchronizeWindowTitleWithDocumentName

Sets the title of the window as the name of the document.

Definition at line 439 of file CPWindowController.j.

- (CPViewController) viewController

Definition at line 358 of file CPWindowController.j.

- (void) viewControllerContainerView

Definition at line 334 of file CPWindowController.j.

- (CPWindow) window

Returns the CPWindow the reciever controls. This will cause loadWindow to be called if no window object exists yet.

Definition at line 165 of file CPWindowController.j.

- (CPString) windowCibName

Definition at line 418 of file CPWindowController.j.

- (CPString) windowCibPath

Definition at line 426 of file CPWindowController.j.

- (void) windowDidLoad

The method notifies the controller that it's window has loaded.

Definition at line 211 of file CPWindowController.j.

- (CPString) windowTitleForDocumentDisplayName: (CPString aDisplayName

Returns the window title based on the document's name.

Parameters:
aDisplayNamethe document's filename

Definition at line 452 of file CPWindowController.j.

- (void) windowWillLoad

The method notifies the controller that it's window is about to load.

Definition at line 218 of file CPWindowController.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines