1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-11-14 01:48:49 +03:00

Mark custom methods as GENERATED NOT

This commit is contained in:
Igor Zapletnev 2016-08-03 12:54:54 +06:00
parent 462a918fa2
commit 1e815c767f
6 changed files with 17 additions and 11 deletions

View File

@ -0,0 +1,3 @@
extension Node {
public var animating = false
}

View File

@ -11,10 +11,12 @@ public class Point: Locus {
self.y = y
}
// GENERATED NOT
public class func zero() -> Point {
return Point(x: 0.0, y: 0.0)
}
// GENERATED NOT
public func add(point: Point) -> Point {
return Point(
x: self.x + point.x,

View File

@ -24,6 +24,11 @@ public class Rect: Locus {
return false
}
// GENERATED NOT
class func zero() -> Rect {
return Rect(x: 0.0, y: 0.0, w: 0.0, h: 0.0)
}
// GENERATED NOT
public func union(rect: Rect) -> Rect {
return Rect(
@ -41,8 +46,4 @@ public class Rect: Locus {
w: self.w,
h: self.h)
}
class func zero() -> Rect {
return Rect(x: 0.0, y: 0.0, w: 0.0, h: 0.0)
}
}

View File

@ -16,6 +16,7 @@ public class Group: Node {
)
}
// GENERATED NOT
override public func bounds() -> Rect? {
guard let firstPos = contentsVar.value.first?.pos else {
return .None

View File

@ -1,7 +1,7 @@
import Foundation
import RxSwift
public class Node: Drawable {
public class Node: Drawable {
public let posVar: Variable<Transform>
public var pos: Transform {
@ -26,14 +26,12 @@ public class Node: Drawable {
get { return clipVar.value }
set(val) { clipVar.value = val }
}
public var animating = false
public init(pos: Transform, opaque: NSObject = true, visible: NSObject = true, clip: Locus? = nil, tag: [String] = []) {
self.posVar = Variable<Transform>(pos)
self.opaqueVar = Variable<NSObject>(opaque)
self.visibleVar = Variable<NSObject>(visible)
self.clipVar = Variable<Locus?>(clip)
self.posVar = Variable<Transform>(pos)
self.opaqueVar = Variable<NSObject>(opaque)
self.visibleVar = Variable<NSObject>(visible)
self.clipVar = Variable<Locus?>(clip)
super.init(
tag: tag
)

View File

@ -34,6 +34,7 @@ public class Shape: Node {
)
}
// GENERATED NOT
override public func bounds() -> Rect? {
// TODO: Implement more form types