2008-04-23 04:22:46 +02:00
# data file for the Fltk User Interface Designer (fluid)
2012-02-29 06:24:51 +01:00
version 1.0300
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
2012-02-29 06:24:51 +01:00
}
2008-05-22 02:40:25 +02:00
2012-03-14 02:44:26 +01:00
decl {const float STATUS_UPDATE_FREQ = 0.5f;} {private local
2012-02-29 06:24:51 +01:00
}
2008-04-23 07:35:49 +02:00
2012-04-14 23:11:58 +02:00
decl {class Fl_Flowpack;} {public global
}
2013-05-01 07:38:49 +02:00
decl {\#include <unistd.h>} {private local
}
decl {\#include <sys/types.h>} {private local
}
decl {\#include <sys/wait.h>} {private local
}
2012-05-21 05:28:09 +02:00
decl {\#include <FL/Fl_Overlay_Window.H>} {private local
}
2013-03-15 01:32:15 +01:00
decl {\#include <FL/Fl_Menu_Settings.H>} {private local
2012-02-29 06:24:51 +01:00
}
2008-04-24 22:52:30 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Timeline.H"} {private local
}
2008-04-23 04:22:46 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Transport.H"} {private local
}
2008-04-23 04:22:46 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Loggable.H"} {private local
}
2008-04-24 00:29:14 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Project.H"} {private local
}
2008-05-04 09:10:15 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Clock.H"} {public local
2008-04-23 04:22:46 +02:00
}
2013-03-15 01:32:15 +01:00
decl {\#include <FL/Fl_Flowpack.H>} {private local
2012-04-14 23:11:58 +02:00
}
2013-03-15 01:32:15 +01:00
decl {\#include <FL/New_Project_Dialog.H>} {private local
2012-02-29 06:24:51 +01:00
}
2010-01-18 07:02:26 +01:00
2012-02-29 06:24:51 +01:00
decl {\#include "Track.H" // for capture_format} {private local
}
2008-04-26 07:33:04 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Waveform.H" // for options} {private local
}
2008-04-23 22:43:17 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Audio_Region.H" // for options} {private local
}
2008-04-26 11:01:54 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Control_Sequence.H" // for options} {private local
}
2008-04-23 22:43:17 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include <FL/Fl_File_Chooser.H>} {private local
}
2008-05-04 03:28:36 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include <FL/Fl_Shared_Image.H>} {private local
}
2008-07-19 19:06:47 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include <FL/Fl.H>} {private local
2010-01-24 22:54:32 +01:00
}
2008-04-23 04:22:46 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include <FL/fl_ask.H>} {private local
}
2008-05-16 02:26:51 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Engine/Engine.H"} {private local
}
2008-05-22 09:05:49 +02:00
2012-02-29 06:24:51 +01:00
decl {\#include "Engine/Audio_File.H" // for supported formats} {private local
}
2008-05-22 09:05:49 +02:00
2013-03-15 01:32:15 +01:00
decl {\#include <FL/About_Dialog.H>} {private local
2012-02-29 06:24:51 +01:00
}
2008-06-22 06:26:39 +02:00
2012-02-29 06:24:51 +01:00
decl {extern char project_display_name[256];} {private global
2008-05-03 06:44:48 +02:00
}
2012-05-22 07:04:09 +02:00
decl {\#include <nsm.h>} {private local
2012-02-29 06:24:51 +01:00
}
2010-01-21 01:33:02 +01:00
2012-05-22 07:04:09 +02:00
decl {extern nsm_client_t *nsm;} {private global
2010-01-21 01:33:02 +01:00
}
2012-02-29 06:24:51 +01:00
decl {extern char *user_config_dir;} {private global
2008-04-25 05:15:17 +02:00
}
2013-05-01 07:38:49 +02:00
decl {extern char *APP_NAME;} {private global
2013-04-12 01:37:10 +02:00
}
2012-05-21 05:28:09 +02:00
class TLE_Window {open : {public Fl_Overlay_Window}
} {
Function {TLE_Window(int W, int H, const char *L = 0) : Fl_Overlay_Window( W, H, L )} {open
} {
code {} {}
}
Function {draw_overlay(void)} {open return_type void
} {
code {timeline->draw_overlay();} {}
}
Function {~TLE_Window()} {open return_type virtual
} {
2012-06-06 02:31:18 +02:00
code {} {}
2012-05-21 05:28:09 +02:00
}
}
2008-05-03 01:03:44 +02:00
class TLE {open
2008-04-23 04:22:46 +02:00
} {
2012-02-29 06:24:51 +01:00
decl {Fl_Color system_colors[3];} {private local
}
2010-01-21 01:33:02 +01:00
Function {save_options()} {open
} {
2012-02-29 06:24:51 +01:00
code {const char options_filename[] = "options";
2010-01-21 01:33:02 +01:00
// const char state_filename[] = "state";
// save options
char *path;
asprintf( &path, "%s/%s", user_config_dir, options_filename );
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Options" ), path );
2012-02-29 06:24:51 +01:00
free( path );} {}
2010-01-21 01:33:02 +01:00
}
2009-01-27 06:10:42 +01:00
Function {save()} {open
} {
2012-02-29 06:24:51 +01:00
code {timeline->command_save();} {}
2008-04-26 07:33:04 +02:00
}
2008-06-22 06:26:39 +02:00
Function {quit()} {} {
2012-02-29 06:24:51 +01:00
code {timeline->command_quit();} {}
2008-04-26 07:33:04 +02:00
}
2008-06-22 06:26:39 +02:00
Function {open( const char *name )} {} {
2012-02-29 06:24:51 +01:00
code {timeline->command_load( name, NULL );} {}
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();
2012-02-29 06:24:51 +01:00
// main_window->show();
2008-05-06 06:33:41 +02:00
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
} {
2012-04-11 08:59:12 +02:00
code {make_window();
2008-07-19 18:41:24 +02:00
2008-04-23 04:22:46 +02:00
Fl::visible_focus( 0 );
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 );
2013-07-24 07:52:15 +02:00
main_window->size_range( 947, 500 );
2010-01-23 02:27:25 +01:00
main_window->size( 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 {
2013-03-11 01:52:15 +01:00
label {Non Timeline}
2008-07-30 04:35:19 +02:00
callback {if ( Fl::event_key() != FL_Escape )
2010-01-21 01:33:02 +01:00
timeline->command_quit();} open
2013-05-14 02:21:50 +02:00
xywh {204 266 1025 770} type Double resizable
2013-04-12 01:37:10 +02:00
code0 {o->xclass( APP_NAME );}
2013-07-24 07:52:15 +02:00
class TLE_Window size_range {947 300 0 0} visible
2008-04-23 04:22:46 +02:00
} {
2013-02-13 01:50:19 +01:00
Fl_Group {} {open
xywh {0 -53 1025 126} box FLAT_BOX
2008-04-23 04:22:46 +02:00
} {
2012-06-06 02:31:18 +02:00
Fl_Menu_Bar menubar {open
private xywh {0 0 1025 25}
2008-04-23 04:22:46 +02:00
} {
2008-06-22 04:06:12 +02:00
Submenu {} {
2012-06-06 02:31:18 +02:00
label {&Project} open
xywh {5 5 74 25}
2008-06-22 04:06:12 +02:00
} {
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&Info}
callback {Project_Info_Dialog pi;
pi.run();}
xywh {5 5 40 25} deactivate
2008-06-22 04:06:12 +02:00
}
Submenu {} {
2012-06-06 02:31:18 +02:00
label {Se&ttings} open
xywh {25 25 74 25}
2008-06-22 04:06:12 +02:00
} {
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&Follow Playhead}
callback {Timeline::follow_playhead = menu_picked_value( o );}
xywh {45 45 40 25} type Toggle value 1
2008-06-22 04:06:12 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&Center Playhead}
callback {Timeline::center_playhead = menu_picked_value( o );}
xywh {55 55 40 25} type Toggle value 1
}
Submenu {} {
label {&Snap to} open
xywh {25 25 74 25}
} {
MenuItem {} {
label Bars
callback {Timeline::snap_to = Timeline::Bars;}
xywh {25 25 40 25} type Radio value 1
}
MenuItem {} {
label Beats
callback {Timeline::snap_to = Timeline::Beats;}
xywh {35 35 40 25} type Radio
}
MenuItem {} {
label Off
callback {Timeline::snap_to = Timeline::None;}
xywh {45 45 40 25} type Radio
}
2008-06-22 04:06:12 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {Magnetic snap}
callback {Timeline::snap_magnetic = menu_picked_value( o );}
xywh {35 35 40 25} type Toggle value 1
2008-06-22 04:06:12 +02:00
}
2012-06-06 02:31:18 +02:00
Submenu {} {
label {Capture Format} open
xywh {25 25 74 25}
} {}
2013-09-10 03:46:28 +02:00
MenuItem {} {
label {Playback Latency Compensation}
callback {Timeline::playback_latency_compensation = menu_picked_value( o );} selected
xywh {55 55 40 25} type Toggle
}
2008-06-22 04:06:12 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&New}
callback {save_timeline_settings();
2008-05-06 22:13:52 +02:00
2013-07-31 06:36:35 +02:00
char *result_path;
2010-01-18 07:02:26 +01:00
2013-07-31 06:36:35 +02:00
char *default_path = read_line( user_config_dir, "default_path" );
result_path = default_path;
2010-01-18 07:02:26 +01:00
2013-07-31 06:36:35 +02:00
char *path = new_project_chooser( &result_path );
2010-01-18 07:02:26 +01:00
2010-01-24 22:54:53 +01:00
if ( path )
{
2013-05-14 02:21:50 +02:00
if ( ! Project::create( path, NULL ) )
2010-01-24 22:54:53 +01:00
fl_alert( "Error creating project!" );
free( path );
}
2010-01-18 07:02:26 +01:00
2013-08-01 06:25:42 +02:00
if ( result_path != default_path )
2013-07-31 06:36:35 +02:00
free(default_path);
if ( result_path )
2010-01-24 22:54:53 +01:00
{
2013-07-31 06:36:35 +02:00
write_line( user_config_dir, "default_path", result_path );
free( result_path );
2010-01-24 22:54:53 +01:00
}
2010-01-18 07:02:26 +01:00
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-12 09:53:00 +01:00
main_window->redraw();}
2012-06-06 02:31:18 +02:00
xywh {5 5 40 25}
}
MenuItem {} {
label {&Open}
2013-09-10 03:46:28 +02:00
callback {char *path = read_line( user_config_dir, "default_path" );
2008-06-22 05:15:05 +02:00
2012-02-27 04:35:31 +01:00
const char *name = fl_dir_chooser( "Open Project", path );
2008-06-22 05:15:05 +02:00
free( path );
2008-06-22 06:26:39 +02:00
open( name );}
2012-06-06 02:31:18 +02:00
xywh {15 15 40 25}
}
MenuItem {} {
label {&Compact}
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();}
2012-06-06 02:31:18 +02:00
xywh {25 25 40 25}
}
2013-05-01 07:38:49 +02:00
Submenu {} {
label {I&mport} open
xywh {20 20 74 25}
} {
MenuItem {} {
label {Import Ardour Session}
2013-05-01 07:44:16 +02:00
callback {if ( !Project::open() )
{
fl_alert( "You must create a new project before importing" );
return;
}
if ( timeline->ntracks() )
2013-05-01 07:38:49 +02:00
{
fl_alert( "You can only import into an empty session!" );
return;
}
2013-05-01 07:44:16 +02:00
2013-05-01 07:38:49 +02:00
pid_t pid;
if ( ! (pid = fork()) )
{
exit( system( "import-ardour-session_gui" ) );
}
char *path = strdup( Project::path() );
Project::close();
int status;
while ( 0 == waitpid( pid, &status, WNOHANG ) )
{
Fl::wait(0.2);
}
Project::open(path);
2013-05-14 02:21:50 +02:00
free(path);}
2013-05-01 07:38:49 +02:00
xywh {20 20 40 25}
}
}
2012-06-06 02:31:18 +02:00
Submenu {} {
label {&Export} open
2013-05-01 07:38:49 +02:00
xywh {5 5 74 25} hide deactivate
2012-06-06 02:31:18 +02:00
} {
MenuItem {} {
label Project
xywh {5 5 40 25}
}
MenuItem {} {
label Range
xywh {15 15 40 25}
}
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&Quit}
callback {quit()}
xywh {45 45 40 25} shortcut 0x40071
2008-04-23 04:22:46 +02:00
}
}
Submenu {} {
2012-06-06 02:31:18 +02:00
label {&Edit} open
xywh {5 5 74 25}
2008-04-23 04:22:46 +02:00
} {
MenuItem {} {
2012-06-06 02:31:18 +02:00
label Undo
2013-03-02 02:05:42 +01:00
callback {timeline->command_undo();}
2012-06-06 02:31:18 +02:00
xywh {5 5 40 25} shortcut 0x4007a divider
2008-04-23 22:43:17 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {Select None}
callback {timeline->select_none();}
xywh {15 15 40 25} shortcut 0x50061
2008-04-23 22:43:17 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {Delete Selected}
callback {timeline->delete_selected();}
xywh {25 25 40 25} shortcut 0xffff
}
}
Submenu {} {
label {T&ransport} open
xywh {5 5 74 25}
} {
MenuItem {} {
label Start
callback {transport->locate( 0 );}
xywh {5 5 40 25} shortcut 0xff50
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label End
callback {transport->locate( timeline->length() );}
xywh {15 15 40 25} shortcut 0xff57
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {Play/Stop}
callback {transport->toggle();}
xywh {25 25 40 25} shortcut 0x20
2008-04-23 04:22:46 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label Record
callback {transport->toggle_record();}
xywh {45 45 40 25} shortcut 0x10072
2008-04-23 04:22:46 +02:00
}
}
2012-04-11 08:59:12 +02:00
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&Timeline}
xywh {5 5 40 25}
2012-04-11 08:59:12 +02:00
}
2008-04-23 04:22:46 +02:00
Submenu {} {
2012-06-06 02:31:18 +02:00
label {&View} open
xywh {5 5 74 25}
2008-04-23 04:22:46 +02:00
} {
2008-04-25 04:48:44 +02:00
Submenu {} {
2012-06-06 02:31:18 +02:00
label {&Zoom} open
xywh {5 5 74 25}
2008-04-25 04:48:44 +02:00
} {
2008-06-22 04:06:12 +02:00
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&In}
callback {timeline->zoom_in();}
xywh {25 25 40 25} shortcut 0x2b
2008-04-25 04:48:44 +02:00
}
2008-06-22 04:06:12 +02:00
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&Out}
callback {timeline->zoom_out();}
xywh {35 35 40 25} shortcut 0x5f
2008-06-22 04:06:12 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {&Fit}
callback {timeline->zoom_fit();}
xywh {15 15 40 25} shortcut 0x3d divider
2008-06-22 04:06:12 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {1 sec.}
callback {timeline->zoom( 1 );}
xywh {15 15 40 25} shortcut 0x31
2008-04-23 04:22:46 +02:00
}
2008-06-22 04:06:12 +02:00
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {1 min.}
callback {timeline->zoom( 60 );}
xywh {25 25 40 25} shortcut 0x32
2008-06-22 04:06:12 +02:00
}
MenuItem {} {
2012-06-06 02:31:18 +02:00
label {1 hour.}
callback {timeline->zoom( 60 * 60 );}
xywh {35 35 40 25} shortcut 0x33
}
}
MenuItem {} {
label {&Theme}
callback {fl_theme_chooser();}
xywh {15 15 40 24}
code0 {\#include "FL/Fl_Theme_Chooser.H"}
}
}
Submenu {} {
label {&Options} open
xywh {5 5 74 25} divider
} {
Submenu {} {
label {&Display} open
xywh {15 15 74 25}
} {
Submenu {} {
label {&Timeline} open
xywh {15 15 74 25}
} {
MenuItem {} {
label {&Measure lines}
callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
2008-04-26 11:01:54 +02:00
2012-04-26 05:31:55 +02:00
timeline->redraw();}
2012-06-06 02:31:18 +02:00
xywh {15 15 40 25} type Toggle value 1
}
2012-10-24 07:44:19 +02:00
MenuItem {} {
label {&Cursor Overlay}
callback {Timeline::draw_with_cursor_overlay = menu_picked_value( o );
timeline->redraw();}
xywh {15 14 40 25} type Toggle value 1
}
2012-04-26 05:31:55 +02:00
}
2012-06-06 02:31:18 +02:00
Submenu {} {
label {&Waveform} open
xywh {15 15 74 25}
} {
MenuItem {} {
label Fill
callback {Waveform::fill = menu_picked_value( o );
2012-04-26 05:31:55 +02:00
2008-04-26 11:01:54 +02:00
timeline->redraw();}
2012-06-06 02:31:18 +02:00
xywh {25 25 40 25} type Toggle value 1
}
MenuItem {} {
label Outline
callback {Waveform::outline = menu_picked_value( o );
timeline->redraw();}
xywh {45 45 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();}
2012-06-06 02:31:18 +02:00
xywh {35 35 40 25} type Toggle value 1
}
2008-06-22 04:06:12 +02:00
}
2012-06-06 02:31:18 +02:00
Submenu {} {
label {&Region} open
xywh {15 15 74 25}
} {
MenuItem {} {
label {Filled fades}
xywh {45 45 40 25} type Toggle value 1
}
MenuItem {} {
label {Inherit track color}
callback {Audio_Region::inherit_track_color = menu_picked_value( o );
timeline->redraw();}
xywh {55 55 40 25} type Toggle value 1
}
MenuItem {} {
label {Show box}
callback {Audio_Region::show_box = menu_picked_value( o );
2008-04-23 22:43:17 +02:00
timeline->redraw();}
2012-06-06 02:31:18 +02:00
xywh {55 55 40 25} type Toggle value 1
}
2008-06-22 04:06:12 +02:00
}
2012-06-06 02:31:18 +02:00
Submenu {} {
label {&Control Sequence} open
xywh {15 15 74 25}
} {
MenuItem {} {
label Ruled
callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
timeline->redraw();}
xywh {55 55 40 25} type Toggle value 1
}
2008-06-22 04:06:12 +02:00
}
2012-10-27 23:12:02 +02:00
Submenu {} {
label {&Track} open
xywh {15 15 74 25}
} {
MenuItem {} {
label {Colored tracks}
callback {Track::colored_tracks = menu_picked_value( o );
timeline->redraw();}
xywh {45 45 40 25} type Toggle value 1
}
2012-10-27 23:12:09 +02:00
}
2008-06-22 04:06:12 +02:00
}
2010-01-29 21:12:24 +01:00
Submenu {} {
2012-06-06 02:31:18 +02:00
label {&Behavior} open
xywh {5 5 74 25}
2010-01-29 21:12:24 +01:00
} {
2012-06-06 02:31:18 +02:00
Submenu {} {
label {&Transport} open
xywh {5 5 74 25}
} {
MenuItem {} {
label {Stop Disables Record}
callback {transport->stop_disables_record( ((Fl_Menu_*)o)->mvalue()->flags & FL_MENU_VALUE );}
xywh {10 10 40 25} type Toggle value 1
}
2012-10-24 07:44:19 +02:00
MenuItem {} {
label {Loop Playback}
2013-02-13 01:50:19 +01:00
callback {transport->loop_enabled( ( ((Fl_Menu_*)o)->mvalue()->flags & FL_MENU_VALUE )) ;}
2012-10-27 23:12:09 +02:00
xywh {10 10 40 25} type Toggle
2012-10-24 07:44:19 +02:00
}
MenuItem {} {
label {Automatically Create Takes}
2013-02-13 01:50:19 +01:00
callback {transport->automatically_create_takes( ( ((Fl_Menu_*)o)->mvalue()->flags & FL_MENU_VALUE ));}
2012-10-27 23:12:09 +02:00
xywh {10 10 40 25} type Toggle
2012-10-24 07:44:19 +02:00
}
2010-01-29 21:12:24 +01:00
}
}
}
2012-06-06 02:31:18 +02:00
Submenu {} {
label {&Help} open
xywh {5 5 74 25}
} {
MenuItem {} {
label {&Manual}
callback {show_help_dialog( "MANUAL" );}
xywh {15 15 40 25} divider
}
MenuItem {} {
label {&About}
2013-04-14 06:41:39 +02:00
callback {About_Dialog ab( PIXMAP_PATH "/non-timeline/icon-256x256.png" );
2008-04-27 09:07:16 +02:00
2010-02-02 04:54:09 +01:00
ab.logo_box->label( VERSION );
2013-03-11 01:52:15 +01:00
ab.title->label( "Non Timeline" );
2010-02-02 04:54:09 +01:00
2013-04-14 06:41:39 +02:00
ab.copyright->label( "Copyright (C) 2008-2013 Jonathan Moore Liles" );
2013-03-11 01:52:15 +01:00
ab.credits->label( "Non Timeline was written from scratch by\\nJonathan Moore Liles for his own use\\n(see the manual).\\n\\nNobody planned. Nobody helped.\\nYou can help now by donating time, money,\\nand/or replacing the rest of Linux Audio\\nwith fast, light, reliable alternatives.\\n" );
2010-02-02 04:54:09 +01:00
2013-03-11 01:52:15 +01:00
ab.website_url->label( "http://non.tuxfamily.org" );
2010-02-02 04:54:09 +01:00
2008-06-22 06:26:39 +02:00
ab.run();}
2012-06-06 02:31:18 +02:00
xywh {5 5 40 25}
}
2008-04-27 09:07:16 +02:00
}
2008-04-23 04:22:46 +02:00
}
2008-04-24 22:52:30 +02:00
Fl_Pack {} {open
2013-02-13 01:50:19 +01:00
xywh {1 27 584 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>}
2013-02-13 01:50:19 +01:00
xywh {5 28 290 44} color 30
2008-04-24 04:10:20 +02:00
code0 {transport = o;}
code1 {o->labeltype( FL_NO_LABEL );}
class Transport
}
2012-04-11 08:59:12 +02:00
Fl_Pack clocks_pack {open
2013-02-13 01:50:19 +01:00
private xywh {295 30 290 41} type HORIZONTAL
2008-04-24 04:10:20 +02:00
code0 {o->spacing( 2 );}
} {
2008-06-22 06:26:39 +02:00
Fl_Box {} {
2013-04-12 01:37:10 +02:00
label PLAYHEAD
2013-02-13 01:50:19 +01:00
private xywh {301 30 137 41} box FLAT_BOX color 47
2008-04-24 04:10:20 +02:00
code0 {o->type( Clock::HMS );}
code1 {o->run( &transport->frame );}
class Clock
}
Fl_Box {} {
2013-04-12 01:37:10 +02:00
label PLAYHEAD
2013-02-13 01:50:19 +01:00
xywh {440 30 137 41} box FLAT_BOX color 47
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>}
2013-02-13 01:50:19 +01:00
xywh {585 32 155 40} 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
2012-06-06 02:31:18 +02:00
xywh {850 23 175 50}
2008-04-24 04:10:20 +02:00
} {
Fl_Box {} {
label {capture:}
2012-06-06 02:31:18 +02:00
xywh {910 27 56 14} labelsize 10 align 24
2008-04-24 04:10:20 +02:00
}
Fl_Box {} {
label {playback:}
2012-06-06 02:31:18 +02:00
xywh {910 43 56 14} labelsize 10 align 24
2008-04-24 04:10:20 +02:00
}
Fl_Box {} {
label {DSP:}
2012-06-06 02:31:18 +02:00
xywh {910 57 56 14} labelsize 10 align 24
2012-04-14 23:11:58 +02:00
}
Fl_Box {} {
label filesystem
2012-06-06 02:31:18 +02:00
xywh {855 28 55 18} labelsize 10 align 16
2008-04-24 04:10:20 +02:00
}
Fl_Progress capture_buffer_progress {
label {50%}
2012-10-27 23:12:09 +02:00
private xywh {965 27 60 14} selection_color 0 labelsize 10
2008-04-24 04:10:20 +02:00
}
Fl_Progress cpu_load_progress {
label {50%}
2012-10-27 23:12:09 +02:00
private xywh {965 57 60 14} selection_color 0 labelsize 9
2008-04-24 04:10:20 +02:00
}
Fl_Progress playback_buffer_progress {
label {50%}
2012-10-27 23:12:09 +02:00
private xywh {965 42 60 14} selection_color 0 labelsize 10
2008-07-30 08:48:22 +02:00
}
Fl_Progress disk_usage_progress {
label {50%}
2012-10-27 23:12:09 +02:00
private xywh {855 43 55 28} selection_color 0 labelsize 10
2012-04-14 23:11:58 +02:00
code0 {o->type( FL_VERTICAL );}
2008-07-30 08:48:22 +02:00
}
2008-04-23 04:22:46 +02:00
}
2012-04-14 23:11:58 +02:00
Fl_Group {} {open
2012-06-06 02:31:18 +02:00
xywh {740 31 115 40}
2012-04-14 23:11:58 +02:00
} {
Fl_Button solo_blinker {
2013-02-13 01:50:19 +01:00
label SOLO
2012-12-11 06:47:44 +01:00
xywh {800 33 50 15} box BORDER_BOX down_box BORDER_BOX color 74 selection_color 92 labelfont 1 labelsize 11 labelcolor 32
2012-04-14 23:11:58 +02:00
code0 {\#include "FL/Fl_Blink_Button.H"}
2012-12-02 01:14:01 +01:00
code1 {o->box( FL_ASYM_BOX );}
code2 {o->down_box( FL_ASYM_BOX );}
2012-12-11 06:47:44 +01:00
code3 {o->ignore_input( true );}
2012-04-14 23:11:58 +02:00
class Fl_Blink_Button
}
Fl_Button rec_blinker {
2013-02-13 01:50:19 +01:00
label REC
2012-12-11 06:47:44 +01:00
xywh {800 53 50 15} box BORDER_BOX down_box BORDER_BOX color 72 selection_color 88 labelfont 1 labelsize 11 labelcolor 32
2012-04-14 23:11:58 +02:00
code0 {\#include "FL/Fl_Blink_Button.H"}
2012-12-02 01:14:01 +01:00
code1 {o->box( FL_ASYM_BOX );}
code2 {o->down_box( FL_ASYM_BOX );}
2012-12-11 06:47:44 +01:00
code3 {o->ignore_input( true );}
2012-04-14 23:11:58 +02:00
class Fl_Blink_Button
}
Fl_Button selected_blinker {
2013-02-13 01:50:19 +01:00
label SEL
2012-12-11 06:47:44 +01:00
xywh {745 53 50 15} box BORDER_BOX down_box BORDER_BOX color 13 selection_color 5 labelfont 1 labelsize 11 labelcolor 32
2012-04-14 23:11:58 +02:00
code0 {\#include "FL/Fl_Blink_Button.H"}
2012-12-02 01:14:01 +01:00
code1 {o->box( FL_ASYM_BOX );}
code2 {o->down_box( FL_ASYM_BOX );}
2012-12-11 06:47:44 +01:00
code3 {o->ignore_input( true );}
2012-04-14 23:11:58 +02:00
class Fl_Blink_Button
}
Fl_Button seek_blinker {
2013-02-13 01:50:19 +01:00
label SEEK
2012-12-11 06:47:44 +01:00
xywh {745 33 50 15} box BORDER_BOX down_box BORDER_BOX color 10 selection_color 2 labelfont 1 labelsize 11 labelcolor 32
2012-04-14 23:11:58 +02:00
code0 {\#include "FL/Fl_Blink_Button.H"}
2012-12-02 01:14:01 +01:00
code1 {o->box( FL_ASYM_BOX );}
code2 {o->down_box( FL_ASYM_BOX );}
2012-12-11 06:47:44 +01:00
code3 {o->ignore_input( true );}
2012-04-14 23:11:58 +02:00
class Fl_Blink_Button
}
2008-07-26 08:49:18 +02:00
}
2012-04-14 23:11:58 +02:00
Fl_Box stats_box {
label {<stats>}
2012-06-06 02:31:18 +02:00
xywh {745 0 235 25} labelsize 13 labelcolor 53 align 88
2008-07-26 08:49:18 +02:00
}
2010-01-25 03:49:28 +01:00
Fl_Button sm_blinker {
label SM
2012-06-06 02:31:18 +02:00
xywh {985 6 35 15} box ROUNDED_BOX down_box ROUNDED_BOX color 45 selection_color 93 labelfont 3 labelcolor 39 deactivate
2012-04-14 23:11:58 +02:00
class Fl_Button
2009-01-19 04:25:28 +01:00
}
2008-04-23 04:22:46 +02:00
}
2012-12-02 01:14:01 +01:00
Fl_Group progress_group {open
2012-10-27 23:12:09 +02:00
xywh {295 352 450 79} hide
} {
Fl_Progress progress {
label {0%}
private xywh {295 394 450 37} box ROUNDED_BOX selection_color 55 labelfont 1 labelsize 22
}
Fl_Box {} {
label {Loading...}
xywh {295 362 450 31} labelfont 1 labelsize 17 align 18
}
2008-06-05 06:27:55 +02:00
}
2008-04-23 04:22:46 +02:00
Fl_Box {} {
2013-05-01 07:44:16 +02:00
label {<Timeline>}
2012-06-06 02:31:18 +02:00
xywh {0 75 1025 692} box FLAT_BOX color 47 labeltype NO_LABEL labelsize 100 resizable
2008-04-24 04:10:20 +02:00
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>}
2012-04-14 23:11:58 +02:00
private xywh {440 0 305 24} 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 ));} {}
}
2012-02-29 06:24:51 +01:00
decl {static void menubar_cb ( void *v )} {private local
}
decl {void menubar_cb ( void )} {private local
}
2008-06-22 06:26:39 +02:00
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
} {
2012-04-11 08:59:12 +02:00
code {if ( p->value() != v )
2012-03-14 02:44:26 +01:00
{
p->value( v );
2008-04-24 04:10:20 +02:00
snprintf( s, 5, "%d%%", (int)v );
2012-03-14 02:44:26 +01:00
p->label( s );
2012-04-11 08:59:12 +02:00
}} {}
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() );
2010-01-21 01:33:02 +01:00
update_progress( cpu_load_progress, clp, engine ? engine->cpu_load() : 0 );
2008-04-29 19:18:27 +02:00
2012-03-04 12:50:16 +01:00
if ( Project::open() )
update_progress( disk_usage_progress, dup, percent_used( Project::path() ) );
else
update_progress( disk_usage_progress, dup, 0 );
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
2010-01-21 01:33:02 +01:00
if ( engine && ! engine->zombified() )
{
2009-01-19 04:25:28 +01:00
snprintf( stats, sizeof( stats ), "latency: %.1fms, xruns: %d",
2013-08-24 23:21:44 +02:00
engine->frames_to_milliseconds( engine->system_latency() ),
2009-01-19 04:25:28 +01:00
engine->xruns() );
2010-01-21 01:33:02 +01:00
}
else
{
snprintf( stats, sizeof( stats ), "%s", "DISCONNECTED" );
}
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;
2010-01-21 01:33:02 +01:00
if ( engine && engine->zombified() && ! zombie )
2008-06-11 02:53:38 +02:00
{
zombie = true;
fl_alert( "Disconnected from JACK!" );
2008-07-26 08:49:18 +02:00
}
solo_blinker->value( Track::soloing() );
2012-06-14 03:28:49 +02:00
2012-10-05 23:19:21 +02:00
if ( transport->punch_enabled() && timeline->range_start() != timeline->range_end() )
2012-06-14 03:28:49 +02:00
rec_blinker->value( transport->rolling &&
transport->rec_enabled() &&
transport->frame >= timeline->range_start() &&
transport->frame <= timeline->range_end() );
else
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() );
2010-01-31 23:29:20 +01:00
selected_blinker->value( timeline->nselected() );
2010-01-19 08:46:49 +01:00
seek_blinker->value( timeline->seek_pending() );
2010-01-21 01:33:02 +01:00
if ( timeline->session_manager_name() != NULL )
{
find_item( menubar, "&Project/&New" )->deactivate();
find_item( menubar, "&Project/&Open" )->deactivate();
}
2012-04-11 08:59:12 +02:00
// project_name->redraw();} {}
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();} {}
}
2012-02-27 04:35:31 +01:00
Function {capture_format_cb( Fl_Widget *, 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
} {
2012-10-27 23:12:09 +02:00
code {if ( ! progress_group->visible() )
2008-06-06 04:30:34 +02:00
{
timeline->hide();
2012-10-27 23:12:09 +02:00
progress_group->show();
2008-06-06 04:30:34 +02:00
}
else if ( 0 == p )
{
timeline->show();
2012-10-27 23:12:09 +02:00
progress_group->hide();
2008-06-06 04:30:34 +02:00
}
2008-06-05 06:27:55 +02:00
2013-02-10 03:19:07 +01:00
// never allow drawing timeline while loading, as this would cause lock recursion.
if ( timeline->visible() )
return;
2012-12-11 02:21:28 +01:00
static int oldp;
2008-06-05 06:27:55 +02:00
static char pat[10];
2012-12-11 02:21:28 +01:00
if ( p != oldp )
{
oldp = p;
nsm_send_progress( nsm, p / 100.0f );
update_progress( progress, pat, p );
2008-06-05 06:27:55 +02:00
2012-12-11 02:21:28 +01:00
progress->redraw();
2008-06-05 06:27:55 +02:00
2012-12-11 02:21:28 +01:00
Fl::check();
2013-02-13 01:50:19 +01:00
}} {}
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];
2013-03-11 01:52:15 +01:00
snprintf( pat, 256, "file://%s/non-timeline/%s.html", DOCUMENT_PATH, file );
2008-07-19 19:06:47 +02:00
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
} {
2012-02-29 06:24:51 +01:00
code {Fl::background2( 100, 100, 100 );
2010-01-30 08:03:35 +01:00
Fl::background( 50, 50, 50 );
2012-04-11 08:59:12 +02:00
Fl::foreground( 255, 255, 255 );} {}
2012-02-29 06:24:51 +01:00
}
2010-01-30 08:03:35 +01:00
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
2013-05-14 02:21:50 +02:00
private xywh {1195 197 520 710} type Double modal visible
2008-06-11 05:43:13 +02:00
} {
2013-05-14 02:21:50 +02:00
Fl_Group {} {open
xywh {25 30 470 75}
} {
Fl_Value_Output {} {
label {Sample Rate}
xywh {35 30 90 25} labeltype SHADOW_LABEL align 1
code0 {o->value( timeline->sample_rate() );}
}
Fl_Output {} {
label {Size of Journal}
xywh {175 30 100 25} box UP_BOX labeltype SHADOW_LABEL align 1
code0 {static char pat[40];}
code1 {snprintf( pat, sizeof( pat ), "%.1fK", size( "history" ) / (float)1024 );}
code2 {o->value( pat );}
code3 {\#include "file.h"}
}
Fl_Output {} {
label {Created On}
xywh {315 30 180 25} box UP_BOX labeltype SHADOW_LABEL align 1 textfont 11 textsize 12
code0 {o->value( Project::created_on() );}
}
Fl_Output {} {
label Length
xywh {25 80 115 25} box BORDER_BOX color 47 align 1 textcolor 71
code0 {char pat[40];}
code1 {Clock::frame_to_HMS( pat, sizeof( pat ), timeline->length() );}
code2 {o->value( pat );}
}
Fl_Value_Output {} {
label Tracks
xywh {195 80 55 25} align 1
code0 {o->value( timeline->ntracks() );}
}
Fl_Output {} {
label {Last Modified On}
xywh {315 80 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
Fl_Box logo_box {
2012-04-11 08:59:12 +02:00
label {<LOGO>}
2013-05-14 02:21:50 +02:00
private xywh {18 117 485 268} color 53 labelfont 1 labelsize 18 align 16
2013-04-14 06:41:39 +02:00
code0 {o->image( Fl_Shared_Image::get( PIXMAP_PATH "/non-timeline/icon-256x256.png" ) );}
2008-06-11 05:43:13 +02:00
code1 {o->label( NULL );}
}
2008-06-13 04:21:08 +02:00
Fl_Text_Editor notes_field {
2013-09-10 03:46:28 +02:00
label {Notes:}
2013-05-14 02:21:50 +02:00
private xywh {20 420 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();}
2013-05-14 02:21:50 +02:00
xywh {422 676 74 25}
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();}
2013-05-14 02:21:50 +02:00
xywh {332 676 74 25}
2008-07-18 06:07:00 +02:00
}
2008-06-11 05:43:13 +02:00
}
}
}