Browse Source

Mixer: Add global command to swap signal and fader views, move signal/fader button to free up vertical space in layout.

tags/non-daw-v1.2.0
Jonathan Moore Liles 10 years ago
parent
commit
17e7ad0ad6
4 changed files with 40 additions and 10 deletions
  1. +16
    -0
      mixer/src/Mixer.C
  2. +1
    -1
      mixer/src/Mixer.H
  3. +22
    -9
      mixer/src/Mixer_Strip.C
  4. +1
    -0
      mixer/src/Mixer_Strip.H

+ 16
- 0
mixer/src/Mixer.C View File

@@ -354,6 +354,10 @@ void Mixer::cb_menu(Fl_Widget* o) {
{
fl_theme_chooser();
}
else if ( ! strcmp( picked, "&Mixer/Swap &Fader//Signal View" ) )
{
command_toggle_fader_view();
}
else if ( ! strcmp( picked, "&Help/&About" ) )
{
About_Dialog ab( PIXMAP_PATH "/non-mixer/icon-256x256.png" );
@@ -523,6 +527,8 @@ Mixer::Mixer ( int X, int Y, int W, int H, const char *L ) :
o->add( "&Mixer/&Import Strip" );
o->add( "&Mixer/Paste", FL_CTRL + 'v', 0, 0 );
o->add( "&Mixer/&Spatialization Console", FL_F + 8, 0, 0, FL_MENU_TOGGLE );
o->add( "&Mixer/Swap &Fader//Signal View", FL_ALT + 'f', 0, 0, FL_MENU_TOGGLE );
// o->add( "&Mixer/&Signal View", FL_ALT + 's', 0, 0, FL_MENU_TOGGLE );
o->add( "&Remote Control/Start Learning", FL_F + 9, 0, 0 );
o->add( "&Remote Control/Stop Learning", FL_F + 10, 0, 0 );
o->add( "&Remote Control/Send State" );
@@ -1188,6 +1194,16 @@ Mixer::maybe_auto_connect_output ( Module::Port *p )
/* Commands */
/************/

void
Mixer::command_toggle_fader_view ( void )
{
for ( int i = 0; i < mixer_strips->children(); i++ )
{
Mixer_Strip *s = ((Mixer_Strip*)mixer_strips->child(i));
s->command_toggle_fader_view();
}
}
void
Mixer::command_clear_mappings ( void )
{


+ 1
- 1
mixer/src/Mixer.H View File

@@ -161,7 +161,7 @@ public:

public:
void edit_translations ( void );
void command_toggle_fader_view ( void );
void command_clear_mappings ( void );
void command_new ( void );
bool command_save ( void );


+ 22
- 9
mixer/src/Mixer_Strip.C View File

@@ -595,6 +595,7 @@ Mixer_Strip::init ( )
o->color2(FL_CYAN);
}
{ Fl_Choice* o = group_choice = new Fl_Choice(61, 183, 45, 22);
o->tooltip( "Create or assign group" );
o->labeltype(FL_NO_LABEL);
o->labelsize(10);
o->textsize(10);
@@ -602,15 +603,20 @@ Mixer_Strip::init ( )
o->value(0);
o->callback( ((Fl_Callback*)cb_handle), this );
}
{ Fl_Flip_Button* o = tab_button = new Fl_Flip_Button(61, 183, 45, 22, "fader/signal");
o->type(1);
o->labelsize( 14 );
o->callback( ((Fl_Callback*)cb_handle), this );
o->when(FL_WHEN_RELEASE);
}
{ Controller_Module *o = mute_controller = new Controller_Module( true );
o->pad( false );
o->size( 45, 22 );
{ Fl_Scalepack *o = new Fl_Scalepack( 0,0, 45, 22 );
o->type( FL_HORIZONTAL );
{ Fl_Flip_Button* o = tab_button = new Fl_Flip_Button(61, 183, 45, 22, "Fadr/Signl");
o->tooltip( "Switch between fader and signal views" );
o->type(1);
o->labelsize( 10 );
o->callback( ((Fl_Callback*)cb_handle), this );
o->when(FL_WHEN_RELEASE);
}
{ Controller_Module *o = mute_controller = new Controller_Module( true );
o->pad( false );
o->size( 45, 22 );
}
o->end();
}
o->end();
}
@@ -1197,6 +1203,13 @@ Mixer_Strip::number ( void ) const
/* Commands */
/************/

void
Mixer_Strip::command_toggle_fader_view ( void )
{
tab_button->value( ! tab_button->value() );
tab_button->do_callback();
}

void
Mixer_Strip::command_move_left ( void )
{


+ 1
- 0
mixer/src/Mixer_Strip.H View File

@@ -177,6 +177,7 @@ public:
int number ( void ) const;
static bool import_strip ( const char *filename );

void command_toggle_fader_view ( void );
void command_move_left ( void );
void command_move_right ( void );
void command_close ( void );


Loading…
Cancel
Save