Inputs pins which can be added dynamically.
More...
Inputs pins which can be added dynamically.
Definition at line 28 of file DynamicInputPins.hpp.
◆ DynamicInputPins()
NAV::gui::widgets::DynamicInputPins::DynamicInputPins |
( |
size_t | firstDynamicPinIndex, |
|
|
Node * | node, |
|
|
std::function< void(Node *)> | pinAddCallback, |
|
|
std::function< void(Node *, size_t)> | pinDeleteCallback, |
|
|
size_t | defaultInputPins = 0 ) |
Constructor.
- Parameters
-
[in] | firstDynamicPinIndex | First pin index which is dynamic |
[in,out] | node | Pointer to the calling node (needs to be valid only during construction) |
[in] | pinAddCallback | Function to call to add a new pin |
[in] | pinDeleteCallback | Function to call to delete a pin |
[in] | defaultInputPins | Default value for the input pins |
Definition at line 25 of file DynamicInputPins.cpp.
◆ addPin()
void NAV::gui::widgets::DynamicInputPins::addPin |
( |
Node * | node | ) |
|
Adds a pin and call the pinAddCallback.
- Parameters
-
[in,out] | node | Pointer to the calling node |
Definition at line 178 of file DynamicInputPins.cpp.
◆ getFirstDynamicPinIdx()
size_t NAV::gui::widgets::DynamicInputPins::getFirstDynamicPinIdx |
( |
| ) |
const |
|
inlinenodiscard |
◆ getNumberOfDynamicPins()
size_t NAV::gui::widgets::DynamicInputPins::getNumberOfDynamicPins |
( |
| ) |
const |
|
nodiscard |
◆ setFirstDynamicPinIdx()
void NAV::gui::widgets::DynamicInputPins::setFirstDynamicPinIdx |
( |
size_t | firstDynamicPinIndex | ) |
|
|
inline |
Set the First Dynamic Pin Idx.
- Parameters
-
[in] | firstDynamicPinIndex | First pin index which is dynamic |
Definition at line 68 of file DynamicInputPins.hpp.
◆ ShowGuiWidgets()
bool NAV::gui::widgets::DynamicInputPins::ShowGuiWidgets |
( |
size_t | id, |
|
|
std::vector< InputPin > & | inputPins, |
|
|
Node * | node, |
|
|
const std::vector< ExtraColumn > & | extraColumns = {} ) |
Shows the GUI input to select the options.
- Parameters
-
[in] | id | Unique id for ImGui. |
[in,out] | inputPins | Input Pins of the node |
[in,out] | node | Pointer to the calling node |
[in] | extraColumns | Extra columns to display in the table |
- Returns
- True when changes occurred
Definition at line 39 of file DynamicInputPins.cpp.
◆ from_json
Converts the provided json object into a node object.
- Parameters
-
[in] | j | Json object with the needed values |
[out] | obj | Object to fill from the json |
[in,out] | node | Pointer to the node calling this |
Definition at line 190 of file DynamicInputPins.cpp.
◆ to_json
Converts the provided object into json.
- Parameters
-
[out] | j | Json object which gets filled with the info |
[in] | obj | Object to convert into json |
Definition at line 184 of file DynamicInputPins.cpp.
◆ _dragAndDropPinIndex
int NAV::gui::widgets::DynamicInputPins::_dragAndDropPinIndex |
|
private |
◆ _firstDynamicPinIdx
size_t NAV::gui::widgets::DynamicInputPins::_firstDynamicPinIdx |
|
private |
◆ _nDynamicInputPins
size_t NAV::gui::widgets::DynamicInputPins::_nDynamicInputPins |
|
private |
◆ _pinAddCallback
std::function<void(Node*)> NAV::gui::widgets::DynamicInputPins::_pinAddCallback |
|
private |
◆ _pinDeleteCallback
std::function<void(Node*, size_t)> NAV::gui::widgets::DynamicInputPins::_pinDeleteCallback |
|
private |
Function to call to delete a pin. Argument is the pin index.
Definition at line 83 of file DynamicInputPins.hpp.
The documentation for this struct was generated from the following files: