File: ticker_tape.h

package info (click to toggle)
din 5.2.1-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,180 kB
  • ctags: 2,511
  • sloc: cpp: 9,369; sh: 6,563; ansic: 2,977; tcl: 1,770; makefile: 283
file content (33 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __ticker_tape
#define __ticker_tape

#include "button.h"
#include "box.h"
#include <string>

struct ticker_tape : click_listener, public widget {

  static const std::string message;
  button toggle; // on / off
  box<int> twin; // window
  int xstart, startx;
  int leftxt, rightxt;
  int dy;

  int handle_input ();
  void draw ();

  int show_text;
  void toggle_text ();
  float mr, mg, mb;

  ticker_tape ();
  void clicked (button& b);
  void set_color (float r, float g, float b) {
    mr = r; mg = g; mb = b;
    toggle.set_color (mr, mg, mb);
  }

};

#endif