unit class GTK::V3::Gtk::GtkLevelBar; also is GTK::V3::Gtk::GtkWidget;
multi submethod BUILD ( Bool :$empty! )
Create a GtkLevelBar object.
multi submethod BUILD ( Num :$min!, Num :$min! )
Create a new GtkLevelBar with a specified range.
multi submethod BUILD ( :$widget! )
Create an object using a native object from elsewhere. See also Gtk::V3::Glib::GObject.
multi submethod BUILD ( Str :$build-id! )
Create an object using a native object from a builder. See also Gtk::V3::Glib::GObject.
method gtk_level_bar_set_mode ( GtkLevelBarMode $mode )
$mode; the way that increments are made visible.
method gtk_level_bar_get_mode ( --> GtkLevelBarMode )
Returns current mode.
method gtk_level_bar_set_value ( Num $value )
$value; set the level bar value.
method gtk_level_bar_get_value ( --> Num )
Returns current value.
method gtk_level_bar_set_min_value ( Num $value )
$value; set the minimum value of the bar.
method gtk_level_bar_get_min_value ( --> Num )
Returns the minimum value of the bar.
method gtk_level_bar_set_max_value ( Num $value )
$value; set the maximum value of the bar.
method gtk_level_bar_get_max_value ( --> Num )
Returns the maximum value of the bar.
method gtk_level_bar_set_inverted ( Int $invert )
$invert; When 1, the bar is inverted. That is, right to left or bottom to top.
method gtk_level_bar_get_inverted ( --> Int )
Returns invert mode; When 1, the bar is inverted. That is, right to left or bottom to top.
Adds a new offset marker on self at the position specified by value . When the bar value is in the interval topped by value (or between value and “max-value” in case the offset is the last one on the bar) a style class named level-name will be applied when rendering the level bar fill. If another offset marker named name exists, its value will be replaced by value .
method gtk_level_bar_add_offset_value ( Str $name, Num $value )
$name; the name of the new offset.
$value; the value for the new offset.
Fetches the value specified for the offset marker name.
method gtk_level_bar_get_offset_value ( Str $name, Num $value --> Int )
$name; the name of the new offset.
$value; the value of the offset is returned.
Returns Int where 1 means that name is found.
Adds a new offset marker on self at the position specified by value . When the bar value is in the interval topped by value (or between value and “max-value” in case the offset is the last one on the bar) a style class named level-name will be applied when rendering the level bar fill. If another offset marker named name exists, its value will be replaced by value. This offset name can be used to change color and view of the level bar after passing this offset by setting information in a css file. For example when name is my-offset
one can do the following.
levelbar block.my-offset { background-color: magenta; border-style: solid; border-color: black; border-style: 1px; } method gtk_level_bar_remove_offset_value ( Str $name )
$name; the name of the offset.
Describes how GtkLevelBar contents should be rendered. Note that this enumeration could be extended with additional modes in the future.
GTK_LEVEL_BAR_MODE_CONTINUOUS; the bar has a continuous mode.
GTK_LEVEL_BAR_MODE_DISCRETE; the bar has a discrete mode.
Emitted when an offset specified on the bar changes value as an effect to gtk_level_bar_add_offset_value()
being called.
The signal supports detailed connections; you can connect to the detailed signal "changed::x" in order to only receive callbacks when the value of offset "x" changes.