Play with track header button callback.

This commit is contained in:
Jonathan Moore Liles 2008-03-05 00:23:00 -06:00
parent 78afcbe019
commit 790f371456
2 changed files with 29 additions and 0 deletions

View File

@ -25,6 +25,13 @@ Track_Header::cb_input_field ( Fl_Widget *w, void *v )
((Track_Header*)v)->cb_input_field();
}
void
Track_Header::cb_button ( Fl_Widget *w, void *v )
{
((Track_Header*)v)->cb_button( w );
}
void
Track_Header::cb_input_field ( void )
{
@ -38,6 +45,19 @@ Track_Header::cb_input_field ( void )
log_end();
}
void
Track_Header::cb_button ( Fl_Widget *w )
{
printf( "FIXME: inform mixer here\n" );
if ( w == record_button )
{
}
}
Track_Header::Track_Header ( int X, int Y, int W, int H, const char *L ) :
Fl_Group ( X, Y, W, H, L )
{
@ -76,6 +96,7 @@ Track_Header::Track_Header ( int X, int Y, int W, int H, const char *L ) :
o->color( FL_LIGHT1 );
o->selection_color( FL_RED );
o->labelsize( 8 );
o->callback( cb_button, this );
}
{
Fl_Button *o = mute_button =
@ -84,6 +105,7 @@ Track_Header::Track_Header ( int X, int Y, int W, int H, const char *L ) :
o->box( FL_THIN_UP_BOX );
o->color( FL_LIGHT1 );
o->labelsize( 11 );
o->callback( cb_button, this );
}
{
Fl_Button *o = solo_button =
@ -92,6 +114,7 @@ Track_Header::Track_Header ( int X, int Y, int W, int H, const char *L ) :
o->box( FL_THIN_UP_BOX );
o->color( FL_LIGHT1 );
o->labelsize( 11 );
o->callback( cb_button, this );
}
{
Fl_Menu_Button *o = take_menu =

View File

@ -122,6 +122,9 @@ public:
asprintf( &sa[ i++ ], ":name \"%s\"", _name ? _name : "" );
asprintf( &sa[ i++ ], ":track 0x%X", _track ? _track->id() : 0 );
asprintf( &sa[ i++ ], ":selected %d", _selected );
/* asprintf( &sa[ i++ ], ":record %d", record_button->value() ); */
/* asprintf( &sa[ i++ ], ":solo %d", solo_button->value() ); */
/* asprintf( &sa[ i++ ], ":mute %d", mute_button->value() ); */
asprintf( &sa[ i++ ], ":h %d", size() );
// asprintf( &sa[ i++ ], ":gain %f", _scale );
@ -196,6 +199,9 @@ public:
static void cb_input_field ( Fl_Widget *w, void *v );
void cb_input_field ( void );
static void cb_button ( Fl_Widget *w, void *v );
void cb_button ( Fl_Widget *w );
static int width();