Muvicado HD
Loading...
Searching...
No Matches
PadView(Persist) Category Reference

#include <PadView+Persist.h>

Instance Methods

(IBAction) - doOpen:
(IBAction) - doSave:
(IBAction) - doSaveAs:
(IBAction) - doImport:
(IBAction) - doExport:
(BOOL) - getPointFromXYPair [implementation]
(void) - parser:didStartElement:namespaceURI:qualifiedName:attributes: [implementation]
(void) - parser:parseErrorOccurred: [implementation]
(void) - parser:didEndElement:namespaceURI:qualifiedName: [implementation]
(void) - alertDidEnd:returnCode:contextInfo: [implementation]
(void) - parseXMLFile: [implementation]
(void) - openXmlPanelDidEnd:returnCode:contextInfo: [implementation]
(void) - openXMLFile [implementation]
(void) - setCurrentFile: [implementation]
(void) - parseMvFile: [implementation]
(void) - openMvPanelDidEnd:returnCode:contextInfo: [implementation]
(void) - openMvFile [implementation]
(NSString *) - panel:userEnteredFilename:confirmed: [implementation]
(void) - saveXMLFile: [implementation]
(void) - saveXmlPanelDidEnd:returnCode:contextInfo: [implementation]
(void) - saveXMLFile [implementation]
(BOOL) - saveMvToFile: [implementation]
(void) - saveMvPanelDidEnd:returnCode:contextInfo: [implementation]
(void) - saveMvFile [implementation]

Detailed Description

Category adding persistence (open/save/import/export) to PadView.

Definition at line 21 of file PadView+Persist.h.

Method Documentation

◆ alertDidEnd:returnCode:contextInfo:

- (void) alertDidEnd: (NSAlert *) alert
returnCode: (int) returnCode
contextInfo: (void *) contextInfo 
implementation

Alert sheet completion callback (reserved for future handling).

Extends class PadView.

Definition at line 316 of file PadView+Persist.m.

◆ doExport:

- (IBAction) doExport: (id) sender

Presents a Save panel to export the current document as XML (.muvi).

IBAction: Export to XML (.muvi).

Extends class PadView.

Definition at line 690 of file PadView+Persist.m.

Here is the call graph for this function:

◆ doImport:

- (IBAction) doImport: (id) sender

Presents an Open panel to import an XML (.muvi) file.

IBAction: Import from XML (.muvi).

Extends class PadView.

Definition at line 685 of file PadView+Persist.m.

Here is the call graph for this function:

◆ doOpen:

- (IBAction) doOpen: (id) sender

Presents an Open panel to choose and load a native .mv file.

IBAction: Open a native .mv file.

Extends class PadView.

Definition at line 634 of file PadView+Persist.m.

Here is the call graph for this function:

◆ doSave:

- (IBAction) doSave: (id) sender

Saves the current document to the existing .mv path or prompts with Save As.

IBAction: Save the current document. Falls back to Save As if no current file.

Extends class PadView.

Definition at line 639 of file PadView+Persist.m.

Here is the call graph for this function:

◆ doSaveAs:

- (IBAction) doSaveAs: (id) sender

Presents a Save panel to choose a destination for the .mv file.

IBAction: Save As… to choose a new .mv destination.

Extends class PadView.

Definition at line 680 of file PadView+Persist.m.

Here is the call graph for this function:

◆ getPointFromXYPair

- (BOOL) getPointFromXYPair (NSString *) xyPair
(NSPoint *) point 
implementation

Parse an SVG-style coordinate pair string into an NSPoint.

Parameters
xyPairA string containing "x,y".
pointOutput parameter that receives the parsed point (must be non-null).
Returns
YES if parsing succeeds and point is assigned; NO otherwise.

Extends class PadView.

Definition at line 37 of file PadView+Persist.m.

Here is the caller graph for this function:

◆ openMvFile

- (void) openMvFile
implementation

Present an Open panel to choose a native .mv file to open.

Extends class PadView.

Definition at line 448 of file PadView+Persist.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openMvPanelDidEnd:returnCode:contextInfo:

- (void) openMvPanelDidEnd: (NSOpenPanel *) sheet
returnCode: (int) returnCode
contextInfo: (void *) contextInfo 
implementation

Completion handler for the Open panel when opening a native .mv file.

Extends class PadView.

Definition at line 435 of file PadView+Persist.m.

Here is the call graph for this function:

◆ openXMLFile

- (void) openXMLFile
implementation

Present an Open panel to choose a .muvi XML file to import.

Extends class PadView.

Definition at line 362 of file PadView+Persist.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ openXmlPanelDidEnd:returnCode:contextInfo:

- (void) openXmlPanelDidEnd: (NSOpenPanel *) sheet
returnCode: (int) returnCode
contextInfo: (void *) contextInfo 
implementation

Completion handler for the Open panel when importing XML (.muvi). Persists the starting directory and triggers parsing.

Extends class PadView.

Definition at line 349 of file PadView+Persist.m.

Here is the call graph for this function:

◆ panel:userEnteredFilename:confirmed:

- (NSString *) panel: (id) sender
userEnteredFilename: (NSString *) filename
confirmed: (BOOL) okFlag 
implementation

