import app_base
# Platform variations
-# TODO: move on the platform once qualified names are understand in the condition
import linux::ui is conditional(linux)
-import android::ui is conditional(android) # FIXME it should be conditional to `android::platform`
+import android::ui is conditional(android)
import ios::ui is conditional(ios)
redef class App
var is_checked = false is writable
end
+# Event sent from a `VIEW`
+class ViewEvent
+ super AppEvent
+
+ # The `VIEW` that raised this event
+ var sender: VIEW
+
+ # Type of the `sender`
+ type VIEW: View
+end
+
# A `Button` press event
class ButtonPressEvent
- super AppEvent
+ super ViewEvent
+
+ redef type VIEW: Button
+end
+
+# The `CheckBox` `sender` has been toggled
+class ToggleEvent
+ super ViewEvent
- # The `Button` that raised this event
- var sender: Button
+ redef type VIEW: CheckBox
end
# A layout to visually organize `Control`s