WPILibC++
2019.1.1-beta-1-31-g81d10bc
|
Common interface for objects that can contain shuffleboard components. More...
#include <ShuffleboardContainer.h>
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. | |
ShuffleboardLayout & | 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. More... | |
ComplexWidget & | Add (const wpi::Twine &title, Sendable &sendable) |
Adds a widget to this container to display the given sendable. More... | |
ComplexWidget & | Add (Sendable &sendable) |
Adds a widget to this container to display the given sendable. More... | |
SimpleWidget & | Add (const wpi::Twine &title, std::shared_ptr< nt::Value > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, bool defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, double defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, int defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, const wpi::Twine &defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, const char *defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, wpi::ArrayRef< bool > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, wpi::ArrayRef< double > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | Add (const wpi::Twine &title, wpi::ArrayRef< std::string > defaultValue) |
Adds a widget to this container to display the given data. More... | |
SimpleWidget & | AddPersistent (const wpi::Twine &title, std::shared_ptr< nt::Value > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (const wpi::Twine &title, bool defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (const wpi::Twine &title, double defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (const wpi::Twine &title, int defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (const wpi::Twine &title, const wpi::Twine &defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (const wpi::Twine &title, wpi::ArrayRef< bool > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (const wpi::Twine &title, wpi::ArrayRef< double > defaultValue) |
Adds a widget to this container to display a simple piece of data. More... | |
SimpleWidget & | AddPersistent (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... | |
![]() | |
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 |
Common interface for objects that can contain shuffleboard components.
ComplexWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
Sendable & | sendable | ||
) |
Adds a widget to this container to display the given sendable.
title | the title of the widget |
sendable | the sendable to display |
IllegalArgumentException | if 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.
sendable | the sendable to display |
IllegalArgumentException | if 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.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
bool | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
double | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
int | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
const wpi::Twine & | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
const char * | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
wpi::ArrayRef< bool > | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
wpi::ArrayRef< double > | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
SimpleWidget& frc::ShuffleboardContainer::Add | ( | const wpi::Twine & | title, |
wpi::ArrayRef< std::string > | defaultValue | ||
) |
Adds a widget to this container to display the given data.
title | the title of the widget |
defaultValue | the default value of the widget |
IllegalArgumentException | if a widget already exists in this container with the given title |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
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
.
title | the title of the widget |
defaultValue | the default value of the widget |
|
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.
|
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.
type | the type of the layout, eg "List" or "Grid" |
title | the title of the layout |