WPILibC++ 2024.3.2
frc::ShuffleboardWidget< Derived > Class Template Reference

Abstract superclass for widgets. More...

#include <frc/shuffleboard/ShuffleboardWidget.h>

Inheritance diagram for frc::ShuffleboardWidget< Derived >:
frc::ShuffleboardComponent< Derived > frc::ShuffleboardComponentBase frc::ShuffleboardValue

Public Member Functions

 ShuffleboardWidget (ShuffleboardContainer &parent, std::string_view title)
 
Derived & WithWidget (BuiltInWidgets widgetType)
 Sets the type of widget used to display the data. More...
 
Derived & WithWidget (const WidgetType &widgetType)
 Sets the type of widget used to display the data. More...
 
Derived & WithWidget (std::string_view widgetType)
 Sets the type of widget used to display the data. More...
 
- Public Member Functions inherited from frc::ShuffleboardComponent< Derived >
 ShuffleboardComponent (ShuffleboardContainer &parent, std::string_view title, std::string_view type="")
 Constructs a ShuffleboardComponent. More...
 
Derived & WithProperties (const wpi::StringMap< nt::Value > &properties)
 Sets custom properties for this component. More...
 
Derived & WithPosition (int columnIndex, int rowIndex)
 Sets the position of this component in the tab. More...
 
Derived & 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
 

Detailed Description

template<typename Derived>
class frc::ShuffleboardWidget< Derived >

Abstract superclass for widgets.

This class is package-private to minimize API surface area.

Template Parameters
Derivedthe self type

Constructor & Destructor Documentation

◆ ShuffleboardWidget()

template<typename Derived >
frc::ShuffleboardWidget< Derived >::ShuffleboardWidget ( ShuffleboardContainer parent,
std::string_view  title 
)
inline

Member Function Documentation

◆ WithWidget() [1/3]

template<typename Derived >
Derived & frc::ShuffleboardWidget< Derived >::WithWidget ( BuiltInWidgets  widgetType)
inline

Sets the type of widget used to display the data.

If not set, the default widget type will be used.

Parameters
widgetTypethe type of the widget used to display the data
Returns
this widget object
See also
BuiltInWidgets

◆ WithWidget() [2/3]

template<typename Derived >
Derived & frc::ShuffleboardWidget< Derived >::WithWidget ( const WidgetType widgetType)
inline

Sets the type of widget used to display the data.

If not set, the default widget type will be used.

Parameters
widgetTypethe type of the widget used to display the data
Returns
this widget object

◆ WithWidget() [3/3]

template<typename Derived >
Derived & frc::ShuffleboardWidget< Derived >::WithWidget ( std::string_view  widgetType)
inline

Sets the type of widget used to display the data.

If not set, the default widget type will be used. This method should only be used to use a widget that does not come built into Shuffleboard (i.e. one that comes with a custom or third-party plugin). To use a widget that is built into Shuffleboard, use WithWidget(WidgetType) and BuiltInWidgets.

Parameters
widgetTypethe type of the widget used to display the data
Returns
this widget object

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