Timeline: Display selection state of basic sequence points and sequence regions.
This commit is contained in:
parent
44a0279e4c
commit
81217a8722
|
@ -106,27 +106,19 @@ draw_marker ( Fl_Color c )
|
||||||
void
|
void
|
||||||
Sequence_Point::draw_box ( void )
|
Sequence_Point::draw_box ( void )
|
||||||
{
|
{
|
||||||
// Sequence_Widget::draw_box();
|
|
||||||
|
|
||||||
const int X = x() - (abs_w() >> 1);
|
const int X = x() - (abs_w() >> 1);
|
||||||
/* // const int Y = y() + Fl::box_dy( box() ); */
|
|
||||||
|
|
||||||
const int Y = y();
|
const int Y = y();
|
||||||
|
|
||||||
/* fl_draw_box( FL_ASYM_BOX, x() - ( abs_w() / 2 ), y(), abs_w(), h(), color() ); */
|
|
||||||
|
|
||||||
/* fl_color( color() ); */
|
|
||||||
|
|
||||||
fl_push_matrix();
|
fl_push_matrix();
|
||||||
fl_translate( X, Y );
|
fl_translate( X, Y );
|
||||||
fl_scale( abs_w(), h() );
|
fl_scale( abs_w(), h() );
|
||||||
|
|
||||||
draw_marker( color() );
|
Fl_Color c = selected() ? selection_color() : color();
|
||||||
|
|
||||||
|
draw_marker( c );
|
||||||
|
|
||||||
fl_pop_matrix();
|
fl_pop_matrix();
|
||||||
|
|
||||||
/* fl_color( FL_WHITE ); */
|
|
||||||
/* fl_line( x(), y(), x(), y() + h() ); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -247,10 +247,21 @@ Sequence_Region::handle ( int m )
|
||||||
void
|
void
|
||||||
Sequence_Region::draw_box ( void )
|
Sequence_Region::draw_box ( void )
|
||||||
{
|
{
|
||||||
fl_draw_box( box(), line_x(), y(), abs_w(), h(), fl_color_add_alpha( box_color(), 127 ) );
|
Fl_Color c = selected() ? selection_color() : box_color();
|
||||||
|
fl_draw_box( box(), line_x(), y(), abs_w(), h(), fl_color_add_alpha( c, 127 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Sequence_Region::draw ( void )
|
Sequence_Region::draw ( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Sequence_Region::draw_label ( const char *label, Fl_Align align )
|
||||||
|
{
|
||||||
|
fl_color( FL_WHITE );
|
||||||
|
fl_font( FL_HELVETICA_ITALIC, 9 );
|
||||||
|
fl_draw( label, x(), y(), abs_w(), h(), align );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,11 @@ protected:
|
||||||
Sequence_Region ( const Sequence_Region &rhs );
|
Sequence_Region ( const Sequence_Region &rhs );
|
||||||
virtual ~Sequence_Region ( );
|
virtual ~Sequence_Region ( );
|
||||||
|
|
||||||
|
virtual Fl_Align align ( void ) const { return FL_ALIGN_INSIDE | FL_ALIGN_CENTER | FL_ALIGN_WRAP; }
|
||||||
virtual int handle ( int m );
|
virtual int handle ( int m );
|
||||||
virtual void draw_box( void );
|
virtual void draw_box( void );
|
||||||
virtual void draw ( void );
|
virtual void draw ( void );
|
||||||
|
virtual void draw_label ( const char *label, Fl_Align align );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue