API  1.0.0
CPWindowController Class Reference

#import <CPWindowController.h>

+ Inheritance diagram for CPWindowController:

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
 
- Instance Methods inherited from CPResponder
(BOOL) - acceptsFirstResponder
 
(BOOL) - becomeFirstResponder
 
(void) - cursorUpdate:
 
(void) - doCommandBySelector:
 
(void) - encodeWithCoder:
 
(void) - flagsChanged:
 
(id) - initWithCoder:
 
(void) - insertBackTab:
 
(void) - insertLineBreak:
 
(void) - insertNewline:
 
(void) - insertTab:
 
(void) - insertText:
 
(void) - interpretKeyEvents:
 
(void) - keyDown:
 
(void) - keyUp:
 
(CPMenu- menu
 
(void) - mouseDown:
 
(void) - mouseDragged:
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(void) - mouseMoved:
 
(void) - mouseUp:
 
(CPResponder- nextResponder
 
(void) - noResponderFor:
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - resignFirstResponder
 
(void) - rightMouseDown:
 
(void) - rightMouseUp:
 
(void) - scrollWheel:
 
(void) - setMenu:
 
(void) - setNextResponder:
 
(BOOL) - tryToPerform:with:
 
(CPUndoManager- undoManager
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Additional Inherited Members

- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

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 AppKit'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

◆ addDocument:()

- (void) addDocument: (CPDocument aDocument
implementation

Definition at line 301 of file CPWindowController.j.

◆ close()

- (void) close
implementation

Definition at line 463 of file CPWindowController.j.

◆ document()

- (CPDocument) document
implementation

Returns the CPDocument in the controlled window.

Definition at line 449 of file CPWindowController.j.

◆ documents()

- (CPArray) documents
implementation

Definition at line 328 of file CPWindowController.j.

◆ init()

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 62 of file CPWindowController.j.

◆ initWithWindow:()

- (id) initWithWindow: (CPWindow aWindow
implementation

Initializes the controller with a window.

Parameters
aWindowthe window to control
Returns
the initialized window controller

Definition at line 72 of file CPWindowController.j.

◆ initWithWindowCibName:()

- (id) initWithWindowCibName: (CPString aWindowCibName
implementation

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 94 of file CPWindowController.j.

◆ initWithWindowCibName:owner:()

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

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 105 of file CPWindowController.j.

◆ initWithWindowCibPath:owner:()

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

Definition at line 118 of file CPWindowController.j.

◆ isWindowLoaded()

- (BOOL) isWindowLoaded
implementation

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

Definition at line 161 of file CPWindowController.j.

◆ loadWindow()

- (void) loadWindow
implementation

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 135 of file CPWindowController.j.

◆ owner()

- (id) owner
implementation

Definition at line 478 of file CPWindowController.j.

◆ removeDocument:()

- (void) removeDocument: (CPDocument aDocument
implementation

Definition at line 307 of file CPWindowController.j.

◆ removeDocumentAndCloseIfNecessary:()

- (void) removeDocumentAndCloseIfNecessary: (CPDocument aDocument
implementation

Definition at line 320 of file CPWindowController.j.

◆ setDocument:()

- (void) setDocument: (CPDocument aDocument
implementation

Sets the document that is inside the controlled window.

Parameters
aDocumentthe document in the controlled window

Definition at line 230 of file CPWindowController.j.

◆ setDocumentEdited:()

- (void) setDocumentEdited: (BOOL)  isEdited
implementation

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 458 of file CPWindowController.j.

◆ setShouldCloseDocument:()

- (void) setShouldCloseDocument: (BOOL)  shouldCloseDocument
implementation

Definition at line 468 of file CPWindowController.j.

◆ setSupportsMultipleDocuments:()

- (void) setSupportsMultipleDocuments: (BOOL)  shouldSupportMultipleDocuments
implementation

Definition at line 291 of file CPWindowController.j.

◆ setViewController:()

- (void) setViewController: (CPViewController aViewController
implementation

Definition at line 378 of file CPWindowController.j.

◆ setViewControllerContainerView:()

- (void) setViewControllerContainerView: (CPView aView
implementation

Definition at line 333 of file CPWindowController.j.

◆ setWindow:()

- (void) setWindow: (CPWindow aWindow
implementation

Sets the window to be controlled.

Parameters
aWindowthe new window to control

Definition at line 202 of file CPWindowController.j.

◆ shouldCloseDocument()

- (BOOL) shouldCloseDocument
implementation

Definition at line 473 of file CPWindowController.j.

◆ showWindow:()

- (action) showWindow: (id)  aSender
implementation

Shows the window.

Parameters
aSenderthe object requesting the show

Definition at line 147 of file CPWindowController.j.

◆ supportsMultipleDocuments()

- (BOOL) supportsMultipleDocuments
implementation

Definition at line 296 of file CPWindowController.j.

◆ synchronizeWindowTitleWithDocumentName()

- (void) synchronizeWindowTitleWithDocumentName
implementation

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

Definition at line 504 of file CPWindowController.j.

◆ viewController()

- (CPViewController) viewController
implementation

Definition at line 423 of file CPWindowController.j.

◆ viewControllerContainerView()

- (void) viewControllerContainerView
implementation

Definition at line 373 of file CPWindowController.j.

◆ window()

- (CPWindow) window
implementation

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

Definition at line 170 of file CPWindowController.j.

◆ windowCibName()

- (CPString) windowCibName
implementation

Definition at line 483 of file CPWindowController.j.

◆ windowCibPath()

- (CPString) windowCibPath
implementation

Definition at line 491 of file CPWindowController.j.

◆ windowDidLoad()

- (void) windowDidLoad
implementation

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

Definition at line 215 of file CPWindowController.j.

◆ windowTitleForDocumentDisplayName:()

- (CPString) windowTitleForDocumentDisplayName: (CPString aDisplayName
implementation

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

Parameters
aDisplayNamethe document's filename

Definition at line 517 of file CPWindowController.j.

◆ windowWillLoad()

- (void) windowWillLoad
implementation

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

Definition at line 222 of file CPWindowController.j.


The documentation for this class was generated from the following files: