app :: Control :: defaultinit
Control
in the control tree
Control
in the control tree
app $ Control :: notify_observers
Also notify the parents (both direct and indirect)core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
app :: AppObserver :: defaultinit
app :: Control :: defaultinit
core :: Object :: defaultinit
core :: Finalizable :: defaultinit
gtk :: GtkCallable :: 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 implementing the UI
class Control
super AppComponent
# Direct parent `Control` in the control tree
#
# The parents (direct and indirect) receive all events from `self`,
# like the `observers`.
#
# If `null` then `self` is at the root of the tree, or not yet attached.
var parent: nullable CompositeControl = null is private writable(set_parent)
# Direct parent `Control` in the control tree
#
# The parents (direct and indirect) receive all events from `self`,
# like the `observers`.
#
# Setting `parent` calls `remove` on the old parent and `add` on the new one.
fun parent=(parent: nullable CompositeControl)
is autoinit do
var old_parent = self.parent
if old_parent != null and old_parent != parent then
old_parent.remove self
end
if parent != null then parent.add self
set_parent parent
end
# Also notify the parents (both direct and indirect)
redef fun notify_observers(event)
do
super
var p = parent
while p != null do
p.on_event event
p = p.parent
end
end
end
lib/app/ui.nit:127,1--168,3
redef class Control
super GtkCallable
super Finalizable
# The GTK element used to implement `self`
fun native: NATIVE is abstract
# Type of `native`
type NATIVE: GtkWidget
redef fun finalize
do
var native = native
if not native.address_is_null then native.destroy
end
end
lib/linux/ui.nit:101,1--116,3