Clamp
Object Hierarchy:
Adw.Clamp
Adw.Clamp
Adw.Clamp
Gtk.Widget
Gtk.Widget
Gtk.Widget->Adw.Clamp
GLib.InitiallyUnowned
GLib.InitiallyUnowned
GLib.InitiallyUnowned->Gtk.Widget
GLib.Object
GLib.Object
GLib.Object->GLib.InitiallyUnowned
Gtk.Accessible
Gtk.Accessible
Gtk.Accessible->Adw.Clamp
Gtk.Accessible->Gtk.Widget
Gtk.Buildable
Gtk.Buildable
Gtk.Buildable->Adw.Clamp
Gtk.Buildable->Gtk.Widget
Gtk.ConstraintTarget
Gtk.ConstraintTarget
Gtk.ConstraintTarget->Adw.Clamp
Gtk.ConstraintTarget->Gtk.Widget
Gtk.Orientable
Gtk.Orientable
Gtk.Orientable->Adw.Clamp
Description:
[ CCode ( type_id = "adw_clamp_get_type ()" ) ] [ Version ( since = "1.0" ) ]public sealed class Clamp : Widget , Accessible , Buildable , ConstraintTarget , Orientable
A widget constraining its child to a given size.
<picture> <source srcset="clamp-wide-dark.png" media="(prefers-color-scheme: dark)"> <img src="clamp-wide.png"
alt="clamp-wide"> </picture> <picture> <source srcset="clamp-narrow-dark.png" media="(prefers-color-scheme: dark)">
<img src="clamp-narrow.png" alt="clamp-narrow"> </picture>
The `AdwClamp` widget constrains the size of the widget it contains to a given maximum size. It will constrain the width if it is
horizontal, or the height if it is vertical. The expansion of the child from its minimum to its maximum size is eased out for a smooth
transition.
If the child requires more than the requested maximum size, it will be allocated the minimum size it can fit in instead.
CSS nodes
`AdwClamp` has a single CSS node with name `clamp`.
Its children will receive the style classes `.large` when the child reached its maximum size, `.small` when the clamp allocates its full
size to the child, `.medium` in-between, or none if it hasn't computed its size yet.
Content:
Properties:
public Widget child { get ; set ; }
The child widget of the `AdwClamp`.
public int maximum_size { get ; set ; }
The maximum size allocated to the child.
public int tightening_threshold { get ; set ; }
The size above which the child is clamped.
Creation methods:
Methods:
public unowned Widget ? get_child ()
Gets the child widget of this .
public int get_maximum_size ()
Gets the maximum size allocated to the child.
public int get_tightening_threshold ()
Gets the size above which the child is clamped.
public void set_child (Widget ? child)
Sets the child widget of this .
public void set_maximum_size (int maximum_size)
Sets the maximum size allocated to the child.
public void set_tightening_threshold (int tightening_threshold)
Sets the size above which the child is clamped.
Inherited Members:
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Gtk.Accessible
accessible_role
get_accessible_role
reset_property
reset_relation
reset_state
update_property
update_property_value
update_relation
update_relation_value
update_state
update_state_value
All known members inherited from interface Gtk.Buildable
add_child
custom_finished
custom_tag_end
custom_tag_start
get_buildable_id
get_id
get_internal_child
parser_finished
set_buildable_property
set_id
All known members inherited from interface Gtk.Orientable