mirror of
https://github.com/exyte/Macaw.git
synced 2024-11-05 04:13:48 +03:00
Public identifiers for static fields
This commit is contained in:
parent
0fa3e3c930
commit
13ca44e068
@ -4,22 +4,22 @@ public class Color: Fill {
|
||||
|
||||
var val: Int = 0
|
||||
|
||||
static var white: Color = Color( val: 0xFFFFFF )
|
||||
static var silver: Color = Color( val: 0xC0C0C0 )
|
||||
static var gray: Color = Color( val: 0x808080 )
|
||||
static var black: Color = Color( val: 0 )
|
||||
static var red: Color = Color( val: 0xFF0000 )
|
||||
static var maroon: Color = Color( val: 0x800000 )
|
||||
static var yellow: Color = Color( val: 0xFFFF00 )
|
||||
static var olive: Color = Color( val: 0x808000 )
|
||||
static var lime: Color = Color( val: 0x00FF00 )
|
||||
static var green: Color = Color( val: 0x008000 )
|
||||
static var aqua: Color = Color( val: 0x00FFFF )
|
||||
static var teal: Color = Color( val: 0x008080 )
|
||||
static var blue: Color = Color( val: 0x0000FF )
|
||||
static var navy: Color = Color( val: 0x000080 )
|
||||
static var fuchsia: Color = Color( val: 0xFF00FF )
|
||||
static var purple: Color = Color( val: 0x800080 )
|
||||
public static var white: Color = Color( val: 0xFFFFFF )
|
||||
public static var silver: Color = Color( val: 0xC0C0C0 )
|
||||
public static var gray: Color = Color( val: 0x808080 )
|
||||
public static var black: Color = Color( val: 0 )
|
||||
public static var red: Color = Color( val: 0xFF0000 )
|
||||
public static var maroon: Color = Color( val: 0x800000 )
|
||||
public static var yellow: Color = Color( val: 0xFFFF00 )
|
||||
public static var olive: Color = Color( val: 0x808000 )
|
||||
public static var lime: Color = Color( val: 0x00FF00 )
|
||||
public static var green: Color = Color( val: 0x008000 )
|
||||
public static var aqua: Color = Color( val: 0x00FFFF )
|
||||
public static var teal: Color = Color( val: 0x008080 )
|
||||
public static var blue: Color = Color( val: 0x0000FF )
|
||||
public static var navy: Color = Color( val: 0x000080 )
|
||||
public static var fuchsia: Color = Color( val: 0xFF00FF )
|
||||
public static var purple: Color = Color( val: 0x800080 )
|
||||
|
||||
init(val: Int = 0) {
|
||||
self.val = val
|
||||
|
@ -2,9 +2,9 @@ import Foundation
|
||||
|
||||
public class Drawable {
|
||||
|
||||
var tag: [String]
|
||||
var tag: [String] = []
|
||||
|
||||
init(tag: [String]) {
|
||||
init(tag: [String] = []) {
|
||||
self.tag = tag
|
||||
}
|
||||
|
||||
|
@ -4,12 +4,12 @@ public class Font {
|
||||
|
||||
var name: String = "Serif"
|
||||
var size: Int = 12
|
||||
var bold: Bool = false
|
||||
var italic: Bool = false
|
||||
var underline: Bool = false
|
||||
var strike_through: Bool = false
|
||||
var bold: NSNumber = false
|
||||
var italic: NSNumber = false
|
||||
var underline: NSNumber = false
|
||||
var strike_through: NSNumber = false
|
||||
|
||||
init(name: String = "Serif", size: Int = 12, bold: Bool = false, italic: Bool = false, underline: Bool = false, strike_through: Bool = false) {
|
||||
init(name: String = "Serif", size: Int = 12, bold: NSNumber = false, italic: NSNumber = false, underline: NSNumber = false, strike_through: NSNumber = false) {
|
||||
self.name = name
|
||||
self.size = size
|
||||
self.bold = bold
|
||||
|
@ -2,14 +2,14 @@ import Foundation
|
||||
|
||||
public class LinearGradient: Fill {
|
||||
|
||||
var userSpace: Bool
|
||||
var stops: [Stop]
|
||||
var userSpace: Bool = false
|
||||
var stops: [Stop] = []
|
||||
var x1: NSNumber = 0
|
||||
var y1: NSNumber = 0
|
||||
var x2: NSNumber = 0
|
||||
var y2: NSNumber = 0
|
||||
|
||||
init(userSpace: Bool, stops: [Stop], x1: NSNumber = 0, y1: NSNumber = 0, x2: NSNumber = 0, y2: NSNumber = 0) {
|
||||
init(userSpace: Bool = false, stops: [Stop] = [], x1: NSNumber = 0, y1: NSNumber = 0, x2: NSNumber = 0, y2: NSNumber = 0) {
|
||||
self.userSpace = userSpace
|
||||
self.stops = stops
|
||||
self.x1 = x1
|
||||
|
@ -6,9 +6,9 @@ public class Stroke {
|
||||
var width: Float = 1
|
||||
var cap: LineCap
|
||||
var join: LineJoin
|
||||
var dashes: [NSNumber]
|
||||
var dashes: [NSNumber] = []
|
||||
|
||||
init(fill: Fill, width: Float = 1, cap: LineCap, join: LineJoin, dashes: [NSNumber]) {
|
||||
init(fill: Fill, width: Float = 1, cap: LineCap, join: LineJoin, dashes: [NSNumber] = []) {
|
||||
self.fill = fill
|
||||
self.width = width
|
||||
self.cap = cap
|
||||
|
@ -2,7 +2,7 @@ import Foundation
|
||||
|
||||
public class Close: PathSegment {
|
||||
|
||||
override init(absolute: Bool) {
|
||||
override init(absolute: Bool = false) {
|
||||
super.init(
|
||||
absolute: absolute
|
||||
)
|
||||
|
@ -9,7 +9,7 @@ public class Cubic: PathSegment {
|
||||
var x: NSNumber = 0
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(x1: NSNumber = 0, y1: NSNumber = 0, x2: NSNumber = 0, y2: NSNumber = 0, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool) {
|
||||
init(x1: NSNumber = 0, y1: NSNumber = 0, x2: NSNumber = 0, y2: NSNumber = 0, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.x1 = x1
|
||||
self.y1 = y1
|
||||
self.x2 = x2
|
||||
|
@ -5,12 +5,12 @@ public class Elliptical: PathSegment {
|
||||
var rx: NSNumber = 0
|
||||
var ry: NSNumber = 0
|
||||
var angle: NSNumber = 0
|
||||
var largeArc: Bool
|
||||
var sweep: Bool
|
||||
var largeArc: Bool = false
|
||||
var sweep: Bool = false
|
||||
var x: NSNumber = 0
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(rx: NSNumber = 0, ry: NSNumber = 0, angle: NSNumber = 0, largeArc: Bool, sweep: Bool, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool) {
|
||||
init(rx: NSNumber = 0, ry: NSNumber = 0, angle: NSNumber = 0, largeArc: Bool = false, sweep: Bool = false, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.rx = rx
|
||||
self.ry = ry
|
||||
self.angle = angle
|
||||
|
@ -4,7 +4,7 @@ public class HLine: PathSegment {
|
||||
|
||||
var x: NSNumber = 0
|
||||
|
||||
init(x: NSNumber = 0, absolute: Bool) {
|
||||
init(x: NSNumber = 0, absolute: Bool = false) {
|
||||
self.x = x
|
||||
super.init(
|
||||
absolute: absolute
|
||||
|
@ -5,7 +5,7 @@ public class Move: PathSegment {
|
||||
var x: NSNumber = 0
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(x: NSNumber = 0, y: NSNumber = 0, absolute: Bool) {
|
||||
init(x: NSNumber = 0, y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.x = x
|
||||
self.y = y
|
||||
super.init(
|
||||
|
@ -5,7 +5,7 @@ public class PLine: PathSegment {
|
||||
var x: NSNumber = 0
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(x: NSNumber = 0, y: NSNumber = 0, absolute: Bool) {
|
||||
init(x: NSNumber = 0, y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.x = x
|
||||
self.y = y
|
||||
super.init(
|
||||
|
@ -2,9 +2,9 @@ import Foundation
|
||||
|
||||
public class Path: Locus {
|
||||
|
||||
var segments: [PathSegment]
|
||||
var segments: [PathSegment] = []
|
||||
|
||||
init(segments: [PathSegment]) {
|
||||
init(segments: [PathSegment] = []) {
|
||||
self.segments = segments
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,9 @@ import Foundation
|
||||
|
||||
public class PathSegment {
|
||||
|
||||
var absolute: Bool
|
||||
var absolute: Bool = false
|
||||
|
||||
init(absolute: Bool) {
|
||||
init(absolute: Bool = false) {
|
||||
self.absolute = absolute
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,9 @@ import Foundation
|
||||
|
||||
public class Polygon: Locus {
|
||||
|
||||
var points: [NSNumber]
|
||||
var points: [NSNumber] = []
|
||||
|
||||
init(points: [NSNumber]) {
|
||||
init(points: [NSNumber] = []) {
|
||||
self.points = points
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,9 @@ import Foundation
|
||||
|
||||
public class Polyline: Locus {
|
||||
|
||||
var points: [NSNumber]
|
||||
var points: [NSNumber] = []
|
||||
|
||||
init(points: [NSNumber]) {
|
||||
init(points: [NSNumber] = []) {
|
||||
self.points = points
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ public class Quadratic: PathSegment {
|
||||
var x: NSNumber = 0
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(x1: NSNumber = 0, y1: NSNumber = 0, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool) {
|
||||
init(x1: NSNumber = 0, y1: NSNumber = 0, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.x1 = x1
|
||||
self.y1 = y1
|
||||
self.x = x
|
||||
|
@ -7,7 +7,7 @@ public class SCubic: PathSegment {
|
||||
var x: NSNumber = 0
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(x2: NSNumber = 0, y2: NSNumber = 0, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool) {
|
||||
init(x2: NSNumber = 0, y2: NSNumber = 0, x: NSNumber = 0, y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.x2 = x2
|
||||
self.y2 = y2
|
||||
self.x = x
|
||||
|
@ -5,7 +5,7 @@ public class SQuadratic: PathSegment {
|
||||
var x: NSNumber = 0
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(x: NSNumber = 0, y: NSNumber = 0, absolute: Bool) {
|
||||
init(x: NSNumber = 0, y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.x = x
|
||||
self.y = y
|
||||
super.init(
|
||||
|
@ -33,9 +33,10 @@ public class Transform {
|
||||
// TODO initial implementation
|
||||
return Transform()
|
||||
}
|
||||
// GENERATED
|
||||
// GENERATED NOT
|
||||
func shear(shx: Float, shy: Float) -> Transform {
|
||||
return nil
|
||||
// TODO initial implementation
|
||||
return Transform()
|
||||
}
|
||||
|
||||
// GENERATED
|
||||
|
@ -4,7 +4,7 @@ public class VLine: PathSegment {
|
||||
|
||||
var y: NSNumber = 0
|
||||
|
||||
init(y: NSNumber = 0, absolute: Bool) {
|
||||
init(y: NSNumber = 0, absolute: Bool = false) {
|
||||
self.y = y
|
||||
super.init(
|
||||
absolute: absolute
|
||||
|
@ -2,13 +2,13 @@ import Foundation
|
||||
|
||||
public class Mouse {
|
||||
|
||||
var hover: Bool
|
||||
var hover: Bool = false
|
||||
var pos: Point
|
||||
var onEnter: Signal
|
||||
var onExit: Signal
|
||||
var onWheel: Signal
|
||||
|
||||
init(hover: Bool, pos: Point, onEnter: Signal, onExit: Signal, onWheel: Signal) {
|
||||
init(hover: Bool = false, pos: Point, onEnter: Signal, onExit: Signal, onWheel: Signal) {
|
||||
self.hover = hover
|
||||
self.pos = pos
|
||||
self.onEnter = onEnter
|
||||
|
@ -2,13 +2,13 @@ import Foundation
|
||||
|
||||
public class MouseButton {
|
||||
|
||||
var pressed: Bool
|
||||
var pressed: Bool = false
|
||||
var onPress: Signal
|
||||
var onRelease: Signal
|
||||
var onClick: Signal
|
||||
var onDoubleClick: Signal
|
||||
|
||||
init(pressed: Bool, onPress: Signal, onRelease: Signal, onClick: Signal, onDoubleClick: Signal) {
|
||||
init(pressed: Bool = false, onPress: Signal, onRelease: Signal, onClick: Signal, onDoubleClick: Signal) {
|
||||
self.pressed = pressed
|
||||
self.onPress = onPress
|
||||
self.onRelease = onRelease
|
||||
|
@ -2,9 +2,9 @@ import Foundation
|
||||
|
||||
public class Group: Node {
|
||||
|
||||
var contents: [Node]
|
||||
var contents: [Node] = []
|
||||
|
||||
init(contents: [Node], pos: Transform, opaque: Bool, visible: Bool, clip: Locus, tag: [String]) {
|
||||
init(contents: [Node] = [], pos: Transform, opaque: NSNumber = true, visible: NSNumber = true, clip: Locus, tag: [String] = []) {
|
||||
self.contents = contents
|
||||
super.init(
|
||||
pos: pos,
|
||||
|
@ -9,7 +9,7 @@ public class Image: Node {
|
||||
var w: Int
|
||||
var h: Int
|
||||
|
||||
init(src: String, xAlign: Align, yAlign: Align, preserveAspectRatio: AspectRatio, w: Int, h: Int, pos: Transform, opaque: Bool, visible: Bool, clip: Locus, tag: [String]) {
|
||||
init(src: String, xAlign: Align, yAlign: Align, preserveAspectRatio: AspectRatio, w: Int, h: Int, pos: Transform, opaque: NSNumber = true, visible: NSNumber = true, clip: Locus, tag: [String] = []) {
|
||||
self.src = src
|
||||
self.xAlign = xAlign
|
||||
self.yAlign = yAlign
|
||||
|
@ -3,11 +3,11 @@ import Foundation
|
||||
public class Node: Drawable {
|
||||
|
||||
var pos: Transform
|
||||
var opaque: Bool = true
|
||||
var visible: Bool = true
|
||||
var opaque: NSNumber = true
|
||||
var visible: NSNumber = true
|
||||
var clip: Locus
|
||||
|
||||
init(pos: Transform, opaque: Bool = true, visible: Bool = true, clip: Locus, tag: [String]) {
|
||||
init(pos: Transform, opaque: NSNumber = true, visible: NSNumber = true, clip: Locus, tag: [String] = []) {
|
||||
self.pos = pos
|
||||
self.opaque = opaque
|
||||
self.visible = visible
|
||||
|
@ -6,7 +6,7 @@ public class Shape: Node {
|
||||
var fill: Fill
|
||||
var stroke: Stroke
|
||||
|
||||
init(form: Locus, fill: Fill, stroke: Stroke, pos: Transform, opaque: Bool, visible: Bool, clip: Locus, tag: [String]) {
|
||||
init(form: Locus, fill: Fill, stroke: Stroke, pos: Transform, opaque: NSNumber = true, visible: NSNumber = true, clip: Locus, tag: [String] = []) {
|
||||
self.form = form
|
||||
self.fill = fill
|
||||
self.stroke = stroke
|
||||
|
@ -8,7 +8,7 @@ public class Text: Node {
|
||||
var baseline: Baseline
|
||||
var anchor: TextAnchor
|
||||
|
||||
init(text: String = "", font: Font, fill: Fill, baseline: Baseline, anchor: TextAnchor, pos: Transform, opaque: Bool, visible: Bool, clip: Locus, tag: [String]) {
|
||||
init(text: String = "", font: Font, fill: Fill, baseline: Baseline, anchor: TextAnchor, pos: Transform, opaque: NSNumber = true, visible: NSNumber = true, clip: Locus, tag: [String] = []) {
|
||||
self.text = text
|
||||
self.font = font
|
||||
self.fill = fill
|
||||
|
Loading…
Reference in New Issue
Block a user