WPILibC++  2019.1.1-beta-2-47-gd528a77
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
ShuffleboardWidget.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <wpi/Twine.h>
11 
12 #include "frc/shuffleboard/ShuffleboardComponent.h"
13 
14 namespace frc {
15 
16 class ShuffleboardContainer;
17 
25 template <typename Derived>
27  : public ShuffleboardComponent<ShuffleboardWidget<Derived>> {
28  public:
30  : ShuffleboardValue(title),
32 
40  Derived& WithWidget(const wpi::Twine& widgetType) {
41  this->SetType(widgetType);
42  return *static_cast<Derived*>(this);
43  }
44 };
45 
46 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
A generic component in Shuffleboard.
Definition: ShuffleboardComponent.h:30
Derived & WithWidget(const wpi::Twine &widgetType)
Sets the type of widget used to display the data.
Definition: ShuffleboardWidget.h:40
Definition: ShuffleboardValue.h:19
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
Common interface for objects that can contain shuffleboard components.
Definition: ShuffleboardContainer.h:34
Abstract superclass for widgets.
Definition: ShuffleboardWidget.h:26