Add color choice to region popup menu.
This commit is contained in:
parent
ebc059ac31
commit
03465d82b0
|
@ -189,6 +189,7 @@ Audio_Region::source_name ( void ) const
|
||||||
return _clip->name();
|
return _clip->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <FL/fl_show_colormap.H>
|
||||||
|
|
||||||
int
|
int
|
||||||
Audio_Region::handle ( int m )
|
Audio_Region::handle ( int m )
|
||||||
|
@ -297,6 +298,7 @@ Audio_Region::handle ( int m )
|
||||||
{ "Parabolic", 0, 0, 0, FL_MENU_RADIO | ( ot == Fade::Parabolic ? FL_MENU_VALUE : 0 ) },
|
{ "Parabolic", 0, 0, 0, FL_MENU_RADIO | ( ot == Fade::Parabolic ? FL_MENU_VALUE : 0 ) },
|
||||||
{ 0 },
|
{ 0 },
|
||||||
{ 0 },
|
{ 0 },
|
||||||
|
{ "Color", 0, 0, 0, inherit_track_color ? FL_MENU_INACTIVE : 0 },
|
||||||
{ 0 },
|
{ 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -308,6 +310,10 @@ Audio_Region::handle ( int m )
|
||||||
_fade_in.type = (Fade::fade_type_e)(int)(r - &menu[2]);
|
_fade_in.type = (Fade::fade_type_e)(int)(r - &menu[2]);
|
||||||
else if ( r > &menu[7] && r < &menu[12] )
|
else if ( r > &menu[7] && r < &menu[12] )
|
||||||
_fade_out.type = (Fade::fade_type_e)(int)(r - &menu[8]);
|
_fade_out.type = (Fade::fade_type_e)(int)(r - &menu[8]);
|
||||||
|
else if ( r == &menu[ 14 ] )
|
||||||
|
{
|
||||||
|
box_color( fl_show_colormap( box_color() ) );
|
||||||
|
}
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,6 +307,7 @@ public:
|
||||||
Fl_Color color ( void ) const { return _color; }
|
Fl_Color color ( void ) const { return _color; }
|
||||||
void color ( Fl_Color v ) { _color = v; }
|
void color ( Fl_Color v ) { _color = v; }
|
||||||
Fl_Color box_color ( void ) const { return _box_color; }
|
Fl_Color box_color ( void ) const { return _box_color; }
|
||||||
|
void box_color ( Fl_Color v ) { _box_color = v; }
|
||||||
virtual Fl_Color selection_color ( void ) const { return _selection_color; }
|
virtual Fl_Color selection_color ( void ) const { return _selection_color; }
|
||||||
virtual void selection_color ( Fl_Color v ) { _selection_color = v; }
|
virtual void selection_color ( Fl_Color v ) { _selection_color = v; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue