mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-11 13:58:28 +00:00
update WidgetValueTrait::value_widget* comments
This commit is contained in:
parent
3b5198c050
commit
9c8d5f3258
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user