~torios/+junk/flautostart

« back to all changes in this revision

Viewing changes to flautostart.cxx

  • Committer: momozor
  • Date: 2019-05-11 03:15:11 UTC
  • Revision ID: skelic3@gmail.com-20190511031511-4oyc42ifrpn3od9q
more protos

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
  }
40
40
}
41
41
 
42
 
void launch_add_window() {
 
42
Fl_Double_Window* launch_add_window() {
43
43
  Fl_Double_Window* top_window =
44
 
    new Fl_Double_Window(250, 250, "Add new autostart program");
45
 
  Fl_Pack* group = new Fl_Pack(0, 25, 350, 445);
46
 
  Fl_Button* cancel = new Fl_Button(30, 425, 25, 25, "Cancel");
47
 
  Fl_Button* submit = new Fl_Button(100, 425, 90, 25, "Submit");
 
44
    new Fl_Double_Window(445, 500, "Add new autostart program");
 
45
  Fl_Pack* pack  = new Fl_Pack(0, 25, 445, 500);
 
46
  Fl_Button* cancel = new Fl_Button(0, 0, 10, 15, "Cancel");
 
47
  Fl_Button* submit = new Fl_Button(0, 25, 10, 15, "Submit");
48
48
 
49
 
  group->end();
 
49
  pack->end();
50
50
  top_window->end();
51
51
  top_window->show();
 
52
 
 
53
  cancel->callback([](Fl_Widget*, void* tw) {
 
54
      Fl_Double_Window* w = static_cast<Fl_Double_Window*>(tw);
 
55
      w->hide();
 
56
  }, top_window);
 
57
 
 
58
  return top_window;
52
59
}
53
60
 
54
61
void launch_remove_window() {
55
62
  Fl_Double_Window* top_window =
56
63
    new Fl_Double_Window(250, 250, "Remove autostart program");
57
 
  Fl_Pack* group = new Fl_Pack(0, 25, 350, 445);
58
 
  Fl_Button* cancel = new Fl_Button(30, 425, 65, 25, "Cancel");
59
 
  Fl_Button* submit = new Fl_Button(100, 425, 90, 25, "Submit");
60
 
 
61
 
  group->end();
 
64
  Fl_Pack* pack = new Fl_Pack(0, 25, 350, 445);
 
65
  Fl_Button* cancel = new Fl_Button(0, 25, 25, 25, "Cancel");
 
66
  Fl_Button* submit = new Fl_Button(0, 25, 25, 25, "Submit");
 
67
  
 
68
  pack->end();
62
69
  top_window->end();
63
70
  top_window->show();
64
71
}
65
72
 
66
73
Fl_Double_Window* make_top_window() {
67
74
  Fl_Double_Window* top_window = new Fl_Double_Window(350, 350, "Autostart");
68
 
  Fl_Pack* group = new Fl_Pack(0, 25, 350, 445, "Known Applications");
 
75
  Fl_Pack* pack = new Fl_Pack(0, 25, 350, 445, "Known Applications");
69
76
 
70
 
  group->labeltype(FL_EMBOSSED_LABEL);
 
77
  pack->labeltype(FL_EMBOSSED_LABEL);
71
78
  make_checkbox_list();
72
79
  Fl_Button* add = new Fl_Button(30, 425, 65, 25, "Add");
73
80
  Fl_Button* remove = new Fl_Button(100, 425, 90, 25, "Remove");
74
81
  Fl_Button* submit = new Fl_Button(265, 425, 70, 25, "Submit");
75
82
  
76
 
  group->end();
 
83
  pack->end();
77
84
  top_window->end();
78
85
  add->callback([](Fl_Widget*, void*) {
79
86
      launch_add_window();