File: panels.C

package info (click to toggle)
xdiskusage 1.48-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 208 kB
  • ctags: 131
  • sloc: cpp: 969; sh: 152; makefile: 60
file content (173 lines) | stat: -rw-r--r-- 5,241 bytes parent folder | download | duplicates (4)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// generated by Fast Light User Interface Designer (fluid) version 1.0011

#include "panels.H"

Fl_Window *disk_chooser=(Fl_Window *)0;

Fl_Browser *disk_browser=(Fl_Browser *)0;

Fl_Input *disk_input=(Fl_Input *)0;

static void cb_browser(Fl_Button*, void*) {
  const char* c = fl_file_chooser("Directory:", 0, disk_input->value());
if (c) disk_input->value(c);
}

Fl_Check_Button *all_files_button=(Fl_Check_Button *)0;

Fl_Window* make_diskchooser() {
  Fl_Window* w;
  { Fl_Window* o = disk_chooser = new Fl_Window(404, 252, "Disk Usage Display");
    w = o;
    { Fl_Button* o = new Fl_Button(290, 10, 65, 20, "reload");
      o->callback((Fl_Callback*)reload_cb);
    }
    { Fl_Button* o = new Fl_Button(365, 10, 25, 20, "\251");
      o->labelsize(18);
      o->callback((Fl_Callback*)copyright_cb);
    }
    { Fl_Browser* o = disk_browser = new Fl_Browser(15, 30, 375, 150, "Pick a disk:");
      o->type(2);
      o->callback((Fl_Callback*)disk_browser_cb);
      o->align(FL_ALIGN_TOP_LEFT);
      Fl_Group::current()->resizable(o);
      static int widths[] = {200,0};
      o->column_widths(widths);
    }
    { Fl_Input* o = disk_input = new Fl_Input(15, 200, 335, 25, "Or type pathname in and hit Enter:");
      o->callback((Fl_Callback*)disk_input_cb);
      o->align(FL_ALIGN_TOP_LEFT);
      o->when(FL_WHEN_ENTER_KEY_ALWAYS);
      o->value("/");
    }
    { Fl_Button* o = new Fl_Button(350, 200, 40, 25, "browser");
      o->labelsize(8);
      o->callback((Fl_Callback*)cb_browser);
    }
    { Fl_Check_Button* o = new Fl_Check_Button(15, 225, 185, 25, "measure directories only");
      o->type(102);
      o->down_box(FL_DIAMOND_DOWN_BOX);
      o->value(1);
    }
    { Fl_Check_Button* o = all_files_button = new Fl_Check_Button(190, 225, 145, 25, "measure all files");
      o->type(102);
      o->down_box(FL_DIAMOND_DOWN_BOX);
    }
    o->end();
  }
  return w;
}

Fl_Window *wait_window=(Fl_Window *)0;

Fl_Slider *wait_slider=(Fl_Slider *)0;

Fl_Window* make_wait_window() {
  Fl_Window* w;
  { Fl_Window* o = wait_window = new Fl_Window(229, 100);
    w = o;
    w->hotspot(o);
    { Fl_Slider* o = wait_slider = new Fl_Slider(10, 25, 205, 25, "Reading disk:");
      o->type(3);
      o->color(12);
      o->selection_color(47);
      o->align(FL_ALIGN_TOP_LEFT);
      Fl_Group::current()->resizable(o);
      o->set_output();
    }
    { Fl_Button* o = new Fl_Button(70, 60, 80, 25, "Cancel");
      o->shortcut(0xff1b);
      o->callback((Fl_Callback*)cancel_cb);
    }
    o->set_modal();
    o->end();
  }
  return w;
}

Fl_Window *print_panel=(Fl_Window *)0;

Fl_Input *print_command_input=(Fl_Input *)0;

Fl_Light_Button *print_file_button=(Fl_Light_Button *)0;

Fl_Input *print_file_input=(Fl_Input *)0;

static void cb_browser1(Fl_Button*, void*) {
  const char* c = fl_file_chooser("Print to:", "*.ps", print_file_input->value());
if (c) print_file_input->value(c);
}

Fl_Check_Button *print_portrait_button=(Fl_Check_Button *)0;

Fl_Check_Button *fill_page_button=(Fl_Check_Button *)0;

Fl_Return_Button *print_ok_button=(Fl_Return_Button *)0;

static void cb_Cancel(Fl_Button* o, void*) {
  o->window()->hide();
}

Fl_Window* make_print_panel() {
  Fl_Window* w;
  { Fl_Window* o = print_panel = new Fl_Window(345, 173, "Print");
    w = o;
    w->hotspot(o);
    { Fl_Box* o = new Fl_Box(10, 5, 85, 25, "Print to:");
      o->labelfont(1);
      o->labelsize(18);
      o->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
    }
    { Fl_Light_Button* o = new Fl_Light_Button(10, 35, 75, 25, "printer");
      o->type(102);
      o->value(1);
    }
    { Fl_Input* o = print_command_input = new Fl_Input(85, 35, 250, 25);
      o->value("lpr");
    }
    { Fl_Light_Button* o = print_file_button = new Fl_Light_Button(10, 65, 75, 25, "file");
      o->type(102);
    }
    { Fl_Input* o = print_file_input = new Fl_Input(85, 65, 215, 25);
      o->value("xdiskusage.ps");
    }
    { Fl_Button* o = new Fl_Button(300, 65, 36, 25, "browser");
      o->labelsize(8);
      o->callback((Fl_Callback*)cb_browser1);
    }
    { Fl_Group* o = new Fl_Group(10, 90, 325, 35);
      o->align(FL_ALIGN_LEFT);
      { Fl_Check_Button* o = print_portrait_button = new Fl_Check_Button(10, 90, 80, 25, "portrait");
        o->type(102);
        o->down_box(FL_DIAMOND_DOWN_BOX);
        o->value(1);
      }
      { Fl_Check_Button* o = new Fl_Check_Button(90, 90, 100, 25, "landscape");
        o->type(102);
        o->down_box(FL_DIAMOND_DOWN_BOX);
      }
      o->end();
    }
    { Fl_Group* o = new Fl_Group(10, 110, 330, 45);
      o->align(FL_ALIGN_LEFT);
      { Fl_Check_Button* o = fill_page_button = new Fl_Check_Button(10, 115, 150, 25, "reshape to fill page");
        o->type(102);
        o->down_box(FL_DIAMOND_DOWN_BOX);
        o->value(1);
      }
      { Fl_Check_Button* o = new Fl_Check_Button(160, 115, 175, 25, "same shape as window");
        o->type(102);
        o->down_box(FL_DIAMOND_DOWN_BOX);
      }
      o->end();
    }
    print_ok_button = new Fl_Return_Button(175, 140, 75, 25, "OK");
    { Fl_Button* o = new Fl_Button(260, 140, 75, 25, "Cancel");
      o->shortcut(0xff1b);
      o->callback((Fl_Callback*)cb_Cancel);
    }
    o->set_modal();
    o->end();
  }
  return w;
}