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

Abstract superclass for widgets. More...

#include <ShuffleboardWidget.h>

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

Public Member Functions

 ShuffleboardWidget (ShuffleboardContainer &parent, const wpi::Twine &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 (const wpi::Twine &widgetType)
 Sets the type of widget used to display the data. More...
 
- Public Member Functions inherited from frc::ShuffleboardComponent< Derived >
 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::ShuffleboardWidget< Derived >

Abstract superclass for widgets.

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

Template Parameters
Derivedthe self type

Member Function Documentation

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
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
template<typename Derived>
Derived& frc::ShuffleboardWidget< Derived >::WithWidget ( const wpi::Twine 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 thrid-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: