4 * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "cwindowgui.h"
24 #include "edlsession.h"
27 #include "mainsession.h"
28 #include "microtheme.h"
30 #include "mwindowgui.h"
31 #include "statusbar.h"
33 #include "trackcanvas.h"
36 PluginClient* new_plugin(PluginServer *server)
38 return new MicroThemeMain(server);
42 MicroThemeMain::MicroThemeMain(PluginServer *server)
43 : PluginTClient(server)
47 MicroThemeMain::~MicroThemeMain()
49 delete camerakeyframe_data;
50 delete channel_bg_data;
51 delete channel_position_data;
53 delete maskkeyframe_data;
54 delete modekeyframe_data;
55 delete pankeyframe_data;
56 delete projectorkeyframe_data;
60 char* MicroThemeMain::plugin_title()
62 return _("Microscopic");
65 Theme* MicroThemeMain::new_theme()
67 return theme = new MicroTheme;
74 MicroTheme::MicroTheme()
78 MicroTheme::~MicroTheme()
82 void MicroTheme::initialize()
84 //printf("MicroTheme::initialize 1\n");
85 mwindow_icon = new VFramePng(get_image("mwindow_icon.png"));
86 vwindow_icon = new VFramePng(get_image("mwindow_icon.png"));
87 cwindow_icon = new VFramePng(get_image("mwindow_icon.png"));
88 awindow_icon = new VFramePng(get_image("mwindow_icon.png"));
89 record_icon = new VFramePng(get_image("mwindow_icon.png"));
90 clip_icon = new VFramePng(get_image("clip_icon.png"));
93 static VFrame *default_patchbay_bg = new VFramePng(get_image("patchbay_bg.png"));
95 BC_WindowBase::get_resources()->bg_color = WHITE;
96 BC_WindowBase::get_resources()->menu_light = WHITE;
97 BC_WindowBase::get_resources()->menu_highlighted = WHITE;
98 BC_WindowBase::get_resources()->menu_down = LTGREY;
99 BC_WindowBase::get_resources()->menu_up = WHITE;
100 BC_WindowBase::get_resources()->menu_shadow = MEGREY;
101 BC_WindowBase::get_resources()->medium_font = "-*-helvetica-medium-r-normal-*-10-*";
103 static VFrame* default_listbox_bg = new VFramePng(get_image("patchbay_bg.png"));
104 BC_WindowBase::get_resources()->listbox_bg = default_listbox_bg;
105 BC_WindowBase::get_resources()->button_light = WHITE;
106 BC_WindowBase::get_resources()->button_up = WHITE;
109 static VFrame *default_cancel_images[] =
111 new VFramePng(get_image("cancel_up.png")), new VFramePng(get_image("cancel_hi.png")), new VFramePng(get_image("cancel_dn.png"))
113 BC_WindowBase::get_resources()->cancel_images = default_cancel_images;
115 static VFrame *default_ok_images[] =
117 new VFramePng(get_image("ok_up.png")), new VFramePng(get_image("ok_hi.png")), new VFramePng(get_image("ok_dn.png"))
119 BC_WindowBase::get_resources()->ok_images = default_ok_images;
121 static VFrame *default_button_images[] =
123 new VFramePng(get_image("generic_up.png")), new VFramePng(get_image("generic_hi.png")), new VFramePng(get_image("generic_dn.png"))
125 BC_WindowBase::get_resources()->generic_button_images = default_button_images;
127 static VFrame *default_tumble_images[] =
129 new VFramePng(get_image("tumble_up.png")), new VFramePng(get_image("tumble_hi.png")), new VFramePng(get_image("tumble_bottomdn.png")), new VFramePng(get_image("tumble_topdn.png"))
131 BC_WindowBase::get_resources()->tumble_data = default_tumble_images;
133 static VFrame *default_checkbox_images[] =
135 new VFramePng(get_image("checkbox_up.png")), new VFramePng(get_image("checkbox_hi.png")), new VFramePng(get_image("checkbox_checked.png")), new VFramePng(get_image("checkbox_dn.png")), new VFramePng(get_image("checkbox_checkedhi.png"))
137 BC_WindowBase::get_resources()->checkbox_images = default_checkbox_images;
139 static VFrame *default_radial_images[] =
141 new VFramePng(get_image("radial_up.png")), new VFramePng(get_image("radial_hi.png")), new VFramePng(get_image("radial_checked.png")), new VFramePng(get_image("radial_dn.png")), new VFramePng(get_image("radial_checkedhi.png"))
143 BC_WindowBase::get_resources()->radial_images = default_radial_images;
145 static VFrame* default_xmeter_data[] =
147 new VFramePng(get_image("xmeter_normal.png")),
148 new VFramePng(get_image("xmeter_green.png")),
149 new VFramePng(get_image("xmeter_red.png")),
150 new VFramePng(get_image("xmeter_yellow.png")),
151 new VFramePng(get_image("over_horiz.png"))
152 new VFramePng(get_image("downmix51_2.png"))
155 static VFrame* default_ymeter_data[] =
157 new VFramePng(get_image("ymeter_normal.png")),
158 new VFramePng(get_image("ymeter_green.png")),
159 new VFramePng(get_image("ymeter_red.png")),
160 new VFramePng(get_image("ymeter_yellow.png")),
161 new VFramePng(get_image("over_vert.png"))
162 new VFramePng(get_image("downmix51_2.png"))
164 BC_WindowBase::get_resources()->xmeter_images = default_xmeter_data;
165 BC_WindowBase::get_resources()->ymeter_images = default_ymeter_data;
166 BC_WindowBase::get_resources()->meter_font = SMALLFONT;
167 BC_WindowBase::get_resources()->meter_font_color = BLACK;
168 BC_WindowBase::get_resources()->meter_title_w = 25;
169 BC_WindowBase::get_resources()->meter_3d = 0;
171 static VFrame* default_pan_data[] =
173 new VFramePng(get_image("pan_up.png")),
174 new VFramePng(get_image("pan_hi.png")),
175 new VFramePng(get_image("pan_popup.png")),
176 new VFramePng(get_image("pan_channel.png")),
177 new VFramePng(get_image("pan_stick.png")),
178 new VFramePng(get_image("pan_channel_small.png")),
179 new VFramePng(get_image("pan_stick_small.png"))
181 BC_WindowBase::get_resources()->pan_data = default_pan_data;
182 BC_WindowBase::get_resources()->pan_text_color = BLACK;
184 static VFrame *default_hscroll_data[] =
186 new VFramePng(get_image("hscroll_handle_up.png")),
187 new VFramePng(get_image("hscroll_handle_hi.png")),
188 new VFramePng(get_image("hscroll_handle_dn.png")),
189 new VFramePng(get_image("hscroll_handle_bg.png")),
190 new VFramePng(get_image("hscroll_left_up.png")),
191 new VFramePng(get_image("hscroll_left_hi.png")),
192 new VFramePng(get_image("hscroll_left_dn.png")),
193 new VFramePng(get_image("hscroll_right_up.png")),
194 new VFramePng(get_image("hscroll_right_hi.png")),
195 new VFramePng(get_image("hscroll_right_dn.png"))
197 static VFrame *default_vscroll_data[] =
199 new VFramePng(get_image("vscroll_handle_up.png")),
200 new VFramePng(get_image("vscroll_handle_hi.png")),
201 new VFramePng(get_image("vscroll_handle_dn.png")),
202 new VFramePng(get_image("vscroll_handle_bg.png")),
203 new VFramePng(get_image("vscroll_left_up.png")),
204 new VFramePng(get_image("vscroll_left_hi.png")),
205 new VFramePng(get_image("vscroll_left_dn.png")),
206 new VFramePng(get_image("vscroll_right_up.png")),
207 new VFramePng(get_image("vscroll_right_hi.png")),
208 new VFramePng(get_image("vscroll_right_dn.png"))
210 BC_WindowBase::get_resources()->hscroll_data = default_hscroll_data;
211 BC_WindowBase::get_resources()->vscroll_data = default_vscroll_data;
213 channel_bg_data = new VFramePng(get_image("channel_bg.png"));
214 channel_position_data = new VFramePng(get_image("channel_position.png"));
215 channel_position_color = BLACK;
216 recordgui_fixed_color = BLACK;
217 recordgui_variable_color = RED;
219 patchbay_bg = default_patchbay_bg;
220 resource1024_bg_data = new VFramePng(get_image("resource1024.png"));
221 resource512_bg_data = new VFramePng(get_image("resource512.png"));
222 resource256_bg_data = new VFramePng(get_image("resource256.png"));
223 resource128_bg_data = new VFramePng(get_image("resource128.png"));
224 resource64_bg_data = new VFramePng(get_image("resource64.png"));
225 resource32_bg_data = new VFramePng(get_image("resource32.png"));
226 plugin_bg_data = new VFramePng(get_image("plugin_bg.png"));
227 title_bg_data = new VFramePng(get_image("title_bg.png"));
228 timebar_bg_data = new VFramePng(get_image("timebar_bg.png"));
229 vtimebar_bg_data = new VFramePng(get_image("vwindow_timebar.png"));
230 new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
232 keyframe_data = new VFramePng(get_image("keyframe3.png"));
233 camerakeyframe_data = new VFramePng(get_image("camerakeyframe.png"));
234 maskkeyframe_data = new VFramePng(get_image("maskkeyframe.png"));
235 modekeyframe_data = new VFramePng(get_image("modekeyframe.png"));
236 pankeyframe_data = new VFramePng(get_image("pankeyframe.png"));
237 projectorkeyframe_data = new VFramePng(get_image("projectorkeyframe.png"));
239 VFrame editpanel_up(get_image("editpanel_up.png"));
240 VFrame editpanel_hi(get_image("editpanel_hi.png"));
241 VFrame editpanel_dn(get_image("editpanel_dn.png"));
242 VFrame editpanel_checked(get_image("editpanel_checked.png"));
243 VFrame editpanel_checkedhi(get_image("editpanel_checkedhi.png"));
245 static VFrame *default_inpoint[] = { new VFramePng(get_image("out_up.png")), new VFramePng(get_image("out_hi.png")), new VFramePng(get_image("out_checked.png")), new VFramePng(get_image("out_dn.png")), new VFramePng(get_image("out_checkedhi.png")) };
246 static VFrame *default_labeltoggle[] = { new VFramePng(get_image("labeltoggle_up.png")), new VFramePng(get_image("labeltoggle_uphi.png")), new VFramePng(get_image("label_checked.png")), new VFramePng(get_image("labeltoggle_dn.png")), new VFramePng(get_image("label_checkedhi.png")) };
247 static VFrame *default_ffmpegtoggle[] = { new VFramePng(get_image("ff_up.png")), new VFramePng(get_image("ff_hi.png")), new VFramePng(get_image("ff_checked.png")), new VFramePng(get_image("ff_down.png")), new VFramePng(get_image("ff_checkedhi.png")) };
248 static VFrame *default_shbtndata[] = { new VFramePng(get_image("shbtn_up.png")), new VFramePng(get_image("shbtn_hi.png")), new VFramePng(get_image("shbtn_dn.png")), };
249 static VFrame *default_outpoint[] = { new VFramePng(get_image("in_up.png")), new VFramePng(get_image("in_hi.png")), new VFramePng(get_image("in_checked.png")), new VFramePng(get_image("in_dn.png")), new VFramePng(get_image("in_checkedhi.png")) };
250 static VFrame *transport_bg[] = { new VFramePng(get_image("transportup.png")), new VFramePng(get_image("transporthi.png")), new VFramePng(get_image("transportdn.png")) };
251 static VFrame *patches_bg[] = { new VFramePng(get_image("patches_up.png")), new VFramePng(get_image("patches_hi.png")), new VFramePng(get_image("patches_checked.png")), new VFramePng(get_image("patches_dn.png")), new VFramePng(get_image("patches_checkedhi.png")) };
253 build_button(BC_WindowBase::get_resources()->filebox_updir_images, get_image("filebox_updir.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
254 build_button(BC_WindowBase::get_resources()->filebox_newfolder_images, get_image("filebox_newfolder.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
255 build_button(BC_WindowBase::get_resources()->filebox_icons_images, get_image("filebox_icons.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
256 build_button(BC_WindowBase::get_resources()->filebox_text_images, get_image("filebox_text.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
258 build_button(BC_WindowBase::get_resources()->listbox_button, get_image("listbox_button.png"), &editpanel_up, &editpanel_hi, &editpanel_dn, &editpanel_hi);
259 build_button(bottom_justify, get_image("bottom_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
260 build_button(center_justify, get_image("center_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
261 build_button(copy_data, get_image("copy.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
262 build_button(cut_data, get_image("cut.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
263 build_button(fit_data, get_image("fit.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
264 build_button(in_data, get_image("outpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
265 build_button(indelete_data, get_image("clearinpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
266 build_button(labelbutton_data, get_image("label.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
267 build_button(left_justify, get_image("left_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
268 build_button(magnify_button_data, get_image("magnify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
269 build_button(middle_justify, get_image("middle_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
270 build_button(nextlabel_data, get_image("nextlabel.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
271 build_button(out_data, get_image("inpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
272 build_button(outdelete_data, get_image("clearoutpoint.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
273 build_button(over_button, get_image("over.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
274 build_button(overwrite_data, get_image("overwrite.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
275 build_button(paste_data, get_image("paste.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
276 build_button(prevlabel_data, get_image("prevlabel.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
277 build_button(redo_data, get_image("redo.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
278 build_button(right_justify, get_image("right_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
279 build_button(splice_data, get_image("splice.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
280 build_button(statusbar_cancel_data, get_image("cancel_small.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
281 build_button(toclip_data, get_image("toclip.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
282 build_button(top_justify, get_image("top_justify.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
283 build_button(undo_data, get_image("undo.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
284 build_toggle(arrow_data, get_image("arrow.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
285 build_toggle(autokeyframe_data, get_image("autokeyframe.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
286 build_toggle(camera_data, get_image("camera.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
287 build_toggle(crop_data, get_image("crop.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
288 build_toggle(ibeam_data, get_image("ibeam.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
289 build_toggle(magnify_data, get_image("magnify.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
290 build_toggle(mask_data, get_image("mask.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
291 build_toggle(proj_data, get_image("projector.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
292 build_toggle(protect_data, get_image("protect.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
293 build_toggle(show_meters, get_image("show_meters.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
294 build_toggle(titlesafe_data, get_image("titlesafe.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
295 build_toggle(tool_data, get_image("toolwindow.png"), &editpanel_up, &editpanel_hi, &editpanel_checked, &editpanel_dn, &editpanel_checkedhi);
296 build_transport(duplex_data, get_image("duplex.png"), transport_bg, 1);
297 build_transport(end_data, get_image("end.png"), transport_bg, 2);
298 build_transport(fastfwd_data, get_image("fastfwd.png"), transport_bg, 1);
299 build_transport(fastrev_data, get_image("fastrev.png"), transport_bg, 1);
300 build_transport(forward_data, get_image("play.png"), transport_bg, 1);
301 build_transport(framefwd_data, get_image("framefwd.png"), transport_bg, 1);
302 build_transport(framefwd_data, get_image("framefwd.png"), transport_bg, 1);
303 build_transport(framerev_data, get_image("framerev.png"), transport_bg, 1);
304 build_transport(rec_data, get_image("record.png"), transport_bg, 1);
305 build_transport(recframe_data, get_image("singleframe.png"), transport_bg, 1);
306 build_transport(reverse_data, get_image("reverse.png"), transport_bg, 1);
307 build_transport(rewind_data, get_image("rewind.png"), transport_bg, 0);
308 build_transport(stop_data, get_image("stop.png"), transport_bg, 1);
309 build_transport(stoprec_data, get_image("stoprec.png"), transport_bg, 2);
311 build_patches(playpatch_data, get_image("playpatch.png"), patches_bg, 0);
312 build_patches(recordpatch_data, get_image("recordpatch.png"), patches_bg, 1);
313 build_patches(gangpatch_data, get_image("gangpatch.png"), patches_bg, 1);
314 build_patches(drawpatch_data, get_image("drawpatch.png"), patches_bg, 1);
315 build_patches(mutepatch_data, get_image("mutepatch.png"), patches_bg, 2);
317 static VFrame *default_expandpatch_data[] =
319 new VFramePng(get_image("expandpatch_up.png")),
320 new VFramePng(get_image("expandpatch_hi.png")),
321 new VFramePng(get_image("expandpatch_checked.png")),
322 new VFramePng(get_image("expandpatch_dn.png")),
323 new VFramePng(get_image("expandpatch_checkedhi.png"))
325 expandpatch_data = default_expandpatch_data;
327 build_button(channel_data, get_image("channel.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
328 build_button(wrench_data, get_image("wrench.png"), &editpanel_up, &editpanel_hi, &editpanel_dn);
329 in_point = default_inpoint;
330 label_toggle = default_labeltoggle;
331 ffmpeg_toggle = default_ffmpegtoggle;
332 shbtn_data = default_shbtndata;
333 out_point = default_outpoint;
335 fade_h = BC_WindowBase::get_resources()->horizontal_slider_data[0]->get_h();
336 mode_h = BC_WindowBase::get_resources()->generic_button_images[0]->get_h();
337 meter_h = BC_WindowBase::get_resources()->xmeter_images[0]->get_h();
338 pan_h = BC_WindowBase::get_resources()->pan_data[PAN_UP]->get_h();
339 play_h = playpatch_data[0]->get_h();
343 title_font = MEDIUMFONT;
348 //printf("MicroTheme::initialize 2\n");
351 void MicroTheme::draw_mwindow_bg(MWindowGUI *gui)
353 gui->clear_box(0, 0, gui->get_w(), gui->get_h());
356 void MicroTheme::get_cwindow_sizes(CWindowGUI *gui)
358 //printf("Theme::get_cwindow_sizes 1 %p\n", mwindow);
365 ccomposite_w = protect_data[0]->get_w();
366 ccomposite_h = mwindow->session->cwindow_h - ccomposite_y;
367 ccanvas_x = ccomposite_x + ccomposite_w;
369 //printf("Theme::get_cwindow_sizes 1\n");
372 if(mwindow->edl->session->cwindow_meter)
374 cmeter_x = mwindow->session->cwindow_w - MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
375 mwindow->edl->session->cwindow_meter);
376 ccanvas_w = cmeter_x - ccanvas_x - 5;
380 cmeter_x = mwindow->session->cwindow_w;
381 ccanvas_w = cmeter_x - ccanvas_x;
383 //printf("Theme::get_cwindow_sizes 1\n");
386 cmeter_h = mwindow->session->cwindow_h - cmeter_y;
388 cedit_y = mwindow->session->cwindow_h - autokeyframe_data[0]->get_h();
389 //printf("Theme::get_cwindow_sizes 1\n");
391 ctransport_y = cedit_y - forward_data[0]->get_h();
392 ccanvas_h = ctransport_y - 5;
393 //printf("Theme::get_cwindow_sizes 1\n");
394 ctime_x = ctransport_x + PlayTransport::get_transport_width(mwindow);
395 ctime_y = ctransport_y;
396 // czoom_x = ctime_x + 150;
397 czoom_x = ctransport_x + PlayTransport::get_transport_width(mwindow) + 20;
398 //printf("Theme::get_cwindow_sizes 1\n");
401 cdest_y = czoom_y + 30;
402 //printf("Theme::get_cwindow_sizes 2\n");
406 void MicroTheme::get_vwindow_sizes(VWindowGUI *gui)
410 if(mwindow->edl->session->vwindow_meter)
412 vmeter_x = mwindow->session->vwindow_w -
413 MeterPanel::get_meters_width(mwindow->edl->session->audio_channels,
414 mwindow->edl->session->vwindow_meter);
415 vcanvas_w = vmeter_x - vcanvas_x - 5;
419 vmeter_x = mwindow->session->vwindow_w;
420 vcanvas_w = mwindow->session->vwindow_w;
424 vedit_y = mwindow->session->vwindow_h - autokeyframe_data[0]->get_h();
426 vtransport_y = vedit_y - forward_data[0]->get_h();
428 vslider_y = vtransport_y -
429 BC_WindowBase::get_resources()->horizontal_slider_data[0]->get_h();
430 vslider_w = vcanvas_w - vslider_x - 5;
432 vtimebar_y = vslider_y - 20;
433 vtimebar_w = vcanvas_w - vcanvas_x;
436 vcanvas_h = vtimebar_y;
439 vmeter_h = mwindow->session->vwindow_h - cmeter_y;
443 vtime_x = vtransport_x + PlayTransport::get_transport_width(mwindow) + 5;
444 vtime_y = vtransport_y;
446 vzoom_x = vtime_x + 150;
453 #define PATCHBAY_W 100
455 void MicroTheme::get_mwindow_sizes(MWindowGUI *gui, int w, int h)
458 mbuttons_y = gui->mainmenu->get_h();
460 mbuttons_h = arrow_data[0]->get_h() + 4;
462 mclock_y = mbuttons_y + mbuttons_h;
463 mclock_w = PATCHBAY_W - 10;
464 mclock_h = timebar_bg_data->get_h();
465 mtimebar_x = PATCHBAY_W;
466 mtimebar_y = mclock_y;
467 mtimebar_w = w - mtimebar_x;
468 mtimebar_h = timebar_bg_data->get_h();
470 mstatus_y = h - statusbar_cancel_data[0]->get_h();
472 mstatus_h = statusbar_cancel_data[0]->get_h();
473 mstatus_progress_x = mstatus_w - statusbar_cancel_data[0]->get_w() - 240;
474 mstatus_progress_y = mstatus_h - BC_WindowBase::get_resources()->progress_images[0]->get_h();
475 mstatus_progress_w = 230;
476 mstatus_cancel_x = mstatus_w - statusbar_cancel_data[0]->get_w();
477 mstatus_cancel_y = mstatus_h - statusbar_cancel_data[0]->get_h();
479 mzoom_y = mstatus_y - ZOOM_H;
483 patchbay_y = mtimebar_y + mtimebar_h;
484 patchbay_w = PATCHBAY_W;
485 patchbay_h = mzoom_y - patchbay_y;
486 mcanvas_x = patchbay_x + patchbay_w;
487 mcanvas_y = patchbay_y;
488 mcanvas_w = w - patchbay_w;
489 mcanvas_h = patchbay_h;
492 void MicroTheme::get_recordgui_sizes(RecordGUI *gui, int w, int h)
494 recordgui_status_x = 5;
495 recordgui_status_y = 5;
496 recordgui_status_x2 = 100;
497 recordgui_batch_x = 220;
498 recordgui_batch_y = 5;
499 recordgui_batchcaption_x = recordgui_batch_x + 70;
502 recordgui_transport_x = recordgui_batch_x;
503 recordgui_transport_y = recordgui_batch_y + 150;
505 recordgui_buttons_x = 220;
506 recordgui_buttons_y = recordgui_transport_y + 30;
507 recordgui_options_x = 220;
508 recordgui_options_y = recordgui_buttons_y + 30;
510 recordgui_batches_x = 10;
511 recordgui_batches_y = 250;
512 recordgui_batches_w = w - 20;
513 recordgui_batches_h = h - recordgui_batches_y - 70;
514 recordgui_loadmode_x = w / 2 - loadmode_w / 2;
515 recordgui_loadmode_y = h - 50;
517 recordgui_controls_x = 10;
518 recordgui_controls_y = h - 30;