WPILibC++  2018.4.1-20180928043320-1211-g175c6c1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
frc::ShuffleboardContainer Class Reference

Common interface for objects that can contain shuffleboard components. More...

#include <ShuffleboardContainer.h>

Inheritance diagram for frc::ShuffleboardContainer:
frc::ShuffleboardValue frc::ShuffleboardLayout frc::ShuffleboardTab

Public Member Functions

 ShuffleboardContainer (const wpi::Twine &title)
 
 ShuffleboardContainer (ShuffleboardContainer &&rhs)=default
 
const std::vector
< std::unique_ptr
< ShuffleboardComponentBase > > & 
GetComponents () const
 Gets the components that are direct children of this container.
 
ShuffleboardLayoutGetLayout (const wpi::Twine &type, const wpi::Twine &title)
 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...
 
ComplexWidgetAdd (const wpi::Twine &title, Sendable &sendable)
 Adds a widget to this container to display the given sendable. More...
 
ComplexWidgetAdd (Sendable &sendable)
 Adds a widget to this container to display the given sendable. More...
 
SimpleWidgetAdd (const wpi::Twine &title, std::shared_ptr< nt::Value > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (const wpi::Twine &title, bool defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (const wpi::Twine &title, double defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (const wpi::Twine &title, int defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (const wpi::Twine &title, const wpi::Twine &defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (const wpi::Twine &title, wpi::ArrayRef< bool > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (const wpi::Twine &title, wpi::ArrayRef< double > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAdd (const wpi::Twine &title, wpi::ArrayRef< std::string > defaultValue)
 Adds a widget to this container to display the given data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, std::shared_ptr< nt::Value > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, bool defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, double defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, int defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, const wpi::Twine &defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, wpi::ArrayRef< bool > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, wpi::ArrayRef< double > defaultValue)
 Adds a widget to this container to display a simple piece of data. More...
 
SimpleWidgetAddPersistent (const wpi::Twine &title, wpi::ArrayRef< 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...
 
- 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...
 

Protected Attributes

bool m_isLayout = false
 

Friends

class SimpleWidget
 

Detailed Description

Common interface for objects that can contain shuffleboard components.

Member Function Documentation

ComplexWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
Sendable sendable 
)

Adds a widget to this container to display the given sendable.

Parameters
titlethe title of the widget
sendablethe sendable to display
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
ComplexWidget& frc::ShuffleboardContainer::Add ( Sendable sendable)

Adds a widget to this container to display the given sendable.

Parameters
sendablethe sendable to display
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title, or if the sendable's name has not been specified
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
std::shared_ptr< nt::Value defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
bool  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
double  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
int  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
const wpi::Twine defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
wpi::ArrayRef< bool >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
wpi::ArrayRef< double >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::Add ( const wpi::Twine title,
wpi::ArrayRef< std::string >  defaultValue 
)

Adds a widget to this container to display the given data.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
Exceptions
IllegalArgumentExceptionif a widget already exists in this container with the given title
See also
#addPersistent(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
std::shared_ptr< nt::Value defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
bool  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
double  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
int  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
const wpi::Twine defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
wpi::ArrayRef< bool >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
wpi::ArrayRef< double >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
SimpleWidget& frc::ShuffleboardContainer::AddPersistent ( const wpi::Twine title,
wpi::ArrayRef< std::string >  defaultValue 
)

Adds a widget to this container to display a simple piece of data.

Unlike add(String, Object), the value in the widget will be saved on the robot and will be used when the robot program next starts rather than

defaultValue

.

Parameters
titlethe title of the widget
defaultValuethe default value of the widget
Returns
a widget to display the sendable data
See also
#add(String, Object) add(String title, Object defaultValue)
void frc::ShuffleboardContainer::DisableIfActuator ( )
overridevirtual

Disables user control of this widget in the Shuffleboard application.

This method is package-private to prevent users from enabling control themselves. Has no effect if the sendable is not marked as an actuator with SendableBuilder#setActuator.

Reimplemented from frc::ShuffleboardValue.

void frc::ShuffleboardContainer::EnableIfActuator ( )
overridevirtual

Enables user control of this widget in the Shuffleboard application.

This method is package-private to prevent users from enabling control themselves. Has no effect if the sendable is not marked as an actuator with SendableBuilder#setActuator.

Reimplemented from frc::ShuffleboardValue.

ShuffleboardLayout& frc::ShuffleboardContainer::GetLayout ( const wpi::Twine type,
const wpi::Twine title 
)

Gets the layout with the given type and title, creating it if it does not already exist at the time this method is called.

Parameters
typethe type of the layout, eg "List" or "Grid"
titlethe title of the layout
Returns
the layout

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