about summary refs log tree commit diff
path: root/usth/ICT2.2/labwork/3/C++/button.h
blob: 92fa685fe07ba654a3a8f3617a1a79ed03b706a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <string>

using namespace std;

class Button
{
  bool state;
public:
  string label;
  string color;
  Button (string l, string c) : label {l}, color {c}, state {false} {}
  void depress () { state = true; }
  void undepress () { state = false; }
};