2007-12-18 05:09:02 +01:00
|
|
|
# data file for the Fltk User Interface Designer (fluid)
|
2012-10-26 09:42:07 +02:00
|
|
|
version 1.0300
|
2007-12-18 05:09:02 +01:00
|
|
|
header_name {.H}
|
|
|
|
code_name {.C}
|
|
|
|
comment {//
|
|
|
|
// Copyright (C) 2008 Jonathan Moore Liles
|
|
|
|
//
|
|
|
|
// 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-10-26 09:42:07 +02:00
|
|
|
decl {\#include "../grid.H"} {private local
|
|
|
|
}
|
2007-12-18 05:09:02 +01:00
|
|
|
|
2012-10-26 09:42:07 +02:00
|
|
|
decl {\#include "../scale.H"} {private local
|
|
|
|
}
|
2007-12-18 05:09:02 +01:00
|
|
|
|
2012-10-29 06:31:29 +01:00
|
|
|
decl {\#include <MIDI/event.H>} {public global
|
|
|
|
}
|
|
|
|
|
|
|
|
decl {\#include <MIDI/event_list.H>} {selected public global
|
|
|
|
}
|
|
|
|
|
|
|
|
decl {using namespace MIDI;} {private local
|
|
|
|
}
|
|
|
|
|
2012-10-26 09:42:07 +02:00
|
|
|
decl {extern Fl_Color velocity_colors[];} {private local
|
|
|
|
}
|
2007-12-18 05:09:02 +01:00
|
|
|
|
2012-10-26 09:42:07 +02:00
|
|
|
decl {class Event_Widget;} {public local
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
class Event_Editor {open
|
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
decl {int _h;} {private local
|
|
|
|
}
|
|
|
|
decl {Grid *_grid;} {private local
|
|
|
|
}
|
2012-10-29 06:31:29 +01:00
|
|
|
decl {MIDI::event_list *_old;} {private local
|
2012-10-26 09:42:07 +02:00
|
|
|
}
|
2012-10-29 06:31:29 +01:00
|
|
|
decl {MIDI::event_list *_el;} {private local
|
2012-10-26 09:42:07 +02:00
|
|
|
}
|
|
|
|
decl {int _y;} {private local
|
|
|
|
}
|
2007-12-18 05:09:02 +01:00
|
|
|
Function {make_window( Grid *g )} {open
|
|
|
|
} {
|
|
|
|
Fl_Window window {
|
|
|
|
label {Event Editor}
|
|
|
|
callback {delete _el;
|
|
|
|
|
|
|
|
_grid->events( _old );
|
|
|
|
|
|
|
|
delete _old;
|
|
|
|
|
2008-02-13 02:37:26 +01:00
|
|
|
_el = _old = NULL;
|
|
|
|
|
|
|
|
o->hide();
|
|
|
|
|
2008-06-14 06:35:04 +02:00
|
|
|
Fl::delete_widget( o );} open
|
2012-10-29 06:31:29 +01:00
|
|
|
xywh {968 122 655 805} type Double resizable
|
2007-12-18 05:09:02 +01:00
|
|
|
code0 {\#include "event_edit.H"}
|
2012-10-29 06:31:29 +01:00
|
|
|
code1 {\#include "../grid.H"} modal size_range {0 0 659 803} visible
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Scroll {} {
|
|
|
|
label {Event List} open
|
|
|
|
xywh {10 29 635 737} type VERTICAL_ALWAYS box FLAT_BOX
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Pack pack {open
|
|
|
|
xywh {10 29 635 737} color 47 when 6 resizable
|
|
|
|
} {}
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
Fl_Return_Button {} {
|
|
|
|
label {&Save}
|
|
|
|
callback {delete window;
|
|
|
|
delete _el;
|
|
|
|
delete _old;}
|
|
|
|
xywh {489 771 76 25}
|
|
|
|
}
|
|
|
|
Fl_Button {} {
|
|
|
|
label {&Discard}
|
|
|
|
callback {window->do_callback();}
|
|
|
|
xywh {575 771 74 25}
|
|
|
|
}
|
|
|
|
Fl_Button {} {
|
|
|
|
label Del
|
|
|
|
user_data this user_data_type {Event_Editor *}
|
|
|
|
callback {_el->remove_selected();
|
|
|
|
|
|
|
|
sync();}
|
|
|
|
xywh {10 771 74 25} shortcut 0xffff color 88
|
|
|
|
}
|
|
|
|
Fl_Menu_Button {} {
|
|
|
|
label {&Insert}
|
|
|
|
user_data this user_data_type {Event_Editor *}
|
|
|
|
callback {if ( o->value() == 0 )
|
|
|
|
{
|
|
|
|
// note;
|
|
|
|
|
|
|
|
event *on = new event;
|
|
|
|
event *off = new event;
|
|
|
|
|
|
|
|
on->status( event::NOTE_ON );
|
|
|
|
on->note( 64 );
|
|
|
|
on->note_velocity( 64 );
|
|
|
|
|
|
|
|
off->status( event::NOTE_OFF );
|
|
|
|
off->note( 64 );
|
|
|
|
off->timestamp( 1 );
|
|
|
|
off->note_velocity( 64 );
|
|
|
|
|
|
|
|
on->link( off );
|
|
|
|
|
|
|
|
_el->insert( on );
|
|
|
|
_el->insert( off );
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
event *e = new event;
|
|
|
|
|
|
|
|
int opcode = e->name( o->menu()[ o->value() ].text );
|
|
|
|
|
|
|
|
if ( opcode < 0 )
|
|
|
|
return;
|
|
|
|
|
|
|
|
e->status( opcode );
|
|
|
|
|
|
|
|
Event_Widget *ew = v->value();
|
|
|
|
|
|
|
|
if ( ew && ew->ev() )
|
|
|
|
e->timestamp( ew->ev()->timestamp() );
|
|
|
|
|
|
|
|
|
|
|
|
_el->insert( e );
|
|
|
|
}
|
|
|
|
|
|
|
|
sync();} open
|
|
|
|
xywh {94 771 121 25} color 63
|
|
|
|
} {
|
|
|
|
MenuItem {} {
|
|
|
|
label Note
|
|
|
|
xywh {10 10 40 25}
|
|
|
|
}
|
|
|
|
MenuItem {} {
|
|
|
|
label Aftertouch
|
|
|
|
xywh {50 50 40 25}
|
|
|
|
}
|
|
|
|
MenuItem {} {
|
|
|
|
label {Control Change}
|
|
|
|
xywh {20 20 40 25}
|
|
|
|
}
|
|
|
|
MenuItem {} {
|
|
|
|
label {Program Change}
|
|
|
|
xywh {30 30 40 25}
|
|
|
|
}
|
|
|
|
MenuItem {} {
|
|
|
|
label {Channel Pressure}
|
|
|
|
xywh {60 60 40 25}
|
|
|
|
}
|
|
|
|
MenuItem {} {
|
|
|
|
label {Pitch Wheel}
|
|
|
|
xywh {40 40 40 25}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
code {// keep a copy
|
|
|
|
_old = g->events();
|
|
|
|
_el = g->events();
|
|
|
|
|
|
|
|
_grid = g;
|
|
|
|
_y = 0;
|
|
|
|
|
2008-11-29 01:25:28 +01:00
|
|
|
_h = pack->h() / 24;
|
2007-12-18 05:09:02 +01:00
|
|
|
|
|
|
|
update_widgets();} {}
|
|
|
|
}
|
|
|
|
Function {sync( void )} {open return_type void
|
|
|
|
} {
|
2008-06-14 06:35:04 +02:00
|
|
|
code {DMESSAGE( "syncing events to grid" );
|
2007-12-18 05:09:02 +01:00
|
|
|
|
|
|
|
_grid->events( _el );
|
|
|
|
|
2008-11-29 01:25:28 +01:00
|
|
|
update_widgets();} {}
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
Function {update_widgets( void )} {open return_type void
|
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
code {int i = 0;
|
2007-12-18 05:09:02 +01:00
|
|
|
if ( ! _el->empty() )
|
|
|
|
|
2016-04-05 23:21:45 +02:00
|
|
|
for ( event* e = (*_el)[0]; e; ( e = e->next() ), i++ )
|
2007-12-18 05:09:02 +01:00
|
|
|
{
|
2012-10-26 09:42:07 +02:00
|
|
|
Event_Widget *ew;
|
|
|
|
|
|
|
|
if ( i < pack->children() )
|
|
|
|
{
|
|
|
|
ew = (Event_Widget*)pack->child(i);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
|
|
|
ew = new Event_Widget( 0, 0, pack->w() - Fl::box_dw( pack->box() ), 24, 0 );
|
|
|
|
|
|
|
|
ew->callback( cb_changed, (void*)this );
|
|
|
|
ew->when( FL_WHEN_CHANGED );
|
|
|
|
pack->add( ew );
|
|
|
|
}
|
2007-12-18 05:09:02 +01:00
|
|
|
|
2012-10-26 09:42:07 +02:00
|
|
|
ew->ev( e );
|
2008-11-29 01:25:28 +01:00
|
|
|
}
|
|
|
|
|
2012-10-26 09:42:07 +02:00
|
|
|
// pack->parent()->redraw();} {}
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
Function {value( void )} {return_type {Event_Widget *}
|
|
|
|
} {
|
2015-12-17 02:57:09 +01:00
|
|
|
code {for ( int i = 0; i < pack->children(); i++ )
|
2007-12-18 05:09:02 +01:00
|
|
|
{
|
|
|
|
Event_Widget *w = (Event_Widget*)pack->child( i );
|
|
|
|
if ( w->selected() )
|
|
|
|
return w;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;} {}
|
|
|
|
}
|
|
|
|
Function {cb_changed( Fl_Widget *w, void *ee )} {open return_type {static void}
|
|
|
|
} {
|
|
|
|
code {Event_Widget *ew = (Event_Widget*)w;
|
|
|
|
|
|
|
|
if ( ew->changed() )
|
|
|
|
// sorting order changed.
|
|
|
|
((Event_Editor*)ee)->_el->sort( ew->ev() );
|
|
|
|
|
|
|
|
((Event_Editor*)ee)->sync();} {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Function {event_editor( Grid *g )} {open C return_type void
|
|
|
|
} {
|
|
|
|
code {Event_Editor ee;
|
|
|
|
|
|
|
|
|
|
|
|
Fl_Window *w = ee.make_window( g );
|
|
|
|
|
|
|
|
w->modal();
|
|
|
|
w->show();
|
|
|
|
|
|
|
|
while( w->shown() )
|
|
|
|
Fl::wait();} {}
|
|
|
|
}
|
|
|
|
|
|
|
|
widget_class Event_Widget {user_data_type {void *} open
|
2012-10-29 06:31:29 +01:00
|
|
|
xywh {945 239 590 30} type Single
|
|
|
|
code0 {_event = NULL;}
|
2007-12-18 05:09:02 +01:00
|
|
|
class Fl_Group size_range {400 24 0 24} visible
|
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
decl {static const Fl_Color note_color = FL_BLACK;} {private local
|
|
|
|
}
|
|
|
|
decl {static const Fl_Color control_color = FL_BLUE;} {private local
|
|
|
|
}
|
|
|
|
decl {static const Fl_Color prog_color = FL_RED;} {private local
|
|
|
|
}
|
|
|
|
decl {static const Fl_Color pressure_color = FL_YELLOW;} {private local
|
|
|
|
}
|
|
|
|
decl {static const Fl_Color after_color = FL_CYAN;} {private local
|
|
|
|
}
|
|
|
|
decl {static const Fl_Color pitch_color = FL_GREEN} {private local
|
|
|
|
}
|
2012-10-29 06:31:29 +01:00
|
|
|
decl {MIDI::event *_event;} {private local
|
2012-10-26 09:42:07 +02:00
|
|
|
}
|
|
|
|
decl {Fl_Group *tab;} {private local
|
|
|
|
}
|
2012-10-29 06:31:29 +01:00
|
|
|
Function {ev( MIDI::event * e )} {open return_type void
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
|
|
|
code {if ( e && ( _event == NULL ) )
|
|
|
|
activate();
|
|
|
|
else
|
|
|
|
if ( ! e )
|
|
|
|
{
|
|
|
|
_event = NULL;
|
|
|
|
deactivate();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
activate();
|
|
|
|
|
|
|
|
_event = e;
|
|
|
|
|
|
|
|
name->label( e->name() );
|
|
|
|
time->value( e->timestamp() );
|
|
|
|
|
|
|
|
// hide all tabs
|
|
|
|
for ( int i = 2; i < children(); i++ )
|
|
|
|
child( i )->hide();
|
|
|
|
|
|
|
|
Fl_Valuator *d1, *d2;
|
|
|
|
|
2008-02-13 02:37:26 +01:00
|
|
|
d1 = d2 = NULL;
|
|
|
|
|
2007-12-18 05:09:02 +01:00
|
|
|
name->color( FL_BLACK );
|
|
|
|
name->value( e->selected() );
|
|
|
|
|
|
|
|
// display the proper subtype
|
|
|
|
switch ( e->opcode() )
|
|
|
|
{
|
|
|
|
\#define TWO d1 = (Fl_Valuator*)tab->child( 0 ); d2 = (Fl_Valuator*)tab->child( 1 )
|
|
|
|
\#define ONE d1 = (Fl_Valuator*)tab->child( 0 ); d2 = NULL
|
|
|
|
|
|
|
|
case midievent::NOTE_ON:
|
|
|
|
case midievent::NOTE_OFF:
|
|
|
|
tab = note_tab;
|
|
|
|
name->color( note_color );
|
|
|
|
|
|
|
|
note_name->label( Scale::chromatic_name( e->note() ) );
|
|
|
|
note_name->labelcolor( velocity_colors[ e->note_velocity() ] );
|
|
|
|
|
|
|
|
TWO;
|
|
|
|
break;
|
|
|
|
case midievent::CONTROL_CHANGE:
|
|
|
|
tab = control_tab;
|
|
|
|
name->color( control_color );
|
|
|
|
|
|
|
|
TWO;
|
|
|
|
break;
|
|
|
|
case midievent::AFTERTOUCH:
|
|
|
|
tab = after_tab;
|
|
|
|
name->color( after_color );
|
|
|
|
|
|
|
|
TWO;
|
|
|
|
break;
|
|
|
|
case midievent::CHANNEL_PRESSURE:
|
|
|
|
tab = pressure_tab;
|
|
|
|
name->color( pressure_color );
|
|
|
|
|
|
|
|
ONE;
|
|
|
|
break;
|
|
|
|
case midievent::PROGRAM_CHANGE:
|
|
|
|
tab = prog_tab;
|
|
|
|
name->color( prog_color );
|
|
|
|
|
|
|
|
ONE;
|
|
|
|
break;
|
|
|
|
case midievent::PITCH_WHEEL:
|
|
|
|
tab = pitch_tab;
|
|
|
|
name->color( pitch_color );
|
|
|
|
|
|
|
|
ONE;
|
|
|
|
d1->value( e->pitch() );
|
|
|
|
goto pitch;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
byte_t D1, D2;
|
|
|
|
|
|
|
|
e->data( &D1, &D2 );
|
|
|
|
|
|
|
|
d1->value( D1 );
|
|
|
|
if ( d2 )
|
|
|
|
d2->value( D2 );
|
|
|
|
|
|
|
|
|
|
|
|
pitch:
|
|
|
|
|
|
|
|
// show the current tab
|
|
|
|
tab->show();
|
|
|
|
|
|
|
|
time->redraw();
|
|
|
|
name->redraw();
|
|
|
|
|
|
|
|
// redraw();} {}
|
|
|
|
}
|
2012-10-29 06:31:29 +01:00
|
|
|
Function {ev( void )} {open return_type {MIDI::event *}
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
|
|
|
code {return _event;} {}
|
|
|
|
}
|
|
|
|
Fl_Value_Input time {
|
|
|
|
callback {if ( _event->is_note_off() )
|
|
|
|
{
|
|
|
|
if ( o->value() < _event->link()->timestamp() )
|
|
|
|
{
|
|
|
|
o->value( _event->timestamp() );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
if ( _event->is_note_on() )
|
|
|
|
if ( o->value() > _event->link()->timestamp() )
|
|
|
|
{
|
|
|
|
o->value( _event->timestamp() );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
_event->timestamp( o->value() );
|
|
|
|
|
|
|
|
set_changed();
|
|
|
|
do_callback();}
|
|
|
|
xywh {3 0 125 24} labeltype NO_LABEL align 0 when 8 maximum 0
|
|
|
|
code1 {o->maximum( (unsigned long)-1 );}
|
|
|
|
}
|
|
|
|
Fl_Button name {
|
|
|
|
label {<Event Name>} user_data_type {void*}
|
|
|
|
callback {if ( o->value() )
|
|
|
|
_event->select();
|
|
|
|
else
|
|
|
|
_event->deselect();
|
|
|
|
|
|
|
|
do_callback();}
|
|
|
|
xywh {132 -1 149 25} type Toggle when 1
|
|
|
|
}
|
|
|
|
Fl_Group note_tab {open
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {282 -3 324 37} align 16
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Value_Input {} {
|
2007-12-18 05:09:02 +01:00
|
|
|
label {Note:}
|
|
|
|
user_data this
|
|
|
|
callback cb_note
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {359 0 51 24} when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Value_Slider {} {
|
2007-12-18 05:09:02 +01:00
|
|
|
label {Velocity:}
|
2012-10-26 09:42:07 +02:00
|
|
|
user_data this user_data_type {void *}
|
2007-12-18 05:09:02 +01:00
|
|
|
callback cb_msb
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {480 0 110 24} type {Horz Fill} selection_color 80 align 4 when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
Fl_Box note_name {
|
|
|
|
label {A\#}
|
|
|
|
private xywh {284 1 31 24} labeltype SHADOW_LABEL labelfont 14 labelcolor 135
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Fl_Group after_tab {open
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {317 0 277 25} align 16 hide
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Value_Input {} {
|
2007-12-18 05:09:02 +01:00
|
|
|
label {Note:}
|
|
|
|
user_data this
|
|
|
|
callback cb_note
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {359 0 51 24} when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Value_Slider {} {
|
2007-12-18 05:09:02 +01:00
|
|
|
label {Pressure:}
|
2012-10-26 09:42:07 +02:00
|
|
|
user_data this user_data_type {void *}
|
2007-12-18 05:09:02 +01:00
|
|
|
callback cb_msb
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {480 0 110 24} type {Horz Fill} selection_color 80 align 4 when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Fl_Group control_tab {open
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {358 0 238 34} align 16 hide
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Value_Input {} {
|
2007-12-18 05:09:02 +01:00
|
|
|
label {Control:}
|
|
|
|
user_data this
|
|
|
|
callback cb_lsb
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {359 0 51 24} when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Value_Input {} {
|
2007-12-18 05:09:02 +01:00
|
|
|
label {Value:}
|
|
|
|
user_data this
|
|
|
|
callback cb_msb
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {480 0 51 24} when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Fl_Group prog_tab {open
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {287 0 238 25} align 16 hide
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
2012-10-26 09:42:07 +02:00
|
|
|
Fl_Value_Input {} {
|
2007-12-18 05:09:02 +01:00
|
|
|
label {Program:}
|
|
|
|
user_data this
|
|
|
|
callback cb_lsb
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {359 0 51 24} when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Fl_Group pitch_tab {open
|
|
|
|
xywh {306 0 290 24} align 16 hide
|
|
|
|
} {
|
|
|
|
Fl_Slider {} {
|
|
|
|
label {Pitch:} user_data_type {void *}
|
|
|
|
callback {_event->pitch( o->value() );
|
|
|
|
do_callback();}
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {358 0 231 24} type Horizontal align 4 when 4 minimum -8192 maximum 8191 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Fl_Group pressure_tab {open
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {307 0 291 24} align 16 hide
|
2007-12-18 05:09:02 +01:00
|
|
|
} {
|
|
|
|
Fl_Slider {} {
|
|
|
|
label {Pressure:}
|
|
|
|
user_data this
|
2012-10-29 06:31:29 +01:00
|
|
|
callback cb_lsb
|
2012-10-26 09:42:07 +02:00
|
|
|
xywh {359 0 230 24} type {Horz Fill} align 4 when 4 maximum 127 step 1
|
2007-12-18 05:09:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Function {select( bool b )} {open return_type void
|
|
|
|
} {
|
|
|
|
code {/*
|
|
|
|
_selected = b;
|
|
|
|
|
|
|
|
if ( b )
|
|
|
|
name->color( FL_WHITE );
|
|
|
|
|
|
|
|
redraw();
|
|
|
|
*/} {}
|
|
|
|
}
|
|
|
|
Function {button()} {open return_type {Fl_Button *}
|
|
|
|
} {
|
|
|
|
code {return name;} {}
|
|
|
|
}
|
|
|
|
Function {selected( void )} {open return_type bool
|
|
|
|
} {
|
|
|
|
code {/*
|
|
|
|
int n = name->value();
|
|
|
|
name->value( 0 );
|
|
|
|
return n;
|
|
|
|
*/
|
|
|
|
|
|
|
|
return name->value();} {}
|
|
|
|
}
|
|
|
|
Function {cb_lsb( Fl_Valuator *o, Event_Widget *w )} {open return_type {static void}
|
|
|
|
} {
|
|
|
|
code {w->ev()->lsb( o->value() );
|
|
|
|
|
|
|
|
w->do_callback();} {}
|
|
|
|
}
|
|
|
|
Function {cb_msb( Fl_Valuator *o, Event_Widget *w )} {open return_type {static void}
|
|
|
|
} {
|
|
|
|
code {w->ev()->msb( o->value() );
|
|
|
|
w->do_callback();} {}
|
|
|
|
}
|
|
|
|
Function {cb_note( Fl_Valuator *o, Event_Widget *w )} {open return_type {static void}
|
|
|
|
} {
|
|
|
|
code {w->ev()->note( o->value() );
|
|
|
|
w->do_callback();} {}
|
|
|
|
}
|
|
|
|
}
|