File: logwindow.fl

package info (click to toggle)
obdgpslogger 0.16-1.3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 5,160 kB
  • ctags: 7,498
  • sloc: ansic: 73,206; cpp: 2,055; php: 407; sh: 51; makefile: 4
file content (60 lines) | stat: -rw-r--r-- 1,498 bytes parent folder | download | duplicates (2)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# data file for the Fltk User Interface Designer (fluid)
version 1.0109 
header_name {.h} 
code_name {.cxx}
decl {\#include <stdio.h>} {} 

class OBDLogWindow {open
} {
  Function {OBDLogWindow()} {open
  } {
    Fl_Window logwindow {
      label {OBD GPS Logger Output} open
      xywh {755 136 625 500} type Double visible
    } {
      Fl_Text_Display logdata_stdout {
        label stdout
        xywh {25 25 285 430}
        code0 {o->buffer(new Fl_Text_Buffer);}
      }
      Fl_Text_Display logdata_stderr {
        label stderr
        xywh {320 25 290 430}
        code0 {o->buffer(new Fl_Text_Buffer);}
      }
      Fl_Button clearbutton {
        label Clear
        callback {clear_logs();}
        xywh {530 460 80 25}
      }
      Fl_Check_Button enablestdlog {
        label {Gather stdout and stderr}
        xywh {320 460 190 25} down_box DOWN_BOX
      }
    }
  }
  Function {clear_logs()} {open
  } {
    code {Fl_Text_Buffer *b;
b = logdata_stdout->buffer();
if(NULL != b) b->text("");
b = logdata_stderr->buffer();
if(NULL != b) b->text("");} {}
  }
  Function {append_stderr(const char *text)} {open
  } {
    code {if(enablestdlog->value()) logdata_stderr->buffer()->append(text);} {}
  }
  Function {append_stdout(const char *text)} {open
  } {
    code {if(enablestdlog->value()) logdata_stdout->buffer()->append(text);} {}
  }
  Function {show()} {open
  } {
    code {logwindow->show();} {}
  }
  Function {hide()} {open
  } {
    code {logwindow->hide();} {}
  }
}