Trait gtk4::prelude::GObjectPropertyExpressionExt
source · [−]pub trait GObjectPropertyExpressionExt {
fn property_expression(&self, property_name: &str) -> PropertyExpression;
fn property_expression_weak(&self, property_name: &str) -> PropertyExpression;
fn this_expression(property_name: &str) -> PropertyExpression;
}
Expand description
Trait containing convenience methods in creating
PropertyExpression
that
looks up a property of a glib::Object
.
Example
label_expression
is an Expression
that looks up at Button’s label
property.
use gtk::prelude::*;
let button = gtk::Button::new();
button.set_label("Label property");
let label_expression = button.property_expression("label");
Required Methods
sourcefn property_expression(&self, property_name: &str) -> PropertyExpression
fn property_expression(&self, property_name: &str) -> PropertyExpression
Create an expression looking up an object’s property.
sourcefn property_expression_weak(&self, property_name: &str) -> PropertyExpression
fn property_expression_weak(&self, property_name: &str) -> PropertyExpression
Create an expression looking up an object’s property with a weak reference.
sourcefn this_expression(property_name: &str) -> PropertyExpression
fn this_expression(property_name: &str) -> PropertyExpression
Create an expression looking up a property in the bound this
object.