WPILibC++  2019.3.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
frc::ShuffleboardComponent< Derived > Class Template Reference

A generic component in Shuffleboard. More...

#include <ShuffleboardComponent.h>

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

Public Member Functions

 ShuffleboardComponent (ShuffleboardContainer &parent, const wpi::Twine &title, const wpi::Twine &type="")
 
Derived & WithProperties (const wpi::StringMap< std::shared_ptr< 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, const wpi::Twine &title, const wpi::Twine &type="")
 
void SetType (const wpi::Twine &type)
 
void BuildMetadata (std::shared_ptr< nt::NetworkTable > metaTable)
 
ShuffleboardContainerGetParent ()
 
const std::string & GetType () const
 
- Public Member Functions inherited from frc::ShuffleboardValue
 ShuffleboardValue (const wpi::Twine &title)
 
wpi::StringRef GetTitle () const
 Gets the title of this Shuffleboard value.
 
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
< std::shared_ptr< nt::Value > > 
m_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::ShuffleboardComponent< Derived >

A generic component in Shuffleboard.

Template Parameters
Derivedthe self type

Member Function Documentation

template<typename Derived >
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.

Parameters
columnIndexthe column in the tab to place this component
rowIndexthe row in the tab to place this component
Returns
this component
template<typename Derived >
Derived & frc::ShuffleboardComponent< Derived >::WithProperties ( const wpi::StringMap< std::shared_ptr< nt::Value >> &  properties)

Sets custom properties for this component.

Property names are case-sensitive and whitespace-insensitive (capitalization and spaces do not matter).

Parameters
propertiesthe properties for this component
Returns
this component
template<typename Derived >
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.

Parameters
widthhow many columns wide the component should be
heighthow many rows high the component should be
Returns
this component

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