![]() |
API 0.9.5
|
#import <CPWindowController.h>
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 |
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.
loadWindow
method.loadWindow
is called the first time the window object is needed. Definition at line 2 of file CPWindowController.h.
- (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.
aWindow | the window to control |
Definition at line 67 of file CPWindowController.j.
- (id) initWithWindowCibName: | (CPString) | aWindowCibName |
Initializes the controller with a Cappuccino Interface Builder name.
aWindowCibName | the cib name of the window to control |
Definition at line 89 of file CPWindowController.j.
- (id) initWithWindowCibName: | (CPString) | aWindowCibName | |
owner: | (id) | anOwner | |
Initializes the controller with a cafe name.
aWindowCibName | the cib name of the window to control |
anOwner | the owner of the cib file |
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.
aDocument | the 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
isEdited | YES 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.
aWindow | the 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.
aSender | the 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.
Returns the window title based on the document's name.
aDisplayName | the 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.