update WidgetValueTrait::value_widget* comments

This commit is contained in:
Kamil Koczurek 2023-05-08 10:41:02 +02:00
parent 3b5198c050
commit 9c8d5f3258

View File

@ -14,10 +14,11 @@ pub trait WidgetValueTrait: Default {
type UserState; type UserState;
type NodeData; type NodeData;
/// This method will be called for each input parameter with a widget. The /// This method will be called for each input parameter with a widget with an disconnected
/// return value is a vector of custom response objects which can be used /// input only. To display UI for connected inputs use [`WidgetValueTrait::value_widget_connected`].
/// The return value is a vector of custom response objects which can be used
/// to implement handling of side effects. If unsure, the response Vec can /// to implement handling of side effects. If unsure, the response Vec can
/// be empty. It isn't called if the input is connected. /// be empty.
fn value_widget( fn value_widget(
&mut self, &mut self,
param_name: &str, param_name: &str,
@ -27,11 +28,13 @@ pub trait WidgetValueTrait: Default {
node_data: &Self::NodeData, node_data: &Self::NodeData,
) -> Vec<Self::Response>; ) -> Vec<Self::Response>;
/// This method will be called for each input parameter with a widget. The /// This method will be called for each input parameter with a widget with a connected
/// return value is a vector of custom response objects which can be used /// input only. To display UI for diconnected inputs use [`WidgetValueTrait::value_widget`].
/// The return value is a vector of custom response objects which can be used
/// to implement handling of side effects. If unsure, the response Vec can /// to implement handling of side effects. If unsure, the response Vec can
/// be empty. This differs from [`WidgetValueTrait::value_widget`] /// be empty.
/// by being called if and only if the input has a connection. ///
/// Shows the input name label by default.
fn value_widget_connected( fn value_widget_connected(
&mut self, &mut self,
param_name: &str, param_name: &str,