Gnome::Gtk4::EditableLabel
#------------------------------------------------------------------------------- #--[Class Description]---------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Description
A Gnome::Gtk4::EditableLabel is a label that allows users to edit the text by switching to an “edit mode”.
Gnome::Gtk4::EditableLabel does not have API of its own, but it implements the Gnome::Gtk4::Text interface.
The default bindings for activating the edit mode is to click or press the Enter key. The default bindings for leaving the edit mode are the Enter key (to save the results) or the Escape key (to cancel the editing).
CSS nodes
Gnome::Gtk4::EditableLabel has a main node with the name editablelabel. When the entry is in editing mode, it gets the .editing style class.
For all the subnodes added to the text node in various situations, see Gnome::Gtk4::Text.
Uml Diagram
=end rakudoc
#------------------------------------------------------------------------------- #--[Class Initialization]------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Class initialization
new
:native-object
Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object() :$native-object! )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
new-editablelabel
Creates a new Gnome::Gtk4::EditableLabel widget.
method new-editablelabel ( Str $str --> Gnome::Gtk4::EditableLabel )
$str; the text for the label.
=end rakudoc
#------------------------------------------------------------------------------- #--[Methods]-------------------------------------------------------------------- #-------------------------------------------------------------------------------
=begin rakudoc
Methods =end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
get-editing
Returns whether the label is currently in “editing mode”.
method get-editing (--> Bool )
Return value; True if $self is currently in editing mode.
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
start-editing
Switches the label into “editing mode”.
method start-editing ( )
=end rakudoc
#------------------------------------------------------------------------------- =begin rakudoc
stop-editing
Switches the label out of “editing mode”.
If $commit is True, the resulting text is kept as the
text defined in Gnome::Gtk4::R-Editable property value, otherwise the
resulting text is discarded and the label will keep its
previous text defined in Gnome::Gtk4::R-Editable property value.
method stop-editing ( Bool() $commit )
$commit; whether to set the edited text on the label.
=end rakudoc