Give each sequence type its own default cursor.
Use a cross-hair cursor for control sequences.
This commit is contained in:
parent
013dbe26f9
commit
595100be8e
|
@ -71,6 +71,8 @@ public:
|
||||||
|
|
||||||
LOG_CREATE_FUNC( Audio_Sequence );
|
LOG_CREATE_FUNC( Audio_Sequence );
|
||||||
|
|
||||||
|
Fl_Cursor cursor ( void ) const { return FL_CURSOR_DEFAULT; }
|
||||||
|
|
||||||
Audio_Sequence ( Track *track ) : Sequence( 0, 0, 0, 0, track )
|
Audio_Sequence ( Track *track ) : Sequence( 0, 0, 0, 0, track )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,7 @@ Control_Sequence::handle ( int m )
|
||||||
{
|
{
|
||||||
case FL_ENTER:
|
case FL_ENTER:
|
||||||
_highlighted = true;
|
_highlighted = true;
|
||||||
|
fl_cursor( cursor() );
|
||||||
redraw();
|
redraw();
|
||||||
return 1;
|
return 1;
|
||||||
case FL_LEAVE:
|
case FL_LEAVE:
|
||||||
|
|
|
@ -66,6 +66,8 @@ public:
|
||||||
Control_Sequence ( Track * );
|
Control_Sequence ( Track * );
|
||||||
~Control_Sequence ( );
|
~Control_Sequence ( );
|
||||||
|
|
||||||
|
Fl_Cursor cursor ( void ) const { return FL_CURSOR_CROSS; }
|
||||||
|
|
||||||
// const char *class_name ( void ) { return "Control_Sequence"; }
|
// const char *class_name ( void ) { return "Control_Sequence"; }
|
||||||
|
|
||||||
void draw ( void );
|
void draw ( void );
|
||||||
|
|
|
@ -28,6 +28,8 @@ class Ruler_Sequence : public Sequence
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Fl_Cursor cursor ( void ) const { return FL_CURSOR_INSERT; }
|
||||||
|
|
||||||
Ruler_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H )
|
Ruler_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H )
|
||||||
{
|
{
|
||||||
// box( FL_UP_BOX );
|
// box( FL_UP_BOX );
|
||||||
|
|
|
@ -257,6 +257,8 @@ Sequence::handle ( int m )
|
||||||
case FL_FOCUS:
|
case FL_FOCUS:
|
||||||
case FL_UNFOCUS:
|
case FL_UNFOCUS:
|
||||||
case FL_LEAVE:
|
case FL_LEAVE:
|
||||||
|
fl_cursor( FL_CURSOR_DEFAULT );
|
||||||
|
return 1;
|
||||||
case FL_DND_DRAG:
|
case FL_DND_DRAG:
|
||||||
return 1;
|
return 1;
|
||||||
case FL_ENTER:
|
case FL_ENTER:
|
||||||
|
@ -274,6 +276,10 @@ Sequence::handle ( int m )
|
||||||
else
|
else
|
||||||
fl_cursor( (Fl_Cursor)1 );
|
fl_cursor( (Fl_Cursor)1 );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
fl_cursor( cursor() );
|
||||||
|
|
||||||
|
return 1;
|
||||||
case FL_DND_ENTER:
|
case FL_DND_ENTER:
|
||||||
case FL_DND_LEAVE:
|
case FL_DND_LEAVE:
|
||||||
case FL_DND_RELEASE:
|
case FL_DND_RELEASE:
|
||||||
|
|
|
@ -96,6 +96,9 @@ public:
|
||||||
|
|
||||||
virtual ~Sequence ( );
|
virtual ~Sequence ( );
|
||||||
|
|
||||||
|
/* override this to provide cursor */
|
||||||
|
virtual Fl_Cursor cursor ( void ) const = 0;
|
||||||
|
|
||||||
nframes_t x_to_offset ( int X );
|
nframes_t x_to_offset ( int X );
|
||||||
|
|
||||||
const char * name ( void ) const { return _name; }
|
const char * name ( void ) const { return _name; }
|
||||||
|
|
|
@ -151,7 +151,7 @@ Sequence_Widget::handle ( int m )
|
||||||
fl_cursor( FL_CURSOR_HAND );
|
fl_cursor( FL_CURSOR_HAND );
|
||||||
return 1;
|
return 1;
|
||||||
case FL_LEAVE:
|
case FL_LEAVE:
|
||||||
fl_cursor( FL_CURSOR_DEFAULT );
|
fl_cursor( _track->cursor() );
|
||||||
return 1;
|
return 1;
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
{
|
{
|
||||||
|
@ -203,6 +203,7 @@ Sequence_Widget::handle ( int m )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_r->offset = 0;
|
_r->offset = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( X >= _track->x() + _track->w() ||
|
if ( X >= _track->x() + _track->w() ||
|
||||||
|
|
|
@ -29,6 +29,8 @@ class Tempo_Sequence : public Sequence
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Fl_Cursor cursor ( void ) const { return FL_CURSOR_DEFAULT; }
|
||||||
|
|
||||||
Tempo_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H )
|
Tempo_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H )
|
||||||
{
|
{
|
||||||
// box( FL_DOWN_BOX );
|
// box( FL_DOWN_BOX );
|
||||||
|
|
|
@ -30,6 +30,8 @@ class Time_Sequence : public Sequence
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Fl_Cursor cursor ( void ) const { return FL_CURSOR_DEFAULT; }
|
||||||
|
|
||||||
Time_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H )
|
Time_Sequence ( int X, int Y, int W, int H ) : Sequence ( X, Y, W, H )
|
||||||
{
|
{
|
||||||
// box( FL_UP_BOX );
|
// box( FL_UP_BOX );
|
||||||
|
|
Loading…
Reference in New Issue