Skip to content

Software Design

Lance A. Endres edited this page Jun 26, 2021 · 1 revision

Introduction

Some abstract base classes provided common functionality and interface design. These cannot be instantiated.

ButtonBase

An abstract class that is the base class for every other class. If you want to understand the software, you should start here.

TwoStateButton

An abstract base class that provides an interface for a two-state button (a button that is only on or off). This class provides a common interface two-state buttons.

By using a common interface for these buttons, they can often be used interchangeably. This allows them to be switched at run time. It also means developers can implement different behavior in their classes by using a TwoStateButton as an argument.

ResettableButton

Abstract class for button classes that use a long press to indicate they should reset themselves to some initial/base value. It exposes the interface for setting the enable/disable of the long press and the duration of the interval.

Clone this wiki locally