Control
grouping other controlsapp $ CompositeControl :: SELF
Type of this instance, automatically specialized in every classandroid :: ui $ CompositeControl :: on_destroy
The application is being destroyedapp $ CompositeControl :: on_pause
The application leaves the active state but is still partially visibleapp $ CompositeControl :: on_restore_state
The application is launching, restore its state from a previouson_save_state
app $ CompositeControl :: on_resume
The application enters the active state, it is in the foreground and interactiveapp $ CompositeControl :: on_save_state
The application may be destroyed soon, save its state for a futureon_restore_state
android :: ui $ CompositeControl :: on_start
The application is starting or restarting, it is visible to the userapp $ CompositeControl :: on_stop
The application is completely hidden from the usercore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
app :: CompositeControl :: defaultinit
gtk :: GtkCallable :: defaultinit
core :: Finalizable :: defaultinit
app :: AppObserver :: defaultinit
core :: Object :: defaultinit
app :: Control :: defaultinit
app :: AppComponent :: defaultinit
core :: Finalizable :: finalize
Liberate any resources held byself
before the memory holding self
is freed
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
app :: AppComponent :: notify_observers
Propagateevent
to all observers
by calling AppObserver::on_event
app :: AppComponent :: observers
AllAppObserver
notified of events raised by self
app :: AppComponent :: observers=
AllAppObserver
notified of events raised by self
app :: AppComponent :: on_pause
The application leaves the active state but is still partially visibleapp :: AppComponent :: on_restart
The application returns to a visible state from a previouson_stop
app :: AppComponent :: on_restore_state
The application is launching, restore its state from a previouson_save_state
app :: AppComponent :: on_resume
The application enters the active state, it is in the foreground and interactiveapp :: AppComponent :: on_save_state
The application may be destroyed soon, save its state for a futureon_restore_state
app :: AppComponent :: on_start
The application is starting or restarting, it is visible to the usercore :: Object :: output_class_name
Display class name on stdout (debug only).Control
in the control tree
Control
in the control tree
app :: AppComponent
An element of an application that is notified of the application life cyclegtk :: GtkCallable
app :: HttpRequestClientWindow
Simple window with a label and a button
# A `Control` grouping other controls
class CompositeControl
super Control
# Child controls composing this control
protected var items = new Array[Control]
# Add `item` as a child of `self`
protected fun add(item: Control) do items.add item
# Remove `item` from `self`
fun remove(item: Control) do if has(item) then items.remove item
# Is `item` in `self`?
fun has(item: Control): Bool do return items.has(item)
# Remove all items from `self`
fun clear do for item in items.to_a do remove item
redef fun on_create do for i in items do i.on_create
redef fun on_resume do for i in items do i.on_resume
redef fun on_pause do for i in items do i.on_pause
redef fun on_stop do for i in items do i.on_stop
redef fun on_restore_state do for i in items do i.on_restore_state
redef fun on_save_state do for i in items do i.on_save_state
end
lib/app/ui.nit:170,1--200,3
redef class CompositeControl
redef fun remove(view)
do
super
if view isa View then
view.native.remove_from_superview
end
end
end
lib/ios/ui/ui.nit:185,1--195,3
redef class CompositeControl
end
lib/linux/ui.nit:118,1--119,3
redef class CompositeControl
redef fun on_start do for i in items do i.on_start
redef fun on_destroy do for i in items do i.on_destroy
end
lib/android/ui/ui.nit:88,1--92,3