WPILibC++ 2024.3.2
|
A generic component in Shuffleboard. More...
#include <frc/shuffleboard/ShuffleboardComponent.h>
Public Member Functions | |
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) |
ShuffleboardContainer & | GetParent () |
const std::string & | GetType () const |
Public Member Functions inherited from frc::ShuffleboardValue | |
ShuffleboardValue (std::string_view title) | |
virtual | ~ShuffleboardValue ()=default |
ShuffleboardValue (const ShuffleboardValue &)=delete | |
ShuffleboardValue & | operator= (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::Value > | m_properties |
bool | m_metadataDirty = true |
int | m_column = -1 |
int | m_row = -1 |
int | m_width = -1 |
int | m_height = -1 |
A generic component in Shuffleboard.
Derived | the self type |
frc::ShuffleboardComponent< Derived >::ShuffleboardComponent | ( | ShuffleboardContainer & | parent, |
std::string_view | title, | ||
std::string_view | type = "" |
||
) |
Constructs a ShuffleboardComponent.
parent | The parent container. |
title | The component title. |
type | The component type. |
Derived & frc::ShuffleboardComponent< Derived >::WithPosition | ( | int | columnIndex, |
int | rowIndex | ||
) |
Sets the position of this component in the tab.
This has no effect if this component is inside a layout.
If the position of a single component is set, it is recommended to set the positions of all components inside a tab to prevent Shuffleboard from automatically placing another component there before the one with the specific position is sent.
columnIndex | the column in the tab to place this component |
rowIndex | the row in the tab to place this component |
Derived & frc::ShuffleboardComponent< Derived >::WithProperties | ( | const wpi::StringMap< nt::Value > & | properties | ) |
Sets custom properties for this component.
Property names are case-sensitive and whitespace-insensitive (capitalization and spaces do not matter).
properties | the properties for this component |
Derived & frc::ShuffleboardComponent< Derived >::WithSize | ( | int | width, |
int | height | ||
) |
Sets the size of this component in the tab.
This has no effect if this component is inside a layout.
width | how many columns wide the component should be |
height | how many rows high the component should be |