Please note that this class is mostly not instantiated directly but is used indirectly when child classes are instantiated.
Create a Raku object using a native object from elsewhere. $native-object can be a N-Object or a Raku object like Gnome::Gtk3::Button.
# Some set of radio buttons grouped together
my Gnome::Gtk3::RadioButton $rb1 .= new(:label('Download everything'));
my Gnome::Gtk3::RadioButton $rb2 .= new(
:group-from($rb1), :label('Download core only')
);
# Get all radio buttons in the group of button $rb2
my Gnome::GObject::SList $rb-list .= new(:native-object($rb2.get-group));
loop ( Int $i = 0; $i < $rb-list.g_slist_length; $i++ ) {
# Get button from the list
my Gnome::Gtk3::RadioButton $rb .= new(
:native-object($rb-list.nth-data-gobject($i))
);
# If radio button is selected (=active) ...
if $rb.get-active == 1 {
...
last;
}
}
Return class's type code after registration. this is like calling Gnome::GObject::Type.new().g_type_from_name(GTK+ class type name).
method get-class-gtype ( --> GType )
Return native class name.
method get-class-name ( --> Str )
Returns True if native object is valid. When False, the native object is undefined and errors will occur when this instance is used.
method is-valid ( --> Bool )
Clear the error and return data to memory pool. The error object is not valid after this call and is-valid() will return False.
method clear-object ()
Used by Gnome::Gtk3::Builder to register itself. Its purpose is twofold
Used by Gnome::GObject::Object to process option .new(:build-id).
Used to insert objects into a builder when test mode is turned on.
method _set-builder ( Gnome::Gtk3::Builder$builder )
Used by Gnome::GObject::Object to search for an object id.
method _get-builders ( --> Array )
Used to turn test mode on or off. This is done by Gnome::T. When turned on, an event loop can not be started by calling Gnome::Gtk3::Main.new.main() and can only be started by Gnome::T.
method _set-test-mode ( Bool $mode )
Get current state.
method _get-test-mode ( --> Bool )
Used by many classes to create a Raku instance with the native object wrapped in
method _wrap-native-type ( Str:D $type where ?$type, N-Object:D $no --> Any )
As with _wrap-native-type() this method is used by many classes to create a Raku instance with the native object wrapped in.
method _wrap-native-type-from-no (
N-Object $no, Str:D $match = '', Str:D $replace = '', :child-type?
--> Any
) {