Mixer/Module: Clean up some focus issues, add tooltip, and focus keybinding.
This commit is contained in:
parent
bf232b3928
commit
2cca17376a
|
@ -141,6 +141,7 @@ Module::init ( void )
|
|||
selection_color( FL_RED );
|
||||
labelsize(12);
|
||||
color( fl_color_average( FL_WHITE, FL_CYAN, 0.40 ) );
|
||||
tooltip( "Left click to edit parameters; Ctrl + left click to select; right click or MENU key for menu." );
|
||||
}
|
||||
|
||||
|
||||
|
@ -625,10 +626,6 @@ Module::draw_box ( int tx, int ty, int tw, int th )
|
|||
fl_draw_box( box(), tx + (spacing * i), ty, tw / instances(), th, c );
|
||||
}
|
||||
|
||||
if ( this == Fl::focus() )
|
||||
{
|
||||
fl_draw_box( FL_UP_FRAME, tx, ty, tw, th, selection_color() );
|
||||
}
|
||||
|
||||
if ( audio_input.size() && audio_output.size() )
|
||||
{
|
||||
|
@ -650,6 +647,11 @@ Module::draw_box ( int tx, int ty, int tw, int th )
|
|||
|
||||
fl_pop_clip();
|
||||
|
||||
if ( this == Fl::focus() )
|
||||
{
|
||||
fl_draw_box( FL_UP_FRAME, tx, ty, tw, th, selection_color() );
|
||||
}
|
||||
|
||||
fl_pop_clip();
|
||||
}
|
||||
|
||||
|
@ -833,13 +835,16 @@ Module::menu_cb ( const Fl_Menu_ *m )
|
|||
if ( ! strcmp( picked, "Edit Parameters" ) )
|
||||
command_open_parameter_editor();
|
||||
else if ( ! strcmp( picked, "Bypass" ) )
|
||||
{
|
||||
if ( ! bypassable() )
|
||||
{
|
||||
fl_alert( "Due to its channel configuration, this module cannot be bypassed." );
|
||||
}
|
||||
else
|
||||
{
|
||||
bypass( ! ( m->mvalue()->flags & FL_MENU_VALUE ) );
|
||||
bypass( !bypass() );
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
else if ( ! strcmp( picked, "Cut" ) )
|
||||
{
|
||||
|
@ -940,6 +945,14 @@ Module::handle ( int m )
|
|||
|
||||
unsigned long evstate = Fl::event_state();
|
||||
|
||||
switch ( m )
|
||||
{
|
||||
case FL_ENTER:
|
||||
// Fl::focus(this);
|
||||
case FL_LEAVE:
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( Fl_Group::handle( m ) )
|
||||
return 1;
|
||||
|
||||
|
@ -971,7 +984,12 @@ Module::handle ( int m )
|
|||
if ( ! Fl::event_inside( this ) )
|
||||
return 1;
|
||||
|
||||
if ( e & FL_BUTTON1 )
|
||||
if ( ( e & FL_BUTTON1 ) && ( e & FL_CTRL ) )
|
||||
{
|
||||
Fl::focus(this);
|
||||
return 1;
|
||||
}
|
||||
else if ( e & FL_BUTTON1 )
|
||||
{
|
||||
command_open_parameter_editor();
|
||||
return 1;
|
||||
|
|
|
@ -406,7 +406,7 @@ public:
|
|||
}
|
||||
|
||||
virtual bool bypass ( void ) const { return _bypass; }
|
||||
virtual void bypass ( bool v ) { _bypass = v; redraw(); }
|
||||
virtual void bypass ( bool v ) { _bypass = v; }
|
||||
|
||||
virtual bool bypassable ( void ) const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue