mirror of
https://github.com/dsward2/macSVG.git
synced 2026-10-24 07:15:14 +02:00
The Generate HTML5 Video command should be working again for Macs that don't use Xeon processors. The biggest set of changes is to suppress the warning messages for deprecated WebKit APIs. This is done by wrapping some conditional code around the deprecated code, e.g., #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // deprecated APIs used here #pragma clang diagnostic pop More work needs to be done on this. Several other deprecated macOS APIs were identified, and several were updated. A subsequent commit is planned to update some third-party code, like CocoaAsyncSocket, CocoaHTTPServer, etc.
112 lines
3.8 KiB
Objective-C
112 lines
3.8 KiB
Objective-C
//
|
|
// SVGPathEditor.h
|
|
// macSVG
|
|
//
|
|
// Created by Douglas Ward on 11/14/11.
|
|
// Copyright © 2016 ArkPhone LLC. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import <WebKit/WebKit.h>
|
|
|
|
@class SVGWebKitController;
|
|
@class MacSVGDocumentWindowController;
|
|
@class DOMMouseEventsController;
|
|
@class SVGXMLDOMSelectionManager;
|
|
@class ToolSettingsPopoverViewController;
|
|
|
|
#define kPathEditingModeNotActive 0
|
|
#define kPathEditingModeCurrentSegment 1
|
|
#define kPathEditingModePreviousSegment 2
|
|
#define kPathEditingModeNextSegment 2
|
|
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
|
@interface SVGPathEditor : NSObject
|
|
{
|
|
IBOutlet SVGWebKitController * svgWebKitController;
|
|
IBOutlet MacSVGDocumentWindowController * macSVGDocumentWindowController;
|
|
IBOutlet SVGXMLDOMSelectionManager * svgXMLDOMSelectionManager;
|
|
IBOutlet DOMMouseEventsController * domMouseEventsController;
|
|
IBOutlet ToolSettingsPopoverViewController * toolSettingsPopoverViewController;
|
|
}
|
|
|
|
@property(assign) NSInteger editingMode;
|
|
|
|
@property(assign) BOOL useRelativePathCoordinates;
|
|
@property(assign) BOOL closePathAutomatically;
|
|
@property(assign) BOOL curveSegmentContinuity;
|
|
@property(assign) BOOL highlightSelectedSegment;
|
|
|
|
@property(strong) NSMutableArray * pathSegmentsArray; // array of path segment dictionaries
|
|
@property(strong) NSXMLElement * selectedPathElement;
|
|
@property(assign) NSInteger pathSegmentIndex;
|
|
@property(strong) NSString * pathEditingKey;
|
|
|
|
@property(strong) NSString * largeArcFlagString;
|
|
@property(strong) NSString * sweepFlagString;
|
|
@property(strong) NSString * xAxisRotationString;
|
|
@property(strong) NSString * pathRadiusXString;
|
|
@property(strong) NSString * pathRadiusYString;
|
|
|
|
@property(strong) NSArray * parametersMoveto;
|
|
@property(strong) NSArray * parametersLineto;
|
|
@property(strong) NSArray * parametersHorizontalLineto;
|
|
@property(strong) NSArray * parametersVerticalLineto;
|
|
@property(strong) NSArray * parametersCubicCurveto;
|
|
@property(strong) NSArray * parametersCubicCurvetoSmooth;
|
|
@property(strong) NSArray * parametersQuadraticCurveto;
|
|
@property(strong) NSArray * parametersQuadraticCurvetoSmooth;
|
|
@property(strong) NSArray * parametersEllipticalArc;
|
|
@property(strong) NSArray * parametersClosepath;
|
|
|
|
@property(strong) DOMElement * activeHandleDOMElement;
|
|
|
|
- (void) startPathWithParentDOMElement:(DOMElement *)parentDOMElement;
|
|
- (void) extendPath;
|
|
- (void) modifyPath;
|
|
- (void) editPath;
|
|
- (void) handleMouseHoverEventForPath:(DOMEvent *)event;
|
|
|
|
-(void) updatePathMode:(NSString *)newPathMode;
|
|
|
|
- (void)updateActivePathInDOM:(BOOL)updatePathLength;
|
|
- (void)updateSelectedPathInDOM:(BOOL)updatePathLength;
|
|
|
|
- (void)updatePathInDOMForElement:(DOMElement *)pathElement pathSegmentsArray:(NSArray *)aPathSegmentsArray updatePathLength:(BOOL)updatePathLength;
|
|
|
|
- (void)buildPathSegmentsArray:(NSXMLElement *)pathElement;
|
|
|
|
- (NSMutableArray *)buildPathSegmentsArrayWithPathString:(NSString *)pathString;
|
|
- (NSString *)buildPathStringWithPathSegmentsArray:(NSArray *)aPathSegmentsArray;
|
|
|
|
- (void)updatePathSegmentsAbsoluteValues:(NSMutableArray *)aPathSegmentsArray;
|
|
|
|
//-(void) makePathHandles;
|
|
-(void) makePathHandlesForXMLElement:(NSXMLElement *)pathXMLElement;
|
|
|
|
- (void)resetPathSegmentsArray;
|
|
|
|
- (void)deleteLastSegmentInPath;
|
|
|
|
- (void)offsetPath:(DOMElement *)pathElement deltaX:(float)deltaX deltaY:(float)deltaY;
|
|
|
|
//- (BOOL)findClickedPathSegmentHandle;
|
|
- (NSInteger)setActiveDOMHandle:(DOMElement *)handleDOMElement;
|
|
|
|
|
|
- (NSInteger)didBeginPathEditingWithTargetXMLElement:(NSXMLElement *)targetXMLElement handleDOMElement:(DOMElement *)handleDOMElement;
|
|
|
|
- (void)removePathHandles;
|
|
|
|
- (void)restartLastPathSegment;
|
|
|
|
- (NSPoint)endPointForSegmentIndex:(NSInteger)segmentIndex
|
|
pathSegmentsArray:(NSArray *)aPathSegmentsArray;
|
|
|
|
@end
|
|
|
|
#pragma clang diagnostic pop
|