NSSavePanel/NSOpenPanel delegate allowing user-entered filenames.

Returns
The confirmed filename when okFlag is YES; otherwise nil.

Extends class PadView.

Definition at line 466 of file PadView+Persist.m.

◆ parseMvFile:

- (void) parseMvFile: (NSString *) pathToFile
implementation

Parse and load a native .mv archive produced by NSKeyedArchiver.

Parameters
pathToFileAbsolute path to the .mv file.

Extends class PadView.

Definition at line 393 of file PadView+Persist.m.

Here is the call graph for this function:

◆ parser:didEndElement:namespaceURI:qualifiedName:

- (void) parser: (NSXMLParser *) parser
didEndElement: (NSString *) elementName
namespaceURI: (NSString *) namespaceURI
qualifiedName: (NSString *) qName 
implementation

NSXMLParser delegate: end element handler (currently unused).

Extends class PadView.

Definition at line 312 of file PadView+Persist.m.

◆ parser:didStartElement:namespaceURI:qualifiedName:attributes:

- (void) parser: (NSXMLParser *) parser
didStartElement: (NSString *) elementName
namespaceURI: (NSString *) namespaceURI
qualifiedName: (NSString *) qName
attributes: (NSDictionary *) attributeDict 
implementation

NSXMLParser delegate: called when the parser encounters a start element.

Handles <svg>, <g>, and <path> elements to construct Pad instances and their geometry/colors.

Parameters
parserThe XML parser.
elementNameThe qualified element name.
namespaceURIThe namespace URI (unused).
qNameThe qualified name (unused).
attributeDictAttributes for the element.

M (absolute) m (relative) moveto (x y)+ Start a new sub-path at the given (x,y) coordinate. M (uppercase) indicates that absolute coordinates will follow; m (lowercase) indicates that relative coordinates will follow. If a moveto is followed by multiple pairs of coordinates, the subsequent pairs are treated as implicit lineto commands. Hence, implicit lineto commands will be relative if the moveto is relative, and absolute if the moveto is absolute. If a relative moveto (m) appears as the first element of the path, then it is treated as a pair of absolute coordinates. In this case, subsequent pairs of coordinates are treated as relative even though the initial moveto is interpreted as an absolute moveto.

Extends class PadView.

Definition at line 66 of file PadView+Persist.m.

Here is the call graph for this function:

◆ parser:parseErrorOccurred:

- (void) parser: (NSXMLParser *) parser
parseErrorOccurred: (NSError *) parseError 
implementation

NSXMLParser delegate: called when a parsing error occurs. Presents an alert describing the error, line, and column.

Parameters
parserThe XML parser.
parseErrorThe parsing error.

Extends class PadView.

Definition at line 295 of file PadView+Persist.m.

◆ parseXMLFile:

- (void) parseXMLFile: (NSString *) pathToFile
implementation

Parse and import a .muvi XML/SVG file, updating the view contents.

Parameters
pathToFileAbsolute path to the .muvi file.

Extends class PadView.

Definition at line 327 of file PadView+Persist.m.

Here is the call graph for this function:

◆ saveMvFile

- (void) saveMvFile
implementation

Present a Save panel to save the current document as a native .mv file.

Extends class PadView.

Definition at line 617 of file PadView+Persist.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveMvPanelDidEnd:returnCode:contextInfo:

- (void) saveMvPanelDidEnd: (NSSavePanel *) sheet
returnCode: (NSInteger) returnCode
contextInfo: (void *) contextInfo 
implementation

Completion handler for the Save panel when saving a native .mv file.

Extends class PadView.

Definition at line 596 of file PadView+Persist.m.

Here is the call graph for this function:

◆ saveMvToFile:

- (BOOL) saveMvToFile: (NSString *) pathToFile
implementation

Save the current elements to a native archive (.mv). called by doSave and by saveMvPanelDidEnd

Parameters
pathToFileDestination path for the archive.
Returns
YES on success; NO otherwise.

Extends class PadView.

Definition at line 589 of file PadView+Persist.m.

◆ saveXMLFile

- (void) saveXMLFile
implementation

Present a Save panel to export the current document as XML (.muvi).

Extends class PadView.

Definition at line 566 of file PadView+Persist.m.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveXMLFile:

- (void) saveXMLFile: (NSString *) pathToFile
implementation

Serialize the current elements to an SVG-like XML file (.muvi).

Parameters
pathToFileDestination path for the XML.

Extends class PadView.

Definition at line 483 of file PadView+Persist.m.

Here is the call graph for this function:

◆ saveXmlPanelDidEnd:returnCode:contextInfo:

- (void) saveXmlPanelDidEnd: (NSSavePanel *) sheet
returnCode: (NSInteger) returnCode
contextInfo: (void *) contextInfo 
implementation

Completion handler for the Save panel when exporting XML (.muvi).

Extends class PadView.

Definition at line 550 of file PadView+Persist.m.

Here is the call graph for this function:

◆ setCurrentFile:

- (void) setCurrentFile: (NSString *) pathToFile
implementation

Set the current .mv file path and update the window's represented filename.

Parameters
pathToFileThe path to associate with the current document.

Extends class PadView.

Definition at line 383 of file PadView+Persist.m.


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