ASMR/src/main/kotlin/net/shadowfacts/cacao/LayoutVariable.kt

18 lines
489 B
Kotlin
Raw Normal View History

2019-06-22 19:02:17 +00:00
package net.shadowfacts.cacao
2019-06-21 20:22:23 +00:00
2019-06-22 19:02:17 +00:00
import net.shadowfacts.cacao.view.View
2019-06-21 20:22:23 +00:00
import no.birkett.kiwi.Variable
2019-06-22 14:59:18 +00:00
/**
2019-06-22 20:08:00 +00:00
* A Kiwi variable that belongs to a Cacao view.
* This class generally isn't used directly, but via the anchor *Anchor properties on [View].
*
2019-06-22 14:59:18 +00:00
* @author shadowfacts
*/
class LayoutVariable(val owner: View, val property: String): Variable("LayoutVariable") {
2019-06-21 20:22:23 +00:00
override fun getName() = "$owner.$property"
override fun toString() = "LayoutVariable(name=$name, value=$value)"
}