2008-04-23 04:22:46 +02:00
# data file for the Fltk User Interface Designer (fluid)
2010-01-29 21:12:24 +01:00
version 1.0110
header_name {.H}
2008-04-23 04:22:46 +02:00
code_name {.C}
2008-05-22 02:40:25 +02:00
comment {//
2010-01-09 04:33:12 +01:00
// Copyright (C) 2008-2010 Jonathan Moore Liles
2008-05-22 02:40:25 +02:00
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
} {in_source in_header
2010-01-29 21:12:24 +01:00
}
2008-05-22 02:40:25 +02:00
2008-04-23 07:35:49 +02:00
decl {const float STATUS_UPDATE_FREQ = 0.5f;} {}
2008-04-24 23:09:17 +02:00
decl {\#include "Fl_Menu_Settings.H"} {}
2008-04-24 22:52:30 +02:00
2008-04-23 04:22:46 +02:00
decl {\#include "Timeline.H"} {}
decl {\#include "Transport.H"} {}
2008-04-24 00:29:14 +02:00
decl {\#include "Loggable.H"} {}
2008-05-07 01:33:24 +02:00
decl {\#include "Project.H"} {}
2008-05-04 09:10:15 +02:00
2008-04-23 04:22:46 +02:00
decl {\#include "Clock.H"} {public
}
2010-01-18 07:02:26 +01:00
decl {\#include "New_Project_Dialog.H"} {}
2008-04-26 10:42:30 +02:00
decl {\#include "Track.H" // for capture_format} {}
2008-04-26 07:33:04 +02:00
2008-04-23 22:43:17 +02:00
decl {\#include "Waveform.H" // for options} {}
2008-05-05 02:04:20 +02:00
decl {\#include "Audio_Region.H" // for options} {}
2008-04-26 11:01:54 +02:00
2008-04-23 22:43:17 +02:00
decl {\#include "Control_Sequence.H" // for options} {}
2008-05-04 03:28:36 +02:00
decl {\#include <FL/Fl_File_Chooser.H>} {}
2008-07-19 19:06:47 +02:00
decl {\#include <Fl/Fl_Shared_Image.H>} {}
2008-04-23 04:22:46 +02:00
decl {\#include <FL/Fl.H>} {}
2008-07-19 19:06:47 +02:00
decl {\#include <FL/fl_ask.H>} {}
2008-05-16 02:26:51 +02:00
2008-05-22 09:05:49 +02:00
decl {\#include "Engine/Engine.H"} {}
decl {\#include "Engine/Audio_File.H" // for supported formats} {}
2008-06-22 06:26:39 +02:00
decl {class About_Dialog;} {}
2008-05-07 01:33:24 +02:00
decl {extern char project_display_name[256];} {global
2008-05-03 06:44:48 +02:00
}
2008-04-25 06:36:02 +02:00
decl {extern char *user_config_dir;} {global
2008-04-25 05:15:17 +02:00
}
2008-05-03 01:03:44 +02:00
class TLE {open
2008-04-23 04:22:46 +02:00
} {
2008-06-22 06:26:39 +02:00
decl {Fl_Color system_colors[3];} {}
2009-01-27 06:10:42 +01:00
Function {save()} {open
} {
2008-04-26 07:33:04 +02:00
code {const char options_filename[] = "options";
2008-04-26 10:42:30 +02:00
// const char state_filename[] = "state";
2008-04-26 07:33:04 +02:00
// save options
char *path;
asprintf( &path, "%s/%s", user_config_dir, options_filename );
2008-06-22 04:06:12 +02:00
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Options" ), path );
2008-05-25 08:14:17 +02:00
free( path );} {}
2008-04-26 07:33:04 +02:00
}
2008-06-22 06:26:39 +02:00
Function {quit()} {} {
code {Project::close();
save();
while ( Fl::first_window() ) Fl::first_window()->hide();} {}
2008-04-26 07:33:04 +02:00
}
2008-06-22 06:26:39 +02:00
Function {open( const char *name )} {} {
code {if ( ! name )
return;
2008-04-26 07:33:04 +02:00
2008-06-22 06:26:39 +02:00
int r = Project::open( name );
if ( r < 0 )
{
const char *s = Project::errstr( r );
fl_alert( "Could not open project \\"%s\\":\\n\\n\\t%s", name, s );
}} {}
2008-05-06 06:33:41 +02:00
}
2008-07-19 18:41:24 +02:00
Function {save_timeline_settings()} {open
} {
2009-01-27 06:10:42 +01:00
code {if ( ! Project::open() )
return;
2008-07-19 18:41:24 +02:00
2009-01-27 06:10:42 +01:00
// save project local options (Timeline menu)
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Project/Se&ttings" ), "options" );} {}
}
Function {reset_timeline_settings( void )} {open private return_type void
} {
code {char path[256];
snprintf( path, sizeof( path ), "%s/%s", user_config_dir, ".default_project_settings" );
2008-07-19 18:41:24 +02:00
2009-01-27 06:10:42 +01:00
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Project/Se&ttings" ), path );} {}
2008-06-22 06:26:39 +02:00
}
2008-07-19 18:41:24 +02:00
Function {load_timeline_settings()} {open
} {
2009-01-27 06:10:42 +01:00
code {reset_timeline_settings();
2008-06-22 06:26:39 +02:00
2009-01-27 06:10:42 +01:00
if ( Project::open() )
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Project/Se&ttings" ), "options" );
2008-06-22 06:26:39 +02:00
update_menu();
2010-01-12 09:53:00 +01:00
project_name->redraw();} {}
2008-06-22 06:26:39 +02:00
}
Function {run()} {} {
2008-05-06 06:33:41 +02:00
code {update_menu();
main_window->show();
2008-05-19 07:07:42 +02:00
Fl::lock();
2008-06-06 04:30:34 +02:00
// Fl::run();} {}
2008-04-26 07:33:04 +02:00
}
2008-07-19 18:41:24 +02:00
Function {TLE()} {open
} {
2010-01-29 21:12:24 +01:00
code {Fl::visual( FL_DOUBLE | FL_RGB8 );
2008-04-23 04:22:46 +02:00
2009-12-26 09:25:01 +01:00
make_window();
2008-07-19 18:41:24 +02:00
2008-04-23 04:22:46 +02:00
Fl::visible_focus( 0 );
Fl::get_system_colors();
2008-04-23 07:35:49 +02:00
Fl::scheme( "plastic" );
2008-04-26 12:11:19 +02:00
system_colors[ 0 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND_COLOR );
system_colors[ 1 ] = (Fl_Color)Fl::get_color( FL_FOREGROUND_COLOR );
system_colors[ 2 ] = (Fl_Color)Fl::get_color( FL_BACKGROUND2_COLOR );
2008-04-23 07:35:49 +02:00
2010-01-30 08:03:35 +01:00
set_theme_dark();
2010-01-23 02:27:25 +01:00
// constrain window to size of screen.
2009-12-26 09:25:01 +01:00
{
int sx, sy, sw, sh;
Fl::screen_xywh( sx, sy, sw, sh );
2010-01-23 02:27:25 +01:00
main_window->size( 947, 600 );
main_window->size_range( 947, 600 );
if ( main_window->w() > sw ||
main_window->h() > sh )
main_window->resize( sx, sy, sw, sh );
2009-12-26 09:25:01 +01:00
}
2008-04-25 05:15:17 +02:00
Fl::add_timeout( STATUS_UPDATE_FREQ, update_cb, this );
2008-05-17 20:42:50 +02:00
fl_message_icon()->box( FL_RSHADOW_BOX );
fl_message_icon()->labelcolor( FL_BLACK );
fl_message_icon()->color( FL_RED );
fl_message_font( FL_HELVETICA, 18 );
2008-04-26 07:33:04 +02:00
std::list <const char *> formats;
Audio_File::all_supported_formats( formats );
for ( std::list <const char *>::const_iterator f = formats.begin(); f != formats.end(); ++f )
{
// capture_format_menu->add( *f, FL_MENU_RADIO, 0, 0, 0 );
//;
char pat[256];
2008-06-22 04:06:12 +02:00
snprintf( pat, sizeof( pat ), "&Project/Se&ttings/Capture Format/%s", *f );
2008-04-26 07:33:04 +02:00
menubar->add( pat, 0, &TLE::capture_format_cb, this, FL_MENU_RADIO );
2008-04-26 10:42:30 +02:00
}
2008-06-22 04:06:12 +02:00
menubar->picked( menubar->find_item( "&Project/Se&ttings/Capture Format/Wav 24" ) );
2008-04-26 10:42:30 +02:00
char *path;
asprintf( &path, "%s/options", user_config_dir );
2008-06-22 04:06:12 +02:00
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Options" ), path );
2008-05-25 22:48:37 +02:00
free( path );
2008-06-06 04:30:34 +02:00
menubar->add( "&Timeline", 0, 0, const_cast< Fl_Menu_Item *>( timeline->menu->menu() ), FL_SUBMENU_POINTER );
2008-07-19 18:41:24 +02:00
// save a copy of the project settings menu so that we can restore the defaults later
{
char path[512];
snprintf( path, sizeof( path ), "%s/%s", user_config_dir, ".default_project_settings" );
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Project/Se&ttings" ), path );
}
2008-07-20 22:31:57 +02:00
Loggable::progress_callback( &TLE::progress_cb, this );} {}
2008-04-23 04:22:46 +02:00
}
Function {make_window()} {open
} {
Fl_Window main_window {
2008-07-30 04:35:19 +02:00
label Timeline
callback {if ( Fl::event_key() != FL_Escape )
2008-07-30 08:48:22 +02:00
o->hide();} open
2010-01-18 07:02:26 +01:00
private xywh {104 122 1025 770} type Double resizable xclass Non_DAW visible
2008-04-23 04:22:46 +02:00
} {
2008-07-19 18:41:24 +02:00
Fl_Menu_Bar menubar {open
2008-06-22 06:26:39 +02:00
private xywh {0 0 1024 25}
2008-04-23 04:22:46 +02:00
} {
Submenu {} {
2008-05-07 01:33:24 +02:00
label {&Project} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
2008-05-05 00:20:38 +02:00
MenuItem {} {
label {&Info}
2008-06-11 05:43:13 +02:00
callback {Project_Info_Dialog pi;
pi.run();}
2008-05-05 00:20:38 +02:00
xywh {0 0 40 25} deactivate
}
2008-06-22 04:06:12 +02:00
Submenu {} {
label {Se&ttings} open
xywh {20 20 74 25}
} {
MenuItem {} {
label {&Follow Playhead}
callback {Timeline::follow_playhead = menu_picked_value( o );}
xywh {40 40 40 25} type Toggle value 1
}
MenuItem {} {
label {&Center Playhead}
callback {Timeline::center_playhead = menu_picked_value( o );}
xywh {50 50 40 25} type Toggle value 1
}
Submenu {} {
label {&Snap to} open
xywh {20 20 74 25}
} {
MenuItem {} {
label Bars
callback {Timeline::snap_to = Timeline::Bars;}
xywh {20 20 40 25} type Radio value 1
}
MenuItem {} {
label Beats
callback {Timeline::snap_to = Timeline::Beats;}
xywh {30 30 40 25} type Radio
}
MenuItem {} {
label Off
callback {Timeline::snap_to = Timeline::None;}
xywh {40 40 40 25} type Radio
}
}
MenuItem {} {
label {Magnetic snap}
callback {Timeline::snap_magnetic = menu_picked_value( o );}
xywh {30 30 40 25} type Toggle value 1
}
Submenu {} {
label {Capture Format} open
xywh {20 20 74 25}
} {}
}
2008-04-23 04:22:46 +02:00
MenuItem {} {
label {&New}
2008-05-06 22:13:52 +02:00
callback {save_timeline_settings();
2010-01-18 07:02:26 +01:00
const char *templates[] = { "Default", NULL };
char *default_path;
char *selected_template;
read_line( user_config_dir, "default_path", &default_path );
char *path = new_project_chooser( templates, &default_path, &selected_template );
if ( ! Project::create( path, selected_template ) )
fl_alert( "Error creating project!" );
free( path );
free( selected_template );
free( default_path );
write_line( user_config_dir, "default_path", default_path );
2008-05-06 22:13:52 +02:00
load_timeline_settings();
2008-05-06 06:33:41 +02:00
update_menu();
2008-05-04 03:28:36 +02:00
2010-01-18 07:02:26 +01:00
main_window->redraw();} selected
2008-05-04 00:50:32 +02:00
xywh {0 0 40 25}
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {&Open}
2008-06-22 05:15:05 +02:00
callback {char *path;
2008-05-06 05:50:57 +02:00
2008-06-22 05:15:05 +02:00
read_line( user_config_dir, "default_path", &path );
const char *name = fl_dir_chooser( "Open Project", path, NULL );
free( path );
2008-06-22 06:26:39 +02:00
open( name );}
2008-05-06 05:50:57 +02:00
xywh {10 10 40 25}
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {&Compact}
2008-05-07 17:20:13 +02:00
callback {int n = fl_choice( "Compacting will replace the project history with a snapshot of the current state.\\nYou will not be able to use Undo to go back beyond this point.\\n\\nThis operation is irreversible!", NULL, "&Cancel", "Pr&ocede with compaction" );
2008-04-24 00:29:14 +02:00
if ( n != 2 )
return;
2008-06-22 01:46:11 +02:00
Project::compact();}
2008-04-23 04:22:46 +02:00
xywh {20 20 40 25}
}
Submenu {} {
2008-05-06 06:33:41 +02:00
label {&Export} open
2008-04-27 09:10:37 +02:00
xywh {0 0 74 25} deactivate
2008-04-23 04:22:46 +02:00
} {
MenuItem {} {
2008-05-19 02:31:27 +02:00
label Project
2008-04-23 04:22:46 +02:00
xywh {0 0 40 25}
}
MenuItem {} {
label Range
xywh {10 10 40 25}
}
}
MenuItem {} {
label {&Quit}
2008-05-15 06:23:16 +02:00
callback {quit()}
2008-04-23 04:22:46 +02:00
xywh {40 40 40 25} shortcut 0x40071
}
}
Submenu {} {
2008-04-27 12:18:03 +02:00
label {&Edit} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
label Undo
2008-04-26 07:33:04 +02:00
callback {Loggable::undo();}
2008-04-29 23:16:09 +02:00
xywh {0 0 40 25} shortcut 0x4007a divider
}
MenuItem {} {
label {Select None}
callback {timeline->select_none();}
xywh {10 10 40 25} shortcut 0x50061
}
MenuItem {} {
label {Delete Selected}
2008-04-30 03:08:49 +02:00
callback {timeline->delete_selected();}
2008-04-29 23:16:09 +02:00
xywh {20 20 40 25} shortcut 0xffff
2008-04-23 04:22:46 +02:00
}
}
Submenu {} {
2010-01-30 07:30:31 +01:00
label T&ransport open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
2008-04-27 05:50:58 +02:00
label Start
2008-04-23 22:43:17 +02:00
callback {transport->locate( 0 );}
xywh {0 0 40 25} shortcut 0xff50
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label End
2008-04-23 22:43:17 +02:00
callback {transport->locate( timeline->length() );}
xywh {10 10 40 25} shortcut 0xff57
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
2008-04-27 23:08:30 +02:00
label {Play/Stop}
callback {transport->toggle();}
xywh {20 20 40 25} shortcut 0x20
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label Record
2008-04-27 09:07:16 +02:00
callback {transport->toggle_record();}
2008-04-27 23:08:30 +02:00
xywh {40 40 40 25} shortcut 0x10072
2008-04-23 04:22:46 +02:00
}
}
2008-05-25 08:14:17 +02:00
MenuItem {} {
label {&Timeline}
2008-05-25 22:48:37 +02:00
xywh {0 0 40 25}
2008-05-25 08:14:17 +02:00
}
2008-04-23 04:22:46 +02:00
Submenu {} {
label {&View} open
xywh {0 0 74 25}
} {
Submenu {} {
2008-04-23 22:43:17 +02:00
label {&Zoom} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25}
} {
MenuItem {} {
2008-04-23 22:43:17 +02:00
label {&In}
callback {timeline->zoom_in();}
2008-05-25 20:45:20 +02:00
xywh {20 20 40 25} shortcut 0x2b
2008-04-23 22:43:17 +02:00
}
MenuItem {} {
label {&Out}
callback {timeline->zoom_out();}
2008-05-25 20:45:20 +02:00
xywh {30 30 40 25} shortcut 0x5f
2008-04-23 22:43:17 +02:00
}
MenuItem {} {
label {&Fit}
2008-05-03 06:44:48 +02:00
callback {timeline->zoom_fit();}
2008-05-25 20:45:20 +02:00
xywh {10 10 40 25} shortcut 0x3d divider
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 sec.}
2008-04-23 22:43:17 +02:00
callback {timeline->zoom( 1 );}
xywh {10 10 40 25} shortcut 0x31
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 min.}
2008-04-23 22:43:17 +02:00
callback {timeline->zoom( 60 );}
xywh {20 20 40 25} shortcut 0x32
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
label {1 hour.}
2008-04-23 22:43:17 +02:00
callback {timeline->zoom( 60 * 60 );}
xywh {30 30 40 25} shortcut 0x33
2008-04-23 04:22:46 +02:00
}
}
}
2008-04-26 10:42:30 +02:00
Submenu {} {
2008-04-26 11:01:54 +02:00
label {&Options} open
2008-04-23 04:22:46 +02:00
xywh {0 0 74 25} divider
} {
Submenu {} {
2008-06-22 04:06:12 +02:00
label {&Display} open
xywh {10 10 74 25}
2008-04-23 04:22:46 +02:00
} {
2008-04-25 04:48:44 +02:00
Submenu {} {
2008-06-22 04:06:12 +02:00
label {&Timeline} open
xywh {10 10 74 25}
2008-04-25 04:48:44 +02:00
} {
2008-06-22 04:06:12 +02:00
MenuItem {} {
label {&Measure lines}
callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
2008-04-25 04:48:44 +02:00
2008-04-25 05:15:17 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {10 10 40 25} type Toggle value 1
2008-04-25 04:48:44 +02:00
}
2008-06-22 04:06:12 +02:00
}
Submenu {} {
label {&Waveform} open
xywh {10 10 74 25}
} {
MenuItem {} {
label Fill
callback {Waveform::fill = menu_picked_value( o );
2008-04-23 22:43:17 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {20 20 40 25} type Toggle value 1
}
MenuItem {} {
label Outline
callback {Waveform::outline = menu_picked_value( o );
2008-04-23 22:43:17 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {40 40 40 25} type Toggle value 1
}
MenuItem {} {
label {Vary color}
callback {Waveform::vary_color = menu_picked_value( o );
2008-04-23 22:43:17 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {30 30 40 25} type Toggle value 1
2008-04-23 04:22:46 +02:00
}
2008-06-22 04:06:12 +02:00
}
Submenu {} {
label {&Region} open
xywh {10 10 74 25}
} {
MenuItem {} {
label {Filled fades}
xywh {40 40 40 25} type Toggle value 1
}
MenuItem {} {
label {Inherit track color}
callback {Audio_Region::inherit_track_color = menu_picked_value( o );
2008-04-26 11:01:54 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {50 50 40 25} type Toggle value 1
2008-04-26 11:01:54 +02:00
}
2008-06-22 04:06:12 +02:00
}
Submenu {} {
label {&Control Sequence} open
xywh {10 10 74 25}
} {
MenuItem {} {
label Polygon
callback {Control_Sequence::draw_with_polygon = menu_picked_value( o );
2008-04-23 22:43:17 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {30 30 40 25} type Toggle value 1
}
MenuItem {} {
label Graded
callback {Control_Sequence::draw_with_gradient = menu_picked_value( o );
2008-04-23 22:43:17 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {40 40 40 25} type Toggle value 1
}
MenuItem {} {
label Ruled
callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
2008-04-23 22:43:17 +02:00
timeline->redraw();}
2008-06-22 04:06:12 +02:00
xywh {50 50 40 25} type Toggle value 1
}
}
Submenu {} {
label {&Style} open
xywh {10 10 74 25}
} {
MenuItem {} {
label Default
callback {Fl::scheme( "plastic" );}
xywh {10 10 40 25} type Radio value 1
2008-04-23 04:22:46 +02:00
}
2008-06-22 04:06:12 +02:00
MenuItem {} {
label Flat
callback {Fl::scheme( "gtk+" );}
xywh {20 20 40 25} type Radio
2008-04-23 04:22:46 +02:00
}
2008-06-22 04:06:12 +02:00
}
Submenu {} {
label {C&olors} open
xywh {10 10 74 25}
} {
MenuItem {} {
label System
callback {//Fl::get_system_colors();
2008-04-26 12:11:19 +02:00
unsigned char r, g, b;
Fl::get_color( system_colors[ 0 ], r, g, b );
Fl::background( r, g, b );
Fl::get_color( system_colors[ 1 ], r, g, b );
Fl::foreground( r, g, b );
Fl::get_color( system_colors[ 2 ], r, g, b );
Fl::background2( r, g, b );
2008-04-23 22:43:17 +02:00
Fl::scheme( Fl::scheme() );}
2008-06-22 04:06:12 +02:00
xywh {10 10 40 25} type Radio
}
MenuItem {} {
label Dark
2010-01-30 08:03:35 +01:00
callback {
2008-04-23 22:43:17 +02:00
2010-01-30 08:03:35 +01:00
set_theme_dark(); }
2008-06-22 04:06:12 +02:00
xywh {20 20 40 25} type Radio value 1
}
MenuItem {} {
label Light
callback {Fl::background2( 192, 192, 192 );
2008-04-27 14:04:56 +02:00
Fl::background( 220, 220, 220 );
2008-04-23 22:43:17 +02:00
Fl::foreground( 0, 0, 0 );
2008-04-27 20:56:20 +02:00
Fl::scheme( Fl::scheme() );}
2008-06-22 04:06:12 +02:00
xywh {30 30 40 25} type Radio
2008-05-25 08:14:17 +02:00
}
}
}
2010-01-29 21:12:24 +01:00
Submenu {} {
label {&Behavior} open
xywh {0 0 74 25}
} {
Submenu {} {
label {&Transport} open
xywh {0 0 74 25}
} {
MenuItem {} {
label {Stop Disables Record}
callback {transport->stop_disables_record( ((Fl_Menu_*)o)->mvalue()->flags & FL_MENU_VALUE );} selected
xywh {5 5 40 25} type Toggle value 1
}
}
}
2008-04-23 04:22:46 +02:00
}
2008-04-27 09:07:16 +02:00
Submenu {} {
label {&Help} open
xywh {0 0 74 25}
} {
2008-07-19 19:06:47 +02:00
MenuItem {} {
label {&Manual}
callback {show_help_dialog( "MANUAL" );}
xywh {10 10 40 25} divider
}
2008-04-27 09:07:16 +02:00
MenuItem {} {
label {&About}
2008-06-22 06:26:39 +02:00
callback {About_Dialog ab;
2008-04-27 09:07:16 +02:00
2008-06-22 06:26:39 +02:00
ab.run();}
2008-04-27 09:07:16 +02:00
xywh {0 0 40 25}
}
2008-04-23 04:22:46 +02:00
}
}
2008-04-24 04:10:20 +02:00
Fl_Group {} {open
2009-01-19 04:25:28 +01:00
xywh {0 1 1025 73}
2008-04-23 04:22:46 +02:00
} {
2008-04-24 22:52:30 +02:00
Fl_Pack {} {open
2008-06-06 04:49:38 +02:00
xywh {0 23 483 46} type HORIZONTAL
2008-04-24 04:10:20 +02:00
code0 {o->spacing( 10 );}
} {
Fl_Box {} {
2008-06-06 04:51:07 +02:00
label {<Transport>}
2008-06-06 04:49:38 +02:00
xywh {5 23 189 46} color 30
2008-04-24 04:10:20 +02:00
code0 {transport = o;}
code1 {o->labeltype( FL_NO_LABEL );}
class Transport
}
2008-06-22 06:26:39 +02:00
Fl_Pack clocks_pack {
private xywh {195 23 288 46} type HORIZONTAL
2008-04-24 04:10:20 +02:00
code0 {o->spacing( 2 );}
} {
2008-06-22 06:26:39 +02:00
Fl_Box {} {
2008-04-24 04:10:20 +02:00
label PLAYHEAD
2008-06-22 06:26:39 +02:00
private xywh {195 29 137 40} box BORDER_BOX color 40
2008-04-24 04:10:20 +02:00
code0 {o->type( Clock::HMS );}
code1 {o->run( &transport->frame );}
class Clock
}
Fl_Box {} {
2008-04-25 08:34:08 +02:00
label PLAYHEAD
2008-06-06 04:49:38 +02:00
xywh {335 29 142 40} box BORDER_BOX color 40
2008-04-24 04:10:20 +02:00
code0 {o->type( Clock::BBT );}
2008-04-25 06:36:02 +02:00
code1 {o->run( &transport->frame );}
2008-04-24 04:10:20 +02:00
class Clock
}
}
2008-04-23 04:22:46 +02:00
}
Fl_Box {} {
2009-01-12 04:38:30 +01:00
label {<empty>}
xywh {487 27 203 42} resizable
2008-04-24 04:10:20 +02:00
code0 {o->labeltype( FL_NO_LABEL );}
}
2008-06-06 04:49:38 +02:00
Fl_Group {} {open
2008-07-30 08:48:22 +02:00
xywh {745 26 280 44}
2008-04-24 04:10:20 +02:00
} {
Fl_Box {} {
label {capture:}
2008-06-06 04:49:38 +02:00
xywh {865 26 56 14} labelsize 10 align 24
2008-04-24 04:10:20 +02:00
}
Fl_Box {} {
label {playback:}
2008-06-06 04:49:38 +02:00
xywh {865 42 56 14} labelsize 10 align 24
2008-04-24 04:10:20 +02:00
}
Fl_Box {} {
label {DSP:}
2008-06-06 04:49:38 +02:00
xywh {865 56 56 14} labelsize 10 align 24
2008-04-24 04:10:20 +02:00
}
Fl_Progress capture_buffer_progress {
label {50%}
2008-06-22 06:26:39 +02:00
private xywh {921 26 104 14} labelsize 10
2008-04-24 04:10:20 +02:00
}
Fl_Progress cpu_load_progress {
label {50%}
2008-06-22 06:26:39 +02:00
private xywh {921 56 104 14} labelsize 9
2008-04-24 04:10:20 +02:00
}
Fl_Progress playback_buffer_progress {
label {50%}
2008-06-22 06:26:39 +02:00
private xywh {921 41 104 14} labelsize 10
2008-04-24 04:10:20 +02:00
}
2008-07-30 08:48:22 +02:00
Fl_Box {} {
label {disk:}
xywh {810 27 55 18} labelsize 10 align 16
}
Fl_Progress disk_usage_progress {
label {50%}
private xywh {810 43 55 26} labelsize 10
}
2008-04-23 04:22:46 +02:00
}
2008-07-26 08:49:18 +02:00
Fl_Button solo_blinker {
label SOLO
2008-07-30 08:48:22 +02:00
xywh {750 30 50 15} box ROUNDED_BOX down_box ROUNDED_BOX color 74 selection_color 92 labelfont 2 labelcolor 39 deactivate
2008-07-26 08:49:18 +02:00
code0 {\#include "FL/Fl_Blinker.H"}
class Fl_Blinker
}
Fl_Button rec_blinker {
label REC
2008-07-30 08:48:22 +02:00
xywh {750 50 50 15} box ROUNDED_BOX down_box ROUNDED_BOX color 72 selection_color 88 labelfont 2 labelcolor 39 deactivate
2008-07-26 08:49:18 +02:00
code0 {\#include "FL/Fl_Blinker.H"}
class Fl_Blinker
}
2010-01-25 03:49:28 +01:00
Fl_Button sm_blinker {
label SM
2009-01-12 04:38:30 +01:00
xywh {695 30 50 15} box ROUNDED_BOX down_box ROUNDED_BOX color 75 selection_color 86 labelfont 2 labelcolor 39 deactivate
code0 {\#include "FL/Fl_Blinker.H"}
class Fl_Blinker
}
2010-01-12 09:53:00 +01:00
Fl_Button selected_blinker {
label SEL
xywh {695 50 50 15} box ROUNDED_BOX down_box ROUNDED_BOX color 13 selection_color 5 labelfont 2 labelcolor 39 deactivate
code0 {\#include "FL/Fl_Blinker.H"}
class Fl_Blinker
}
2009-01-19 04:25:28 +01:00
Fl_Box stats_box {
2009-01-27 06:10:42 +01:00
label {<stats>}
2009-01-19 04:25:28 +01:00
xywh {810 1 215 21} labelsize 13 labelcolor 53 align 88
}
2008-04-23 04:22:46 +02:00
}
2008-06-05 06:27:55 +02:00
Fl_Progress progress {
label {0%}
2008-06-22 06:26:39 +02:00
private xywh {15 394 995 41} hide
2008-06-05 06:27:55 +02:00
}
2008-04-23 04:22:46 +02:00
Fl_Box {} {
2008-04-24 04:10:20 +02:00
label {<Timeline>}
xywh {0 72 1024 695} box FLAT_BOX color 47 labelsize 100 resizable
code0 {timeline = o;}
class Timeline
2008-04-23 04:22:46 +02:00
}
2008-05-15 06:23:16 +02:00
Fl_Box project_name {
2008-05-07 01:33:24 +02:00
label {<project name>}
2009-01-19 04:25:28 +01:00
private xywh {450 0 365 22} labeltype SHADOW_LABEL labelfont 2
2008-05-07 01:33:24 +02:00
code0 {o->label( Project::name() );}
2008-05-03 06:44:48 +02:00
}
2008-04-23 04:22:46 +02:00
}
}
2008-06-22 06:26:39 +02:00
Function {menu_picked_value( const Fl_Menu_ *m )} {private return_type {static int}
} {
code {return m->menu()[ m->value() ].flags & FL_MENU_VALUE;} {}
}
Function {find_item( Fl_Menu_ *menu, const char *path )} {private return_type {static Fl_Menu_Item *}
2008-05-06 06:33:41 +02:00
} {
code {return const_cast<Fl_Menu_Item*>(menu->find_item( path ));} {}
}
2008-06-22 06:26:39 +02:00
decl {static void menubar_cb ( void *v )} {}
decl {void menubar_cb ( void )} {}
Function {update_menu()} {private
2008-05-06 06:33:41 +02:00
} {
code {Fl_Menu_Bar *m = menubar;
2008-05-07 01:33:24 +02:00
if ( ! Project::open() )
2008-05-06 06:33:41 +02:00
{
2008-05-07 01:33:24 +02:00
find_item( m, "&Project/&Export" )->deactivate();
find_item( m, "&Project/&Compact" )->deactivate();
find_item( m, "&Project/&Info" )->deactivate();
2008-05-06 06:33:41 +02:00
2008-06-22 04:06:12 +02:00
find_item( m, "&Project/Se&ttings" )->deactivate();
2008-05-25 20:45:20 +02:00
find_item( m, "&Timeline" )->deactivate();
2008-05-06 06:37:45 +02:00
2008-05-06 06:33:41 +02:00
timeline->deactivate();
transport->deactivate();
}
else
{
2008-05-07 01:33:24 +02:00
find_item( m, "&Project/&Export" )->activate();
find_item( m, "&Project/&Compact" )->activate();
find_item( m, "&Project/&Info" )->activate();
2008-05-06 06:37:45 +02:00
2008-06-22 04:06:12 +02:00
find_item( m, "&Project/Se&ttings" )->activate();
2008-05-25 20:45:20 +02:00
find_item( m, "&Timeline" )->activate();
2008-05-06 06:33:41 +02:00
timeline->activate();
transport->activate();
2008-05-06 22:13:52 +02:00
}
2008-05-15 06:23:16 +02:00
m->redraw();
2008-06-22 05:15:05 +02:00
project_name->redraw();} {}
2008-05-06 06:33:41 +02:00
}
2008-06-22 06:26:39 +02:00
Function {update_progress( Fl_Progress *p, char *s, float v )} {private return_type {static void}
2008-04-24 04:10:20 +02:00
} {
code {p->value( v );
snprintf( s, 5, "%d%%", (int)v );
2008-06-06 04:30:34 +02:00
p->label( s );} {}
2008-04-24 04:10:20 +02:00
}
2008-07-26 08:49:18 +02:00
Function {update_status()} {open private
2008-04-23 07:35:49 +02:00
} {
2008-07-30 08:48:22 +02:00
code {static char cbp[5], pbp[5], clp[5], dup[5];
2008-04-23 07:35:49 +02:00
2008-04-24 04:10:20 +02:00
update_progress( capture_buffer_progress, cbp, timeline->total_input_buffer_percent() );
update_progress( playback_buffer_progress, pbp, timeline->total_output_buffer_percent() );
2008-04-29 19:18:27 +02:00
update_progress( cpu_load_progress, clp, engine->cpu_load() );
2008-07-30 08:48:22 +02:00
update_progress( disk_usage_progress, dup, percent_used( "." ) );
2008-04-29 19:18:27 +02:00
2008-05-01 13:35:42 +02:00
if ( timeline->total_capture_xruns() )
capture_buffer_progress->selection_color( FL_RED );
if ( timeline->total_playback_xruns() )
playback_buffer_progress->selection_color( FL_RED );
2009-01-19 04:25:28 +01:00
static char stats[100];
2008-05-01 13:35:42 +02:00
2009-01-19 04:25:28 +01:00
snprintf( stats, sizeof( stats ), "latency: %.1fms, xruns: %d",
engine->frames_to_milliseconds( timeline->total_output_latency() ),
engine->xruns() );
2008-05-01 13:35:42 +02:00
2009-01-19 04:25:28 +01:00
stats_box->label( stats );
2008-06-11 02:53:38 +02:00
static bool zombie = false;
if ( engine->zombified() && ! zombie )
{
zombie = true;
fl_alert( "Disconnected from JACK!" );
2008-07-26 08:49:18 +02:00
}
solo_blinker->value( Track::soloing() );
2009-01-12 04:38:30 +01:00
rec_blinker->value( transport->rolling && transport->rec_enabled() );
2010-01-25 03:49:28 +01:00
sm_blinker->value( timeline->session_manager_name() != NULL );
sm_blinker->tooltip( timeline->session_manager_name() );
selected_blinker->value( timeline->nselected() );} {selected
}
2008-04-23 07:35:49 +02:00
}
2008-07-26 08:49:18 +02:00
Function {update_cb( void *v )} {open private return_type {static void}
2008-04-23 07:35:49 +02:00
} {
code {Fl::repeat_timeout( STATUS_UPDATE_FREQ, update_cb, v );
((TLE*)v)->update_status();} {}
}
2008-06-22 06:26:39 +02:00
Function {capture_format_cb( Fl_Widget *w, void *v )} {private return_type {static void}
2008-05-06 22:13:52 +02:00
} {
2008-06-22 06:26:39 +02:00
code {((TLE*)v)->capture_format_cb();} {}
2008-05-15 06:23:16 +02:00
}
2008-06-22 06:26:39 +02:00
Function {capture_format_cb()} {private return_type void
2008-05-15 06:23:16 +02:00
} {
2008-06-22 06:26:39 +02:00
code {Fl_Menu_ *o = menubar;
2008-05-15 06:23:16 +02:00
2008-06-22 06:26:39 +02:00
Track::capture_format = o->menu()[ o->value() ].label();} {}
2008-05-06 22:13:52 +02:00
}
2008-06-22 06:26:39 +02:00
Function {progress_cb( int p, void *arg )} {private return_type {static void}
2008-06-05 06:27:55 +02:00
} {
2008-06-06 04:30:34 +02:00
code {((TLE*)arg)->progress_cb( p );} {}
}
2008-06-22 06:26:39 +02:00
Function {progress_cb( int p )} {private return_type void
2008-06-06 04:30:34 +02:00
} {
code {if ( ! progress->visible() )
{
timeline->hide();
progress->show();
}
else if ( 0 == p )
{
timeline->show();
progress->hide();
}
2008-06-05 06:27:55 +02:00
static char pat[10];
update_progress( progress, pat, p );
progress->redraw();
2008-06-11 02:53:38 +02:00
Fl::check();} {}
2008-06-05 06:27:55 +02:00
}
2008-07-19 19:06:47 +02:00
Function {show_help_dialog( const char *file )} {open private return_type {static void}
} {
code {char pat[256];
snprintf( pat, 256, "file://%s%s.html", DOCUMENT_PATH, file );
2008-07-26 08:49:18 +02:00
open_url( pat );} {}
2008-07-19 19:06:47 +02:00
}
2008-04-23 04:22:46 +02:00
}
2008-05-04 03:28:36 +02:00
2010-01-30 08:03:35 +01:00
Function {set_theme_dark()} {C return_type void
} {
code { Fl::background2( 100, 100, 100 );
Fl::background( 50, 50, 50 );
Fl::foreground( 255, 255, 255 );
Fl::scheme( Fl::scheme() ); } {}
}
2008-07-18 06:07:00 +02:00
class Project_Info_Dialog {open
} {
2008-06-11 05:43:13 +02:00
Function {Project_Info_Dialog()} {open
} {
code {make_window();} {}
}
Function {run()} {open return_type void
} {
2008-06-16 04:18:25 +02:00
code {window->show();
2008-06-11 05:43:13 +02:00
2008-06-16 04:18:25 +02:00
while ( window->shown() )
2008-06-11 05:43:13 +02:00
Fl::wait();} {}
}
Function {make_window()} {open
} {
2008-06-16 04:18:25 +02:00
Fl_Window window {
2008-06-22 06:26:39 +02:00
label {Project info}
callback {o->hide();
if ( logo_box->image() )
{
((Fl_Shared_Image*)logo_box->image())->release();
logo_box->image( NULL );
}} open
2010-01-18 07:02:26 +01:00
private xywh {651 237 520 740} type Double modal visible
2008-06-11 05:43:13 +02:00
} {
Fl_Value_Output {} {
label {Sample Rate}
2008-06-13 04:21:08 +02:00
xywh {40 80 90 25} labeltype SHADOW_LABEL align 1
2008-06-11 05:43:13 +02:00
code0 {o->value( timeline->sample_rate() );}
}
Fl_Output {} {
label {Size of Journal}
2008-07-18 06:07:00 +02:00
xywh {180 80 100 25} box UP_BOX labeltype SHADOW_LABEL align 1
2008-06-11 05:43:13 +02:00
code0 {static char pat[40];}
code1 {snprintf( pat, sizeof( pat ), "%.1fK", size( "history" ) / (float)1024 );}
code2 {o->value( pat );}
code3 {\#include "util/file.h"}
}
Fl_Output {} {
label {Created On}
2008-07-18 06:07:00 +02:00
xywh {320 80 180 25} box UP_BOX labeltype SHADOW_LABEL align 1 textfont 11 textsize 12
code0 {o->value( Project::created_on() );}
2008-06-13 04:21:08 +02:00
}
Fl_Output {} {
label Length
2008-07-18 06:07:00 +02:00
xywh {30 130 115 25} box BORDER_BOX color 47 align 1 textcolor 71
2008-06-13 04:21:08 +02:00
code0 {char pat[40];}
code1 {Clock::frame_to_HMS( pat, sizeof( pat ), timeline->length() );}
code2 {o->value( pat );}
}
Fl_Value_Output {} {
label Tracks
2008-07-18 06:07:00 +02:00
xywh {200 130 55 25} align 1
2008-06-13 04:21:08 +02:00
code0 {o->value( timeline->ntracks() );}
2008-06-11 05:43:13 +02:00
}
2008-06-22 06:26:39 +02:00
Fl_Box logo_box {
2008-06-11 05:43:13 +02:00
label {<LOGO>}
2008-06-22 06:26:39 +02:00
private xywh {51 180 418 235} box ROUNDED_BOX color 53 labelfont 1 labelsize 18 align 16
2008-06-11 05:43:13 +02:00
code0 {o->image( Fl_Shared_Image::get( INSTALL_PREFIX "/share/pixmaps/non-daw/logo2.png" ) );}
code1 {o->label( NULL );}
}
2008-06-13 04:21:08 +02:00
Fl_Text_Editor notes_field {
2008-06-22 04:06:12 +02:00
label {Notes:}
2008-06-22 03:35:55 +02:00
private xywh {20 445 480 245} color 47 selection_color 31 textsize 18 textcolor 92
2008-06-13 04:21:08 +02:00
code0 {o->buffer( new Fl_Text_Buffer() );}
code1 {o->buffer()->loadfile( "notes" );}
}
2008-06-11 05:43:13 +02:00
Fl_Button {} {
2008-06-16 04:18:25 +02:00
label {&Save}
2008-06-11 05:43:13 +02:00
callback {notes_field->buffer()->savefile( "notes" );
2008-06-22 06:26:39 +02:00
window->do_callback();}
2008-06-22 03:35:55 +02:00
xywh {425 700 74 25}
2008-06-11 05:43:13 +02:00
}
2008-06-13 04:21:08 +02:00
Fl_Box {} {
label {Project Info}
xywh {40 18 405 27} box RSHADOW_BOX color 95 labeltype SHADOW_LABEL labelsize 18
2008-06-12 05:52:34 +02:00
}
2008-06-13 04:21:08 +02:00
Fl_Box {} {
label {Project Info}
xywh {25 18 470 33} box RSHADOW_BOX color 133 labelsize 20 labelcolor 32
2008-06-12 05:52:34 +02:00
}
2008-06-16 04:18:25 +02:00
Fl_Button {} {
label {&Discard}
2008-06-22 06:26:39 +02:00
callback {window->do_callback();}
2008-06-22 03:35:55 +02:00
xywh {330 700 74 25}
2008-06-16 04:18:25 +02:00
}
2008-07-18 06:07:00 +02:00
Fl_Output {} {
2008-07-19 18:41:24 +02:00
label {Last Modified On}
2008-07-18 06:07:00 +02:00
xywh {320 130 180 25} box UP_BOX labeltype SHADOW_LABEL align 1 textfont 11 textsize 12
code0 {time_t t = modification_time( "history" );}
code1 {static char s[40];}
code2 {ctime_r( &t, s ); s[ strlen( s ) - 1 ] = 0;}
code3 {o->value( s );}
}
2008-06-11 05:43:13 +02:00
}
}
}
2008-06-22 06:26:39 +02:00
2010-01-18 07:02:26 +01:00
class About_Dialog {} {
Function {About_Dialog()} {} {
2008-06-22 06:26:39 +02:00
code {make_window();} {}
}
Function {run()} {return_type void
} {
code {window->show();
while ( window->shown() )
Fl::wait();
delete window;} {}
}
Function {make_window()} {open private
} {
Fl_Window window {
label About
callback {o->hide();
if ( logo_box->image() )
{
((Fl_Shared_Image*)logo_box->image())->release();
logo_box->image( NULL );
}} open
2010-01-18 07:02:26 +01:00
private xywh {1342 76 495 655} type Double xclass {Non-DAW} visible
2008-06-22 06:26:39 +02:00
} {
Fl_Tabs {} {open
xywh {0 264 497 392}
} {
Fl_Group {} {
label Credits open
xywh {2 293 492 362}
} {
Fl_Box {} {
label {Non-DAW was written from scratch by
Jonathan Moore Liles for his own use
(see the manual).
Nobody planned. Nobody helped.
You can help now by donating time, money,
and/or replacing the rest of Linux Audio
with fast, light, reliable alternatives.}
xywh {39 322 418 262} box ROUNDED_BOX color 46 labelsize 18
}
}
Fl_Group {} {
label License open
xywh {2 288 492 311} hide
} {
Fl_Box {} {
2010-01-09 04:33:12 +01:00
label {Copyright (C) 2008-2010 Jonathan Moore Liles}
2008-06-22 06:26:39 +02:00
xywh {43 302 410 37} labeltype SHADOW_LABEL labelfont 1 labelsize 18
}
Fl_Box {} {
label {This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.}
xywh {10 351 475 233} box ROUNDED_BOX color 46 labelfont 1 labelsize 12 labelcolor 53 align 144
}
}
}
Fl_Box logo_box {
label VERSION
private xywh {25 20 445 180} box ROUNDED_BOX color 48 labelfont 1 labelsize 18 align 16
code0 {o->image( Fl_Shared_Image::get( INSTALL_PREFIX "/share/pixmaps/non-daw/logo.png" ) );}
code1 {o->label( VERSION );}
}
Fl_Return_Button {} {
label Rock
callback {o->window()->do_callback();}
xywh {400 614 76 30}
}
Fl_Button {} {
label {http://non-daw.tuxfamily.org}
2008-07-20 22:31:57 +02:00
callback {open_url( o->label() );}
2008-06-22 06:26:39 +02:00
xywh {125 614 245 30} color 14 labeltype SHADOW_LABEL labelcolor 6
}
Fl_Box {} {
label {The Non DAW (Digital Audio Workstation)}
xywh {32 221 430 29} labeltype SHADOW_LABEL labelfont 3 labelsize 17
}
}
}
}
2008-07-20 22:31:57 +02:00
Function {open_url( const char *url )} {open return_type void
} {
code {\#if ! ( FL_MAJOR_VERSION >= 1 && FL_MINOR_VERSION >= 1 && FL_PATCH_VERSION >= 8 )
// FIXME: got a better idea?
char cmd[256];
snprintf( cmd, sizeof( cmd ), "x-www-browser '%s' &", url );
system( cmd );
\#else
fl_open_uri( url );
\#endif} {}
}