WPILibC++ 2024.3.2
ComplexWidget.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <memory>
8#include <string_view>
9
11
13
14namespace wpi {
15class Sendable;
16class SendableBuilder;
17} // namespace wpi
18
19namespace frc {
20
21class ShuffleboardContainer;
22
23/**
24 * A Shuffleboard widget that handles a Sendable object such as a motor
25 * controller or sensor.
26 */
27class ComplexWidget final : public ShuffleboardWidget<ComplexWidget> {
28 public:
30 wpi::Sendable& sendable);
31
32 ~ComplexWidget() override;
33
34 void EnableIfActuator() override;
35
36 void DisableIfActuator() override;
37
38 void BuildInto(std::shared_ptr<nt::NetworkTable> parentTable,
39 std::shared_ptr<nt::NetworkTable> metaTable) override;
40
41 private:
42 wpi::Sendable& m_sendable;
43 std::unique_ptr<wpi::SendableBuilder> m_builder;
44};
45
46} // namespace frc
A Shuffleboard widget that handles a Sendable object such as a motor controller or sensor.
Definition: ComplexWidget.h:27
void BuildInto(std::shared_ptr< nt::NetworkTable > parentTable, std::shared_ptr< nt::NetworkTable > metaTable) override
Builds the entries for this value.
void DisableIfActuator() override
Disables user control of this widget in the Shuffleboard application.
void EnableIfActuator() override
Enables user control of this widget in the Shuffleboard application.
ComplexWidget(ShuffleboardContainer &parent, std::string_view title, wpi::Sendable &sendable)
~ComplexWidget() override
Common interface for objects that can contain shuffleboard components.
Definition: ShuffleboardContainer.h:42
Abstract superclass for widgets.
Definition: ShuffleboardWidget.h:29
Interface for Sendable objects.
Definition: Sendable.h:16
basic_string_view< char > string_view
Definition: core.h:501
Definition: AprilTagPoseEstimator.h:15
Definition: ntcore_cpp.h:26