pub trait CompositeTemplateCallbacks {
const CALLBACKS: &'static [(&'static str, fn(&[Value]) -> Option<Value>)];
fn bind_template_callbacks<T>(klass: &mut T)
where
T: WidgetClassSubclassExt,
{ ... }
fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str)
where
T: WidgetClassSubclassExt,
{ ... }
fn add_callbacks_to_scope(scope: &BuilderRustScope) { ... }
fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str) { ... }
}
Expand description
A trait for setting up template callbacks inside
class_init
. This trait is implemented
automatically by the template_callbacks
macro.
Associated Constants
Provided methods
fn bind_template_callbacks<T>(klass: &mut T) where
T: WidgetClassSubclassExt,
fn bind_template_callbacks<T>(klass: &mut T) where
T: WidgetClassSubclassExt,
Binds the template callbacks from this type into the default template scope for klass
.
fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str) where
T: WidgetClassSubclassExt,
fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str) where
T: WidgetClassSubclassExt,
Binds the template callbacks from this type into the default template scope for klass
,
prepending prefix
to each callback name.
fn add_callbacks_to_scope(scope: &BuilderRustScope)
fn add_callbacks_to_scope(scope: &BuilderRustScope)
Binds the template callbacks from this type into scope
.
fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
Binds the template callbacks from this type into scope
, prepending prefix
to each
callback name.