2015-12-15 11:55:08 +03:00
|
|
|
import Foundation
|
2016-05-11 09:10:17 +03:00
|
|
|
import RxSwift
|
2015-12-15 11:55:08 +03:00
|
|
|
|
2016-08-03 09:54:54 +03:00
|
|
|
public class Node: Drawable {
|
2015-12-15 11:55:08 +03:00
|
|
|
|
2016-05-11 09:10:17 +03:00
|
|
|
public let posVar: Variable<Transform>
|
2016-02-14 12:42:18 +03:00
|
|
|
public var pos: Transform {
|
2016-05-11 09:10:17 +03:00
|
|
|
get { return posVar.value }
|
|
|
|
set(val) { posVar.value = val }
|
2016-02-14 12:42:18 +03:00
|
|
|
}
|
|
|
|
|
2016-05-11 09:10:17 +03:00
|
|
|
public let opaqueVar: Variable<NSObject>
|
2016-02-14 12:42:18 +03:00
|
|
|
public var opaque: NSObject {
|
2016-05-11 09:10:17 +03:00
|
|
|
get { return opaqueVar.value }
|
|
|
|
set(val) { opaqueVar.value = val }
|
2016-02-14 12:42:18 +03:00
|
|
|
}
|
|
|
|
|
2016-08-03 10:39:21 +03:00
|
|
|
public let opacityVar: Variable<Double>
|
|
|
|
public var opacity: Double {
|
|
|
|
get { return opacityVar.value }
|
|
|
|
set(val) { opacityVar.value = val }
|
2016-02-14 12:42:18 +03:00
|
|
|
}
|
|
|
|
|
2016-05-11 09:10:17 +03:00
|
|
|
public let clipVar: Variable<Locus?>
|
2016-02-14 12:42:18 +03:00
|
|
|
public var clip: Locus? {
|
2016-05-11 09:10:17 +03:00
|
|
|
get { return clipVar.value }
|
|
|
|
set(val) { clipVar.value = val }
|
2016-02-14 12:42:18 +03:00
|
|
|
}
|
2015-12-15 11:55:08 +03:00
|
|
|
|
2016-08-03 10:39:21 +03:00
|
|
|
public init(pos: Transform, opaque: NSObject = true, opacity: Double = 1, clip: Locus? = nil, visible: NSObject = true, tag: [String] = [], bounds: Rect? = nil) {
|
2016-08-03 09:54:54 +03:00
|
|
|
self.posVar = Variable<Transform>(pos)
|
|
|
|
self.opaqueVar = Variable<NSObject>(opaque)
|
2016-08-03 10:39:21 +03:00
|
|
|
self.opacityVar = Variable<Double>(opacity)
|
2016-08-03 09:54:54 +03:00
|
|
|
self.clipVar = Variable<Locus?>(clip)
|
2015-12-16 09:49:10 +03:00
|
|
|
super.init(
|
2016-08-03 10:39:21 +03:00
|
|
|
visible: visible,
|
|
|
|
tag: tag,
|
|
|
|
bounds: bounds
|
2015-12-16 09:49:10 +03:00
|
|
|
)
|
2015-12-15 11:55:08 +03:00
|
|
|
}
|
|
|
|
|
2015-12-20 14:47:07 +03:00
|
|
|
// GENERATED NOT
|
2016-02-04 18:42:09 +03:00
|
|
|
public func bounds() -> Rect? {
|
2015-12-20 17:06:11 +03:00
|
|
|
return Rect()
|
|
|
|
}
|
2015-12-15 11:55:08 +03:00
|
|
|
|
2016-08-03 10:39:21 +03:00
|
|
|
// GENERATED NOT
|
|
|
|
public override func mouse() -> Mouse {
|
|
|
|
return Mouse(pos: Point(), onEnter: Signal(), onExit: Signal(), onWheel: Signal())
|
|
|
|
}
|
2016-08-03 18:09:52 +03:00
|
|
|
}
|
|
|
|
|