#import <CPDocument.h>
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 |
CPDocument is used to represent a document/file in a Cappuccino application. In a document-based application, generally multiple documents are open simultaneously (multiple text documents, slide presentations, spreadsheets, etc.), and multiple CPDocuments should be used to represent this.
Definition at line 2 of file CPDocument.h.
|
implementation |
Definition at line 330 of file CPDocument.j.
|
implementation |
Add a controller to the document's list of controllers. This should be called after making a new window controller.
aWindowController | the controller to add |
Definition at line 298 of file CPDocument.j.
|
implementation |
Provided by category CPDocument(ClosingDocuments).
Definition at line 893 of file CPDocument.j.
|
implementation |
Provided by category CPDocument(ClosingDocuments).
Definition at line 872 of file CPDocument.j.
|
implementation |
Provided by category CPDocument(ClosingDocuments).
Definition at line 846 of file CPDocument.j.
|
implementation |
Definition at line 577 of file CPDocument.j.
|
implementation |
Definition at line 549 of file CPDocument.j.
|
implementation |
Definition at line 489 of file CPDocument.j.
|
implementation |
Definition at line 606 of file CPDocument.j.
Returns the receiver's data in a specified type. The default implementation just throws an exception.
aType | the format of the data |
anError | not used |
CPUnsupportedMethodException | if this method hasn't been overridden by the subclass |
Definition at line 209 of file CPDocument.j.
|
implementation |
Returns the name of the document as displayed in the title bar.
Definition at line 362 of file CPDocument.j.
|
implementation |
Returns the document's file type
Definition at line 653 of file CPDocument.j.
|
implementation |
Returns the path to the document's file.
Definition at line 427 of file CPDocument.j.
|
implementation |
Returns YES
if the document has a CPUndoManager.
Definition at line 663 of file CPDocument.j.
|
implementation |
Initializes an empty document.
Reimplemented from CPObject.
Definition at line 116 of file CPDocument.j.
|
implementation |
Initializes the document from a URL.
anAbsoluteURL | the document location |
absoluteContentsURL | the location of the document's contents |
aType | the type of the contents |
aDelegate | this object will receive a callback after the document's contents are loaded |
aDidReadSelector | the message selector that will be sent to aDelegate |
aContextInfo | passed as the argument to the message sent to the aDelegate |
Definition at line 186 of file CPDocument.j.
|
implementation |
Initializes a document of a specific type located at a URL. Notifies the provided delegate after initialization.
anAbsoluteURL | the url of the document content |
aType | the type of document located at the URL |
aDelegate | the delegate to notify |
aDidReadSelector | the selector used to notify the delegate |
aContextInfo | context information passed to the delegate after initialization |
Definition at line 161 of file CPDocument.j.
Initializes the document with a specific data type.
aType | the type of document to initialize |
anError | not used |
Definition at line 140 of file CPDocument.j.
|
implementation |
Returns YES
if there are any unsaved changes.
Definition at line 616 of file CPDocument.j.
|
implementation |
Definition at line 247 of file CPDocument.j.
|
implementation |
Creates the window controller for this document.
Definition at line 242 of file CPDocument.j.
|
implementation |
Sets the content of the document by reading the provided data. The default implementation just throws an exception.
aData | the document's data |
aType | the document type |
anError | not used |
CPUnsupportedMethodException | if this method hasn't been overridden by the subclass |
Definition at line 224 of file CPDocument.j.
|
implementation |
Set the document's data from a URL. Notifies the provided delegate afterwards.
anAbsoluteURL | the URL to the document's content |
aType | the document type |
aDelegate | delegate to notify after reading the data |
aDidReadSelector | message that will be sent to the delegate |
aContextInfo | context information that gets sent to the delegate |
Definition at line 414 of file CPDocument.j.
|
implementation |
Definition at line 339 of file CPDocument.j.
|
implementation |
Remove a controller to the document's list of controllers. This should be called after closing the controller's window.
aWindowController | the controller to remove |
Definition at line 311 of file CPDocument.j.
|
implementation |
Saves the document. If the document does not have a file path to save to (fileURL
) then -saveDocumentAs
: will be called.
aSender | the object requesting the save |
Definition at line 782 of file CPDocument.j.
|
implementation |
Saves the document to a user specified path.
aSender | the object requesting the operation |
Definition at line 805 of file CPDocument.j.
|
implementation |
Definition at line 787 of file CPDocument.j.
|
implementation |
Saves the document to the specified URL. Notifies the provided delegate with the provided selector and context info afterwards.
anAbsoluteURL | the url to write the document data to |
aTypeName | the document type |
aSaveOperation | the type of save operation |
aDelegate | the delegate to notify after saving |
aDidSaveSelector | the selector to send the delegate |
aContextInfo | context info that gets passed to the delegate |
Definition at line 456 of file CPDocument.j.
|
implementation |
Sets the document's file type
aType | the document's type |
Definition at line 645 of file CPDocument.j.
|
implementation |
Sets the path to the document's file.
aFileURL | the path to the document's file |
Definition at line 436 of file CPDocument.j.
|
implementation |
Sets whether the document should have a CPUndoManager.
aFlag | YES makes the document have an undo manager |
Definition at line 672 of file CPDocument.j.
|
implementation |
Definition at line 711 of file CPDocument.j.
|
implementation |
Provided by category CPDocument(ClosingDocuments).
Definition at line 852 of file CPDocument.j.
|
implementation |
Shows all the document's windows.
Definition at line 353 of file CPDocument.j.
|
implementation |
Returns the document's undo manager. If the document should have one, but the manager is nil
, it will be created and then returned.
Reimplemented from CPResponder.
Definition at line 758 of file CPDocument.j.
|
implementation |
Updates the number of unsaved changes to the document.
aChangeType | a new document change to apply |
Definition at line 625 of file CPDocument.j.
|
implementation |
Definition at line 320 of file CPDocument.j.
|
implementation |
Definition at line 376 of file CPDocument.j.
|
implementation |
Definition at line 234 of file CPDocument.j.
|
implementation |
Definition at line 344 of file CPDocument.j.
|
implementation |
Definition at line 325 of file CPDocument.j.
|
implementation |
Definition at line 230 of file CPDocument.j.
|
implementation |
Returns the document's Cib name
Definition at line 384 of file CPDocument.j.
|
implementation |
Called after aWindowController
loads the document's Nib file.
aWindowController | the controller that loaded the Nib file |
Definition at line 393 of file CPDocument.j.
|
implementation |
Returns the document's window controllers
Definition at line 288 of file CPDocument.j.
|
implementation |
Called before aWindowController
will load the document's Nib file.
aWindowController | the controller that will load the Nib file |
Definition at line 401 of file CPDocument.j.
|
implementation |
Definition at line 770 of file CPDocument.j.