WPILibC++ 2024.3.2
frc::SuppliedValueWidget< T > Class Template Reference

#include <frc/shuffleboard/SuppliedValueWidget.h>

Inheritance diagram for frc::SuppliedValueWidget< T >:
frc::ShuffleboardWidget< SuppliedValueWidget< T > > frc::ShuffleboardComponent< SuppliedValueWidget< T > > frc::ShuffleboardComponentBase frc::ShuffleboardValue

Public Member Functions

 SuppliedValueWidget (ShuffleboardContainer &parent, std::string_view title, std::string_view typeString, std::function< T()> supplier, std::function< void(nt::GenericPublisher &, T)> setter)
 
void BuildInto (std::shared_ptr< nt::NetworkTable > parentTable, std::shared_ptr< nt::NetworkTable > metaTable) override
 Builds the entries for this value. More...
 
- Public Member Functions inherited from frc::ShuffleboardWidget< SuppliedValueWidget< T > >
 ShuffleboardWidget (ShuffleboardContainer &parent, std::string_view title)
 
SuppliedValueWidget< T > & WithWidget (BuiltInWidgets widgetType)
 Sets the type of widget used to display the data. More...
 
SuppliedValueWidget< T > & WithWidget (const WidgetType &widgetType)
 Sets the type of widget used to display the data. More...
 
SuppliedValueWidget< T > & WithWidget (std::string_view widgetType)
 Sets the type of widget used to display the data. More...
 
- Public Member Functions inherited from frc::ShuffleboardComponent< SuppliedValueWidget< T > >
 ShuffleboardComponent (ShuffleboardContainer &parent, std::string_view title, std::string_view type="")
 Constructs a ShuffleboardComponent. More...
 
SuppliedValueWidget< T > & WithProperties (const wpi::StringMap< nt::Value > &properties)
 Sets custom properties for this component. More...
 
SuppliedValueWidget< T > & WithPosition (int columnIndex, int rowIndex)
 Sets the position of this component in the tab. More...
 
SuppliedValueWidget< T > & WithSize (int width, int height)
 Sets the size of this component in the tab. More...
 
- Public Member Functions inherited from frc::ShuffleboardComponentBase
 ShuffleboardComponentBase (ShuffleboardContainer &parent, std::string_view title, std::string_view type="")
 
void SetType (std::string_view type)
 
void BuildMetadata (std::shared_ptr< nt::NetworkTable > metaTable)
 
ShuffleboardContainerGetParent ()
 
const std::string & GetType () const
 
- Public Member Functions inherited from frc::ShuffleboardValue
 ShuffleboardValue (std::string_view title)
 
virtual ~ShuffleboardValue ()=default
 
 ShuffleboardValue (const ShuffleboardValue &)=delete
 
ShuffleboardValueoperator= (const ShuffleboardValue &)=delete
 
const std::string & GetTitle () const
 Gets the title of this Shuffleboard value. More...
 
virtual void BuildInto (std::shared_ptr< nt::NetworkTable > parentTable, std::shared_ptr< nt::NetworkTable > metaTable)=0
 Builds the entries for this value. More...
 
virtual void EnableIfActuator ()
 Enables user control of this widget in the Shuffleboard application. More...
 
virtual void DisableIfActuator ()
 Disables user control of this widget in the Shuffleboard application. More...
 

Additional Inherited Members

- Protected Attributes inherited from frc::ShuffleboardComponentBase
wpi::StringMap< nt::Valuem_properties
 
bool m_metadataDirty = true
 
int m_column = -1
 
int m_row = -1
 
int m_width = -1
 
int m_height = -1
 

Constructor & Destructor Documentation

◆ SuppliedValueWidget()

template<typename T >
frc::SuppliedValueWidget< T >::SuppliedValueWidget ( ShuffleboardContainer parent,
std::string_view  title,
std::string_view  typeString,
std::function< T()>  supplier,
std::function< void(nt::GenericPublisher &, T)>  setter 
)
inline

Member Function Documentation

◆ BuildInto()

template<typename T >
void frc::SuppliedValueWidget< T >::BuildInto ( std::shared_ptr< nt::NetworkTable parentTable,
std::shared_ptr< nt::NetworkTable metaTable 
)
inlineoverridevirtual

Builds the entries for this value.

Parameters
parentTableThe table containing all the data for the parent. Values that require a complex entry or table structure should call parentTable.getSubtable(getTitle()) to get the table to put data into. Values that only use a single entry should call parentTable.getEntry(getTitle()) to get that entry.
metaTableThe table containing all the metadata for this value and its sub-values

Implements frc::ShuffleboardValue.


The documentation for this class was generated from the following file: