WPILibC++ 2023.4.3-108-ge5452e3
|
A layout in a Shuffleboard tab. More...
#include <frc/shuffleboard/ShuffleboardLayout.h>
Public Member Functions | |
ShuffleboardLayout (ShuffleboardContainer &parent, std::string_view name, std::string_view type) | |
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::ShuffleboardComponent< ShuffleboardLayout > | |
ShuffleboardComponent (ShuffleboardContainer &parent, std::string_view title, std::string_view type="") | |
ShuffleboardLayout & | WithProperties (const wpi::StringMap< nt::Value > &properties) |
Sets custom properties for this component. More... | |
ShuffleboardLayout & | WithPosition (int columnIndex, int rowIndex) |
Sets the position of this component in the tab. More... | |
ShuffleboardLayout & | 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... | |
Public Member Functions inherited from frc::ShuffleboardContainer | |
ShuffleboardContainer (std::string_view title) | |
ShuffleboardContainer (ShuffleboardContainer &&rhs)=default | |
~ShuffleboardContainer () override=default | |
const std::vector< std::unique_ptr< ShuffleboardComponentBase > > & | GetComponents () const |
Gets the components that are direct children of this container. More... | |
ShuffleboardLayout & | GetLayout (std::string_view title, BuiltInLayouts type) |
Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called. More... | |
ShuffleboardLayout & | GetLayout (std::string_view title, const LayoutType &type) |
Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called. More... | |
ShuffleboardLayout & | GetLayout (std::string_view title, std::string_view type) |
Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called. More... | |
ShuffleboardLayout & | GetLayout (std::string_view title) |
Gets the already-defined layout in this container with the given title. More... | |
ComplexWidget & | Add (std::string_view title, wpi::Sendable &sendable) |
Adds a widget to this container to display the given sendable. More... | |
ComplexWidget & | Add (std::string_view title, const cs::VideoSource &video) |
Adds a widget to this container to display the given video stream. More... | |
ComplexWidget & | AddCamera (std::string_view title, std::string_view cameraName, std::span< const std::string > cameraUrls) |
Adds a widget to this container to display a video stream. More... | |
ComplexWidget & | Add (wpi::Sendable &sendable) |
Adds a widget to this container to display the given sendable. More... | |
ComplexWidget & | Add (const cs::VideoSource &video) |
Adds a widget to this container to display the given video stream. More... | |
SimpleWidget & | Add (std::string_view title, const nt::Value &defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, bool defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, double defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, float defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, int defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, std::string_view defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, const char *defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, std::span< const bool > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, std::span< const double > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, std::span< const float > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, std::span< const int64_t > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (std::string_view title, std::span< const std::string > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SuppliedValueWidget< std::string > & | AddString (std::string_view title, std::function< std::string()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< double > & | AddNumber (std::string_view title, std::function< double()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< double > & | AddDouble (std::string_view title, std::function< double()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< float > & | AddFloat (std::string_view title, std::function< float()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< int64_t > & | AddInteger (std::string_view title, std::function< int64_t()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< bool > & | AddBoolean (std::string_view title, std::function< bool()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< std::string > > & | AddStringArray (std::string_view title, std::function< std::vector< std::string >()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< double > > & | AddNumberArray (std::string_view title, std::function< std::vector< double >()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< double > > & | AddDoubleArray (std::string_view title, std::function< std::vector< double >()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< float > > & | AddFloatArray (std::string_view title, std::function< std::vector< float >()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< int64_t > > & | AddIntegerArray (std::string_view title, std::function< std::vector< int64_t >()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< int > > & | AddBooleanArray (std::string_view title, std::function< std::vector< int >()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< uint8_t > > & | AddRaw (std::string_view title, std::function< std::vector< uint8_t >()> supplier) |
Adds a widget to this container. More... | |
SuppliedValueWidget< std::vector< uint8_t > > & | AddRaw (std::string_view title, std::string_view typeString, std::function< std::vector< uint8_t >()> supplier) |
Adds a widget to this container. More... | |
SimpleWidget & | AddPersistent (std::string_view title, const nt::Value &defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, bool defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, double defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, float defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, int defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, std::string_view defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, std::span< const bool > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, std::span< const double > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, std::span< const float > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, std::span< const int64_t > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (std::string_view title, std::span< const std::string > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
void | EnableIfActuator () override |
Enables user control of this widget in the Shuffleboard application. More... | |
void | DisableIfActuator () override |
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 |
Protected Attributes inherited from frc::ShuffleboardContainer | |
bool | m_isLayout = false |
A layout in a Shuffleboard tab.
Layouts can contain widgets and other layouts.
frc::ShuffleboardLayout::ShuffleboardLayout | ( | ShuffleboardContainer & | parent, |
std::string_view | name, | ||
std::string_view | type | ||
) |
|
overridevirtual |
Builds the entries for this value.
parentTable | The 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. |
metaTable | The table containing all the metadata for this value and its sub-values |
Implements frc::ShuffleboardValue.