
Gnome::Gtk3::Orientable
An interface for flippable widgets
Description
The Gnome::Gtk3::Orientable interface is implemented by all widgets that can be oriented horizontally or vertically. Historically, such widgets have been realized as subclasses of a common base class (e.g HBox/VBox or HScale/VScale). Gnome::Gtk3::Orientable is more flexible in that it allows the orientation to be changed at runtime, allowing the widgets to “flip”.
Note that HBox/VBox or HScale/VScale are not implemented in this Raku package because these classes are deprecated.
Synopsis
Declaration
unit role Gnome::Gtk3::Orientable;
Example
my Gnome::Gtk3::LevelBar $level-bar .= new; $level-bar.set-orientation(GTK_ORIENTATION_VERTICAL);
Methods
get-orientation
method get-orientation ( --> GtkOrientation )
Retrieves the orientation of the orientable.
set-orientation
method set-orientation ( GtkOrientation $orientation )
Sets the orientation of the orientable. This is a GtkOrientation enum type defined in GtkEnums.
Properties
An example of using a string type property of a Gnome::Gtk3::Label object. This is just showing how to set/read a property, not that it is the best way to do it. This is because a) The class initialization often provides some options to set some of the properties and b) the classes provide many methods to modify just those properties. In the case below one can use new(:label('my text label')) or gtk_label_set_text('my text label').
my Gnome::Gtk3::Label $label .= new; my Gnome::GObject::Value $gv .= new(:init(G_TYPE_STRING)); $label.g-object-get-property( 'label', $gv); $gv.g-value-set-string('my text label');
Supported properties
Orientation
The orientation of the orientable. Widget type: GTK_TYPE_ORIENTATION
The Gnome::GObject::Value type of property orientation is G_TYPE_ENUM
.