diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-11-15 17:03:30 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-11-15 17:03:30 +0100 |
commit | c5bbd26744fd5237d53d280ac73e3bfe98bc5967 (patch) | |
tree | e8cbc6ec5570ee97e4984f822801a23da195c304 /glib/src | |
parent | 419ce6c2a6b6fd208751e75fb148ba7dbaf9821c (diff) | |
download | glibmm-c5bbd26744fd5237d53d280ac73e3bfe98bc5967.tar.gz |
Glib::Binding: Explain why SlotTransform takes GValue*
Fixes #61
Diffstat (limited to 'glib/src')
-rw-r--r-- | glib/src/binding.hg | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/glib/src/binding.hg b/glib/src/binding.hg index ff1df062..f944dd8d 100644 --- a/glib/src/binding.hg +++ b/glib/src/binding.hg @@ -130,6 +130,16 @@ public: template <typename T_from, typename T_to> using SlotTypedTransform = sigc::slot<std::optional<T_to> (const T_from&)>; + // GValue* or Glib::ValueBase& in SlotTransform? + // Binding_transform_callback_common() is simpler and faster with GValue*. + // No need to copy between GValue and Glib::ValueBase. ValueBase would only + // be marginally better for users of bind_property_value(). Users would want + // Value<T_source> and Value<T_target>, meaning that bind_property_value() + // would have to be a template function. Most users would probably still + // prefer bind_property(). bind_property_value() is public partly because + // it's a good place to present documentation common to all the + // bind_property() overloads. + // See also https://gitlab.gnome.org/GNOME/glibmm/issues/61 /** Creates a binding between @a source_property and @a target_property, * allowing you to set the transformation functions to be used by the binding. * |